I have several of these 12v and 24v relays from Amazon.
ANMBEST Relay Module with Optocoupler High/Low Level Trigger for Arduino (24V Relay 2 Channel)
They all act the same. I have 12v going to COM1. I have the 5v from the arduino going to D+ and the arduino ground going to D- and my output pin to IN1.
When I write HIGH output to IN1 in my code, the red light comes on, when I send LOW to that pin it goes off. But the relay never sends the 12v through the relay, the circuit side always remains open.
I have tried the jumper on high and low trigger, it reverses when the red light comes on and off, but the 12v circuit is never connected.
My actual voltage with my meter on the D+ from the arduino and on my pin output when HIGH pushed to it is 4.74 volts.
So the default closed circuit is always closed, and the default open circuit is always open. Since I see the red light change when I trigger it, it appears I am properly communicating to the relay. So what am I doing wrong? I have read other posts but could not determine my problem from them,
Hard to read, especially when upside down. But your relays appear the REQUIRE 24 volts on the coil for the relay to operate. You did not mention using 24 volt relays or relay modules.
Paul
I have tried with the 12v one and the 24volts one. I will go back and retest with the 12v one again. So they have to have 12v on the coil side? I was planning on one to connect a ground through the arduino code, so that will not work. I was hoping the would just complete the circuit so I could use one to open and close a ground wire in the ignition system. I have a 24v magnet I need the 24v one for, and several 12v circuits. Do you know what I could use to open and close a ground wire?
you cant use arduino to power a 12v or 24v relay directly. you need to interface it with a transistor, the signal from your arduino will go to the base of the transistor. or just buy a 5v relay instead.
Here us my 12v one, same issue.
Red Wire -> 5 v from Arduino to D+
Black Wire -> Ground from Arduino to D- (Green light on relay comes on)
Green Wire -> S1 to pin 8 on Arduino. I write to it with this pin with digitalWrite(8, HIGH);
White Wire -> COM1 to + side of 12 volt battery
Yellow Wire -> NO1 to plus side of multi meter
Negative side of multi miter to negative side of battery.
The red light on the relay board responds to changing pin8 from high to low. Green wire goes from 0v to 5v (4.74) so the arduino is working and sending 5v when I toggle it.
The volt meter remains on 0, NO1 is the default open and when 5 volts is applied to S1 the circuit is suppose to close I thought.
If I move the Yellow wire to NC1 that is a default of closed, then the volt meters stays a 12.4 volts, so it never opens and drops it to 0.
The jumper in the picture is for high input but I tried on low also.
OK I finally see what you are saying, these require 12 or 24 v to flip the relay, and the relay can handle a lot more current. So I need them one that triggers on 5v. So they sold me the wrong stuff, these are not for Arduino because it will never output more then 5 v. Thanks for beating this into my head.
The relay coils need this supply to be able to energize.
You can use an inexpensive transistor/opto isolator between the Arduino and the module to get the module to work.
When you have a 5v module we still do not recommend you use the Arduino 5v power supply to energize the relay coil.
But please we need to see the link to the relay module.
There is the possibility you can use an Arduino to control the optocoupler and 12/24v to energize the coil.
I do not have a link to any schematics or details, and for $8 I can have some 5v ones here tomorrow. Do not plan to make it more complicated, call these other ones a $13 learning experience.
Firstly, an Arduino does not "power" anything in any case.
This module - as with all relay "modules" contains the transistor for controlling the relay. It also contains an optocoupler. If you find a power supply to match the coil voltage, you can most certainly use it with an Arduino in either of two different ways, thought there are a few tricks to the connections.
Perhaps you should not interject if you do not understand the problem.
His answer with the other ones were helpful and helped me solve my problem. I assumed the 12v or 24v was the load side, not the trigger side. I got my 5v TRIGGER relays and it works great. I think he fully understood the problem but did not dumb it down enough for me to realize it right away.