-->
Page 2 of 12

Re: optocoupler as "relay"

PostPosted: Tue Mar 15, 2016 2:17 pm
by martinayotte
Ah ! Ok !
In such case, it should work ...

Re: optocoupler as "relay"

PostPosted: Tue Mar 15, 2016 4:33 pm
by jra
The Sainsmart 2/4/8 channel relays http://www.sainsmart.com/sainsmart-rela ... ry-pi.html are opto-isolated and can be driven directly from 3v3 logic, see the following for details:

https://forum.pjrc.com/threads/26403-re ... elp-needed
https://arduino-info.wikispaces.com/ArduinoPower

Remove the VCC JD-VCC jumper so you can connect VCC to your 3v3 logic supply and JD-VCC to your 5V supply to energize the relay coils. Sainsmart also has a 16-channel board with 12V relays if that simplifies your design, don't know if they have a 12V version with fewer relays. Or buy a clone, lots of those available on the usual sites but not all are opto-isolated .

Re: optocoupler as "relay"

PostPosted: Tue Mar 15, 2016 4:45 pm
by Trent
Super cool. I have an 8 channel one of those left over. I didn't know it would do 3v3.

Re: optocoupler as "relay"

PostPosted: Tue Mar 15, 2016 5:30 pm
by Trent
OK, I tested my relay module using a standard dual rail breadboard power supply. I wired 5v to jd-vcc and ground to ground, 3.3v to vcc and grounded a relay terminal. The relay switched as expected. I measured amperage and see 40ma. I thought esp (huzzah datasheet) is limited to 12ma on gpio. Won't this burn out the huzzah?

Does sinking vs sourcing make a difference in power handling?