I purchased a 5V 8 channel realy to use with Arduino. When the output is low the relays are on. I need to turn the relays on when the output signal is high. Is there a way to make the board respond to a high input and to turn on the relay?
- invert the signal inside the software. This would be my choice.
- put an inverter between the Arduino and the relay board. Take for instance a 74HC540(my original suggestion) or a much more common uln2803 as StevenH suggests. This would be my choice if you really can't change the software.
- change the board itself. Bad choice IMO.
Inverting the logic in your software, like Wouter says, is the zero cost solution. If you don't want that you can change the logic with little hardware.
For a single relay I would use an NPN transistor, but you have 8 relays and then the ULN2803 is a good solution.
It's an array of 8 transistors with base resistors integrated, so you don't need any other components, not even a power supply. Due to the higher saturation voltage of the Darlington transistors your LED current will be a bit lower, but the Darlington on the relay side will fix this. You may also decrease the value of R1, the LED's series resistor.
Inverting the logic on the code is not always a good solution because the relay can be turned on while the device is booting.
Another solution is using these connections:
JD-VCC ----> 5V VCC ----> Digital IO IN ----> GND GND ---—> GND
The digital input can be 3.3V
Unhappily it does not work when we have many relays on the same board sharing the same VCC and GND.
my relay board has 3 terminals for each relay center is the power input and then there is the normally open and closed sides as a safety option i believe the relay is set to open so if some mishap happened the power is off so just switch the output on the relay to the other side and in my mind you fixed the issue