Has anyone driven a small 5Volt relay directly from an Arduino output? Or does the turn off spike kill the pin?

5 Answers

Relevance
  • 2 years ago
    Favourite answer

    It's unlikely to supply enough current to energise the coil. But if it did, you must include a flyback diode as shown in (a) in khalil's diagram. You don't need 2 diodes like in (b).

    Don't wire the relay to a 12V supply like in Kahlil's diagrams. Arduino doesn't use open collector drivers so you'd damage the chip. Instead drive the relay directly from the Arduino output.

  • Anonymous
    10 months ago

    What "pin"? Sounds  more like a solenoid.

    If you refer to Back EMF fr relay, it can damage, Especially at hi current/many turns of wire. Faraday's law and ampere/turns.

    A small reed wont need any protection. Maybe a 1N4001 across the coil, the anode  (striped end) to negative,  cathode to +. I do on every relay or motor I add to my car,  just in case.  Reduces noise in radio, too. 

  • fuzzy
    Lv 7
    2 years ago

    thanks all but got it working fine direct drive (with flyback diode) from 5 Volt rail. Used a reed relay - pulls about 10mA.

  • Anonymous
    2 years ago

    Hi this is when you need a transistor to drive the relay even a bc109 would at least drive a small relay however you will need a diode connected in reverse direction so it protects the transistor across the relay's coil. otherwise when the transistor switches off the back e.m. f. will destroy the transistor with a reverse high voltage spike.

  • What do you think of the answers? You can sign in to give your opinion on the answer.
  • khalil
    Lv 7
    2 years ago

    if the output cannot provide enough current for the relay, we may use a driver ( usually a common emitter transistor )..

    yes ... we should use a damper diode to clip the spike ..D1 in fig. (a)

    Attachment image
Still have questions? Get answers by asking now.