Messure power

Hello I'm creating a system with a 3g and wifi router, a webcam, and arduino for controlling it based on solar and wind, its in an area with little sun parts of the year(70C north) so I probably need wind also. I'm using a hybrid wind/solar charge controller. I'm thinking of using a small type car battery or similar, lets say 40 amp/h.

In my boat I have a digital panel where I can read how much power is left on the battery in amp and percent, the voltage and the netto charge/discharge in real time. Is it possible to create something similar myself?

How much power left in amp/percent is probably not necessary, but it would be nice to know the netto charge/discharge to know how well the charge system is actually charging and how much the devices are using.

Anyone know how to go about this? Regards

I can read how much power is left on the battery in amp

Not sure how you managed that, since amps are not the units of power.

kritro: Is it possible to create something similar myself?

Of course!

Will it be easy/something you can do over a weekend? Very unlikely.

kritro: Anyone know how to go about this?

Answer: One step at a time.

(you have to learn to walk before you can run...)

Not sure how you managed that, since amps are not the units of power.

Its not something i did, its a meter that says amp, but it is Ah (often people just says ampere about batteries when its ampere hours so, my mistake), I have 2X220 Ah batteries. When they are fully charged the meter says 440 amp (Ah) or in percent it shows 100%. This functionality is very nice, but not necessary in this case. The meter in my boat is probably calibrated from the size of the batteries or something, I thought it was impossible to just measure how many Ah is left in a battery of any size, but maybe I'm wrong.

I just wonder if someone could push me in the right direction for a good way to see if the battery is charging, and even better, how much its charging/discharging. Could this be done with a normal ampermeter? Will that show how much is going out of the battery or how much is coming in from the charger?

I know one should be able to walk before running, its just an initial question to have something to work with:)

kritro: I thought it was impossible to just measure how many Ah is left in a battery of any size, but maybe I'm wrong.

It's impossible to look at a random battery, take a measurement, then say how much is left.

But... you can make a good guess if it's a battery you know and have seen it discharge a few times before.

The key in monitoring the health of your lead-acid battery is in accurately monitoring the voltage of the battery.
An article like this

may help you in understanding the importance of measuring and interpretate the battery voltage.

You can't tell the state of charge of a lead acid battery reliably because you must let it rest for quite a long time after charging or discharging it.

You can monitor the current draw over time and sum it to see how many Ah you've pulled out already, and subtract that from the presumed full Ah of the battery to determine how much charge is left.

just wonder if someone could push me in the right direction for a good way to see if the battery is charging, and even better, how much its charging/discharging. Could this be done with a normal ampermeter? Will that show how much is going out of the battery or how much is coming in from the charger?

Yes, an ammeter shows you how much current is flowing at one moment in time. The meter in your boat is not a simple ammeter... It's most-likely reading the voltage to estimate how much charge is left.

In your application, the current will be approximately constant. So, you should be able to do some experiments, measuring the voltage every hour or so to get an idea of the discharge rate. Once you've taken that data, the voltage measurement will tell you how much time is left (worst case with no charging taking place).

I think this is how a laptop estimates the remaining battery life.... I think it looks at the voltage and it "knows" how fast the voltage usually drops-off (and the "shape" of the discharge curve).

That data is only going to be valid for a healthy battery, but if you are going to use a microcontroller you can build some "smarts" into it to re-calibrate itself based on the rate at which the voltage drops under real-world conditions.

Reading OCV (Open-Circuit Voltage) can let you estimate the amp-hour capacity, with a three limitations.

The first is that the battery isn't under load. Voltage dips under load, so you don't know if 11.5V is a dead battery or a fully charged battery that's supplying several amps.

The second is that the battery hasn't been loaded or charged recently. Chemical reactions are slow, particularly for lead-acid. If you start and then stop a heavy load (like starting a car) then immediately monitor the voltage, you will see voltage steadily climb for many minutes as the battery recovers (which is why, if you run your battery 'down' trying to start your car, you can wait half an hour and it'll have enough juice to try again). Similarly, it is possible to put a "surface charge" to 13.8V on a battery, disconnect it from the charger, and then watch as voltage falls to only 13.4V over several minutes.

There is a third proviso, but more on that later.

The most accurate battery capacity meter is a columb counter. If you start with the battery in a known state (such as the OCV with the provisos mentioned above), you continuously monitor the amps going in and out of it and keep a running total.

Since a columb counter does not have infinite resolution, periodic re-calibration with OCV will be required or else drift will occur.

An ACS712 or similar hall-effect ammeter is what I would use in conjunction with an Arduino for this project. With it, you will be able to sense and display the current net charge/discharge rate as well as implement a columb counter for tracking capacity. A separate resistor voltage divider will give you battery voltage.

One interesting application of a columb counter is to detect long-term battery degradation that OCV cannot. (This is the third problem with OCV as mentioned above). A new battery might have 220Ah, but after many charge/discharge cycles (especially if it's not refilled with distilled water), it will hold significantly fewer amp-hours. Such a battery may show a "healthy" 13.8V after a charge, but drop to a completely useless 6V when a load is placed on it. Smart software on the Arduino can detect this condition in the early stages and signal the user to obtain a replacement battery before it gets really bad.

Thanks for answer. Do I need one current sensor between the devices and the battery to show the flow from the battery and one separate current sensor between the battery and the charger to show the flow in to the battery and then use the difference or is it possible to use just one?

You're interested in charge in the battery, you just measure current to/from the battery, which means using a bipolar current sensor. The current sensor has to be able to deal with the highest currents the battery handles of course, as well as having the resolution for measuring smaller long-term current draws accurately enough. Basically you just integrate the readings over time.

A good way to monitor the state of a liquid electrolyte lead-acid battery is with a hydrometer, not electrically, since that shows the state of the chemistry - but not easy to automate.

Alas the voltage change as a lead-acid discharges isn't very large, so its not easy to determine SoC from that, except at the limits - the charge monitoring (coulomb meter) approach is good for the mid-range, and voltage is good at the ends, so a combined strategy is needed - from the combined information you should get a good estimate of the current capacity of the battery too (note that this can vary with temperature and discharge rate as well as age).

Lead acid batteries don't tolerate being discharged well - keeping them topped up whenever possible will extend life, and for deep-cycle batteries this means trying not to use the full cycle whenever possible.

kritro: is it possible to use just one?

Yes, the ACS hall effect sensors are bidirectional.