I suspect the answer to this question - "Is it possible to make up some sort of circuit that would allow you to vary the Ah provided by a battery?" - is "NO, Not Possible" but here goes.

I want to test a device with varying Amp Hours from a rechargeable battery.

For example, I have a fully charged 4.5Ah battery but I want to make it look like it only has 2Ah or 1.5Ah or some other value under 4.5Ah - is that even possible? I'd recharge the battery before each test.

In effect, I want to limit the time the device would operate before the battery was exhausted by altering the Ah of the battery.

This is sort of like using a timer to control the time but that does not meet my requirements. I want the device to operate until the battery is exhausted and I'd like to determine times vs Ah so that I can substitute a battery with an appropriate Ah rating for the approximate time I want the device to operate.

If this is possible, can you give me at least an idea of the circuit needed?

Or - Can a power supply be constructed on which you could not only set the voltage but also the Ah it would provide before shutting off power output? That would be another way I could do what I want to do.

It would not actually emulate a battery in that it would produce a constant voltage where as a battery's voltage would decrease with use but it would be a way to at least approximate what I want to do - if my first idea of varying the Ah of a battery is not possible.

Perhaps a device to measure the amperage draw and time and calculate the Ah and shutoff power to the device at a set Ah value??

This is all probably quite impossible. I may have to get batteries of the correct voltage with different Ah and just time how long the device operates with each battery.

  • \$\begingroup\$ You could emulate the discharge curve of a certain type of battery, but for that you would not need a battery. Just an electronic circuit. \$\endgroup\$
    – Oldfart
    Feb 18 '20 at 7:45
  • 3
    \$\begingroup\$ Sounds like an XY problem to me. \$\endgroup\$
    – Andy aka
    Feb 18 '20 at 7:50
  • 1
    \$\begingroup\$ It sounds like you are trying to choose a battery to deliver a certain life and the load is not constant. If you can determine the average load, then you can do a simple calculation to figure out what size battery will work. This will probably give you a faster solution. But for sure it is possible to "coulomb count" the output of a power supply and then turn it off when it reaches a certain count. I would want to use a microcontroller for that and do the count digitally rather than try to integrate in the analog domain. \$\endgroup\$
    – mkeith
    Feb 18 '20 at 8:09
  • 3
    \$\begingroup\$ Don't write "the Ah" as Ah is the unit of capacity of a battery. So write "capacity". Same as you would ask about the speed of a car and not "what is the km per hour of this car". \$\endgroup\$ Feb 18 '20 at 8:53

Take one 4.5Ah battery. Fully discharge in accordance with the manufacturers instructions. Charge it to 2Ah. You now have a 2Ah battery. It's discharge characteristics will not be identical to a real 2Ah battery, but for your purposes they are probably close enough.

The easiest way to charge the battery to a known capacity is with a constant current charger. 1A for 2h will charge a battery to nearly 2Ah (due to losses).

  • 1
    \$\begingroup\$ Keep track of the battery temperature and don't let it get too warm; that temperature rise is evidence of energy leaking out instead of being captured by the battery. Slow charge rate should give you better control and less loss than fast (high current) charge rate. \$\endgroup\$
    – MarkU
    Feb 18 '20 at 10:06

If this is possible, can you give me at least an idea of the circuit needed?

Yes it is possible. The circuit needed would be a digital power supply.
It will mostly be software doing the complicated part.
I suspect is should be possible to add battery emulation to an open source power supply. Like the (soon to be OSHW) uSupply from EEVBlog.

If you also want to emulate charging you'd need a 4 quadrant supply, then things get complicated.

You can also buy one. Keithley Series 2281S Battery Simulator

If you have a PC control power supply you can make a DIY a rudimentary one yourself with some scripts.


If this is for testing realistic lifetimes with different batteries, presumably you need more accuracy than simply scaling the results as in "this battery has 1.5Ah instead of 4.5Ah, so divide the actual life by 3".

Otherwise you would simply measure once and scale the results for other batteries, and get a simple approximation to the correct life.

If you DO need accurate results you need to do much more than simply scale results, OR charge a big battery to some lower capacity.

First, study some battery datasheets. Actual capacity varies a lot with discharge rate and discharge history, as well as temperature and other factors. For example, dry cells fail early under a heavy load (like a motor), then recover some capacity while resting, then fail slightly earlier next time under load, and so on.

The failure can be modelled as an increasing series resistance, which will be much higher for a small battery than for a large battery at any state of charge.

The effect of the series resistance depends on the load ... my "economical" father would run a clock for six months or so from a battery that was "dead" for any other purpose...

So you first need to learn (either from datasheets or actual load tests) what your batteries do, and learn how that interacts with your load under all conditions (standby, operating, motors running etc).

Then the suggestion of programming a power supply (connected via a programmable resistor aka "dummy load" to your application) or battery simulator to model each battery, is a good one.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.