After reading so many different topics on how to wire relay boards I am still puzzled.
My setup as per the attached diagram is that I use an arduino mega and am using multiple relay boards. I have a setup with 16 channel relay boards and 8 channel relay boards.
The relays are setup with external (5v) power.
My understanding of reading on the www is that from a 16 channel relay board the ground needs to be redirected back to the arduino.
For the 8 channel relay board I am reading that the vcc should be redirected to the arduino.
Can somebody explain me the difference in this wiring (orange boxes) between the 8channel and 16 channel board?
To be clear, i did not include the pin wiring or the external power to the arduino, that is in my opinion not relevant to my question.
Now, the 16-ch depends on the optocoupler used there.
There are 3 options, either:
1 5V- LOW pin
2 GND- HIGH pin
3 Bidirectional, choose one
You can just simply test, it's safe. But don't connect both 5V and GND.
Likely it's bidirectional, so if you want HIGH trigger connect GND, if you want LOW trigger connect 5V.
Many relay modules provide a removable shunt or jumper (often labeled JD-VCC/VCC) that ties the relay coil supply to the logic supply; removing that shunt lets you power the relay coils from a separate 5V supply while keeping the logic side powered from the Arduino
Many modules use optocouplers or optotransistors on the input to provide electrical separation between the Arduino and the relay coils.
If the board has true optocoupler isolation and you remove the JD-VCC jumper, the coil side and the LED/input side are electrically separate.
In that configuration you must still provide a reference for the input signals; typically you still connect the module VCC to the Arduino 5V and connect the Arduino GND to the module GND so the input LED has a return path.
If you want galvanic isolation so that the Arduino ground is not shared with the coil supply, ensure the board’s opto LED side (VCC/GND) is powered only from the Arduino and the coil side (JD-VCC) is powered from the external supply with no common ground between the coil supply and Arduino, but confirm the module’s schematic first because some boards wire the input return to coil ground internally and therefore require a common ground even with optos fitted.
So honestly I am not sure if LOW or HIGH is used.
I am using the EX‑CommandStation on my arduino’s to control the relays. According to the arduino code and documentation this is by default a HIGH.
But would there be a way to measure this on the relay board?
I cannot swap the code as the project used is not maintained by myself. But as said according to documentation it should be by default a HIGH (The default is to set ACTIVE pins HIGH and INACTIVE pins LOW)
the measuring is not entirely clear to me but I’ll give it a go
Yes it is 5v. the diagram did not have an actual picture.
Below is one of the 16 channel boards I have, in this picture not connected via external power yet.
Don't connect both the 5V and GND.
Also, depending on the resistors in series with opto (which I don't know), 32 optos might draw more than recommended total of all arduino pins. Not likely, but possible.
16-channel relay boards are evil. They have a design fault.
The user can't select opto isolation (there is no jumper, like 8-ch boards have).
They don't require a common ground, because the inputs are low level trigger.
A common ground also powers the Arduino.
Which part of the Arduino is overheating?
The relay inputs should only sink 2mA each.
Maybe use one board with common ground and the other one not.
The picture (post#10) shows a version of the board without buck converter parts fitted.
What voltage have the relays printed on them.
Leo..