So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By PieterE
#86064 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?
You do not have the required permissions to view the files attached to this post.
User avatar
By btidey
#86070 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