Capacitor timer (RC) circuit: Seeking different on/off delay times - Page 1
Forum section: electronics / beginners

author: TheBaconWizard
author_rank: Regular Contributor
timestamp: June 20, 2016, 06:06:00 am
content: Hi There.Total noob here, you'll need to use simple words lolI understand the idea of an RC timer, and don't mind doing my own maths.In simple terms, I would like to have a delay of x seconds between closing a switch and an LED coming on. However, I would like to have a different time for the LED to turn off once the circuit is powered-off.I want to do it both ways around: ie in one case, the LED takes longer to come on than to go off again, and in another case for the LED to remain lit for longer than it took to come-on.Would someone please explain if and how this can be achieved? I wish to only use jellybean parts, no chips.Thanks for any help

author: danadak
author_rank: Super Contributor
timestamp: June 20, 2016, 10:12:03 am
content: "Normall" you would consider a comparator and some for of Vref to getrepeatable trip point.That being said use of diodes comes to mind, one in series with Rchg to controlcharge path, another same but using Rdischg, diode reversed, and it has a longertime constant for discharge thru use of bigger R.What accuracy over T, V, and component tolerance do you want ?Regards, Dana.

author: Seekonk
author_rank: Super Contributor
timestamp: June 20, 2016, 05:05:34 pm
content: You say no chips, but I suggest you use a LM431 as the voltage switch. This is three terminal like a transistor and it can easily drive a small relay. Can be found in most old PC power supplies and wall warts. Then just use the diode method method as indicated before to get different times for on and off.Anything marked 431 will likely be the part.

author: Lesterwyatt
author_rank: Regular Contributor
timestamp: June 20, 2016, 07:00:00 pm
content: Hi. I have used a opamp (comparator ) and RC in my timed socket, this has indicator LEDs. This may help you out.http://youtu.be/1bEQtBWxZg4

author: TheBaconWizard
author_rank: Regular Contributor
timestamp: June 20, 2016, 11:01:51 pm
content: Quote from: danadak on June 20, 2016, 10:12:03 amV needs to not stand even the slightest chance of blowing the LED nor of failing to light it when supposed to be on.Time wise, it doesn't matter if the off time delay is not accurately half (or double) of the on time delay: I'll actually have a line of 7 or 8 LED's each with it's own timer and the idea being that they light in turn 1-7 smoothly and then turn off 7-1 smoothly, no matter what the total difference in time happens to be off vs on.Component tolerance: Absolute, cannot ever blow under any circumstances.Am I right in thinking that in the most basic version of an RC timer, the cap charging is slowed by the resistor, but that upon discharge the resistor no-longer plays a part and that discharge is therefore based only on the cap value alone?

author: danadak
author_rank: Super Contributor
timestamp: June 21, 2016, 12:30:36 am
content: Something like this ?Attached.

author: TheBaconWizard
author_rank: Regular Contributor
timestamp: June 21, 2016, 07:28:05 am
content: That looks absolutely perfect, thank you.Just a case of playing with the R values until it has the on vs off curves that I happen to want at the time.Nice and simple, exactly what I wanted. Thanks!

author: danadak
author_rank: Super Contributor
timestamp: June 21, 2016, 10:20:55 am
content: Keep on mind you may be able to use a high beta non darlingtonfor the transistor. Also you can replace the diodes with schottkysto get a little more dynamic range.Lastly Iled set by emitter R and input Vpeak.Note this circuit does not delay a fixed time then "snap" on/off the Led,rather it effects a delay in ramping Iled. If you wanted snap effectthen some form of comparator or use of Zeners could accomplishthat.Regards, Dana.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: June 21, 2016, 12:36:22 pm
content: @Bacon:I know you said "no chips" but this project, especially if you want to do it with 7 or 8 LEDs... would be a _lot_ easier (and even cheaper) if you used a microcontroller system. It would be trivial to implement it using a single 3-dollar Arduino Nano or Pro-Mini and a few resistors, and you might not even need any driving transistors for the LEDs, depending on what type LEDs you are using.

author: TheBaconWizard
author_rank: Regular Contributor
timestamp: June 21, 2016, 04:20:34 pm
content: Thanks but I have not gone into full detail about the actual project: arduino stuff is too wide. It needs to fit in a string not much fatter than the LEDs themselves and various wires.I wonder if I could do without the Transistor entirely, as long as I stayed well within the tolerances of the LED for voltage/current.I am perfectly happy with a soft response rather than a hard on/off

author: Seekonk
author_rank: Super Contributor
timestamp: June 21, 2016, 07:35:00 pm
content: To power a LED even for a very minimal length of time would require a fairly large capacitor. I really suggest you use a LM431 instead of a transistor.

author: TheBaconWizard
author_rank: Regular Contributor
timestamp: June 21, 2016, 07:45:05 pm
content: Quote from: Seekonk on June 21, 2016, 07:35:00 pmThat's not what I'm trying to do though. Or do you mean if we skip the transistor and drive the LED directly and if the LED or a string of them required a ton of mA?Also, I am not sure what I gain by using the LM431 instead? How does that improve things for me? I warned you, I'm a noob.

author: danadak
author_rank: Super Contributor
timestamp: June 21, 2016, 11:22:18 pm
content: An smt transistor would fit, but you have to look at Pdiss tomake sure it does not overheat. Some of them a spec of pepper.20 mA thru LED, with transistor saturated to say ~ 1V, is 20 mW.But I would spice this as transistor spends a lot of time not insaturation.Regards, Dana.

author: TheBaconWizard
author_rank: Regular Contributor
timestamp: June 25, 2016, 09:53:55 am
content: I suspect I have misunderstood a principle here, but maybe someone can talk me through it.According to me, in the following circuit (I haven't bothered with specific figures, just the general idea) R1 determines the time delay for switching the LED on, and R2 determines the delay for switching off. Am I way off?And also, if that's right, do the two resistors act on the cap completely independently? (ie R1 only affects time to charge, and R2 only affects time to discharge) so that if R2 was a big enough resistor, the off delay would be longer than the on delay?

author: Seekonk
author_rank: Super Contributor
timestamp: June 25, 2016, 12:34:23 pm
content: With a transistor you will have a linear transition and additional current will be needed to drive the transistor, hence a larger capacitor will be needed. Using a LM431 there will be no loading because the input is an op.amp. The transition will also be a sharp on off.

author: TheBaconWizard
author_rank: Regular Contributor
timestamp: June 25, 2016, 12:38:08 pm
content: Quote from: Seekonk on June 25, 2016, 12:34:23 pmAh, thanks, that's handy to know