How to measure battery level?

Hi,

I am new on arduino, and i would like to have some ideas in order to develop in the future my own devide.

I would like to know if there is any way to measure the battery level on Arduino.

I will develop an outdoor devide to measure temperature and other paramenter, and save them into a SD card each hour thanks to a RTC. I would like to know if it is possible to measure also the battery level and store this paramenter at the SD in order to know at the end of the experiment, how was the evolucion of the battery level in the project.

I am really new, so detailed and clear explainations are really wellcome!

Thanks!

You can easy get battery voltage, and with a Hall Effect device get the current, but trying to calculator the stored energy of a battery gets complex.

I think it's done by using a constant current PWM charger, and monitoring the voltage of the battery.

Thanks for the idea Peter 247.
I will study the idea and try to go around.

Cheers,

Level is kind of a unspecific word when talking about batteries. If you mean voltage level that is pretty simple with a voltage divider and reading the value into a analog input pin.

If you mean state of charge remaining in a battery, that is somewhat complex in that you have to measure current usage continuously and integrate it to come up with a amp/hour (or milliamp/hr) consumed to then subtract that from the batteries maximum amp/hour capacity to finally arrive at the current amp/hour capacity remaining.

Lefty

Thanks retrolefty,

That is. I want to know the state of charge remaining in the battery... I see that it is pretty complex.

I saw that there are come projects about to develop battery chargers with ardino, so may be there have details about how to control that kind of things. My idea is in the future to joint a solar panel and rechargeable batteries (AA) to my devise in order to have enough power for one year.

I expect to leave the devise working alone for all this time, so i would like to go around this idea.

Thanks so much for your comments.