Connect with us

How to control 12vdc relay with microcontroller!

Discussion in 'Microcontrollers, Programming and IoT' started by lockoutseniorproject, Mar 19, 2012.

Scroll to continue with content
  1. lockoutseniorproject

    lockoutseniorproject

    2
    0
    Mar 19, 2012
    Microcontroller - arduino uno http://www.sparkfun.com/products/10356

    Relay - simple 12vdc spdt relay

    I was wondering if the microcontroller outputs enough voltage to control this relay, and how i would go about making these components work together - thank you!
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,411
    2,779
    Jan 21, 2010
    No, you will need to use the arduino's output to drive a transistor and use that to switch the relay current. You will also need a diode across the relay contacts to protect the transistor.

    This lays it out really well.
     
  3. lockoutseniorproject

    lockoutseniorproject

    2
    0
    Mar 19, 2012
    where would we attach the external power supply in your diagram? also would a 3906 transistor suffice.
     
  4. GreenGiant

    GreenGiant

    841
    6
    Feb 9, 2012
    The external power would connect to Relay Power V+

    That transistor would work, but be cautious it is only rated for up to 300mA so without a current limiting resistor you run the risk of burning it out
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-