Battery monitor

Hello!
I'm new on Arduino, and i'm close to finish my 1st project.
I have a little question, just to make sure i don't burn up my board. :sweat_smile:
I have a Arduino Uno, a motors driver L298v2, I2C LCD, and a 7.4V battery with 2.9A and a 4 sensors(1 digital).
I'm trying to read my battery voltage. I made a power divisor from 2x 500 Ohm resistors and i ended up with 3.7V on the wire witch goes to analog pin.
Now, giving the fact that i use the battery for motors and arduino, due to lack of space on my robot, i wanna ask u guys if its safe for both board and battery to run it with a power divisor. And... i'll get good readings from battery voltage?
Thanks in advance.

The only problem is that it is wasting power. If you use (say) a pair of 4700 ohm resistors it will work just as well for voltage sensing but will waste a lot less power.

If this is the battery that is powering the Arduino you should probably divide the voltage down to a max of 1 volt and use the Arduino's internal 1.1v voltage reference for the ADC so the reading is not affected by the falling battery voltage.

...R

The voltage divider method will work, although to avoid wasting power, you should use larger resistors (for example, 2 x 10K ohms).

However, powering motors and an Arduino from the same battery is not a good idea. Electrical noise from the motors can damage the Arduino or interfere with its operation. Also on many Arduinos, if the input voltage drops below 7 V, the voltage regulator may cease functioning correctly and at the very least, the battery voltage measurement will be wrong.

Thanks for u're suggestions.
I put my robot to the test now. It consumed from 7.21v to 7.14v( that's the voltage in use ) in half hour of non-stop running :smiley:
I hacked the battery from a laptop... took 4 cells out of 6 due to lack of space, again...
Tell me if it's alot of power consumption or... should i put 2x 10k resistors?
Thank you!

IMG_20140527_001441.jpg

cezar92:
Tell me if it's alot of power consumption or... should i put 2x 10k resistors?

Without knowing how many milliamp-hours have been consumed I can't say.
Why not use the 10k resistors? They will save some energy.

...R

I am now running some testing based on this formula R2/(R1+R2)=Ue/Ua using a potentiometer:

power divider.jpg

Using this
Step-Up/Step-Down Voltage Regulators
Buck-boost and SEPIC converters work with input voltages that are higher than, equal to, or lower than the regulated output voltage, making them especially well-suited for battery-powered applications in which the battery voltage begins above the desired output voltage and drops below the target as the battery discharges.

Will enable you to have constant voltage for your Arduino Uno.