Arduino Forum

Using Arduino => General Electronics => Topic started by: Gadgeroonie on Oct 27, 2011, 10:15 pm

Title: Voltage regulators
Post by: Gadgeroonie on Oct 27, 2011, 10:15 pm
i have a 7805



i have connected

20v to the input
gnd to gnd
I expect to see 5v on the output

except i see 20v (near enough)

do I need to put capacitors around the regulator input and output ?

like this




Title: Re: Voltage regulators
Post by: CrossRoads on Oct 27, 2011, 10:20 pm
Yes. Your drawing says Transformer - is that correct?
If so you need rectifier also to convert the AC into rough DC, the caps and regulator then make smooth DC for the circuit.
Title: Re: Voltage regulators
Post by: JChristensen on Oct 27, 2011, 10:23 pm
Yes, capacitors are required, but their absence doesn't explain to me why the output isn't pretty close to 5V. Technically speaking, a transformer doesn't supply positive and negative, but AC. What exactly is the "transformer" being used here? DC needs to be supplied to the circuit as illustrated.
Title: Re: Voltage regulators
Post by: Gadgeroonie on Oct 27, 2011, 10:25 pm
i lifted the drawing from another web page

the supply to the regulator is 20v DC (not ac)

i am very confused :-S
Title: Re: Voltage regulators
Post by: CrossRoads on Oct 27, 2011, 10:28 pm
Add the caps and see if that helps.
Polarized electrolytic 3.3uF, 4.7uF, 10uF along those lines on the input.
1uF on the output.
Title: Re: Voltage regulators
Post by: Grumpy_Mike on Oct 27, 2011, 10:29 pm
Quote
i am very confused

Why, you need caps.
You also need it to be the right way round, check again it is.
Title: Re: Voltage regulators
Post by: floresta on Oct 28, 2011, 03:33 pm
Quote
except i see 20v (near enough)

Maybe your 7805 was abused in a previous life.  Have you substituted a different one?

Don
Title: Re: Voltage regulators
Post by: Gadgeroonie on Oct 29, 2011, 07:13 pm
i added the caps and still 20v in and 19ish out

i have tried this on two brand new regs

one is 5v the other is 15v

could i have damaged them running without caps ?
Title: Re: Voltage regulators
Post by: kkman20xx on Oct 29, 2011, 07:40 pm
I sometimes wires a 7805 on breadboard without caps and they works fine, there is no reason being damage without caps.

What I am wondering is may be:
1: you may have it wrong way round?
2: is it ground or negative voltage from the transformer?
3: One of them is not a 7805 and different pinout?
Title: Re: Voltage regulators
Post by: Grumpy_Mike on Oct 29, 2011, 07:42 pm
Quote
i added the caps and still 20v in and 19ish out

Then it is either not connected the way you think or it is faulty.

Quote
could i have damaged them running without caps

No.

Quote
I sometimes wires a 7805 on breadboard without caps and they works fine,

Rubbish. Unless by working fine you mean at just one current and you haven't bothered to check the waveform with a scope.
Title: Re: Voltage regulators
Post by: kkman20xx on Oct 29, 2011, 08:19 pm
Quote
I sometimes wires a 7805 on breadboard without caps and they works fine,

Rubbish. Unless by working fine you mean at just one current and you haven't bothered to check the waveform with a scope.
[/quote]

i.e. breadboard, quick test circuit, my point is that it should not damage the 7805 without the caps.
Title: Re: Voltage regulators
Post by: Grumpy_Mike on Oct 29, 2011, 08:25 pm
Quote
my point is that it should not damage the 7805 without the caps.

That was my point too.

The problem is that many people think if they have a circuit that they perceive as working then it is fine, it IS working. This is not the case. A 7805 without capacitors can never be stable. You might not have the tools to see the instability or you might have hit a quasi stable state due to the current drawn and the stray capacitance in the layout. But it is not working fine.
Title: Re: Voltage regulators
Post by: zoomkat on Oct 29, 2011, 11:53 pm
Quote
Rubbish. Unless by working fine you mean at just one current and you haven't bothered to check the waveform with a scope.


I have several simple setups where I only use a capacitor on the regulator output and they work ok (well, for 6+ years). The last data sheet I read on the regulator chips only recommended the caps on the input side when the input was over a long wire. As to stability, it is a relative term as to the actual operating conditions and requirements.
Title: Re: Voltage regulators
Post by: Grumpy_Mike on Oct 30, 2011, 12:13 am
Quote
I have several simple setups where I only use a capacitor on the regulator output and they work ok (well, for 6+ years).

No you haven't you have several simple setups where you have not detected the instability.
Quote
The last data sheet I read on the regulator chips only recommended the caps on the input side when the input was over a long wire.

That was one manufacturers claim on one specific chip, did you use that chip 6 years ago?
Quote
As to stability, it is a relative term

No it's quite specific.
Quote
as to the actual operating conditions and requirements.

Hey lets redefine words, I can balance an egg on it's point, that is stable as long as nothing disturbs it.

Title: Re: Voltage regulators
Post by: JChristensen on Oct 30, 2011, 12:48 am

i added the caps and still 20v in and 19ish out

i have tried this on two brand new regs

one is 5v the other is 15v

could i have damaged them running without caps ?


Time to post a picture if you can, the whole circuit, maybe several pics if that works best.
Title: Re: Voltage regulators
Post by: Gadgeroonie on Oct 30, 2011, 02:05 am
good idea on the picture !

i will send one in the morning  :)
Title: Re: Voltage regulators
Post by: Gadgeroonie on Oct 30, 2011, 06:16 pm
here is a close up of the regulator and caps



here is the voltage on pin1 - input pin



here is the voltage on the output pin - should be 5 V !



any suggestions welcome

--------------------------------------------------------------------------------------------------------------

the power supply is my laptop power supply - i have another 20v supply, today when i plugged in the supply i noticed my wifes radio had a lot of noise that went when i unplugged it (not sure of this is relevant but i decided to use the laptop supply for this test)

Title: Re: Voltage regulators
Post by: JChristensen on Oct 30, 2011, 07:12 pm
The only thing that I can see is that the capacitor on the input side is connected backwards. The minus (-) lead on both capacitors should go to ground, i.e. the middle terminal on the 7805.

Not real familiar with what comes out of those laptop supplies, is there any particular reason you need to use one? I'd much prefer an inexpensive and much smaller and lighter wall wart similar to this one (http://www.sparkfun.com/products/298).

While the regulator will work fine on 18-20V input, without knowing how much current will be drawn by whatever the regulator will power, it won't take much current to cause the regulator to really heat up, because it has to drop 13-15V. So I might be prepared to heat sink it.

As for the radio frequency interference, was that something that was absent before, and now you're hearing it? Or was it just the first time a radio happened to be on. The laptop supply is no doubt a switching supply, so it could well generate some RFI. Or did you mean this laptop supply wasn't the one used before?
Title: Re: Voltage regulators
Post by: Grumpy_Mike on Oct 30, 2011, 07:24 pm
I noticed that the capacitors you use are not ceramic ones. A 0.1uF ceramic is a must in my book. The other thing is that you have no load on the output. For test purposes put a 1K or so on the output to draw a little current. And yes that cap is the wrong way round which might account for the interference.
Title: Re: Voltage regulators
Post by: JChristensen on Oct 30, 2011, 07:48 pm
Good points, Mike, I'd missed that. Actually I've gotten into the habit of using both ceramics and electrolytics on input and output. Might be overkill, but I figure it can't hurt. I'll use a larger electrolytic on the input especially if I'm not sure of the quality of the input power, e.g. from a wall wart, which is the situation in the attached schematic. Haven't ever had an issue with that approach. Also a clip from the National Semiconductor 78XX datasheet. Pretty sure I've checked these supplies with no load however, and the voltage is right where it's expected to be.
Title: Re: Voltage regulators
Post by: Gadgeroonie on Oct 30, 2011, 09:25 pm
Thanks for the idea's guys

i fitted the cap the right way round and put a 1k for soem load

no change !

------------------------------------

the noise from the power supply was something i had only noticed because the radio was on

do you think the noise may have damaged the regulators ?

Title: Re: Voltage regulators
Post by: Grumpy_Mike on Oct 30, 2011, 09:50 pm
Make the measurement from the center pin of the regulator to the output, not from the plug. It looks like the ground is not connected.
Title: Re: Voltage regulators
Post by: JChristensen on Oct 30, 2011, 09:59 pm
Well I'm fairly well flummoxed. Noise shouldn't hurt the regulator, unless its amplitude is in excess of the regulator's maximum rating, which would surprise me. Do you have anything else you can use for input? Like a wall wart that supplies 8-20 volts DC? Or just some batteries? Just try a 9V battery if you have one, or 5 or 6 AA cells in series. Use a new regulator and new capacitors if you have them. What are the values and voltage ratings of the capacitors you're using?

If your meter has the ability to test capacitors, check them out.
If it doesn't, you can still test to make sure they're not shorted as follows.
Set your meter to measure Ohms.
Take the capacitor out of the circuit.
Short the capacitor's leads together to remove any residual charge.
Connect the capacitor to the meter probes, matching polarity if it's a polarized capacitor.
What you should see is an initial low resistance, but it should then increase to at least several megohms as the meter's testing voltage charges the capacitor. For larger electrolytics, this may take several seconds, depending on the meter. For smaller values, e.g. ceramics, it will happen so quickly you may not notice the charging effect.
Title: Re: Voltage regulators
Post by: Gadgeroonie on Oct 30, 2011, 10:14 pm
Bingo !

I checked the power between pins one and 2 and there was no voltage at all !

this confused me

when i studied the power socket it became clear !

the jack plug socket has 3 pins

1 +
2 -
3 -

i was using pin 2

so pins 2 and 3 are both negative. but what i did not realise is when you plug in the actual jack plug the pin 2 goes open circuit as the pin pushes the connector away  (i guess you can check continuity between 2 and 3 to see if the plug is in or not)

I completely overlooked this and now i look like an idiot ! (i certainly feel like one)

this has been a hard lesson

I would like to thank everyone for thier help particually Mike, It is easy to give up on a thread when somebody else is having some bother, your perseverance has helped me realise the problem

I was starting to think i was going nuts over this - and was going to test some regulators on another board then fit them to my project to try and see what had goe wrong - common sense was pointing to the noise on the power supply had killed the regs, But it was something very very simple

pleased i can press on now

Thanks again for your help
Title: Re: Voltage regulators
Post by: Grumpy_Mike on Oct 30, 2011, 10:22 pm
Quote
I was starting to think i was going nuts over this

When ever you get into this situation, and it happens a lot even to me. I find that the problem is always that bit you think is obviously right. Knowing that helps but only if you persevere with it.

Now head long dash at full speed until you come to a screaming halt with the next snag. It's just like driving on the Autobahn on a Friday!
Title: Re: Voltage regulators
Post by: JChristensen on Oct 30, 2011, 10:27 pm

I find that the problem is always that bit you think is obviously right.


Indeed! Nice work, extra points for being remote!  :D
Title: Re: Voltage regulators
Post by: Njay on Nov 01, 2011, 10:10 pm
Be careful with electrolytic capacitors connected backwards. If you were really feeding 20V to the big one that was backwards, it would most probably have blown in under 5s.
Title: Re: Voltage regulators
Post by: westfw on Nov 02, 2011, 01:07 am
BTW, while the capacitor advice was all "good", I don't think the 7805 regulators are known to be particularly fussy about their filter caps.  A ceramic output cap might have been better, but it shouldn't be "needed."
(some low dropout regulators are VREY fussy about the caps; check datasheets and follow recommendations.)
Title: Re: Voltage regulators
Post by: Grumpy_Mike on Nov 02, 2011, 09:08 am
Quote
some low dropout regulators are VREY fussy about the caps;

That is because they are more like high bandwidth amplifiers and with these it is possible to put too much decoupling capacitance on their output.