specific time carrier

Thread Starter

magnethead

Joined Nov 9, 2010
147
This may have been asked before, maybe not to this specific amount.

I'm trying to design a timer module, for this specific application:

12 volts input is provided.

12 volts input is dropped. Timer starts counting.

one half of a second, +- 0.125 second, later the output does something. I dont care if it drops or is provided.

one second after count start, +- 0.125 second, ditto.

purpose: Traction control devices are expensive. Using accelerometer, I know exactly when we are slipping tires (drag racing). I want to retard the timing at 0 to 0.5 seconds (retard channel 1) and 0.5 to 1.0 seconds (retard channel 2).

The input is the transbrake switch- cuts the 12 volts to the Tbrake when the car launches. Thus, when this 12 volt is dropped, i want the timer to start.

The MSD box wants a ground to disappear, in order to activate the timing retard channels.

So, what I want:

channel 1: transbrake is engaged, charging resis/Capac circuit. transbrake released, RC circuit starts discharging, and after half a second, the output falls out. this de-energizes a relay, which disconnects the MSD terminal from ground.

channel 2: transbrake is engaged, charging resis/capac circuit. ransbrake released, RC circuit starts discharging, and after a full second, the output falls out. this de-energizes a relay, which disconnects the MSD terminal from ground

So for the first half second, both channels are active, then only one is, then none are.

Reason: I want to launch with the engine retarded 10 degrees. So Ch 1 and ch2 both have 5 degree chips in them. First half second, both are on, so 10 degree total. next half second, only ch 2 is on, so only 5 degree. after that, it's at the full 45 degree timing advance.

I've done a little reading, but I don't know much. I figure the relays will cost more than the components....

From my understanding, you bridge the resistor across the capacitor, to promote capacitor leak-down. The output will drop when the capacitor has drained itself empty. But I don't know how to predict Vmax of the capacitor. But from what I can tell, I can use the same capacitor # on both circuits, and just use a resistor that is twice as resistive for the 1.0 second delay timer?

(time) = (time constant)*(voltage)/(Vmax)

voltage = 12 VDC (actually 14.4 on the alternator

0.5 = TC * V/Vm

1.0 = TC * V / Vm

(time constant in seconds) = (resistance in ohms) * (capacitance in farads)

thus,

0.5 = (resistance in ohms) * (capacitance in farads) * 13.8 [avg] / Vm

1.0 = (resistance in ohms) * (capacitance in farads) * 13.8 [avg] / Vm
 
Last edited:

beenthere

Joined Apr 20, 2004
15,819
Just to clarify for other members - this project is not concerned with standard automotive applications, so our guidelines are not applicable. Please help if you wish.
 

Thread Starter

magnethead

Joined Nov 9, 2010
147
Right. Here's a very poor idea of what I'm wanting to do. I just don't know what values C, R1, and R2 should be, but from what I can tell, R1 should be double the value of R2, so that the time will be half for that side of the circuit? Also, the transbrake is only on for less than 1.5 seconds, so it would also have to charge the capacitor in that amount of time, before emptying in a span of 0.5 and 1 seconds. So it seems like the value will all be very small. It seems to me, that with small enough capacitors, that resistor's wouldn't even be needed, but i assume they have to be there to charge the capacitor? I don't know the impedance of the relay coils, but could inline capacitors be just enough that the relay coil was have enough resistance to not even require an external resistor?

edit- checked the data sheet- 155 ohms for the coil of a STSP-NO relay (per Omron Elec)

So if I were lucky enough, I could just get an assortment of 5 capacitors, and use my test-bench so see what values get close to the numbers I want, then narrow my window down. but that would be wasted money on caps...if somebody could help me with the mathematical (and explain it in laymens for future reference) so i can get it right on first or second try, it would be appreciated.

Also, something i forgot to ponder, the relay's coil will release somewhere around 10 volts. So the capacitor will always have a little bit of a charge in it, I suppose, and never actually be fully empty? That should help that <1.5 second recharge time, correct? Also, aren't most capacitors rated at 16, 25, or 50 volts, or does that not matter?

If i could find a definition of Vmax, I could probably figure this out quicker...

components are no problem, I live 3 miles from Mouser Electronics' warehouse (http://www.mouser.com)

 
Last edited:

Kermit2

Joined Feb 5, 2010
4,162
Time for 2/3 of the supply voltage to appear(charge into) equals resistance x capacitance

10k x 1uf = 10,000 x .000001 = .01 seconds. If you had exactly 12 volts in your circuit supply then in .01 seconds it would have 8 volts on the cap. (12 x 2/3) In the next .01 seconds it would go up much less. Of the 12 volts, it now has 8, so only 4 volts difference is left. (4 x 2/3 = 2.67 volts) 8 plus 2.67 is 10.67! the difference is now only 1.33 volts. (2/3 of that etc etc) you get it.

Caps are considered fully charged in 5 of these RC time constants.
 

Thread Starter

magnethead

Joined Nov 9, 2010
147
edit 2 (timed out): looking @ yahoo answers, Vmax is the voltage rating of the cap, and voltage is the operating voltage?

if so, for a 16 volt rated Cap,

V = Vmax*(1 - e^(-t/RC) )

V/Vmax = .6 = (1 - e^(-t/RC) )

12/16 = .75 = (1 - e^(-t/RC) )


( 1 - .75 ) = e^(-t/RC)

Ln(.25) = -t/RC = -1.3863

RC = t / 1.3863 = 1.0 [safe side] / 1.3863 = 0.7213 second time constant

0.5 =/= .72 * 12/16

1.0 =/= .72 *12 / 16

.72 * 12/16 = 0.5410 seconds to discharge, and R * C = 0.72? Which, if R is 155 ohms (relay coil), then C would be 0.004 farads, which is 4uF, i think? And that would only solve my half-second case, not the full second?

Is that right? i've successfully gotten myself lost?
 

Thread Starter

magnethead

Joined Nov 9, 2010
147
Time for 2/3 of the supply voltage to appear(charge into) equals resistance x capacitance

10k x 1uf = 10,000 x .000001 = .01 seconds. If you had exactly 12 volts in your circuit supply then in .01 seconds it would have 8 volts on the cap. (12 x 2/3) In the next .01 seconds it would go up much less. Of the 12 volts, it now has 8, so only 4 volts difference is left. (4 x 2/3 = 2.67 volts) 8 plus 2.67 is 10.67! the difference is now only 1.33 volts. (2/3 of that etc etc) you get it.

Caps are considered fully charged in 5 of these RC time constants.
okay, so basically then, charge time shouldn't matter? If I used the relay coil's resistance inline, the total package would be 155 * C, so for arbitraries standpoint,

155 ohm * 100uf = 155 * 0.000100 = .0155 second. fully charged being 5 cycles, would be a full charge in 0.0755 seconds.

What about discharge rate? Since that's the more important thing i'm needing.

So, assuming the relay's coil de-energizes at 10 VDC, and a full charge is 12 volts, then it only has to fall to 83% of it's total charge to cease output? Is this where that natural log formula comes in?

A thought I had, if I have to use an external resistor, couldn'tI just use a potentiometer, that way I can move it around until I find the setting I want? I'd ditto with a varistor, but Mouser doesn seem to have them as cheap, and all are in picofarad...
 
Last edited:

Kermit2

Joined Feb 5, 2010
4,162
Just go backwards with the voltages. 1 tc; 66% of the caps voltage 'bleeds' away - remember to look at the circuit and use the resistance in the discharge path. It can be different. You might use a forward biased diode to fast charge a cap with a pulse and then discharge the cap through a high resistance, so a short pulse could be changed to a longer duration one using a cap, a diode, and a resistor. R x C = Sec. = 1RC Time Constant; gets you 2/3V Every time.
:)
 

Thread Starter

magnethead

Joined Nov 9, 2010
147
Just go backwards with the voltages. 1 tc; 66% of the caps voltage 'bleeds' away - remember to look at the circuit and use the resistance in the discharge path. It can be different. You might use a forward biased diode to fast charge a cap with a pulse and then discharge the cap through a high resistance, so a short pulse could be changed to a longer duration one using a cap, a diode, and a resistor. R x C = Sec. = 1RC Time Constant; gets you 2/3V Every time.
:)
So am I better off having the resistor bridged across the capacitor leads, or in-line downstream?

So, lets say I took a 10k to 1M potentiometer, so I could adjust it for track conditions (so I could shorten the retard for good conditions, and run it out for bad).

From what I can tell, recharge time will always be less than one second except for super small resistors.

So, lets say I go with that 10k-1M pot, with a 10uF cap?

10,000Ω + 155Ω * .000010 = 0.1 second. So, it'll go from 12 volts to 4 volts in 1/10 of a second?
100,000Ω + 155Ω * .000010 = 1 second. So, it'll go from 12 volts to 4 volts in one second?
1,000,000Ω + 155Ω * .000010 = 10 seconds. Don't think I need quite that long....

Can't find the link to the 10K-1M pot i had earlier...but here's a 1W 10k pot that i'd prefer to use- http://www.mouser.com/ProductDetail...=sGAEpiMZZMsEGgLEzQVydkL99A7CVoDmVH0ZxofOwfU= that way i know it has the power handling... $1.50 not bad either.

How do i know what the range is though? Does it start at 10k, center on 10k, or end at 10k? Would a 50k pot be better? http://www.mouser.com/ProductDetail...=sGAEpiMZZMsEGgLEzQVyduOUXJIjM5Ftt9z8jtqw1AQ=

or 2W 100k? http://www.mouser.com/ProductDetail...=sGAEpiMZZMsEGgLEzQVydmFA56OEN7E8R/AK/BUmm80=

100,000Ω + 155Ω * .000010 = 1 second.
100,000Ω + 155Ω * .000050 = 5 second.

If my assumption is true (12-> 4 volts in t seconds), then I think the 100k + 10uF would be plenty for my application?
 
Last edited:

Thread Starter

magnethead

Joined Nov 9, 2010
147
alright, the graphic at the top of this page made it easier to see- http://www.tpub.com/neets/book2/3d.htm

so charge time == discharge time so,

100,000Ω (R1) + 155Ω (coil) * 10uF =
100,000 + 155 * 0.000010 = 1.00155 Time constant (1 RC)

So if it looses 66% in one RC, it will drop from 14.4 to 4.75 volts in the first RC, correct?

Assuming the relay coil drops at 10 volts, and assuming that graph is anything close to accurate, 10/14.4 = 69%, which occurs somewhere around 0.4 of an RC.

This means, that for one side, 0.4 of an RC must be 1/2 of a second, and for the other side, 0.4 of an RC must be a full second?

This would mean that for one side, one RC must be 1.25, and for the other, one RC must be 2.5 seconds.

In terms of charge time, this also means that for one side, a full charge of 5 RC's would be 6.25 seconds, and for the other side, would be 12.5 seconds.

However, because the circuit is broken at 10 volts, the capacitors will always have a "surface charge" on them, which means it should theorietically only take one RC to bring back up to full charge (correct me if I'm wrong)?

So based on all this, I could go to a a 25uF cap...

100,000Ω (R1) + 155Ω (coil) * 25uF =
100,000 + 155 * 0.000025 = 2.503875 Time constant (1 RC)

0.4 of an RC (69% reserve, or 10 volts) times a 2.503875 sec RC = 1.00155 seconds. Which, for all I care, is darn close to what I want for the second stage.

Now getting the first stage,

X + 155 * .000025 = ~1.25
X = 50K

50,000 + 155 * 0.000025 = 1.253875

Alright, so both sides get a 100K pot and 25uF cap. One pot is halfway, other is full open. But what about adjustability?

Easy fix. Instead of having one 100k pot wide open, i can series 2 100k pots, and have both at halfway.


So, am I totally in the wrong ballpark, or am I learning this on my own?
 

Thread Starter

magnethead

Joined Nov 9, 2010
147
OK, so i was wrong on dropout. Spec sheet fo relay- http://www.mouser.com/catalog/specsheets/850-0210.pdf

Says the gradual dropout voltage is 10% of nominal voltage...which means it drops at 1.2 volts. I thought it would drop at 10 volts.

If that's the case, then all the math has to be re-worked, and the resistive value will be much lower- looks like a 50k pot will be plenty, and I wont even have to have it wide open?
 
Last edited:

Thread Starter

magnethead

Joined Nov 9, 2010
147
Ok, so based on dropout being 10%, and not 69% as I had thought, changed thing up. Now 2.5RC's have to equal ~0.5 and ~1.0 seconds.

2.5 RC = 0.5s -> RC= 0.2 seconds
2.5 R = 1.0s -> RC = 0.4 seconds

So that the capacitor would have emptied from 14.4 volts to ~1.2 volts in half a second and one second respectively, the RC period would have to be 0.2 and 0.4 seconds respectively.

For a 50 uF cap,

X + 155 * .000050 = .2
X = 4000 ohms = 4Kohm
X + 155 * .000050 = .4
X = 8000 ohms = 8 Kohm

For a 25 uF cap,

X + 155 * .000025 = 0.2
X = 8000 ohms = 8Kohm
X + 155 * .000025 = 0.4
X = 16000 ohms = 16Kohm

For a 10uF cap,

X + 155 * .000010 = .2
X = 20,000 ohms = 20 Kohm
X + 155 * .000010 = .4
X = 40,000 ohms = 40 Kohm

With that said, I'm trying to come up with a combination that would give me the most tuning flexibility at least cost. The problem is, I need some over-run beyond the given value, and I'm not so sure a 10Kohm pot with an 8 Kohm requirement would give me enough overrun, say I needed it to actually be at 12Kohm. Ideally, I'd like to have the center of the pot be the value I need for the circuit to work at the optimimum values, but I also have to factor up to +- 20% of tolerance on any given values.

If I use a 25 uF cap, then I could do what I want using a 3 Kohm and 10 Kohm resistor inline with each post, so that they are centered on 8 and 16 (give or take). I'm wondering if that would just simply be my best bet? It would also give me the most accurate tuning ability, since it wouldn't be that hard to find 10K out of one turn of a shaft. I could be more accurate using 2 5K pots, but i'm trying to be cheap here, too.
 

Thread Starter

magnethead

Joined Nov 9, 2010
147
So here's where I stand-

I have everything built, but it's not working. So I debugged it. My benchtop power supply is putting out 11.65 VDC.

power in - 25uF cap - 5K pot - 5K pot - 3.3K resistor - switch - LED - relay - ground

First thing I did was make sure relay works- check
- I left ground as is, and put power lead to other coil contact, and it worked

Second, I backed it up, and put power at the switch/LED connection- LED lit up, but relay didn't work

Third, I backed it up one more- turned switch on, and went from the resistor/switch connection. LED lit up, relay didn't work.

Fourth, I backed it up one more- left switch on, and went from the second pot/resistor connection. LED was dim.

So I thought, maybe the external resistor and LED (With internal resistor) were too much load. So I bypassed them, going straight from pot to relay, putting power at second pot, and it worked.

next, put power to first pot, and it worked as long as both were at 1/4 or less.

next, put power to the "out" lead of the capacitor, and it worked.

next, put power to the "in" lead of the capacitor, nothing worked.


What did I do wrong? Does direction matter with capacitors (I'm using axial if it matters)?

I put my voltmeter just across the cap, and if I put red on the input and black on output, it reads positive. Switch leads, and it's negative.
 
Last edited:

Thread Starter

magnethead

Joined Nov 9, 2010
147
update- I just tinkered some more with the bypassing, and it still doesnt work, even with only the LED bypassed- apparently the 3.3 Kohm resistor is too much load, and doesnt allow it to trigger the relay.

So i bypassed a direct connection from the second pot to the relay.

Turns out, the relay is energized only IFF there is less than 107 ohms from the pots. I turned them from closed (5Kohm) to wide open, until the relay activated. first pot said 10 ohms (all the way open), second said 97. and it still doesnt work if i put power at the inlead of the cap.

The actual coil resistance in the relay is 177 ohms. So total dropout resistance is 284 ohms. I=V/R is 11.65/284 = .04 amps.....

This is not going how I had planned.....
 
Last edited:

Thread Starter

magnethead

Joined Nov 9, 2010
147
So if I were to only use a 100 ohm potentiometer (do those even exist?),

I need RC's of 0.2 and 0.4 seconds.

277 ohm * X = 0.4
X = 0.001400 Farad = 1400 uF???
277 ohm * X = 0.2
X = 0.000722 Farad = 722 uF???

So I'd have power in, 1400 (700) uF cap, 100 ohm pot, relay coil, then ground, and that would be it???

I've put $40 into this so far (pots are $7 each) so it would be nice if I could get it right, maybe second try? I'd prefer to make what I have now, work.
 
Last edited:

Thread Starter

magnethead

Joined Nov 9, 2010
147
checked again to make sure, and indeed, it won't actuate the relay unless i supply power after the capacitor, for either circuit.

I have the ridges of both capacitors facing power in. Do I have them reverse? Do I need to replace the caps? What can I do to make the relay actuate at high resistance?

capacitor: http://www.mouser.com/Search/Produc...5-E3virtualkey61320000virtualkey75-TVA1205-E3
data sheet: http://www.mouser.com/catalog/specsheets/tvaatom.pdf

So, if I had to overcome the high resistance not allowing the relay to engage, I could go to this 100 ohm potentiometer: http://www.mouser.com/ProductDetail...=sGAEpiMZZMtxdMMi52izymMkEveFlKhU9VEaJTIpo0M=

250 ohm (not enough) * X = .4
X = 0.001600 Farad = 1600 uF & 800 uF

277 ohm * X = 0.4
X = 0.001400 Farad = 1400 uF & 700 uF

300 ohm (too much) * X = .4
X = 0.0013333 Farad = 1333 uF & 666 uF

.002 * 277 = 0.554 second RC * 2.5 = 1.385

.0016 * 277 = 0.4432 second RC * 2.5 = 1.108

.0014 * 277 = 0.3878 second RC * 2.5 = 0.9695

.0013 * 277 = 0.3601 second RC * 2.5 = 0.90

For adjustabilities sake, I'll be better off going with a larger than neccesary capacitance...say, two of these 1000uF caps in parrallel for a 2000uF net capacitance: http://www.mouser.com/ProductDetail...=sGAEpiMZZMtZ1n0r9vR22fPWwtj8kO8a0v3hPZ8wmD0=

That would give me over-adjustability with only one pot per channel instead of two.



edit- here are pics of what I have (click thumbnails):

edit2- in second pic, you can see a plus sign on ridge. Both are same, so I think it's wired correctly. So why can I not get conductance thru cap? Do i need to make pots + resistor parrallel with cap?





 
Last edited:

Kermit2

Joined Feb 5, 2010
4,162
You have come this far. Go get a 555 timer or three and we will do this neat trim and proper. The math exercises you just went through will serve you VERY well in the coming change.
We are going to use transistors. They will 'switch' the relays on and off. We are going to use 555 timers to 'trigger' the resistors.

You WILL NEED to create the same type of timing RC circuit for the timers.

Your method will work but will NOT be timing stable, meaning each time you run it, the circuit will trigger at slightly different times.

Using the timers will increase the accurracy of your on off cycles and make any tuning you do last for more than minute or two.

You game?
 

Thread Starter

magnethead

Joined Nov 9, 2010
147
Alright, do I need PNP, NPN, MOSFET, or ???? transistors?

I was trying to avoid IC's since i've never used a breadboard/PC board, nor soldered on close proximity pins. (granted i bought a new soldering iron...the tip finally melted off my dad's)

transistor choices- http://www.mouser.com/Semiconductors/Discrete-Semiconductors/Transistors-General-Purpose/_/N-7h7n3/

Timers- http://www.mouser.com/Semiconductor...zvq76Z1yzxmn9Z1z0sv49Z1z0w92cZ1z0wa4cZ1z0wa34

My electronics book has 2 different timers- one uses JFET (2N3819) but requires a reset circuit, and other uses N channel MOSFET and no reset circuit. Is the later what we're heading towards?

Also, what Drain-Source Breakdown Voltage and Gate-Source Breakdown Voltage ?

Is an off-on circuit possible?

DPDT relay 1- the half second circuit, fired by timer, one side engages MSD box ch 1, other side illuminates status LED
DPDT relay 2- the one second circuit, fired by second timer, engages MSD box ch 1, other side lights status LED
DPST relay 1- goes from our external shift timer, engages MSD ch. 3 during shift (has no part in the technical side of proj)

I'd like to have the 4th MSD channel be where I could set it to anywhere between zero and 6 seconds, where it's off, then briefly turns on, then turns off again- ie if I see we're losting traction down track, I can tell it to dial back on channel 4. But that's only if we can get the first 2 stages working.

edit- would 556's be a better idea? Seems like if I did that, it clean things up a little? would this work? -> http://www.mouser.com/ProductDetail/Texas-Instruments/TLC556IN/?qs=sGAEpiMZZMuMkwKcEjFF1Pzg5iWPfmn5H4JBIp9zSHU%3d

What about this N-MOSFET? http://www.mouser.com/ProductDetail...=sGAEpiMZZMtCrm2fS1SYQtwshenJsAeCDyZpuNze5m0=

I'm still reading up on it before class-

So putting a timer in monostable mode, we'll be using the 555's output pin to trigger the gate of the transistor, will have the relay between drain and +12V constant, and source has the RC parrallel circuit connecting it to the gate?

So i'll need a third DPDT relay to convert the transbrake release (removes 12V) to a switching action to engage the two circuits? I suppose I could fly with that.

So the delay time will be 1.1*R*C?

"Beware that electrolytic capacitors leak charge which substantially increases the time period if you are using a high value resistor - use the formula as only a very rough guide! "

.5 = 1.1*R*C
1.0 = 1.1*R*C

0.4545 = RC
0.90909 = RC

I was a low value resistor and high value capacitor, from the sounds of that caution statement. But I already have 3.3Kohm resistors (is that considered a high value?) and 5Kohm pots- a total range of 3.3K-8.3K ohms

.4545 = 3300 C
C= 0.000137
.9090 = 3300 C
C= 0.000275

.4545 = 8300 C
C= 0.0000547
.9090 = 8300 C
C= 0.0001095

So i'm just better off getting all new stuff, ie 500ohm pots and 100 ohm minimum resistors? :/ wow, this is an expensive project suddenly...
 
Last edited:
Top