3
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ Do you care much about power consumption when inactive? \$\endgroup\$
    – jonk
    Feb 6, 2018 at 18:52
  • \$\begingroup\$ For the purpose of this application, I don't. But would like to appreciate power consumption considerations too maybe for future applications if you could help me think about it \$\endgroup\$
    – Azrudi
    Feb 6, 2018 at 19:18
  • \$\begingroup\$ Basically, I think you want a timer where the timer operates a "normally closed" switch that opens when the timer is activated. You also have a manual switch that is "normally open." When the manual switch is closed, this starts the timer which causes the "normally closed" to become "normally open" for a period of time and then return to "normally closed." If you put these two in series, the timer switch and the manual switch, then power will be supplied only when the manual switch is closed and the timer has expired. Opening the switch must force reset the timer, too. A fair bit to achieve. \$\endgroup\$
    – jonk
    Feb 6, 2018 at 19:47

2 Answers 2

3
\$\begingroup\$

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.

\$\endgroup\$
4
  • \$\begingroup\$ This is brilliant. I never thought I could arrange the two NPNs that way. Can you explain a bit how it works? To my naive eyes, the Q1 emitter isn't connected to ground so how does it turn on? (C1 increases in voltage until its voltage is 0.7V above Vbe.. but what is Vbe of Q1 when e is not connected to ground? Secondly, I implemeted this circuit and measured the voltage from ground to Q1 base. It seems the voltage goes all the way to about 1.7V +/- before it turns on, is this dangerous for the Q1 transistor? \$\endgroup\$
    – Azrudi
    Feb 7, 2018 at 9:53
  • \$\begingroup\$ Q1 acts as an emitter follower- the voltage at the emitter is about 0.7V less than the voltage at the base. Because the transistor has a current gain of about 300 the loading on the RC circuit is more like a 300K resistor than a 1K resistor. Q1 is fine because Vbe is only 0.7V. \$\endgroup\$ Feb 7, 2018 at 11:57
  • \$\begingroup\$ Ok I see what you mean. So Vb of Q1 should be registering about 1.4V when Q1 and Q2 are both turned on. \$\endgroup\$
    – Azrudi
    Feb 7, 2018 at 16:02
  • \$\begingroup\$ Because of that 1K it will be higher than that. Vbe is the voltage from the base to the emitter (of the same transistor). \$\endgroup\$ Feb 7, 2018 at 16:10
5
\$\begingroup\$

The series combination of R1 and the 1K base resistor probably does not provide enough base current to put the transistor into saturation.

You should have a "flyback diode" across the relay coil to protect the transistor from high-voltage spikes when the relay is switched off.

\$\endgroup\$
3
  • \$\begingroup\$ OK, I guess the difficulty is finding R1 that is low enough to provide acceptable base current while being high enough to provide the time length? The flyback diode, I have no diodes at the moment, I'll have to drive about 70 mins to get one. Will an LED be ok? \$\endgroup\$
    – Azrudi
    Feb 6, 2018 at 18:46
  • \$\begingroup\$ If I keep R1 at 1K which seems to be the lowest value I should use to turn on the NPN transistor, it seems I will need a 20000 uF (0.1F) capacitor to keep the same 5 second delay. Yikes! Is there a thing that can make an equivalent delay such as delays in series or something? \$\endgroup\$
    – Azrudi
    Feb 6, 2018 at 19:29
  • 1
    \$\begingroup\$ Use an IC such as a 555 or a 74hc123 to provide the delay. \$\endgroup\$ Feb 6, 2018 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.