# capacitance value to add delay in circuit

Discussion in 'General Electronics Chat' started by bobdxcool, Nov 12, 2014.

1. ### bobdxcool Thread Starter New Member

Feb 12, 2012
18
0
I am using a relay to turn on/off a 12V motor. I wanted to add a delay in the circuit by adding a capacitor across the relay. I wanted to know what value of capacitor should I use to introduce a delay of 1second in the circuit. What is the relationship between the capacitor value and delay value ?

This is the relay I am using, amazon.com/SainSmart-4-CH-4-Channel-Relay-Module/dp/B0057OC5O8 I am activating the relay using a raspberry pi. The raspberry pi is in turn connected to a ULN2803 Darlington array. This is the schematic, i40.tinypic.com/xknc53.png

Last edited: Nov 12, 2014
2. ### wayneh Expert

Sep 9, 2010
12,368
3,224
The link says the relay draws up to 20mA at 5V, similar to a 250Ω resistor. To get a delay of 1 sec, you need about 2 x RC =1sec, or C=2,000µF.

This is an estimate, because it's unpredictable just when the relay will release as the voltage and current fade off. You can measure it, though.

That module looks cool by the way. No way you could build it that cheap.

3. ### bobdxcool Thread Starter New Member

Feb 12, 2012
18
0
Why have you multiplied RC by 2 ?

4. ### bobdxcool Thread Starter New Member

Feb 12, 2012
18
0
so, to get a 2 second delay, should I do, 2 =2 RC, and find C ?

5. ### wayneh Expert

Sep 9, 2010
12,368
3,224
Wild guess. The voltage across the capacitor falls by exponential decay, falling about 63% with every RC time segment. (Note that the units of RC are time. The half-life is a bit shorter than RC.) So after 2 increments, the voltage remaining is about 0.37^2 = 14%. The guess is that the relay will release when the voltage has fallen to that level.

Last edited: Nov 13, 2014
6. ### cmartinez AAC Fanatic!

Jan 17, 2007
3,696
2,749
Maybe you should consider adding a small 555 circuit to your design, instead of using a capacitor. Although using a cap may seem simpler, you might run into some trouble because the cap has to be discharged prior to re-activating the relay. Besides, a 555 will give you far more accuracy on the delay that you intend to implement.

7. ### wayneh Expert

Sep 9, 2010
12,368
3,224
Yes, one problem with using the RC approach is the slow, soft switching that might cause chatter at the transition point. A sharp on or off is better. But with just a 1 second delay, it might be adequate. Five seconds, no way.

8. ### AnalogKid Distinguished Member

Aug 1, 2013
4,679
1,295
It looks like there already are relay coil transistor drivers on the board, so you might be able to eliminate the 2803 and reverse the logic polarity of the MCU drive signals. A better place for the timing capacitor is at the input to the coil driver rather than across the coil. You will get the delay you want with a much smaller capacitor, and the coil drive transitions will be faster - fast enough to prevent chatter. Don't know without seeing the board and measuring a few things, but maybe each drive signal goes through a diode to the board input cathode to the board, anode to the MCU, and put the cap from each cathode to GND. MCU charges the cap, board relay driver input discharges it.

ak

wayneh likes this.