Author Options:

How do you use this relay module? Answered

Has anyone used a 16 Channel 12V Relay Module Interface Board For Arduino PIC ARM DSP PLC? I want to use it to control some solenoids but I have no idea how to do so, I'm looking for a schematic and a code example. I'm a total programming noob. I want to connect it to an arduino duemilanove. 





2 years ago

HI There~

Such a great information!

I am wondering if I can apply the 16 relay module to reset my computer or not?

Please help me!


3 years ago

in order to make this work with the arduino uno; what would be the code used?

also looking for the code for a 2 channel ; 1 channel; AND 8 channel relay

trying to build a garden bot and thought this would be the best way... also how to wire on the arduino


3 years ago

corrections to previous typo error.. it's 250Vac and not 25Vac. Actually, check the relay ratings, in this module, the relay contacts rating is: 250VAC, 10A and 30VDC, 10A


3 years ago

This board is great in any applications, it all depends to what you want to control whether a light bulb, solenoid, a

appliances or anything as long as the load voltage is not more that 25Vac and amperage will not exceed 60% rating of the relay contacts (for longer life). All you need is a 12Vdc power supply that could provide enough current to all 16 relays when all of them activates simultaneously. Many got confused on how to wire this module for applications other than arduino. Here's how to do it:

1. Connect the 12Vdc wires to the two (2) blue terminals (located in between the capacitor and the 16 pin inputs) - the negative to left side marked GND on the board and the positive 12V to the right side beside the capacitor.

2. Connect your +5Vdc to the left side of the 16 pin (marked 5V on board).

3. The negative side goes to the right side of 16 pin input marked GND on the board.

4. In digital electronics, we have a floating zero logic, which means an input of zero volts is needed to activate the circuit. This is the principle being use in this module. So, interconnect all individual 16 outside sensors/switches (not part of this module) to the negative (GND). The other terminal/wire of the switch goes to the individual 16 pin input of the module. In short, you only need to switched the GND and connect it to the 16 pin input of the module.

5. Finally, you may connect your loads to each NO/NC contacts of the relay, whichever you desired.

I hope this helps.


7 years ago

That is a board with 16 relays that have coils that activate at 12V. There is a 12V regulator on the board so you can have more then 12V feeding into the screw terminals on the front of the board. The pictures on ebay do a pretty good job of showing what the board has but its still unclear what the 2x 18 pin chips are. But i think it would be safe to assume those are shift registers of some kind.

So you will want to connect an outside power source to the screw terminal sitting on the front of the board all by itself. Since the pins on the front are labeled with 5V and ground i'd say go ahead and connect those to the ground and 5V of the Arduino. Either way you will want the ground of the board connected to the Arduino. As for where the other pins will go on the board you won't know unless it comes with some paperwork. Or you will need to look up the data sheet for the chips and figure it out from there. Meaning you'll need to ID each pin of the chips and trace it back to the header.

Check out any information you can about using shift registers with the Arduino and setting up a basic sketch to use them. I'm unfamiliar with using shift registers myself. I ordered 4 of them a couple of years ago but never got around to using or playing with them. Any application i can think of where i need more pins i need them to be input not output. The ones i have are for Shifting out and are great for lighting allot of LEDs or running a bunch of relays like that.

As for the solenoids... You will notice there are 3 terminals coming off each relay. The center terminal is basically your ground. It looks like the right hand terminal is shorted to the center terminal when the coil is not engaged. The left terminal is left open until power is applied to the coil. Then the left is shorted to the middle and the right is left open.

I know thats allot of reading and not giving very much info. But i do hope it helps.


Answer 7 years ago

Thanks so much that was super helpful. Do u think it would interface just like this one http://www.hobbyist.co.nz/?q=interfacing-relay-modules-to-arduino only I guess i would need a mega for all the extra pins


Answer 7 years ago

Agreed about the 12v regulator.
I don't think they are shift registers; I'm guessing they may be latches/inverters of some sort -- why?
no latch, data, clock pins -- just gnd 5v and 16 inputs.

I'd be glad to know what they are also.

and the tiny-8pin smt's...resistor arrays?


7 years ago

The 18 pin chips are ULN2803 - An octal driver chip which switches the relay coils.  The 4 pin devices are opto-couplers to isolate the micro side from the high-current switching going on on the relay board, so it's just a case of applying a LOGIC LOW to the relevant line on the pin header to activate a relay, LOCIC HIGH to turn it off.
Watch out though, the inputs say 15-25mA to operate.    Check the individual and total output current rating of the micro you're using. You may need to drive this through buffered outputs.

HERE is the schematic for the device.