RC Timer Design Challenge
![william chan](https://forums.parallax.com/uploads/userpics/RBTCEMRWP85K/nQFR9OII9OM33.jpg)
To all geniuses in this forum.
Traditional RC timers discharge slower as the capacitor voltage reduces.
I challenge you to design a simple, RC timer that
discharges the capacitor quickly when it's voltage becomes lower than a certain threshold.
You should only use low cost discrete components. No cheating with microcontrollers!
The application could be a simple push on light timer controlled by a n-type mosfet.
In a traditional RC timer, after the push button is pressed, the gate capacitor charges up instantaneously,
switching on the mosfet and the load. (light bulb)
A resistor slowly discharges the capacitor, making the bulb grow dimmer with time.
The only problem is, when the bulb is too dim to be seen, current still continue to flow through the bulb through extended periods.
The solution is to change the discharge curve to discharge faster with lower capacitor voltage or to discharge quickly after a certain threshold.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Traditional RC timers discharge slower as the capacitor voltage reduces.
I challenge you to design a simple, RC timer that
discharges the capacitor quickly when it's voltage becomes lower than a certain threshold.
You should only use low cost discrete components. No cheating with microcontrollers!
The application could be a simple push on light timer controlled by a n-type mosfet.
In a traditional RC timer, after the push button is pressed, the gate capacitor charges up instantaneously,
switching on the mosfet and the load. (light bulb)
A resistor slowly discharges the capacitor, making the bulb grow dimmer with time.
The only problem is, when the bulb is too dim to be seen, current still continue to flow through the bulb through extended periods.
The solution is to change the discharge curve to discharge faster with lower capacitor voltage or to discharge quickly after a certain threshold.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Comments
Without much information as to what exactly you are looking for, this circuit may or may not work for you... perhaps you can come up with a derivative that will satisfy your needs. I borrowed this circuit from one of my own designs to limit or prevent Li-Poly batteries from discharging too low. In that particular application the cut-off did the exact opposite and allowed current to flow above a set threshold.
TP1 - shows the raw charge/discharge curve of the capacitor
TP2 - shows the charge/discharge curve with a low voltage discharge snubbing circuit. The simulator was set at about 3k (2V snubbing)
The key with this circuit is that the right most NPN transistor must have it's Emitter tied HIGH during capacitor charging, and then LOW when you want the snubbing to take effect, otherwise the snubbing won't allow you to charge the cap in the first place. Other than that, the left most NPN with the 100K and the 10K POT plus 470 Ohm buffer forms a voltage divider that gates the snubbing NPN ( <- the right most NPN)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 2/9/2010 8:57:14 AM GMT
Oh, wait. That's been done already as a 555 timer...
--Rich
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $24.99 has backlight driver and touch sensitive decoder.
If you have not already. Add yourself to the prophead map
A quick electromechanical option: use a low-current·relay (big R) that is held temporarily closed by a large electrolytic cap (big C) that is instantly charged by a momentary pushbutton press. Relay contacts open fully·once the cap/coil voltage decays beyond the minimum holding value.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Mctrivia,
Which mosfet would you recommend?
The circuit seems a bit tricky because the sink and the gate is essentially the same voltage, ie. the capacitor voltage.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Why are there 2 capacitors?
What's with the 40Hz AC signal?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
The two capacitors are to show one being affected by the snub circuit and the other not being affected.
The 40Hz (square wave) was just for the simulation to show the charge/discharge of the two caps.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Willliam, Here's my tutorial style explanation of how it works.
Q1 is the upper left transistor, Q2 is the lower right transistor. R1= 470 Ohm + 10k potentiometer. Input is square wave.
1) Start input low, so emitter of Q2 is also low and its base is driven with current from the +5 power supply through the resistor combo R1. That drives Q2 ON so its collector pulls the top of the 10 uF capacitor to ground. Q1 has both its emitter and base at ground, so it is OFF.
2) Input goes high. Now both emitter and base of Q2 are at +5 volts, so the collector of Q2 no longer holds the capacitor at ground.. Q1 is still OFF. The capacitor charges up through the 1 kOhm resistor, and also charging current comes in via R1 through the base-collector diode junction of Q2.
3) The input voltage reaches the point where current through the 100k resistor into the base of Q1 turns it ON, which draws the base of Q2 to ground, so current no longer flows through R1 via the base emitter junction of Q2. The capacitor continues to charge (with a small change of charging RC) through the 1k resistor.
4) Input returns low. The base of Q1 is still driven by current from the capacitor, so Q1 is ON and holds the base of Q2 low, so Q2 is OFF and does not draw current from the capacitor. The capacitor discharges through the 1k resistor and some current also flows out via the 100k resistor into the base of Q1.
5) Current through the 100k resistor is no longer able to hold Q1 ON, so it turns OFF, it's collector goes high, and current from R1 can again drive the base of Q2, turning it ON, and quickly discharging the capacitor. This is a regenerative effect with positive feedback.
6) Return to step 1.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
When you push the button, the capacitor charges quickly and turns on the lamp. The phototransistor Q3 is looking at the lamp, and when the lamp is bright it pulls the base of the other transistor Q1 low, turning it off. You release the pushbutton, so the capacitor discharges gradually through R2. When the lamp dims to that certain point, the phototransistor no longer holds the base of Q1 low, and it turns on and rapidly discharges the capacitor and turns off the lamp.
Edit, added collector resistor R4.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 2/13/2010 5:22:05 PM GMT
Thanks! ... yes I think your explanation is correct.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Both circuits are really ingenious !
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
the capacitor will charge up correctly because Q1 is always conducting (and shorting the cap)
when the light bulb is off.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Here is another little circuit that detects the voltage across the mosfet instead of using a phototransistor. One purpose of a circuit like this might be to keep the mosfet from overheating during the transition period. This circuit starts the rapid capacitor discharge when the voltage across the mosfet reaches about 1.2 volts, set by the resistor ratio of R1 to R5.
Edit--removed extraneous line (short circuit).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 2/14/2010 4:22:02 AM GMT