Im sorry if im posting this thread in the wrong place this is my first post and you can tell i am a noob (obviously). I reccently bought a 4 relay module so I can create a light switch to turn off 110v light bulbs.
I have no Idea how to use it and I dont know where things go (example: wires resistors etc.). I looked all over the internet and found wrong versions and junk >:( . If you have any links that would be great! Please no rude comments or insults.
From a brief glance at the board, it look slike the low voltage side of the board is the pins on the lower right.
GND - Self Explanatory, this is the ground for the board.
IN 1-4 - I assume these are the relay triggers. another assumption would be that a logic high (+5v) will change the state of the relay.
VCC - Not sure why this is on the board.
K 1-4 - These are the high-voltage terminals of the relays. Each relay has an N.C. (normally closed) and N.O. (normally open) contact. This means that when unpowered, each relay has one set of conducting contacts, and one set of open contacts. when you power the relay, those contacts change state. I would hope that the diagram above the terminals appropriately describes which terminal is N.C. and N.O. It looks like the centre terminal is live, the right terminal is N.O., and the left terminal is N.C.
I've used this board recently, its quite simple. When using an Arduino Uno, you can power the relay board all from the same Arduino without the need of a separate power supply. Just hook up the INX pins (X being a number from 1 to 4) to any of the output pins on your Arduino, then use the code to do something like this
danielchow:
I've used this board recently, its quite simple. When using an Arduino Uno, you can power the relay board all from the same Arduino without the need of a separate power supply.
That way has no opto isolation. Dangerous is you use the board for mains power.
Leo..
If you are new, the very first thing I would recommend you to consider before plugging anything into anything, is to have a separate 5VDC power source.
This can be anything like a spare USB phone/device wall wart charger, 4 AA batteries in series, or a switch mode power supply.
This supply will power the coils of the relays. Each relay will need about 90-100mA of current to energize the coil. An Arduino can't do that for multiple relays.
What the Arduino does with the IO pins going to IN1, IN2, etc is only sending a low current 5V signal to tell each respective relay to energize the coil (with energy being drawn for this from the aforementioned 5VDC power source).
This signal from the IO pin needs to ground back to the Arduino, so don't forget to connect the grounds of the power supply, the relay board, and the Arduino together.
This signal from the IO pin needs to ground back to the Arduino, so don't forget to connect the grounds of the power supply, the relay board, and the Arduino together.
Ground to the Arduino isn't needed ... it would only disable the opto isolation and serve no other purpose.
EDIT: Check the LED side of the control circuit in LarryD's diagram.
Rambinayrb6:
There is no code here for 4 channel relay board. Which code is use please reply
You just need to make an Arduino digital pin go high or low. The board shown (from 2.5 years ago ) is active low- low on the Arduino pin energises the relay.
You can just use Blink or BlinkWithOutDelay to test.
Note that because it is active LOW, you must digitalWrite each Arduino output to HIGH in setup() before you pinMode it to OUTPUT, otherwise the relays briefly click on as it starts up.