-->
Page 11 of 12

Re: optocoupler as "relay"

PostPosted: Fri Mar 18, 2016 9:02 am
by Barnabybear
Hi, if your looking at 30V AC you might want to consider the MOC302x series of opto triacs (x = last bit of part number 0, 1, 2 or 3). The data sheet is here, just don't get the zero crossing one.

Re: optocoupler as "relay"

PostPosted: Tue May 03, 2016 5:22 pm
by Trent
I completed my setup and built it into a project box a few weeks ago. Everything seemed good. I noticed something odd the other day though. Seems as though when the relay is energized, my DHT22 sensor which is also hooked up to my huzzah starts reading erratically. Basically it will rapidly jump 5-10 degrees. As soon as you release the relay, temperatures smooth out.

The only thing I can think of is that the power needed to energize the relay's opto circuit is pulling down the huzzah so much that the dht is not getting enough power?

As a test, I set the huzzah to energize the output for the relay but disconnected it from the relay. The DHT has been fine in this situation. I think this test only eliminates some funky code issues which I didn't suspect.

Re: optocoupler as "relay"

PostPosted: Fri May 13, 2016 6:51 am
by Trent
Just as a follow up to this; in case somebody runs into a similar problem. It was related to my power supply being too weak. I upgraded to a 2amp 5v supply I had in a box and everything is happy now. Hind sight says the previous one which was 600ma was barely powerful enough for the esp let alone a relay.

Re: optocoupler as "relay"

PostPosted: Fri Aug 12, 2016 12:45 am
by ChrisSparks
I tried to hook my NodeMCU to a 4 CH sainsmart relay but nothing happened. I tried using that 5V pin and that didn't do it. I tied it to the 3.3V on the other side and it was not making any clicks.