2
\$\begingroup\$

I just discovered a Sainsmart 4-Channel 5V Relay Module for PIC ARM AVR DSP Arduino MSP430 TTL Logic, I don't know how to make links, so I copy the URL here. http://www.sainsmart.com/arduino-pro-mini.html .Maybe the moderator can edit it a little bit. And I have a question. I'm in need of an array of isolation relays for a project, and wonder if I can use this device by simply providing a +5v VCC and contact closures between GND and INx.

Thanks for your help a lot.

\$\endgroup\$
2
\$\begingroup\$

Per the specifications at the meb page linked in the question, the control input is a simple series curcuit: VCC is connected to a resistor (limits the current through the remainder of the series) which is connected in sereies with an optoisolator diode, which, in turn, is connected in series with a LED indicator. The optoisolator, (and consequently, the relay) and the LED will be turned on if 5V (more or less) is applied between VCC and INx.

So, yes, the device may be controlled by contact closures between INx and ground as you indicated. Alternately, the INx terminal could be connected to an open-collector or open-drain driver circuit to allow for uC control.

A coulple of things to keep in mind:

  • the circuit driving the INx must be able to handle (sink) 20mA, per the device description.

  • if you want to isolate the relay coil drive voltage from the optocoupler VCC, you will need to drive the node labelled JD-VCC with another 5V supply, connected between JD-VCC and ground. (In this case, the first 5V supply would connect to VCC only - this supply's ground would not be connected to the relay board. When the contact connected to the INx pin is closed, a return path will be formed through the INx pin.)

\$\endgroup\$
1
  • \$\begingroup\$ You and Steven were giving me so much information. Thank you. It will takes a while to understand all of it. But it is useful. It worthes the effort. \$\endgroup\$ – user10768 Jul 11 '12 at 3:05
4
\$\begingroup\$

That's the way it works. The schematic doesn't say which value the series resistor is, but on the website it says it says the current is between 15 and 20 mA, that's what most microcontrollers just can sink, if you would like to use that. If you want to use a switch then there's no problem.

enter image description here

The schematic also shows a second power supply (JD-VCC) for driving the relays. It doesn't say so expressly, but since it's called a 5 V module, I presume that also needs 5 V. You can use the same supply for both then.

This is really a silly circuit, though. The optocoupler is not necessary at all since the relay already provides isolation (though only 1500 V).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.