All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > The Projects Forum

Notices

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.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 07-02-2013, 03:30 AM
AlkaAka AlkaAka is offline
New Member
 
Join Date: Jul 2013
Posts: 9
Default 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.
Reply With Quote
  #2  
Old 07-02-2013, 03:49 AM
AlkaAka AlkaAka is offline
New Member
 
Join Date: Jul 2013
Posts: 9
Default

I just realized a fatal flaw.. the switch should go between 9v and the rest of the circuit, not just the discharge resistor.
Reply With Quote
  #3  
Old 07-02-2013, 04:12 AM
blueroomelectronics's Avatar
blueroomelectronics blueroomelectronics is offline
Senior Member
 
Join Date: Jul 2007
Location: Toronto, Canada
Posts: 1,701
Default

Consider using a one shot.
http://www.doctronics.co.uk/555.htm#monostable
__________________
Bill
Reply With Quote
  #4  
Old 07-02-2013, 07:44 AM
crutschow's Avatar
crutschow crutschow is offline
Senior Member
 
Join Date: Mar 2008
Location: L.A. USA
Posts: 5,654
Blog Entries: 1
Default

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
Reply With Quote
  #5  
Old 07-02-2013, 09:48 AM
deco75943531 deco75943531 is offline
New Member
 
Join Date: Jul 2013
Posts: 5
Default LED

LED and its current limiting resistor would go between the cap and the floor drain resistance will still go from 9V to ground
Reply With Quote
  #6  
Old 07-02-2013, 04:40 PM
#12's Avatar
#12 #12 is offline
Senior Member
 
Join Date: Nov 2010
Location: 15 miles west of Tampa, Florida
Posts: 8,477
Blog Entries: 9
Default

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.

http://forum.allaboutcircuits.com/blog.php?b=485
__________________
It's only my opinion, and sometimes I'm wrong.
(I learn something almost every day on this site.)
Reply With Quote
The Following User Says Thank You to #12 For This Useful Post:
Metalmann (07-05-2013)
  #7  
Old 07-02-2013, 06:16 PM
AlkaAka AlkaAka is offline
New Member
 
Join Date: Jul 2013
Posts: 9
Default

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)?

deco75943531 - A bit confused about your statement. Isn't that how I already had it incorrectly set up?

#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!
Reply With Quote
  #8  
Old 07-02-2013, 07:21 PM
wayneh wayneh is offline
Senior Member
 
Join Date: Sep 2010
Location: Roscoe, IL
Posts: 6,863
Default

Quote:
Originally Posted by AlkaAka View Post
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.
Reply With Quote
  #9  
Old 07-02-2013, 08:26 PM
AlkaAka AlkaAka is offline
New Member
 
Join Date: Jul 2013
Posts: 9
Default

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?
Reply With Quote
  #10  
Old 07-02-2013, 08:42 PM
wayneh wayneh is offline
Senior Member
 
Join Date: Sep 2010
Location: Roscoe, IL
Posts: 6,863
Default

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.
Reply With Quote
Reply   Post New Thread

Tags
, ,


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple timing circuits briscoe General Electronics Chat 5 08-03-2013 07:59 AM
Please help check on SPI timing diagram richiechen Embedded Systems and Microcontrollers 7 12-07-2012 12:59 PM
How to draw timing diagram from logic gates??? jake077 Homework Help 5 03-15-2012 12:00 AM
Timing Diagram Draw Tool seecumulus Electronics Resources 3 08-05-2011 12:30 AM
continuous timing circuit inspector4 The Projects Forum 2 01-11-2010 02:29 PM

Thread Tools
Display Modes

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 Jump


All times are GMT. The time now is 09:50 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.