# Capacitor Question

Discussion in 'Electronic Basics' started by [email protected], Feb 9, 2006.

1. ### Guest

I have a voltage supply of 12-14.5 DC with a 7805 Regulator, what
would be the capacitor values before and after the regulator to
"smooth" the 5 volts output of the regulator?

Also....

How would I calculalte these values for future reference?

2. ### Charles SchulerGuest

C = (I/Vpp)T

where C is the capacitance in Farads
I is the load current
Vpp is the maximum (allowable) peak to peak ripple voltage
T is the period in seconds

So, as an example, for a 60 Hz full-wave supply at 5 amps with an allowable
ripple of 1 Vpp, the capacitor should be about 40,000 uF.

The above will guide you in picking the capacitor before the VR. The one on
the output side is typically 10 to 100 uF.

3. ### Pooh BearGuest

The output of the 7805 doesn't need any smoothing, it's already
'smoothed' by the 7805 ! A small amount of capacitance at the
regulator terminals helps stability though ( see manufacturer's data
sheet / application note ). I normally use a 10uF electrolytic in
parallel with a 47n plastic film or ceramic type. That's in addition
to any load decoupling you also need of course. If the regulator isn't
near the bulk storage cap you may also want to add some local
decoupling on the input too.

As for the input.... I assume you're using a full wave rectifier at ac
line frequency ?

You need to consider ripple current ( an approx rule of thumb is 1.6x
DC load current ). You'll find ripple current ratings on the capacitor
manufacturers data sheet. 'Derating' ripple current ratings - being
more 'conservative' - makes the cap last longer btw ( also consider
operating temperature for lifetime ) !

You also need to the consider ripple voltage that the storage cap will
result in.

Pk-pk ripple voltage is ~ Iload/Cstorage*( tdisch) where tdisch is ~
7.5 ms for 50Hz supplies and ~ 6ms for 60Hz supplies.

Eg 4700uF - 1 A load and 50 Hz > ( 1/4700*10^-6 ) * 7.5*10^-3

= 1.6 V ( quite an acceptable figure )

Graham

4. ### John FieldsGuest

The only thing you need on the output of the regulator is a 0.1µF
capacitor and, if your DC supply never goes below 7.5V when the 7805
is supplying maximum current into the load, a 0.33µF cap across the
input, and they should both be as close to the 7805 as possible.

5. ### Guest

Maybe I am thinkng this all wrong, with so many different answers, Whic
one is roght?

This is a DC input from a 12-14.5 volt vehicle battery.

what is happenning, with a circuit a made to flash lights for certain
gears, is that my gear sensor out put varies a lot with acceleration,
maybe the cap or whatever, should be on the gear input side????

6. ### Pooh BearGuest

Why didn't you say that before ? That's somewhat important. You don't
'smooth' a car battery with a cap any more than a person can stop an
elephant !

Sheesh. I went to all the trouble of typing out how to select a reservoir
cap for an ac supply and all along you were just pulling my leg !

10uF on the in and out should be fine.
I haven't a clue what you're rabbitting on about. What 'gear side' ? What
sensor ? What does this have to do with a 7805 ? Why does acceleration
affect it ?

Would you like to start again at the beginning by explaining ( as ever )
what you *really* want to know ( with full accomapanying details ) instead
of just hinting at it ?

Graham

7. ### Guest

I have a voltage supply of 12-14.5 DC with a 7805 Regulator

Yikes....it said in my original post that it was DC!!!

Anyone who knows anything about a car, knows that with acceleration and
deccelration, the battery voltage can rise and fall.

I have an output from a sensor on the transmission that that puts out 1
- 5 VOLTS DC, deoending on which gear you are in.

What I am finding is that if I am in first, I would like the output
from the transmission to my circuit board to stay around 1.5 volts dc,
not 1.4 to 1.6 depending on acceleration and deccelration. The
fluctuaion is affecting my circuit. I would like to see if I can get
the variance closer than 1.4 - 1.6.

This voltage changes for every gear but it still flucuates whithin it's
voltage. around 15%.

Or is this something that I could accomplish with another component,
say a series resistor 10K or so.....I don't know.

Hopefully this is clear enough.

8. ### John PopelishGuest

Is the sensor (a potentiometer that varies with gear position) powered
by your 5 volt regulator, or by a connection directly to the battery
(or through a dropping resistor to the battery)?

Is your regulated 5 volts varying with engine speed, or only the
battery voltage?

9. ### GuestGuest

wrote:
:>I have a voltage supply of 12-14.5 DC with a 7805 Regulator

: Yikes....it said in my original post that it was DC!!!

: Anyone who knows anything about a car, knows that with acceleration and
: deccelration, the battery voltage can rise and fall.

: I have an output from a sensor on the transmission that that puts out 1
: - 5 VOLTS DC, deoending on which gear you are in.

: What I am finding is that if I am in first, I would like the output
: from the transmission to my circuit board to stay around 1.5 volts dc,
: not 1.4 to 1.6 depending on acceleration and deccelration. The
: fluctuaion is affecting my circuit. I would like to see if I can get
: the variance closer than 1.4 - 1.6.

: This voltage changes for every gear but it still flucuates whithin it's
: voltage. around 15%.

: Or is this something that I could accomplish with another component,
: say a series resistor 10K or so.....I don't know.

: Hopefully this is clear enough.

No cap on the input of the regulator is necessary in your
situation.

The information that you need to give me to answer your
other question is how much the CURRENT of the load (your gear sensor) of
the 7805 changes and how fast (actually, we could assume the worst case,
that the change is instantaneous.) If the answer is that your gear sensor
draws a constant current from the regulator, no cap on the output of the
regulator is necessary. Otherwise, I believe a previous poster gave an
equation for the cap. value vs. the peak-allowable ripple on the supply.
Use that.

Joe

10. ### Guest

The gear postition sensor is part of the bike, not my circuit, my
circuit just takes this information and campares it to voltages on my
voltage ladder and kicks on the proper comparator to give an indication
light.

Even with no circuit attached to the bike, I read the outpout of the
sensor and this is what I get(min to max.....manual stated value)

1st - 1.68 to 1.76....1.782
2nd - 2.13 to 2.21....2.242
3rd - 2.83 to 2.98....2.960
4th - 3.51 to 3.63....3.63
5th - 4.23 to 4.33....4.31
6th - 4.56 to 4.66....4.66
neu - 4.85 to 5.15....5.02

The 5v from the I am not sure if it flucuates with vehicle accel and
decel, however it shouldn't matter should it?
If my 7805 output goes down, say due to decel, my voltage ladder
cutouts will drop also. And I would think that everything should be
equal.

I am still awaiting my PIC programmer, so it will eliminate all this
stuff, however, I beleive in the last week , I have learned a lot about
this stuff, and would still like to solve my initial problem.

Post back if you need any more info.

11. ### John PopelishGuest

As I understand it, the position sensor is a variable resistor
(potentiometer) connected to some supply voltage. If that voltage is
regulated, the engine speed (alternator voltage) should not affect the
output voltage. If the potentiometer is connected in series with a
fixed resistor to the positive side of the battery, then engine speed
will vary the total voltage across the potentiometer, and also the
output at each of the gear positions. You need to have your A/D
converter have the same voltage as its reference(full scale voltage)
as the potentiometer has, either by duplicating the way the
potentiometer develops its voltage (a second voltage divider across
the battery, instead of using the 5 volt regulator) or you need to
change the supply to the pot to power it from your 5 volt regulator.
This is the only way they will agree in spite of the battery voltage
variations.
This looks like there are still clear divisions between these ranges
to make an unambiguous decision, as long as you can filter out any
noise. For example, taking the average of the highest the lower
voltage can be and the lowest the next highest level can be I get
these decision points:

1-2, 1.95 volts
2-3, 2.52
3-4, 3.25
4-5, 3.93
5-6, 4.45
6-n, 4.76

You can also do digital filtering, like I described earlier, to
prevent flicker on an occasional spike.
It is the full scale reference for your A/D converter, so if it
bounces around, it bounces your measurement around. 50% of full scale
output on the A/D occurs at half of the 5 volt regulator voltage. So
you may need a little high frequency capacitance on the regulator
input and output, and, perhaps a bit of resistor or inductor between
its input and the battery line.
I thought we were talking about the microprocessor doing the job. Are
we back to the string of comparators?

If so, yes, the ladder string will vary, but is it varying exactly the
same way the potentiometer supply is varying? If the potentiometer
uses a series resistor to drop the battery to approximately 5 volts
full scale, then your resistor string also needs a series resistor,
not a 5 volt regulator to drop the battery voltage to a range of taps
between 0 and about 5 volts. The two processes have to track each other.
Okay, I think I understand, now. If you use 5 volts as the full scale
reference for the A/D, don't be too surprised if the problem is
exactly the same as it is now.

12. ### Pooh BearGuest

Most ppl's DC comes from an ac supply of some sort.

You asked about *smoothing*. A battery doesn't need smoothing at all.
Actually the battery voltage rises and falls with the *load*. Vehicle speed
has no direct effect at all. Besides you didn't even mention a car in your
original post !

That's going to depends on what your *output* is ! Nothing to do with any
7805 !
Without knowing what your circuit is - no - not at all. How can I possibly
answer a question about a circuit if you won't tell me anything about it ?
Do you think I'm psychic ?

You can't even explain yourself properly. I suspect you haven't a clue what
your're doing. Seems common these days.

What has education come to ?

Graham

13. ### Pooh BearGuest

You reckon ?

Never heard of ( trace ) inductance ? Instability ? It's the blind leading the
blind here !

Graham

14. ### Guest

Oh, sorry Pooh Bear.....me stupid....me know nothing.......you know
everything.

I have no education.......just figured with everything else that is
done online, why not get "brilliant, witty, biting" people like you to
do my work for me.

The battery voltage rises and falls with rise and fall of the engine
speed not speed of the vehicle.

For your ultimate clarity.....
http://www.bluegauges.com/gearindicatorplans.htm is what I have made.

With the rise and fall of engine speed, the output of the gear position
sensor goes up down also. This is with no circuit hooked up.

When I hook it up to the circuit, (pin 3 on U2 and U3) and put the bike
in first gear, and rev the engine, the second light flickers.
This does not happen in every gear, but about 3 out of six of them.

Maybe all I need is a series resistor, to bring the voltage down a bit.

But then I have no education and just want someone to do my work for
me.

So if anyone feels like helping they can if not....go to the Pooh Bear
side.
Some people like to share knowledge, and others like to point out
people's lack of it.

15. ### GuestGuest

: wrote:

:> No cap on the input of the regulator is necessary in your
:> situation.

: You reckon ?

: Never heard of ( trace ) inductance ? Instability ? It's the blind leading the
: blind here !

: Graham

Jackass. Why does this matter on the INPUT of the regulator.

In case you didn't hear me: Jackass.

You might have an argument for a compensating cap on the OUTPUT of
the regulator, but I'm not familiar with the inner workings of a 7805, and
assumed that any good designer would compensate his regulator so that it
was stable over the specified (in the datasheet) operating conditions

Once more: You are a jackass.

Joe

16. ### GuestGuest

: wrote:

:> No cap on the input of the regulator is necessary in your
:> situation.

: You reckon ?

: Never heard of ( trace ) inductance ? Instability ? It's the blind leading the
: blind here !

: Graham

One more time: JACKASS.

I forgot to put this in my last post: For a DC INPUT, why do you
care about trace inductance? I'll make it easy for you with a multiple
choice question:

1. You don't.
2. You don't and you (Graham) are a jackass.

Joe

17. ### Pooh BearGuest

In case the bulk cap is some distance away.

I suggest you read up on the app notes.
It shows.
You're mistaken. A typical beginner's error.
And you're a monkey who talks out of your ass. Read up on the parts before opening
your idiot mouth again will you. No shortage of know-nothings talking garbage here

Graham

18. ### Pooh BearGuest

See Fig 1 of
http://focus.ti.com/general/docs/lit/getliterature.tsp?genericPartNumber=ua7805

There's 0.33 uf on the regulator input.

National's LM340 ( replaces 78xx ) series datasheet
http://www.national.com/ds.cgi/LM/LM340.pdf offers more info. *Required if the
regulator is located far from the power supply filter.

And you're just plain simply *WRONG*.

I've seen ppl do what you suggest and their supplies are sometimes unstable ( high
frequency ripple superimposed on the DC output ) .

Graham

19. ### GuestGuest

: wrote:

:>
:> : wrote:
:>
:> :> No cap on the input of the regulator is necessary in your
:> :> situation.

: See Fig 1 of
: http://focus.ti.com/general/docs/lit/getliterature.tsp?genericPartNumber=ua7805

: There's 0.33 uf on the regulator input.

: National's LM340 ( replaces 78xx ) series datasheet
: http://www.national.com/ds.cgi/LM/LM340.pdf offers more info. *Required if the
: regulator is located far from the power supply filter.

:> : You reckon ?
:>
:> : Never heard of ( trace ) inductance ? Instability ? It's the blind leading the
:> : blind here !
:>
:> : Graham
:>
:> One more time: JACKASS.
:>
:> I forgot to put this in my last post: For a DC INPUT, why do you
:> care about trace inductance? I'll make it easy for you with a multiple
:> choice question:
:>
:> 1. You don't.
:> 2. You don't and you (Graham) are a jackass.

: And you're just plain simply *WRONG*.

: I've seen ppl do what you suggest and their supplies are sometimes unstable ( high
: frequency ripple superimposed on the DC output ) .

: Graham

Graham,

Please begin your reply with "I, Graham, am a jackass."

If you look at the schematic of the 7805 in your datasheet (I'm
looking at:

http://www.st.com/stonline/books/pdf/docs/2143.pdf

Page 2/34

...you'll see that the 7085 is a series regulator built from
a simple 3-stage opamp (4 if you count the output cascade as 2
separate stages, with the feedback from the output to the (-)
terminal internal to the part. This has 3 major poles, one caused by
each stage. Although I'll admit that I was wrong about the designer
properly compensating the amplifier, I wasn't totally wrong. C1 splits
apart the poles caused by the first 2 stages. This amplifier is designed
to be compensated by moving the output pole in so far as to make it to
dominant pole. That is done with a large cap. in parallel with the
output. Provided that this cap is large enough, so as to make that pole
the dominant pole, this amp. cannot be made to go unstable.

If you observed 7805s going unstable, then you didn't have enough
output cap. If you want to argue that you can make your output cap
smaller by using an input cap to limit the input bandwidth, you're just
arguing conservation of difficulty. If you go back and re-read my
original post, I said that no input cap was necessary, but the output cap.
required some thought. Can't you see that in "your" case, you are using
your input cap to limit the bandwidth of the input signal, where as in
"my" case I am ensuring that the amplifier remains unconditionally stable?

App. diagrams are designed so that people who have little to no
knowledge about how the part works don't get themselves into trouble. I
suspect that's why you like them so much.

Joe
Not blind, not a beginnner, not wrong, NOT A JACKASS!

20. ### Pooh BearGuest

You'll notice that STM also recommend a 0.33uF cap on the input !

They embody knowledge about the parts directly from their designers and you ignore their

You seem to reckon that you can ignore that on the basis of your theoretical analysis. I
consider that very foolish.

I can tell you that prior to adopting the 'ground rules' I originally mentioned in this
thread that a certain company I design for had experienced occosional trouble with 78
and 79 series regulators 'oscillating'.

Since adopting my advice, easily a hundred thousand units embodying my advice have been
made without that problem.

I simply don't care how clever you think you are, I'm interested in making stable
designs. At the end of the day, the cost of a small film cap easily outweighs taking
chances with stability issues that'll hold up your production and require costly
re-work.

Also note that every batch of ICs may perform slightly differently. Making something
that works on the bench doesn't guarantee every product using that design will behave
identically.

Graham