-->
Page 1 of 2

driving 12v relays not working when relays are powered

PostPosted: Tue Nov 16, 2021 1:48 am
by Paul Arbour
I have a relay board which I'm trying to drive with the sp8266.
Short explanation is that the input voltage to the control circuit is 5V, and the relays are 12V.

I am feeding the 12v into the relays, and 5V into the control circuit along with the same power going to the ESP8266.

If I do not have the 12V power into the relays the control from the ESP works just fine, the LEDs on the relay module switch on and off as requested.

When I power up the relays with 12V the setup of my code succefully turns the relays on but they never go off.

I am feeding a LOW and they turn on, but a HIGH never seems to force them off.

Again, if I remove the 12V everything is hunky dory.

Is it possible this is because the output from the ESP is only 3.3V which somehow isn't enough to force the relays down?

Re: driving 12v relays not working when relays are powered

PostPosted: Wed Nov 17, 2021 1:40 pm
by Paul Arbour
To provide some further context and details.
I put some resistors inline with the pins from the MCU to the relay controller, and that kind of mostly works but there is still a relay or two that doesn't react properly here.
I was using the first eight GPIO pins, the one connected to GPIO0 was being wonky, so I moved that but it seems to not have really helped.

The relays will all switch but will eventually flip open slowly but surely.

Re: driving 12v relays not working when relays are powered

PostPosted: Fri Nov 19, 2021 1:47 am
by schufti
w/o knowing any details about the relays board, what answer do you expect? As if there was only THE ONE relaiys board listed on aliexpress...

Re: driving 12v relays not working when relays are powered

PostPosted: Wed Nov 24, 2021 9:04 am
by Inq720
You might also show your hardware and wiring configuration. You're guess is probably right in that a 3.3v pin may not trigger something expecting 5v. I use WeMos ESP8266 and you can get cheap daughter boards with relays that have all the proper supporting hardware to trigger the relay correctly. You'll note in the image that there are some supporting components, resistors, diode and what looks like its own voltage regulator.

Good luck