All About Circuits Forum Capacitor Discharge Timing
 Register Blogs FAQ Members List Today's Posts Search Today's Posts Mark Forums Read

 The Projects Forum Working on an electronics project and would like some suggestions, help or critiques? If you would like to comment or assist others with their projects, this is the place to do it.

#1
07-02-2013, 03:30 AM
 AlkaAka New Member Join Date: Jul 2013 Posts: 9
Capacitor Discharge Timing

Hello! First post here and I'm looking forward to many more

As per the title, I (think) I know the circuit to control capacitor voltage discharge, a simple capacitor connected to + and gnd with a resistor tied around it on a switch. Switch is thrown and the cap begins to discharge.

I've done a few calculations using 9v power supply and a 220u capacitor. It seems a 50k resistor will have a time constant of 11 seconds. I think for my needs, that will be the longest time constant I would need. I intend on putting a 50k potentiometer to use for variability.

However, I'd like to throw and LED into the mix with a forward current of 25ma and forward voltage of 2.2v.

When the switch is open and the capacitor is fully charged, the LED should be at full brightness. When the switch is thrown, the LED will dim as the cap loses brightness. I assume an LED and it's limiting resistor would go between the cap and ground and the drain resistor would still go from 9v to ground? Does the addition of the LED and current limiting resistor affect the discharge time?

Also, is there any way to linearize the discharge time? The time constant is a measurement of discharge of ~63% of the voltage making appear logarithmic. Is there a way to smooth it out?

Thanks!

EDIT: Something like this, but with a switch between 9v and the time potentiometer (oops)

Last edited by AlkaAka; 07-02-2013 at 03:38 AM.
#2
07-02-2013, 03:49 AM
 AlkaAka New Member Join Date: Jul 2013 Posts: 9

I just realized a fatal flaw.. the switch should go between 9v and the rest of the circuit, not just the discharge resistor.
#3
07-02-2013, 04:12 AM
 blueroomelectronics Senior Member Join Date: Jul 2007 Location: Toronto, Canada Posts: 1,704

Consider using a one shot.
http://www.doctronics.co.uk/555.htm#monostable
__________________
Bill
#4
07-02-2013, 07:44 AM
 crutschow Senior Member Join Date: Mar 2008 Location: L.A. USA Posts: 6,527 Blog Entries: 1

You circuit has more than one fatal flaw.

In your circuit the 50k pot goes between 9V and ground. It has no effect on the timing of the current through the capacitor and LED. The time-constant of that is approximately 330Ω 8 220μF = 73ms

The circuit will also only pulse once when energized. There is no path to reset the capacitor since the LED is reversed biased for any capacitor current in the opposite direction.
__________________
Zapper
Curmudgeon Elektroniker
#5
07-02-2013, 09:48 AM
 deco75943531 New Member Join Date: Jul 2013 Posts: 5
LED

LED and its current limiting resistor would go between the cap and the floor drain resistance will still go from 9V to ground
#6
07-02-2013, 04:40 PM
 #12 Senior Member Join Date: Nov 2010 Location: 15 miles west of Tampa, Florida Posts: 9,067 Blog Entries: 9

The first problem I see is that you can't run current backwards through an LED and expect anything predictable. LEDs are represented by a diode symbol because they ARE diodes. When calculating in the forward direction, you can treat the LED as a voltage drop, not a resistor. Just remove 2.2 volts from the equation.

The way to "linearize" the change of voltage on a capacitor is to use a constant current regulator. V=I/C Constant current into a constant size of capacitor causes a constant (linear) rate of voltage change.

Meanwhile, I wrote all the equations for time, resistance, and capacitance so they would be easy to use and eliminate making simple math mistakes every time you need an equation.

__________________
It's only my opinion, and sometimes I'm wrong.
(I learn something almost every day on this site.)
 The Following User Says Thank You to #12 For This Useful Post: Metalmann (07-05-2013)
#7
07-02-2013, 06:16 PM
 AlkaAka New Member Join Date: Jul 2013 Posts: 9

blueroomelectronics - If I'm reading what the 555 timer does correctly, it will hold at 0V until triggered, at which point it will put out a constant voltage for a set time? I'm looking for something that will hold high until triggered, at which point the voltage will decrease over a set time.

crutschow - Yeah as I was thinking about it more last night I realized more and more how wrong I was. I'm only looking for one pulse when triggered from the switch. Would closing the switch not re-energize the capacitor (assuming a circuit that was set up properly)?

#12 - So the voltage used in the equation would now be 6.8V due to the diode. As far as a constant current source, could I use a regulator? Or a transistor circuit like this:

Would the 'load' be the entirety of the cap/resistor/LED circuit? Thanks for the link to the equations! Definitely helpful.

Thank you all for the useful responses!
#8
07-02-2013, 07:21 PM
 wayneh Senior Member Join Date: Sep 2010 Location: Roscoe, IL Posts: 7,613

Quote:
 Originally Posted by AlkaAka Also, is there any way to linearize the discharge time? The time constant is a measurement of discharge of ~63% of the voltage making appear logarithmic. Is there a way to smooth it out?
I'm still confused about what you're actually trying to do. One way to get pseudo-linearity is to use less of the decay curve. I mean, the range between 80% and 70% charge looks more linear than the range from 90 to 60%. But of course there will be less dimming effect from using the smaller range.

Unless you have a very large capacitor, the LED current will cause it to dim quickly. The current-limiting resistor must be sized to prevent burning the LED at 100% charge, but will quickly be too much resistance to allow the LED to keep going brightly. I've used big capacitors at high voltage and the LED will glow dimly for a long time after a few seconds of brightness.
#9
07-02-2013, 08:26 PM
 AlkaAka New Member Join Date: Jul 2013 Posts: 9

wayneh - Forgetting the whole cap circuit, the function of the idea is to have a push button that, when pushed, will cause an LED to linearly dim at a rate determined by a potentiometer. When the button is released, independent of where the LED is in it's dimming progress, the LED will go back to the initial brightness - immediately or at the same rate as it dimmed, whatever is easiest as that part isn't as important.

Perhaps a discharged cap is not the best way to do this?
#10
07-02-2013, 08:42 PM
 wayneh Senior Member Join Date: Sep 2010 Location: Roscoe, IL Posts: 7,613

Aha, got it. Since you apparently need dimming over 10-30 seconds, that pretty much rules out using the stored energy in a capacitor. You could get one big enough, but it would not be cheap, elegant or linear.

I'm sure there may be a more clever approach, but here's my solution. Use an RC tank for the timing. The switch, when off, allows the capacitor to charge from the battery. Pressing the switches removes the battery so that the capacitor discharges.

Use an op-amp to watch the voltage on the capacitor on one input. The other input will watch the voltage across a resistor that is in series with your LED and the output of the op-amp. The op-amp will thus reduce the current to the LED as the voltage on the capacitor drops. This could be set to be quite slow; the capacitor discharges only via the op-amp (very slowly) and the adjustable resistor. Power for the LED comes from the battery via the op-amp.

I'd draw this out but I don't have a drawing tool handy. Hopefully you can follow. It's a standard constant-current op-amp circuit with a falling reference voltage provided by the RC tank.

By choosing the gain of the op-amp circuit, you can choose what percentage of the RC curve will give you full dimming of the LED. So for instance I think you could get the LED to fully dim when the capacitor voltage falls from 100% to just 80% or so. This would give a more nearly linear dimming than a deeper discharge.

 Tags capacitor, discharge, timing

 Related Site Pages Section Title Video Lecture RC Time Constants (Part 2) - Circuit Waveforms - Inductors,Capacitors,Transformers Video Lecture RC Time Constants (Part 1) - Pulse Circuit Response - Inductors,Capacitors,Transformers Worksheet Power conversion circuits Worksheet Time constant circuits Textbook CMOS 555 LONG DURATION RED LED FLASHER : 555 Timer Circuits Textbook CMOS 555 LONG DURATION FLYBACK LED FLASHER : 555 Timer Circuits Textbook CMOS 555 LONG DURATION BLUE LED FLASHER : 555 Timer Circuits Textbook 555 HYSTERETIC OSCILLATOR : 555 Timer Circuits Textbook 555 audio oscillator : Analog Integrated Circuits Textbook Special-purpose diodes : Diodes And Rectifiers

 Similar Threads Thread Thread Starter Forum Replies Last Post briscoe General Electronics Chat 5 08-03-2013 07:59 AM richiechen Embedded Systems and Microcontrollers 7 12-07-2012 12:59 PM jake077 Homework Help 5 03-15-2012 12:00 AM seecumulus Electronics Resources 3 08-05-2011 12:30 AM inspector4 The Projects Forum 2 01-11-2010 02:29 PM

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Electronics Forums     General Electronics Chat     The Projects Forum     Homework Help     Electronics Resources Software, Microcomputing, and Communications Forums     Programmer's Corner     Embedded Systems and Microcontrollers     Computing and Networks     Radio and Communications Circuits and Projects     The Completed Projects Collection Abstract Forums     Math     Physics     General Science All About Circuits Commmunity Forums     Off-Topic     The Flea Market     Feedback and Suggestions

All times are GMT. The time now is 01:34 AM.