So I wanted to play around with relays and clearly got it wrong even before I got started. I wanted to control a 12 Volt fan - thinking that it would have a capacity of 12 V to control.. But now I know that it takes 12 V input and can control upto 250VAC...
I have ordered some new 5 Volt relays, but want to know how I can use the 12V relay with an arduino _____________? (bear in mind that I'm a newbie)
This is the relay module I bought:
UPDATE
Thank you all so much for finding your time to help me out, I really appreciate it! First now I found the time to try out your suggestion.
@jippie comment:
..(or Vin on Arduino if you are feeding it from a 12V supply)
got me think about what I really wanted. I wanted to use the 12V power supply to also feed the arduino (hehe..) - but posting the question I needed to know the anwser to whether an "under"-powered arduino could control a 12V relay.
But first validate that the relay is actually working! So found a 12 V adapter and connected it to a breadboard.
Then connected it to the relay by NC and COM
Compiled the Blink code example and hooked it up using Vin, GND and D13
I then hooked my Arduino to a 9V battery and tried the 5V output
Unfortunately this did not work..
@Madmanguruman and @Kurt thank you both for your answers - I'm just too newbie to figure out all the things you were talking about.
UPDATE 2
Forgot one more possible combination
This kinda brings me down to these options with my relay:
- Control something that requires more than 12 Volts, but power the arduino with 12 Volts
- Use it to control DC gear motors without using and H-bridge and diode (kinda expensive)
- Use the NC (Normally Closed) and NO (Normally Open) logic to do something neat
All this got me thinking.. If I need to power my Arduino with 12 Volts to control a 12 Volts device - why don't I just connect my device directly to my Arduino ____?
As mentioned many times: I'm a newbie and just want to learn electronics mostly by Learning-by-doing - but without putting myself at risk and breaking things (like my Arduino)
But why would this not work:
simulate this circuit – Schematic created using CircuitLab
EDIT:
Controlling 12v DC motorfan with arduino
Firstly, even if a motor or pump or fan (anything with coils inside) is 3V or 5V, do NOT power it directly from the Arduino pins as the Arduino pins can only supply a maximum of 40mA. As per my previous article on Arduino pins, they are not designed to drive a DC motor or coils.
UPDATE 3
Using 9V and Vin also worked :)
So guess the answer is:
- Yes, but I have to use >= 9V (perhaps lower, but not 5V) and the Vin.