# How does this timer circuit work?

I am stumped on how this circuit works. I am quite new to electronics but I know the basics of capacitors, transistors, ohm's law .etc, but I have no clue why when the switch(S1) is switched on the LED(D1) goes out for a short while then lights back up again.

I have made this circuit myself with a breadboard and when I increase the size of the capacitor the LED takes longer to come back on, which makes me wonder why the capacitors aren't filling when the switch (S1) isn't set to on.

I appreciate any help with this, but could you please keep in mind when you answer this that I am still very new to this. Thanks

• I'm very rusty on this, but when S1 is open and Q1 is open so there is no current flow to earth at all. – Solar Mike Jun 26 '17 at 16:35
• Try simulating it and probe in different points. But the key "concept" here that the capacitor "doesn't like" to have a voltage changed on it in zero time, so once the switch is closed, the voltage on both sides of the capacitor is going down. – Eugene Sh. Jun 26 '17 at 16:44
• @SolarMike: When S1 is open, Q1 will be conducting, so there WILL be current flowing to 0V. In fact, Q1 will be conducting except for a short time after S1 is closed, while C1 is discharging, then charging with opposite polarity. – Peter Bennett Jun 26 '17 at 18:48
• @PeterBennett thanks for putting me straight - appreciated. – Solar Mike Jun 26 '17 at 19:33

You haven't commented. But it is easy enough and I will add something...

After I'd built a few circuits and then decided that I wanted to understand them better, I found it very difficult. The schematics provided in those older electronics magazines (popular electronics and radio electronics) were early and always focused on builders and less on designers. Later, they catered to helping authors sell their kits, assembled or otherwise, and it got really annoying. But the basic fact remains that their schematic diagrams were rarely about how to understand electronics design. (There would still be the occasional article, luckily.) Instead, they were all about building one.

Your schematic is at least in part a construction diagram. Let's redraw it a little better for understanding purposes and less for construction:

simulate this circuit – Schematic created using CircuitLab

You can see that I've eliminated the busing of power and ground. None of that helps much when learning about circuits. It just makes you think there is something going on in those bus wires that really isn't going on (or else, if it is going on, then you aren't yet ready to understand it so again there is no point including the bused wiring.)

Next, I've broken this up so that there are individual parts. Let's start from the upper right corner.

1. The light. In this case, it's a current-limited LED that is designed to work from a $9\:\textrm{V}$ potential difference. LED current will be roughly $\frac{9\:\textrm{V}-V_{CE_{SAT}}-V_{LED}}{R_3}\approx 6.5\:\textrm{mA}$. You could use a smaller value for $R_3$, but it is fine as it is.
2. The switch. $Q_1$ is basically operated as a saturated BJT switch that can be controlled (or timed) using some driving circuit. If sufficient recombination current is provided to its base (assuming a forward biased $V_{BE}$ of course) then it is on. Otherwise it is off (or in some twilight state in between the two states.)
3. Base current supply (recombination.) Given the estimated collector current for the $Q_1$ switch (computed in #1 above), the base current needs to be at least $\frac{1}{20}$th (and preferably closer to $\frac{1}{10}$th), or $\ge 400\:\mu\textrm{A}$. This works out to $\frac{9\:\textrm{V}-V_{BE_{SAT}}}{400\:\mu\textrm{A}}\le 20.75\:\textrm{k}\Omega$. They've (or you have) used a slightly higher standard value, which is probably just fine.

This is a good place to pause for a moment. With nothing else added, this would simply turn on $Q_1$ and the LED would just stay on all the time. Now for the added circuitry:

1. Pre-charging. Here, $R_1$ supplies the current needed to rapidly charge up $C_1$ in preparation for you activating $SW_1$ later. $R_1$ is also needed because otherwise when you activated $SW_1$ you'd be directly grounding the $9\:\textrm{V}$ supply -- not such a good thing. Higher values of $R_1$ will require less supply current while the switch is held engaged to ground. But will also take longer to pre-charge $C_1$ after you release $SW_1$, in order to prepare for another application of the switch. So it's magnitude is a bit of a balancing act. $C_1$ will pre-charge up to about $9\:\textrm{V}-V_{BE_{SAT}}\approx 8.2\:\textrm{V}$ given about $5 \tau_1=R_1\cdot C_1\approx 220\:\textrm{ms}$ or about $5\cdot R_1\cdot C_1\approx 1.1\:\textrm{s}$. So you need to wait about one second, given these values, to allow the circuit to reset itself for the next application of $SW_1$.
2. $SW_1$. Pulls hard on the pre-charged, positive end of $C_1$, driving it to ground. This causes the negative end of $C_1$ (which is about $8.2\:\textrm{V}$ lower than the positive end -- now at $0\:\textrm{V}$) to move almost instantly to $-8.2\:\textrm{V}$. The only way for that not to happen would be if there were some path by which that voltage could invoke a substantial current. But $Q_1$ moves rapidly through turn-off, so it's base won't be any help (except that it is likely to avalanche as most small signal BJTs break down with reverse $V_{BE}$ magnitudes in excess of $5-6\:\textrm{V}$.) Also, while $R_2$ can start to charge that negative end of $C_1$, it can only do so rather slowly since it is a rather high value. So when activated, the positive side of $C_1$ is at $0\:\textrm{V}$ and the negative side of $C_1$ is at $-8.2\:\textrm{V}$, and now $R_2$ starts sourcing current at the rate of $\frac{9\:\textrm{V}-\left(-8.2\:\textrm{V}\right)}{22\:\textrm{k}\Omega}\approx 780\:\mu\textrm{A}$. The new time constant is $\tau_2=R_2\cdot C_1\approx 10.3\:\textrm{s}$, but here the voltage only needs to change by about $\Delta V=+600\:\textrm{mV}-\left(-8.2\:\textrm{V}\right)=8.8\:\textrm{V}$. This is about 50% of the original applied difference, which is reached a little earlier than one $\tau_2$ period -- about 70% of it, in fact. So this suggests that the delay will be about $7\:\textrm{s}$ before the LED goes back on.

Of course, all computed values are only rough estimates based upon nominal values.

That's the more complete walk-through. You should be able to see why the schematic I drew up is equivalent to the one you drew up. I didn't spend time explaining why it is the same because I expect you can see that for yourself. I also didn't spend a lot of time on $\tau=R\cdot C$ and why that works as well as it does. But you can look that detail up on the web, easily enough.

Some legal warning labels. (I'm not selling or recommending this circuit. But for those who might imagine otherwise even for a moment.)

• "Capacitors are often manufactured with large tolerances. Behavior computed from nominal values may be inaccurate."
• "Resistors are also often manufactured with tolerances. Behavior computed from nominal values may be inaccurate."
• "Semiconductors also have tolerances for their many specifications. Behavior computed from nominal values may be inaccurate."
• "Operating semiconductors, including BJTs, outside of their specifications may lead to long-term and/or permanent damage resulting in temporary or permanent incorrect operation."
• "Use parts and/or any combination of parts at your own risk."
• "Do not swallow electronic or electric parts."
• You should add that most of this type of timer circuit is just plain bad design. The C1 cap is charged to about 8.3 V and when you close the switch the transistor base is forced toward about -8.3 V. This is far above the absolute maximum rated EB voltage: mouser.com/ds/2/149/2n3904-82270.pdf The EB junction will avalanche on many devices and this makes calculation of a timer value very dodgy. In addition, any switch bounce interferes with the time value, and if you have a long timer (off) value then it becomes dependent on you holding the switch closed. – Jack Creasey Jun 26 '17 at 23:19
• @JackCreasey I think I mentioned that already. Didn't you see it? (#5) But I did take it as implied that the timing will be off when that is the case. I could clarify that point. – jonk Jun 26 '17 at 23:51
• @JackCreasey Too folksy for you? In any case, I agree with the "just plain bad design." – jonk Jun 27 '17 at 5:43
• @JerryCoffin Yeah. I suppose I should have added that. I feel like this is becoming one of those "Don't drink" labels on an ammonia bottle. Obvious stuff, but labeled anyway "just in case." I'll add a note. – jonk Jun 27 '17 at 5:44
• @jonk Sorry for the lateness of my response, after reading you in-depth explanation I now have a better understanding of both the circuit itself and the John D's shorter response (which I didn't earlier). Thank you for your answer I appreciate the energy you put into it. – Fudge Whelpling Jun 27 '17 at 15:50

With the switch open, the base of the NPN is at a diode drop above ground, say 0.7V. C1 charges to 9V - 0.7V or 8.3V.

When you close the switch, the voltage across the cap can't change instantaneously so it pulls the base of the NPN down to -8.3V, shutting off the BJT. (This might exceed the base-emitter reverse bias maximum!)

After the switch closes C1 starts to charge in the reverse direction through R2. When it reaches +0.7V the transistor turns on and the LED lights up again.

Note that you show a polarized cap and this circuit requires that the cap be charged in both directions.

• Would that mean this wouldn't work with a polarized cap? Also may I ask what the name of this concept is where voltage is brought down to a negative voltage? I can't seem to find it anything to do with it. – Fudge Whelpling Jun 26 '17 at 17:32
• @FudgeWhelpling John did a nice (but short) summary of what happens and despite the brevity still included a description of why the base would go significantly negative. Aren't you able to see why? Just read the first sentence, think about it. Then read and think about the second sentence. It should become clear. That's about as good as you are likely to get anywhere else, I'm pretty sure. It's almost too simple to spend more time on. If you really need a more thorough discussion, and if John doesn't feel like adding it, I'll write something. But I think you can get this. – jonk Jun 26 '17 at 17:49
• The cap can't go more than 0.7V reverse polarity, which is quite acceptable for an aluminum electrolytic. The negative Vbe, as you point out, not so much. – Spehro Pefhany Jun 26 '17 at 19:56
• @SpehroPefhany good point, as long as you put the cap in with the polarity shown. A tantalum could get in trouble at higher temps though. – John D Jun 26 '17 at 20:53

If you duplicate the circuit and replace the 'switches' with the transistors you would get a classic BJT astable circuit. (see below)

There are lots of detailed explanations on how this circuit works and John has nicely summarised the basic working.

The only other point I would make is that taking the base more than 5V or 6V below 0V could cause a b-e breakdown (reverse avalanche) which would eventually lead to the BJT not working.

The reactance of capacitor is given by $$X_C=\frac{1}{j\omega C}$$

which means at DC(condition when There is no change in voltage at the output of the timer ie the output of the timer is constant(either 0V or 5V)) capacitor will not conduct, which means that the circuit would be like this:

First assume active mode operation

Therefore using Kirchoff's voltage law in the BE side we get

$$V_{CC}-I_BR_2-V_{BE}=0$$ $$I_B=\frac{V_{CC}-V_{BE}}{R_2}=\frac{83}{220}mA$$

Now applying KVL at output:

$$V_{CC}-I_CR_3-0.7-V_{CE}=0$$ $$V_{CC}-\beta I_BR_3-0.7-V_{CE}=0$$ $$V_{CE}=-ve$$

The transistor is not in active mode:

Next assuming the transistor is in saturation mode:

(To know how to analyse a Transistor in Sat region, refer to this article)

The voltage differences among the terminals would be somewhat as shown for the transistor to be in sat region.

Applying KVL to the I/P:

$$V_{CC}-I_BR_2-0.7=0$$ $$9-I_B*22k-0.7=0$$ $$I_B=\frac{83}{220} mA$$

KVL at output:

$$V_{CC}-I_CR_3-0.7-0.2=0$$ $$9-I_C*1k-0.7-0.2=0$$ $$I_C=\frac{81}{10}mA$$

and

$$I_E=I_B+I_C$$ $$I_E=\frac{373}{44}mA$$

SINCE all the currents are positive which means ALL THE ASSUMED DIRECTION OF CURRENTS(IB and IC entering and IE leaving the transistor) are correct, $$\text{The Transistor is in saturation region}$$

which means the current through R3 is non zero, which means the LED will glow.

$$\text{Which means under the circumstances when the output of the timer is constant(either 0v or 5V), the LED will glow}$$

CAsE 2:

When the output of the timer is just changing its value, either transitioning from 0V to 5V or 5V to 0V, the capacitor will conduct, and the resultant circuit will be like this:

In the above case, When The output of the timer circuit goes from 5V to 0V:

$$v_c(t^-)=V_B(t^-)-V_{s1}(t^-)$$ $$=(9-22*\frac{82}{220})-5=-4.3=-ve$$ $$v_c(t^-)=v_c(t)=v_c(t^+)=-4.3v$$ $$v_{BE}(t^+)=v_{s1}(t^+)=0-4.3)=-4.3$$ Therefore when The output of the timer circuit goes from 5V to 0V,transistor is off, which implies $$V_{BE}=0$$

When The output of the timer circuit goes from 0V to 5V:

$$v_c(t^-)=V_B(t^-)-V_{s1}(t-)$$ $$v_c(t^-)=(9-22*\frac{83}{220})-0=9-8.3=0.7v$$ $$v_c(t^-)=v_c(t)=v_c(t^+)=0.7v$$ $$v_{BE}(t^+)=v_c(t^+)-v_{S1}(t+)=0.7-5=-4.3v$$

Therefore when The output of the timer circuit goes from 0V to 5V,transistor is off, which implies $$V_{BE}=0$$

Which means

$$V_{BE}=0$$ According to the equation $$I_B=I_S(e^{\frac{qV_{BE}}{kT}}-1)$$

Which means $$I_B=0$$ which in turn means $$I_C=0$$, which means the LED is off.

$$\text{That is when the output of the timer circuit is just changing its value, either transitioning from 0V to 5V or 5V to 0V,}$$ $$\text{in both those transitioning instants, LED will be off.}$$

$$\text{CONCLUSION: Under the circumstances when the output }$$ $$\text{of the timer is constant(either 0v or 5V), the LED will glow}$$

$$AND$$

$$\text{when the output of the timer circuit is just changing its value ie either transitioning from 0V to 5V or 5V to 0V, }$$ $$\text{in both those transitioning instants, LED will be off.}$$

If some expert on this subject finds any fault with this answer, then I am willing to rectify it.

• Corrected. The answer would not change because of this calculation mistake.As 9-8.3=0.7 Would mean $$V_{BE}=-4.3V$$ which will drive the BE voltage more negative. Hence the transistor would not be on. – Soumee Jun 27 '17 at 11:29
• @Nasha Corrected. The calculation mistake would make no difference .As 9-8.3=0.7 Would mean $$V_{BE}=-4.3V$$ which will drive the BE voltage more negative. Hence the transistor would not be on as had been inferred earlier(The conclusion drawn now is same as had been drawn earlier). – Soumee Jun 27 '17 at 11:39