-->
Page 1 of 1

Amplifier for signal for Relay not working

PostPosted: Sun Mar 15, 2020 9:42 am
by PieterE
I've been working on this problem for days, but don't understand why it doesn't work. I want to amplify the output signal from the ESP for a relay. The relay is made for 5 volts, and i get strange results (Relay does not allways react). I suspect that the input signal (3.3v) is not sufficient so I want to boost that. See accompanying schedule. The transistor works fine if I use it as a dimmer, and the relay also switches nicely at 5 volts. But with my wiring, the relay does nothing. I don't know much about circuitry, but it should still work (i think :roll:). Can anyone help? What do i do wrong?

Re: Amplifier for signal for Relay not working

PostPosted: Mon Mar 16, 2020 4:11 am
by btidey
That circuit is not going to work.

Instead connect

S to 0V
G to D0
D to Sig and via a resistor to 5V

Resistor value needs to be low enough to operate relay. I'd suggest starting with 470R

When D0 is low MOSFET is Off and Sig is connected to 5V through the 470R resistor. When D0 is high MOSFET is On and Sig is connected to 0V

Re: Amplifier for signal for Relay not working

PostPosted: Tue Mar 17, 2020 3:36 am
by PieterE
Thanks, I will test it asap.
But does't this invert the signal from the esp?
Is there any fast way you can explain why my circuit does not work?
Thanks

Re: Amplifier for signal for Relay not working

PostPosted: Tue Mar 17, 2020 5:27 am
by PieterE
After studiing your change, am I right that the MOSFET I use behaves more like a PNP than a NPN? Or am I now (as the dutch saying go's) "cursing in church" :D?