Re: Help me build my IoT enabled water heater with an ESP826
Posted: Wed Mar 21, 2018 3:00 pm
I ordered some a few optocouplers from ebay https://www.ebay.com/itm/381374644110 I hope this model will do the trick.
Looks easy to implement, I have three questions though.
Should I pay close attention to the polarities when it comes to connecting the circuit to the optocoupler? I'm not sure if I can read this schematic the right way, but what I'm gonna do is put 3 volts for the GPIO2 for a really short period of time, and I should treat the "LED side" of the optocoupler just like I do with any other regular LED, right? Like putting a 330 ohm resistor in front of it. Kinda looks that the LED's schematic arrow is not pointing the right way, is that possible?
On the other hand, does the polarity matter on the collector side?
The third one is, once I build this "bridge" over the original pushutton on the heater's PCB, for how long should my code send 3 volts to GPIO2? 1 second, maybe a lot less? The way it works now if I push the button for about 5 seconds nothing happens, except when I release it.
Looks easy to implement, I have three questions though.
Should I pay close attention to the polarities when it comes to connecting the circuit to the optocoupler? I'm not sure if I can read this schematic the right way, but what I'm gonna do is put 3 volts for the GPIO2 for a really short period of time, and I should treat the "LED side" of the optocoupler just like I do with any other regular LED, right? Like putting a 330 ohm resistor in front of it. Kinda looks that the LED's schematic arrow is not pointing the right way, is that possible?
On the other hand, does the polarity matter on the collector side?
The third one is, once I build this "bridge" over the original pushutton on the heater's PCB, for how long should my code send 3 volts to GPIO2? 1 second, maybe a lot less? The way it works now if I push the button for about 5 seconds nothing happens, except when I release it.