116Views6Replies

Author Options:

Should I use a relay? Answered

Hello, I am trying to control a 9v DC pump with an arduino. I am thinking that I will need to attach a relay to the pump, and control the relay with a transistor from my arduino. Is this correct?

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
steveastrouk
steveastrouk

9 years ago

Yes. Make sure you put a diode across the relay coil, tie the diode's cathode (the end with the marking) to the most positive side of the supply, and tie the anode to the top of the transistor/connection to the relay.

steve

0
KarateLover21
KarateLover21

Answer 9 years ago

the diode is to make sure that no power goes back into the arduino?

0
frollard
frollard

Answer 9 years ago

+1

0
dog digger
dog digger

9 years ago

You could use a mosfet. Make sure you use a diode on terminals

0
kenyer
kenyer

9 years ago

check this for nice schematics:

http://www.oomlout.com/a/products/ardx/circ-11

It helped me to understand relays.

0
steveastrouk
steveastrouk

9 years ago

The diode stops a very high voltage that will be generated in the relay coil when its switched off from damaging the Arduino.

Steve