Testing a Voltage Regulator

Hi,

I want to test a volatage regulator.

I applied a voltage betweet Vin and GND and measured between Vout and GND. I measured no voltage and the regulator got hot.
What did I do wrong?

How can I regulate 7.2V to 5V?

You bought a negative voltage regulator. Look for a 7805 instead of the 7905

How can I regulate 7.2V to 5V?

why would you do that with a Negative voltage regulator when it says in the datasheet: DC input voltage: - 5 to - 18 V, and it already told you its a negative one in the second line of the datasheet?

7805 should work, it has a voltage dropout of 2V, so if u get below 7V at the input it wont be able to regulate to 5V.

lax123:
7805 should work, it has a voltage dropout of 2V, so if u get below 7V at the input it wont be able to regulate to 5V.

Are there regulators with a smaller dropout?
The 7.2V comes out of a battery pack. It will probably drop when it is almost discharged. Can I use the 7805 anyway?

If the regulator is correct, can I just connect the Vin and Vout to it or do I need a further circuit like this:

The capacitors are there to prvent oscillations and smooth out fluctuations, use them. If you want to input less than 7 V, look up low dropout "LDO" regulators.

Will an LDO regulator be necessary for a 7.2V battery? What happens if the 7805 is supplied less than 7V?

It will stop regulating at some point, and the output voltage will go down.

So it will output less than 5V if the input is for example 6V?

Could I use an analog input of a microcontroller to find out if this point is reached?

Only if you use an independent voltage reference, if the reference is relative to the supply you will never see any change!

So how can I read the battery level with a microcontroller?

So I guess I need to use an internal reference.
But how can I get a 0-8V to 0-1.1V? Would it make sense to analog read a voltage divider with 10k and 2k? I think this would scale it down to about 1.3V
By the way, will this Arduino function also work on an ATtiny?

you can do it with a voltage divider.

If your max is 7,2 why not use 7,5 instead of 8V for calculating the divider, increases accuracy.
And i think you should bring it down to 1.1V and not 1.3V. Your reference will be mapped as 0-1.1V/1024 for analog read.

About ATtiny, this looks promising:
http://hlt.media.mit.edu/?p=1695
Havent tried but would surely be nice and save a lot of money for simple projects

I just measured 7.6V at the battery and its not even completely charged.

Programmimg the ATtiny is no problem, I was just wondering if the AnalogReference works the same on it.

If you have the voltage divider connected, it will of course drain the battery a bit. A total resistance of 50 kOhm is down to 0,15mA.

Using a voltage divider from an unknown supply voltage to test the voltage of that voltage doesn't sound logical to me. The reference point will change with supply voltage, proportionately, so how does that solve anything?

Use a precision voltage reference. It's kind of like a Zener diode. They are usually 1.225v or so, and only need some minimal current running through them to function. Easily achieved through a current-limiting resistor from your battery. Of course, that's only if you really need to know your battery level. Using an LDO regulator is probably sufficient. Dropping from 7v to 5v should be doable. If the battery is SO low that it can't maintain a regulated 5v, you're in pretty dire straits. Brown-out detection can be enabled to hold the micro in reset if the V+ drops below a threshold of 3 to 4v.

marian42:
So it will output less than 5V if the input is for example 6V?

Could I use an analog input of a microcontroller to find out if this point is reached?

Read this
http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/

Okay, thanks for your replies.

The article is very helpful.

What I want to do is use a NiMH Racing pack (7.2V), regulate it down to 5V and power a USB jack with it.
I want to use this as a cellphone charger.

Is it a good idea to put an ATtiny behind the regulator and let it check wheter the voltage dropped under 5V and then make an LED indicate the battery level (like discharged and not discharged).
A NiMH battery can hardly be damaged by exhausting it (as opposed to LiPo batteries)
I bought 7805 regulators.

(I made a thread for this project as well but I didn't get any replies.)

Measuring battery voltage under charge can be misleading.. The voltage at the terminals Must be higher than the nominal battery voltage to charge it, It's called the forcing function and is used to determine the battery condition under charge.. If you know approximately the battery charge then a comparison of the voltage or current at several places during the charge cycle can flag a failing battery early and is a common technique to monitor and return those values to the controller to indicate apparent battery charge warning conditions early. Very commonly used to report battery conditions in un-monitored remote control points.

Bob

actually i think u dont need a uC at all. there is simple circuitry involing transistor and zener diodes and leds to accomplish what u want. unforunately i dont have the schematic right now