Electronic – Using BJT NPN to drive relay coil sometimes work sometimes not

bjtdelaynpnrelay

I am just a hobbyist and I have a typical schematic I've always used to switch on/off relay coils.

enter image description here

This has always worked the last 3-4 times I've used it (without R1 and C1)

But this time, I can't turn the relay on at all (the transistor collector doesn't drop to GND (~200mV).

If I measure the collector voltage, it starts at 5V then after some seconds it drops to 3.5V-4.5V. I'm pretty sure the few times I've used this in the past (without R1 and C1, the base is connected to a GPIO pin instead) it managed to switch the relay on when transistor is on.

The only things I have changed (I think) is the introduction of R1 and C1 and Vcc 3V instead of just sending GPIO HIGH/LOW to the 1K base. I've also tried various values for R1 and C1 that I have with me.

I'd like to stop guessing what R1 and C1 values I should have. Ideally I would like the relay to switch 5-10 seconds after I connect R1 to Vcc. Currently, R1 & C1 are set to 100Kohm & 220uF to give about 5 seconds.

Note:
Transistor is S9011 I think. Or 9013.
Relay is an 8 pin 5V relay (2 for coil, 3 one side and 3 another side) – come to think of it, I've never used this kind of relay before – I've always used the 5 pin one, but this 8 pin one is the only one I have around this house. So this is also another thing has changed from my prior experience.

Thanks for reading.

Best Answer

You can follow the RC circuit with an emitter follower.

I'm not suggesting this is the best way, or even a good way, to get a delay of that magnitude, but it's probably the minimum change you can make without requiring a large capacitor.

schematic

simulate this circuit – Schematic created using CircuitLab

Disadvantages include sluggish turn-on of the relay, reducing life, temperature sensitivity (due to beta changes mostly) and poor initial accuracy.


A much better way would be to drive R1 with an 8-pin micro such as PIC12F629 which will give you +/-1% accuracy without external timing components (and with power-on reset for repeatable timing regardless of off or on times). The down side is that you have to learn how to use it and buy a programmer.