Im trying to power on a 12 relay from the arduino uno. 3 wires coming from the board 5V GRN and the trigger wire which is 5V.
Basically im trying to trigger the 12v relay module to turn on and off for a specified time. I know im going to need a 12 supply to get the relay module to operate because the voltage from the trigger is too low. I just dont know how to wire it up.
I uploaded an image of where im stuck at hopefully you guy can help
I would try the relay board set to a low trigger, so an Arduino pin set low will trigger the relay, with the ground from the 12V also going to the Arduino. (So like the bottom pic, but with the board jumpered for low, and a common ground.)
But then I'm not sure (and someone will correct me if I'm wrong) if the Arduino's 5V high will be high enough to release the relay, perhaps being seen as a low still by the 12V relay board. That might be nonsense; pure speculation in my part.
It looks as if that relay module is intended to be triggered with a 12v signal but without seeing the datasheet it is impossible to be certain.
Similar modules are available that can be triggered with the Arduino's 5v signal.
If you want to use that module and if it does require 12v then you will need to use the Arduino to trigger a transistor to switch the 12v signal for the relay.
The relay module does in fact need 12V to trigger it I tested it myself 5v will not do. The only thing I'm not familiar with is how to set up the transistor. I know the the trigger from arduino will go from to a resistor then to the transistor middle pin or the base then after that I'm not sure what goes where. The transistor im trying to use is SS8050 - NPN Epitaxial Silicon Transistor
Ok so I do have a 5v relay module but its not rated for what im using it for. Im trying to turn on and off a load that is carrying at least 7amps and this 12v reay module is rated for 30v 10A
I bought the module off ebay if theres specs it would be there
Hi,
Can you tell us how you have set the jumpers on the relay board.
What we are trying to tell you is, if you look at post #1, there is a config for LOW trigger, this should enable 5V control.
We are not talking about the relay switching capacity, we are talking about the relay CONTROL circuitry.
Please go back the the start of this threat and carefully read what has been suggested.
Have you got the gnd of the Arduino connected to the gnd of the relay module as well as the 12V supply?
Looking at the specs of the relay module and the photos in the ebay posting, there is R2 in series with the opto-isolator that is used to trigger the relay. My guess is that this resistor is set to turn on the photo-diode of the opto-isolator at 12V, or somewhere above 5V. You should be able to reduce the value of this resistor (either replace it with a lower value, or add another resistor in parallel) and get the photo-diode to turn on below 5V. You just need to size R2 to not blow the photo-diode and the LED. I would suggest you measure the resistance of R2, and just solder another resistor of the same value across R2 (halving the total resistance). This should allow you to trigger the relay with the 5V I/O on the Arduino.
You can see the R2 is just limiting the current through the photo-diode and LED, so that 12V doesn't blow them up. Reducing the resistance of R2 will allow more current with a 5V I/O pin driving it.
Hopfully this will help in seeing what im doing wrong. If I leave the same setup and switch the trigger to low voltage it triggers the relay on but wont turn off it just stays on.
KC1135:
If I leave the same setup and switch the trigger to low voltage it triggers the relay on but wont turn off it just stays on.
And that makes sense I think now, looking at the circuit.
@tnjyoung, the problem is not that he can't trigger the relay, it's that he can't turn it off with it set to trigger on a low. (There is never 5V on the led anode, it's always 12V. The other end is either 0v or 5V.)
Here's what's happening, with the module set to trigger low:
There's 12V on the optoisolator anode.
With the Arduino i/o pin on low (to energise relay), there's 0V on the led cathode. (In fact there are 2 leds in series, ones an indicator, the 0V is on the latter's cathode.) (As tnjyoung points out the resistor is chosen by maker for 12V across resisitor and leds.) Optoisolator's led comes on, relay triggers.
With the Arduinp i/o pin on high (to de-energise relay) there's still 12V on the anode, but but now 5V on the cathode. So there's still 7V across the resistor and 2 leds. That is presumably enough to keep the optioisolator illuminated and the opto doesn't go off.
But there's a wrinkle in my thinking there: if 12-5 ie 7V keeps the opto on when the module is set to trigger low, it should just as readily turn it on when set to trigger high. So that's a bit odd?
OP can you draw your circuit please? I can't make it out in the photo, especially the red text on the mottled surface. In particular I can't see if there's a ground between the 12V/relay and the Arduino.