Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help Debug Circuit

Status
Not open for further replies.
The Thevenin equivalent of two resistors in this configuration is the value of the two of them in parallel, not in series. It is 10 || 20.9, not 10 + 20.9.


ak
 
I applied the same formula to E-Tech's schematic and came up with
82 x .010 = .82
then added the var and got 5.82
so the range is .82 - 5.82 seconds turn on delay

so i dont know if im ready for this but does it matter the cap / resistor combo values? or as long as it meets the requirements its fine to use what ever cap/res combination you like.
The equation for an NE555 monostable timer is 1.1*R*C, where R and C are the timing components values. There is a limit on the values of R and C but its a wide range.
Generally try to keep C value small or use a high quality timing capacitor to keep leakage current low and improve temperature stability (more expensive cap). An extreme of either of these attributes can cause the value to drift and affect stability of the timer.. The NE555 datasheet is your friend. :)

Example for U1
R1=82k+(P1=min=0,max=500k)
C1=10u

T=1.1*R*C
Tmin=1.1*(82k+0K)*10u=0.902 seconds min
Tmax=1.1*(82k+500k)*10u=6.402 seconds max
 
the value of the two of them in parallel
Ok. Thank you. I thought it would be easy to do it on paper but reciprocal math is not in my wheel house.
I found a calculator and it came up with 6.9 for the resistor total
6.9 x .470 =3.2
still off from your 3.8
---------edit-------
1.1 x 6.9 x .470 = 3.56
 
Last edited:
The equation for an NE555 monostable timer is 1.1*R*C, where R and C are the timing components values.
Note to Thoms:

That is because the capacitor voltage is 0.632 x Vcc after one time constant, but the 555 transition level is 0.667 x Vcc. That is 1.055 times greater, which the datasheet rounds up to 1.1.

ak
 
now ive played around with the calculator.
with just the 22.9k resistor from the IC the TC is 10.7 seconds (22.9 x .470)
so i need to bring that down to 6 seconds. So i lower the cap value. 22.9x .250 = 5.72 seconds
now I add a parallel var resistor to bring it to 10 seconds. so i have the range i require.
Using the calculator i need a total of 40k to give me a max time of 10 seconds. (22.9 +18) x .250 = 10.25
The problem im facing is (using reciprocal math) no matter how much i increase the resistor the (k) value hardly budges .
 
The problem im facing is (using reciprocal math) no matter how much i increase the resistor the (k) value hardly budges .
if there are any other things i need to take into consideration such as volts, current, and ohms I do not know how to apply them.
 
what I am discovering is (excluding the timing issue) the purpose for the resistors and caps is to control the level, flow, and direction of current. I dont know why or how their values are selected but the overall scope less blurry now.
 
Last edited:
Is this what im missing? If so help me solve this. Using the results I have above.
copped from Wikipedia
Charging toward applied voltage (initially zero voltage across capacitor, constant V0 across resistor and capacitor together)
{\displaystyle V_{0}:\quad V(t)=V_{0}(1-e^{-t/\tau })}
 
Last edited:
Is this what im missing? If so help me solve this. Using the results I have above.
copped from Wikipedia
Charging toward applied voltage (initially zero voltage across capacitor, constant V0 across resistor and capacitor together)
{\displaystyle V_{0}:\quad V(t)=V_{0}(1-e^{-t/\tau })}
That is a very common formula for capacitors.

T is the time constant, which is just the capacitance multiplied by the resistance. It's not at all obvious, but a resistance in Ohms multiplied by a capacitance in Farads is a time in seconds.

t is the time, so that would be 0 at the start is the number of seconds from then on.

Then we get to the exponential function e^(-t/T). "e" is Euler's number, which is about 2.71828, and any number raised to the power of zero is 1, so at the start, t is zero and the e^(-t/T) bit is just 1.

As time goes on, and t/T gets bigger, e^(-t/T) gets smaller and smaller, getting closer and closer to zero, but slowing down and never getting there. The larger T is, the slower that e^(-t/T) goes down. At the time that t = T, the expression e^(-t/T) is just e^(-1) which is about 37%

So e^(-t/T) starts at 1 and goes down towards 0.

(1 - e^(-t/T)) then starts at 0 and goes up towards 1, slowing down and never getting quite to 1.

The overall equation Vo * (1-e^(-t/T)) starts at 0, and goes upwards towards Vo, starting faster and slowing down and never getting there.

If we take an example, charging a 10 μF capacitor through a 1 MOhm resistor to 5 V, for 30 seconds, it works out like this. The time constant is 10 μF * 1 MOhm which is 10 seconds.

t/T is 30/10 = 3

e^(-t/T) = e^(-3) = 0.049787 (using a calculator)

1 - 0.049787 = 0.950213 (also using a calculator)

so the final voltage is 5 * 0.950213 = 4.75 V

The only practical warning is that after 2 or 3 time constants the voltage is changing very slowly, so it's rarely practical to make a timer that detects a voltage that has got 95% of the way to its final value. Most timers will usually be in the range 0.5 - 1.5 time constants, so around 5 - 15 seconds with the capacitor and resistor values in the example.
 
That is a very common formula for capacitors.
Your response is appreciated. The time you took to help me understand this is humbling but I do not understand this. Im sure that any experienced designer would look at what you have provided and wonder "Its right there in plain English" Ive read it a dozen times trying to see where my values would apply to help solve what resistor i need seem daunting. And because i have to use parallel math to solve this make me think that this IC is beyond my knowledge. The 555 does allow me to align the components in series where the formula is much simpler. Perhaps I will use this for now until i gain more experience.
T.B.
 
Per the explanation in post #79, In your circuit the exponential capacitor equation cooks down to something pretty straightforward: t = RC >> the time delay (in seconds) equals the value of the resistor (in ohms) times the value of the capacitor (in farads). With this equation, you can start with a desired time value, and the value of whatever capacitor you have on hand, and calculate the required resistance. You can solve for any one of the three variables if you know the other two. Ah, if only it were that easy.

The complication is R because it is a combination of three resistances. For an adjustable time delay (and a single, fixed capacitor value), there are actually two values of R. One is the resistance that yields the minimum delay, and one that yields the max delay. Note that the max delay resistance value always will be larger than the min delay value.

Let's start with the two resistors that are external to the ULN2004. If you have a pot (potentiometer, variable resistor) in series with a fixed resistor, the combination has a range of values. When the pot is turned all the way to one end, it is at its minimum value, close to 0 ohms. In this case, the combined resistance is simply the value of the fixed resistor. This is the resistance for the minimum delay. When the pot is adjusted all the way to the other end, it is at its max resistance, the value usually stamped on the back. In this case, the combined resistance is the sum of the fixed resistor value plus the pot max value. This is the resistance for the max delay.

A constraint that I mentioned before is that the combined resistance should be less than around 15 K. Another is that pots are not available in lotsa values. For this circuit, you're limited to 5 K and 10 K. Let's start with 10 K and see what happens. We'll pick Rt1 (resistance for short delay) = 3.3 K. Rt2 (resistance for long delay) = 13.3 K.

In terms of the impedance that the timing capacitor sees, Rt always is in parallel with the 2004's internal resistor string. So the effective short and long timing resistances are 3.3 K || 20.9 K, and 13.3 K || 20.9 K. After a little math:

The effective short timing resistance, Rt1e, equals 2.85 K.

The effective long timing resistance, Rt2e, equals 8.13 K.

If we pick a short time delay of 5 s, then

C = 5 / Rt1e = 5 / 2850 = 1750 uF. Well, that's large.

With that capacitor value we can calculate the long time delay:

t2 = Rt2e x C = 8130 x 0.00175 = 14.2 s

So, with a 1800 uF capacitor, (nearest standard value), the short time is dead on and the long tim is a bit too long. If we decrease the capacitor value, both times will decrease. This tells me we should drop down to the next standard value, 1500 uF, and recalc.

t1 = Rt1e x 1500 uF = 2850 x 0.0015 = 4.27 seconds.

t2 - Rt2e x 1500 uF = 8130 x 0.0015 = 12.19 seconds.

That is a very reasonable bracketing of the desired range, and will at least partly cover things like the capacitor value tolerance, the actual transition voltage level of a 2004 section, etc.

ak
 
Last edited:
There are two significant sources or error (not the same as sources of significant error) in this circuit.

First is that the resistors inside the 2004 have transistors across them, and this changes how they appear to the external circuit. The net effect is that the apparent value of the three-resistor string is lower than the sum of the resistor values, as two of them are partially shorted by diodes (the transistor base-emitter junctions).

Second is the actual input voltage level at which the 2004 output begins to change state. It is somewhere around 5 V, but this is poorly documented and not at all tightly controlled. A difference of 0.5 V will have a noticeable effect on the time delay value.

Earlier I said that if I were doing this project for myself, I'd use the ULN2004 circuit. That still is true, but ... that's because I own all of the parts and am intimately familiar with their quirks. If this is getting to be too much for you, no problem. I can help you analyze any circuit you choose.

ak
 
Maybe a step-by-step of the R-C charge curve might help.

Circuit elements used:
1 Volt
1 ohm resistor
1 Farad capacitor

Capacitors are charge by current. Here we are using a resistor to control the current into the capacitor.

At time zero The cap voltage is zero and the voltage across the resistor is 1 Volt, so the current through the resistor and into the cap is 1 Amp. After 0.1 Second the cap voltage will be 0.1 Volt.

So now we need to recalculate. The resistor voltage is now 0.9 Volts which gives us a current of 0.9 Amps. The cap voltage at 0.2 Seconds will be 0.19 so the resistor V is 0.81 and the current is 0.81 Amps.

At 0.3 Seconds, cap V = .271, R V = 0.729, Current = 0.729 A
At 0.4 Seconds, cap V = .344, R V = 0.656, Current = 0.656 A

And so on.

As you can see, it's not a linear progression. Each step changes the terms for the next one.



The times above are a gross simplification. In a real circuit the values are recalculating constantly.
 
So the effective short and long timing resistances are 3.3 K || 20.9 K, and 13.3 K || 20.9 K. After a little math:
Trying to follow this.
3.3 + 20.9 + 13.3 = 20.9 in parallel
The calc i use says the above = 2.34
Or is that 4 resistors? Or did you miss type something?

I think your using the IC's resistor for each external resistor
3.3 & 20.9
13.3 & 20.9
 
Last edited:
A constraint that I mentioned before is that the combined resistance should be less than around 15 K. Another is that pots are not available in lotsa values. For this circuit, you're limited to 5 K and 10 K.
i understand pots value limits but why should the resistance be less than 15k?
 
Trying to follow this.
3.3 + 20.9 + 13.3 = 20.9 in parallel
Nope.

3.3 || 20.9

= ( 3.3 x 20.9 ) / ( 3.3 +20.9 )

= 68.97 / 24.2

= 2.85

There are two equation for two resistors in parallel, but they are the same thing with mathematical manipulation. Here is one form:

R1 || R2 = ( R1 x R2 ) / ( R1 + R2 )

ak
 
i understand pots value limits but why should the resistance be less than 15k?
The external resistor and the internal resistors form a voltage divider between Vcc (in your case, 12 V) and GND. The series string is:

Vcc

External timing resistance (Rt)

2004 input pin

Internal 20.9 K ohms (Rint)

GND

The voltage in the middle of a 2-resistor voltage divider is:

Vmid = Vcc x Rint / ( Rt + Rint )

If the largest external resistance is 13.3 K, then:

Vmid = (12 x 20.9 ) / (13.3 + 20.9 ) = 7.33 V.

This is the lowest possible steady-state voltage at the input pin. As the timing resistor is adjusted to a lower value to shorten the timing period, this voltage increases, which is good. What is important is that this voltage is enough above 5 V (the approximate transition level for the input, that it never comes close due to component tolerances. For example, if the timing resistor were 50.4 K, the node voltage at the input pin would be exactly 5 V. If the actual input transition voltage is 5 V +/-0.5 V, that's a problem. I picked 15 K as a quasi-arbitrary upper bound based on experience.

ak
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top