We have a PCB with a DA14683 that is powered by a 90mAh Li-ion single cell. For testing the software and hardware of this PCB, we want to emulate the battery. For example, we want to test how the PCB behaves when the battery voltage drops below 2.8V or the battery has very low internal resistance. Another example is to verify charging current and charging voltage in the different charging phases. What's a schematic that emulates such a battery and can be controlled by another microcontroller?
There are basically two tasks: a) battery being charged and b) battery providing energy. For b), we can simply use an adjustable LDO like the one used in DA14683-00A9DEVKT-P and ajust the voltage with a microcontoller, here's the schematic:
But we also want to test the switch over to charging the battery, so we need both tasks integrated into a single solution.
There seem to be commercial devices such as the Keithley 2281S for USD 3000? or qoitech.com for USD 1600 with 1 year of software use. For one, I'd like to understand how they work and second, I prefer to have the emulator integrated in our development environment and production testers. ADALM1000 provides a 2 quadrant source, could it work as an example for an battery emulator? Are there any application notes or open-source projects for Li-ion battery emulators?