1

really noob question..

I am thinking of using a 12v power source and a 5v power source as an external power supply for my 5v relay (and some other stuff that I might add up to my project that will need 5V) and the 12v is for my 12V solenoids. Is it right to connect all ground wires to the ground of the Arduino? I am really sorry that I have to ask this question cause all tutorials I see online are only connecting one external power supply to their Arduino.

Any form of correction is highly appreciated. Thank you so much

2
  • First make sure the voltages are stable enough even under any and all expected changes in current load - solenoids take quite a bit of juice and have interesting magnetic field effects. No sense subjecting your arduino to potential overvoltage in AC from an accidentally bucking inductor.
    – Abel
    Nov 10, 2020 at 2:17
  • 1
    Yes, in general all grounds need to be connected
    – Sim Son
    Nov 10, 2020 at 9:57

1 Answer 1

1

Besides connecting all the grounds, a "good idea" whenever working with solenoids or magnetic (as opposed to solid state) relays is to add protection against inductive kickback, which can create really high voltages (hundreds of volts) when the current through an inductor changes suddenly. (The voltage is the product of the inductance and the rate-of-change of the current.) The protection is simple: Put a rectifier diode across each coil, with the arrow pointing to positive (reverse-biased). The rectifier has to handle a big spike of current as well as the high voltage, so use something like 1N4004. This protection will reduce the likelihood of spikes causing mysterious state changes in your circuits.

3
  • Hi, correct me, but a snubber diode is like a safety precaution to avoid frying your relays right? so it should work for DC Motors too cause its an inductive load right? thanks Apr 23, 2021 at 12:11
  • 1
    Correct. Google for "snubber diode on DC motor"
    – Boggyman
    Apr 24, 2021 at 12:15
  • thanks a lot! I wish you a happy day :) Apr 25, 2021 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.