preso.cratico
Hello everyone, I am conducting tests to see how an 8-relay module JQC3F-05VDC-C works. As you can see in the ladder logic (LD) programming, I have a physical input, in my case, a start button (which, to avoid connecting external resistors, I modified the CPP file to make it a pull-up input). The sequence is very simple: I want that when the button is pressed, the first output (relay 1) turns on, after 5 seconds, the first one turns off and the second one turns on, and the same with the third one. When I simulate it in the simulation section, it works perfectly. The problem arises when I wire everything physically. The 3 output pins are connected to the respective IN of each relay. GND to Arduino and VCC to the 5V output of Arduino. When I power the circuit without pressing the start button, the LEDs of the relays are on. They should be off until the sequence starts. I don't know how to solve this problem.
 
E0: works similar to First Scan (initializing HIGH or 1)
 
programacion.jpg
 
In the second photo, I mark the pins and the IN LEDs that are lit without me having started the sequence. The GND pin is connected to a GND on my Arduino, while IN1, IN2, and IN3 are connected to %QX0.0 (pin 7 of Arduino UNO), %QX0.1 (pin 8 of Arduino UNO), and %QX0.2 (pin 12 of Arduino UNO), respectively. Finally, the VCC is connected to one of the 5V outputs of my Arduino UNO.
 
rele.jpg
Reply 0 0
thiagoralves
If you've modified the hardware layer to use pull-up inputs on your inputs, then you must also invert behavior of your button in your logic. In other words, button not pressed = high, button pressed = low. Also, it is possible that your relay board inputs are active low, i.e., the relays are turned on with GND.
Reply 0 0
preso.cratico
If you've modified the hardware layer to use pull-up inputs on your inputs, then you must also invert behavior of your button in your logic. In other words, button not pressed = high, button pressed = low. Also, it is possible that your relay board inputs are active low, i.e., the relays are turned on with GND.
As you can see in the PM programming, that's how I refer to my start button. I know that the logic needs to be inverted if the CPP file is modified, which is why I use the negated contact, but I still can't figure out the issue.
What could be causing the possibility of them being activated through GND?
Reply 0 0
fg71
The inputs for this module are active low, meaning that the relay is activated when the signal on the input header is low. This is because the indicator LED and the input of the optocoupler are connected in series to the VCC pin on one end, so the other end must be connected to the ground to enable the current flow. The optocouplers used here are the PCF817, which is a common optocoupler and can also be found in through-hole packaging.
 
[203128%2F9222107%2Fmceclip0]
Reply 0 0
preso.cratico
The inputs for this module are active low, meaning that the relay is activated when the signal on the input header is low. This is because the indicator LED and the input of the optocoupler are connected in series to the VCC pin on one end, so the other end must be connected to the ground to enable the current flow. The optocouplers used here are the PCF817, which is a common optocoupler and can also be found in through-hole packaging.
 
[203128%2F9222107%2Fmceclip0]
Maybe you could help me if I show you my configuration with this photo.
I don't understand why the IN (input Signal) is connected when the signal It is supposed to be low. Only when I push the button then It must start the sequence PXL_20250304_173429355.jpg
Reply 0 0
preso.cratico
Maybe you could help me if I show you my configuration with this photo.
I don't understand why the IN (input Signal) is connected when the signal It is supposed to be low. Only when I push the button then It must start the sequence PXL_20250304_173429355.jpg
I've seen on an Arduino Forum that maybe this could solve inverting the logic of the outputs. I've just tried right now and It works. I'll show you the only change that i made on the ladder code.
[203128%2F9223531%2Fmceclip0]
Reply 0 0
thiagoralves
If you've modified the hardware layer to use pull-up inputs on your inputs, then you must also invert behavior of your button in your logic. In other words, button not pressed = high, button pressed = low. Also, it is possible that your relay board inputs are active low, i.e., the relays are turned on with GND.
That's exactly what I've been trying to tell you since the beginning 😅
Reply 1 0
fg71
You could also do Normal Open (NO) contact E1 and NOT KA0 coil, meaning when you press the button E1 your KA0 will be active.
 
Or
 
You could use HIGH input and your E1 connected to XOR and output connected to your KA0 coil. In other words HIGH and E1 is active and
XOR output become FALSE If E1 is LOW, XOR output become True and KA0 coil become TRUE.
Reply 0 0
Reply