optocoupler as "relay"
Posted: Tue Mar 15, 2016 10:14 am
I have an irrigation controller that you must short two terminals together for rain bypass. Historically I have used a 120v relay that is plugged into a controlled outlet. I'm building an esp8266 (adafruit hazzah) unit for other purposes nearby and would like to ditch the 120v relay as the outlet is somewhat unreliable due to distance from rest of house.
The huzzah obviously has 3v gpio and most relays are 5v. I was thinking of using an optocoupler as a sort of relay. Would an optocoupler with forward current of say 5ma be an acceptable way to do this or should I build out a transistor controlled relay. Something like this: http://www.mouser.com/ProductDetail/Sharp-Microelectronics/PC817X1NSZ0F/?qs=sGAEpiMZZMteimceiIVCBwW0eeEZ4eD118K0CibgR7c%3d
The huzzah obviously has 3v gpio and most relays are 5v. I was thinking of using an optocoupler as a sort of relay. Would an optocoupler with forward current of say 5ma be an acceptable way to do this or should I build out a transistor controlled relay. Something like this: http://www.mouser.com/ProductDetail/Sharp-Microelectronics/PC817X1NSZ0F/?qs=sGAEpiMZZMteimceiIVCBwW0eeEZ4eD118K0CibgR7c%3d