How to make a battery tester connection on a breadboard

Hello,

I am new to electronic and microcontroller but really fascinated about electrical stuffs. Here is the problem, I want to test a 9v battery using arduino and labview much like a multimeter (much later a deep cycle battery) . How do I make the connection on a breadboard to show accurate readings on my labview indicator. Like I said really really new to electrical and electronics. I would really be grateful if I could get a drawing of the connection using fritzing. Your help will be much appreciated.

Michael

grateful if I could get a drawing of the connection using fritzing.

Doh!

That's where you lost your audience.

Fritzing is a bit of a dirty word around here. Maybe some one will but quite a lot of us won't touch that heap of ****.

Draw you a schematic if you want.

You just need a voltage divider with two resistors and connect the tap to an analogue pin.
Read the pin, and the digital value you get will represent the battery voltage.

For a 9volt battery, use e.g. two 10k resistors in series from battery positive to ground.
The tap will have 4.5volt.
If you read that with Arduino's default 5volt Aref, you will have a digital value of about (4.5volt/5volt*1024 = ~921).
You can convert that in your code to a human-readable value.

Try that first before you advance to reading the voltage with e.g the internal 1.1volt Aref and smoothing.
Leo..

Wawa:
You just need a voltage divider with two resistors and connect the tap to an analogue pin.
Read the pin, and the digital value you get will represent the battery voltage.

For a 9volt battery, use e.g. two 10k resistors in series from battery positive to ground.
The tap will have 4.5volt.
If you read that with Arduino's default 5volt Aref, you will have a digital value of about (4.5volt/5volt*1024 = ~921).
You can convert that in your code to a human-readable value.

Try that first before you advance to reading the voltage with e.g the internal 1.1volt Aref and smoothing.
Leo..

Thanks for your reply.

I have a 22k and 27k resistors. From my calculations I would have 4.9..v, would that be to close a call being that an analog input is limited to 5v. Don't want to burn the arduino board by chance. Thanks again

Bouss:
I have a 22k and 27k resistors. From my calculations I would have 4.9..v, would that be to close a call being that an analog input is limited to 5v. Don't want to burn the arduino board by chance. Thanks again

You can connect them two ways.
27k to battery and 22k to ground will give 22/(22+27) * 9volt = 4.04volt on the analogue input.
22k to battery and 27k to ground will give 27/(22+27) * 9volt = 4.96volt on the analogue input.
The first option is the best one.
Both options won't damage the pin, because the resistance is to high for any damaging current.
Leo..

A nominal 9 V battery can have a voltage of about 9.5 V when new so go for Leo's first option.

Russell.

To get a better picture of battery health, battery testers apply a load resistance. I measured one that I have kicking around and found a 1.0k resistance on the 9V test setting. So your resistive dividers total resistance should be more like that. Or you can simply add the 1k in parallel with the divider.

Okay.. Thank you guys

A quick question. I do I replicate design this for a battery bank (4 * 200mAH) to create a 48v voltage input to my arduino. I want to monitor my deep cycle batteries( voltage wise), can this be done and How. Cheers

It makes no difference if you measure a 9volt battery or a 48volt battery.
The resistor divider just has to be scaled for 48volt (or 60volt for four lead/acid batteries).
Connect the battery resistor near the battery for safety reasons.
The battery resistor has to be at least 100k for 48volt. Pick the other value so you get down to <5volt.
120k to battery and 10k to ground could work.
Use the resistor divider ratio and Aref in your code to calculate A/D value to volt.
Leo…

Thanks Guys... I finally got it to read my 9V battery. Cool seeing it work.

Okay how do I connect my arduino to a relay (SSR) to control switches and sockets. I believe this is home automation. What components do I need to make it work

Thanks for any detailed explanation.

This is a great forum.