Relay backfeeding 3.07V through "IN" port

Hi, my diagram is as follows:

When I set D2 to HIGH, the 3.3V signal from the board is stepped up to 5V and sent to the relay, which switches off (low level relay).
When I set D2 to LOW, the relay switches on, but the integrated LED on the HW-553 is still on (albeit dimmer). This is because when I measure between 5V and GND on the HW-553, I get 3.07V (if I measure between IN+ and IN- I get 0V).

So, I guess that means that the relay is for some reason backfeeding 3.07V between the "IN" port and GND on the relay when it's switched on.
Is this expected or have I messed up somewhere?

btw. the board can switch the relay on and off without any problems, so it isn't really a problem for me, but I still wanted to know if this is normal
btw btw. the psu doesn't have an AC ground connection, but i guess that's not an issue...

Both
It's expected and you have messed up. Doing it that way, you will eventually burn out your D1 mini or at least the D2 output.
Are you using a relay module?
If yes, which one?
You may not need any aditional hardware depending on the module?

Thanks for the reply. I'm using this:


Could I switch the relay somehow differently?

is the relay -V tied to the PSU -V and Arduino -V (ground) ?

Yes, all on the same ground

As @jim-p says remove the HW-553 and connect D2 directly to Din on the relay ( all gnd tied together ).
If you have that relay (with only 1 transistor, and no optocouplers ) you don't need anything else

Connect Vcc to 5V supply
Connect GND to 5V supply GND and D1 GND
Connect IN to D1 mini D2

Thanks. Since it's a 5V relay, I thought it needs a 5V signal to the IN port as well. So I guess that's not a problem?

It depends, some of those modules will work fine with 3.3V from a D1 mini, some don't.
Try it and see. If it does not work, let us know

1 Like

Hi, thanks, it looks like it works. One more question -- when the HW-553 was connected, what was the problem? High current draw from GPIO that would eventually burn out the board?

Yes. The HW-553 is meant to act as a power supply, not a voltage translator.

Yes, and/or stability problems with the DCDC converter failing to start up in the first place due to its input being severely current limited. During startup a converter like this looks nearly like a dead short to GND from the perspective of the power input (in your case a GPIO).

Glad it worked!
Have a nice day!

I just found out that your suggested fix only works when the relay is also powered by the board's 3.3V pin. When I power the relay with 5V from the PSU, I can't control it with 3.3V on the IN terminal. Grounds are connected together.

Is it a problem? It's a 5V only relay (but it works on 3.3V too for some reason).

Don't power the relay from the D1 mini 3.3V, it may damage the D1 mini.
Then something is wrong. Are you sure ALL the grounds are connected, 5V power supply, D1 mini and relay.

Both the D1 and the relay are connected to the same PSU ground, continuity tested. If I connect the IN pin directly to GPIO and relay 5V and GND to PSU, it doesn't work.
I checked, and there is 3.3V coming from the GPIO. The relay is on all the time, which means it's not detecting a signal.

Disconnect wire from gpio. Is relay turning off?
Trigger manually touching that wire to 5V. Is relay turning on?

Yes, if I disconnect gpio manually, the relay turns off. When I reconnect it back, it turns on. It's a low level relay.

so it's triggering if you touch it to GND?

Yes, just tried it now

that probably means that my setup would work for a high level one(?)