I'm researching lithium-ion cells and want to construct a physical setup to test how a Li-ion cell's behavior changes over many discharge-charge cycles, i.e. gather data similar to cycles

I plan to use Arduino architecture to charge and discharge a cell automatically. Voltage and current will be measured with the Adafruit INA219.

Starting from discharge, if the voltage drops below 2.7 V a switch should disconnect the load and connect the cell to the charging system, for which I will likely use a TP4056 breakout board (e.g. this). Once full the switch should disconnect the charger and reconnect the load. It's important that everything happens without human intervention. I've drawn the circuit in KiCAD below.

example circuit

B- and B+ indicate the leads on the charger breakout boards. The load is represented by a lamp. The switch component is just a random one I picked in KiCAD and is not representative of a thought-out design. I'm using a single 18650 cell, so no need for balance charging, etc.

My question is: will this work like this?

Online searches are all about circuits with solar cells attached and included charge controllers, but I don't think that is applicable to my circuit. The power supply will come from a wall socket converted to 5 V DC.

I feel like I am missing components or trying to do something really stupid. I would appreciate any help or a push in the right direction. Thanks!

  • \$\begingroup\$ Is the continuous current rating of 30mA for the ADG419 adequate? It also has a typical resistance of 24 ohms. \$\endgroup\$
    – JRE
    Nov 25, 2022 at 8:20
  • \$\begingroup\$ I picked a random component for the switch and it is not representative of a thought-out design. I will edit to make it more clear \$\endgroup\$
    – Wirral
    Nov 25, 2022 at 8:26

1 Answer 1


No, it won't (sorry). The 0.5 C charging and 1 C discharging current is on the order of 1 to 10 A (depending on the capacity of the Li-ion cell under test). For that kind of current, you need a relay, not an analog switch. For even larger Li-ion cells, the current is on the order of 100 A, for which you need a contactor.

Use a SPDT relay: C contact to the Li-ion cell, N.O. to the charger, N.C. to the load. Add a buffer between your microcontroller GPIO and the relay coil, which draws more current than a GPIO pin can provide.

However, I would not do any of that. I would buy an off-the-shelf Li-ion cell tester. They can be as cheap as $ 7.

  • \$\begingroup\$ Thank you for your answer. I would also prefer an off-the-shelf solution, but wouldn't I still need some type of switch to change from the capacity tester to the battery charger? I haven't been able to find an OTS component that can do both charging and discharging and that is what confuses me. \$\endgroup\$
    – Wirral
    Nov 25, 2022 at 14:21
  • \$\begingroup\$ That switch is built into a battery tester. As I am sure you understand, this problem was already solved and products are sold that handle the entire process of testing Li-ion cells. \$\endgroup\$ Nov 25, 2022 at 14:59
  • \$\begingroup\$ The cheap ones don't seem to. I guess I'll have to keep searching. And yes you did answer my initial question. Thank you. \$\endgroup\$
    – Wirral
    Nov 25, 2022 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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