# Beginner help building 5V power supply

Discussion in 'Electronic Basics' started by Joel, Apr 10, 2007.

1. ### JoelGuest

Hi, I'm new to the group (and fairly new to electronics).

I created a 5V DC power supply to power a PIC microcontroller from a
pre-existing 24V AC source and intermittently the 7805 regulator is getting
very hot. The 5V section is only drawing .005A continuously. It is powering
a PIC and several LEDs. The regulator goes through random length cycles of
being rather cool to periods when it is so hot you can't leave my finger on
it for more than a second. These cycles happen on there own and the current
draw is constant.

I would love to draw the schematic of the circuit (and tried a few times),
but it wasn't really readable. So the first "mini" question is there a
program that helps me draw schematics using text characters?

Second question is why would the v-reg go through these cycles, and is that
OK?

verbal schematic:
24V AC into full wave bridge rectifier (GBL005)
Output of rectifier has 3 1000uF caps (35v) in parallel across output
output feeds into 7805 v-reg (Output Voltage: +5VDC @ 1A Maximum Input
Voltage: 35VDC) (no heat-sink used)
I have a .1uF cap across the 5V output of the v-reg

I noticed that the 24 VAC when rectified with no load was reading as 34VDC
this is pretty close to the max input voltage for the v-reg. Is this OK and
why would the rectified voltage be HIGHER than the AC voltage.

2. ### Anthony FremontGuest

Only 5mA and you have "several" LEDs? Maybe it's 50mA?
No, it's not ok. It's possibly oscillating.
The 24VAC is RMS, the peak to peak is 1.4 * 24 = 33.6V peak. This means the
regulator has to drop quite a bit of voltage, about 29V to be precise. At
5mA, the power dissipated by the regulator will be (.005*29= .145W) not
allot, but at 50mA, the power dissipated will be 1.45W. It's gonna get real
hot with no heat sink. Is it only getting hot when the LEDs are on?

If the leads going from your filter caps (3 1000uF) to the regulator is more
than a few inches, then put a .33uF cap on the input pin of the regulator
(real close to the regulator of course) to help prevent oscillations.

If your transformer has a center tap on the output, then use it to extract

3. ### Randy DayGuest

AACircuit v1.28 beta
www.tech-chat.de
Alternating current is measured RMS (root mean squared);
24v is more of an average value, not your peak-to-peak
voltage. After filtering, and under low load, yes,
you'll see near-max voltage across the cap.

4. ### JoelGuest

Just double checked, draw is .005A
One of two LED is always on, but never both.

pin of the regulator
Entire circuit is only 1 inch, everything is close togheter.
No center tap on xformer.

Any ideas on improving this circuit and why it goes through these cycles?

Thanks

6. ### Anthony FremontGuest

Must be using fairly low current on the LEDs then. Good. I don't
think that .15W should make it very hot, unless it only gets hot when you
press your finger on it. Putting your finger on the case decreases the
ability of the regulator to dissipate heat, hence it will get hotter from
touching it. If this is what is happening, then everything is probably
fine.
If you have a scope, you can look for oscillation on the output. I'd still
add the .33uF on the input and also try something in the range of a few uF
on the output (parallel to the .1uF on the output to ground).
Just the ones I gave you. It's either dissipating too much power, or it's
oscillating. Have you looked at the current draw on the input to see if it
changes radically when the device heats up?

7. ### John FieldsGuest

---
Nope. Peak-to-peak is 2.8 * RMS; _peak_ is 1.4 * RMS
---
---
Nope. To be precise:

Vreg = (Vrms * sqrt(2)) - (2Vf + Vout)

= (28V * 1.414) - (1.4V + 5V)

~ 27.5V
---

8. ### Anthony FremontGuest

Arghhhhhhhhhhh......... pedant kids...... ;-) (just kidding
Don't you mean 24V right here? ;-) I had a senior moment and was wondering
where you came up with the 2Vf stuff. Then I recovered and went and looked
at the Vishay datasheet for GBL005. Looks like maximum Vf is 1V per leg at
4A. Extrapolating the curve down to 5mA using their graph, it looks like a
little under .6V per leg would be closer. 8^) Loonel must be having fits
right now.

http://www.ortodoxism.ro/datasheets/vishay/gbl005.pdf'
27.736V give or take ;-)

9. ### DJ DelorieGuest

Having recently done 24vac->5vdc for a prototype, i can tell you a few
of the things I tried. None worked well, I eventually got the
switcher I ordered (acon CX) and used that instead. There are less
expensive switchers, but the CX is (1) vertical mount, and (2)
isolated. My raw DC was closer to 37 V, with four 820uF caps, and
about a 0.5A draw on the 5v side.

Try a 12v zener on the gnd leg to turn a 35max->5 regulator into a
47max->17 regulator, feed *that* into the 7805.

Try a 12v zener and a power transistor emitter follower to
pre-regulate to 12v for the 7805.

A resistor divider between the output and gnd provides a "floating"
ground reference to increase a 7805's output, check the specs for
details.

Use a 7824 to pre-regulate - it has a Vmax of 40V.

Use a different regulator ;-)

Use a heatsink.

Don't forget to include a small cap *after* the regulator, too.

10. ### Jon SlaughterGuest

I think you need to try and troubleshoot some more. Try and find out exactly
when its getting hot. It will only get hot if to much current is flowing
through the regulator or if it is dropping to high of a voltage. Since you
are taking ~34VDC and dropping it down to 5VDC there is a constant voltage
drop of about ~30VDC. The power dissipated is then 30VDC*I where I is the
current that is going through the regulator. If its only 5ma like you say
then thats only 150mW. I'm not sure which 7805(Is it a 7805 or 78M05 or
what?) but this should be well within reason and you shouldn't need a heat
sink. But what is happening is that your power dissipation is 30*I and I is
not 5mA.

What I would do is first completely take away the pick and just add a one
LED(with a current limiting resistor) and see what happens. See if it does
the same thing. You can even play around with the load here go get some idea
of the performance/efficiency of your regulator. Dropping that 30VDC is
kinda excessive and if your drawing 1A then thats 30W and I don't think the
7805 can handle anything like that except possibly with a head sink and
cooling. A datasheet I saw said something like 500mW for the 7805 and 30W
for the 78M05.

There are several solutions to make your regulator dissipate less heat or be
able to handle more dissipation. I think though one needs to find the main
issue here though. My guess is that your just pulling more current than you
think and this is causing it to over heat. I'm not sure what your doing with
your pic but it surely will require more than 5mA to function.

Because AC is usually given in RMS which is sort of an average. When you
rectify and then filter it, the filtering "works off" of the peak. So you
have to convert the RMS value which is 24VAC into peak which is 34VAC peak.
Rectifying this gives 34VDC but its not constant. Filtering then converts
this to approximately constant 34VDC by "filling in" the gaps.

Note that 212F is the boiling point of water. No one I ever have met can
stick there finger in boiling water for over a second without burning
themselfs... yet this is only 100C. Most silicon devices have a maximum
working temperature of 125C or so. So just cause it does get hot doesn't
mean its a huge deal... except when it shouldn't be getting hot.

12. ### ehsjrGuest

Joel wrote:

Here's one way to draw an ascii schematic without a
program to do it for you:
1) Start every new line of the drawing with a space
2) End every line of the drawing with a non-blank character
3) "Make" symbols you have trouble drawing by using
boxes with text labels
4) Most important - use a fixed font, like Courier.

Here's an example, using your description.

--------- --------- ----
| XFORMER |-| Bridge +|---+----+----+---|7805|---+---> +5
| 24 VAC | | | |+ |+ |+ ---- |
| | | | [C1] [C2] [C3] | [C4]
| | | | | | | | |
| |-| -|---+----+----+------+-----+---> Gnd
--------- ---------

When you use polarized components, you should label
them to indicate the polarity if you draw them as boxes.
See the bridge and C1-C3 as examples.

Regarding other points (which have been answered),
you should add an input cap (.33 uF was mentioned,AIRC)
physicaly close to the 7805. That would add C5 to the
above schematic, from the Vin pin of the 7805 to ground.
Also, your higher than 24V DC was explained, but I'll
add that a higher voltage rated filter capacitor would be
better, as you are very close to the 35V rating. It is
good practice to use electrolytics rated well above the
voltage they will "see". And, for a 5 mA load, you do not
need 3000 uF of filter capacitance.

I may have missed it in the responses, but why not use
a lower input voltage? Wall wart DC supplies are dirt
cheap and often free - you could use one as the input

Ed

13. ### Paul E. SchoenGuest

Another option is to use LTSpice, and supply the ASC text. It is also very
informative if you run the simulation and look at voltages and waveforms.
A good rule of thumb is 2000 uF per amp. The capacitor only needs to hold
the voltage to about 2/3 of the peak, from one peak to the next. Another
way to approximate the capacitor value is using a time constant at the line
frequency. For 60 Hz:

C(uF) = 8300(uSec)/RL. So a 5V 0.005A load is 1000 ohms, and C=8.3 uF.