Monitoring Power on high capacity batteries.

Hi all,

I have a task: I have an inverter with 8 batteries connected to it. The batteries are powered by the main electricity supply when available. However they take over when electricity go down hence they start draining power. When the battery power reaches a certain level before fully discharged I intend to have a relay to automatically switch on the generator so they can be charged again. The generator should be switched off automatically again when they are fully charged.

Can this be achieved by our simple Arduino Uno??

You can use a current sensor to see how much the load draws. Calculate A/hrs drawn and switch on gen as required. Use purpose made charger to recharge the batteries.

The generator should run until the mains returns before turning off.

Does the load switch off when the mains fails then return once the inverter starts? You will need to change the source of the supply to the load from from mains to inverter and back.

Mains fails Turn on inverter Switch load from mains to inverter Calculate battery usage If more than required, turn on generator Switch charger on to generator If mains returns switch load to mains switch charger to mains Turn generator off


Is this a lead-acid battery? (I am only familiar with them).

This is not a simple task.

Do you have a 3 or 4-step charger that settles down to a trickle charge when it thinks the battery is fully charged? If so I would use the charger's "intelligence" to "advise" the Arduino when to shut down the generator. For example it might be wise to let it run at the trickle charge level for an hour before shutting down.

Detecting when to turn on the generator is more complex. If you always discharge the battery at a constant current then you could probably figure out a voltage level that signifies the low charge threshold. But if your demand varies this will not work so well and you may trigger a generator start prematurely if a large short-term current draw pulls the voltage down.

You could build a more complex system that counts the amp-hrs taken from the battery. But for that to work you need to know how many amp-hrs were in the battery when it was fully charged - and that is not a simple thing.

To be honest a crude system that runs the generator for K hours every N hours may be as good as any. You can do some calculations on typical usage to figure out how long the batteries should provide power.

If you want a long life from lead acid batteries you should also have a periodic (perhaps weekly) 8 or 10 hour charge to ensure they are fully topped up.

This laptop is being powered from an inverter as I write this. I have two banks of batteries and I swap them over every 3 days as that gives each set a chance to get a full charge while the other is in use. I normally run my generator twice a day. I have solar panels so on good days I may need only one engine run.