-->
Page 12 of 12

Re: optocoupler as "relay"

PostPosted: Fri Aug 12, 2016 6:44 pm
by ChrisSparks
ChrisSparks wrote: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.


Well I was able to figure out my GPIO issue and now my SainSmart relay shows the LEDs lighting up but no noticeable clicking of the relay. I hear a slight tum-tum-tum sound as I cycling through the relays.

I guess I need more power to get to those relays.

I hope someone can help. I am not an electrical engineer so...

chris

Re: optocoupler as "relay"

PostPosted: Fri Aug 12, 2016 7:40 pm
by martinayotte
Driving relays rated to 5V with 3.3V supply isn't a good idea ...
You need to supply them with 5V, no way to go around that !
There are maybe other pitfall : is this board have a driving circuit that will allow 3V GPIO to control it ?
Maybe you can provide photos and/or schematic of that board.
In some cases, you maybe will have to have another driving circuits, simply done with a MOSFET and resistors.

Re: optocoupler as "relay"

PostPosted: Sat Aug 13, 2016 5:24 pm
by ChrisSparks
martinayotte wrote:Driving relays rated to 5V with 3.3V supply isn't a good idea ...
You need to supply them with 5V, no way to go around that !
There are maybe other pitfall : is this board have a driving circuit that will allow 3V GPIO to control it ?
Maybe you can provide photos and/or schematic of that board.
In some cases, you maybe will have to have another driving circuits, simply done with a MOSFET and resistors.


I got lucky. My LoLin board is V3 and has 5V pin out for power. Lucky me. So I just connected to it and viola, the happy sound of relays clicking...