Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Arduino Relay Driver

Loading...

Sign in or sign up now!
12,536
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 26, 2009

I'm describing the Arduino relay driver I made to control my doorbell.

I read a great article from Maurice's Hobby Robotics site: http://www.glacialwanderer.com/hobbyrobotics/?p=9

and the schematic I used is here: http://www.arduino.cc/playground/uploads/Learning/relays.pdf

View the code at: http://www.amazingknife.com/tag/doorbellcode
Be really careful around high voltage! Stay away from water, wear rubber soled shoes, don't touch wires that make you part of the circuit, and don't do any other unsafe activities!

  • likes, 4 dislikes

Link to this comment:

Share to:

Uploader Comments (RuthJ180)

  • Great vid and detailed explaination (not to mention the high video quality) ☺

    Thank You for uploading it!

    I gather from this video and others that using an external power source would be in my best interest to drive my relays/servos/DC motors (inductive loads),... just to be on the safe side when the mA`s are in question.

  • @TheTubejunky, Glad you liked the video! I usually power the circuit on my breadboard with the 5V and Gnd in the Power header on the Arduino. There are a lot of options when it comes to powering your components. You could use a variable power supply, a batter pack, or a voltage converter with the right adapter so you can use power from a wall receptacle. Make sure you follow the schematic that is in the video notes. The diode is what will protect your power supply.

  • That makes sense. I have just ordered a arduino mega and a 4 relay board for a differential temp/pump controller system. Did you have any problems with the relay needing to many Many mA. I think the arduion puts out about 40mA and the relays I need consume about 72. Do I wire up 2 output pins at once? Thanks in advance.

  • @aaronandnicole, I used relay with part number OJE-SH-105DM. It could handle up to 5 Amps at 240V AC. The data sheet for it says: Rated Coil Voltage = 5 VDC, Nominal Current = 91 mA, Must Operate Voltage = 3.5 VDC. I was able to use it with the Arduino. I don't think you can add current by having more than one output pin. I think you may need an external power source. The place you bought the relay board from may be able to anwser the question better. I'm always learning more about relays.

  • question, why does everyone use arduino pin 3?

  • @aaronandnicole, I always take some sample code from the Arduino software and modify it. So I guess it always uses pin 3. According to the Arduino documentation: Each of the 14 digital pins on the Duemilanove can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. Some pins have specialized functions also, check out the Arduino web site and choose the "Hardware" link. YouTube isn't letting me post the URL.

see all

All Comments (18)

Sign In or Sign Up now to post a comment!
  • @aaronandnicole i am starting a new blog and my first post was a 4 channel relay driver check out at oscircuit blogspot. with pcb design and wathever

  • @Froggy19510 Thanks for checking out the video and thanks for the info. I read that it was there to protect against any surges but I didn't know exactly how they could happen.

  • Very good video. FYI there is always high voltage across the power leads on the relay when it releases. It acts like a solenoid and produces high voltage spikes . That is the reason for the diode.8)

  • i lke it....

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more