I've been tinkering with the AVR-DB series, and since it has builtin opamps, I decided to make a constant current load, something like this but using the internal opamp and DAC (and the MOSFET is a 2N7000)
I decided to use it to test some NiMH batteries I have been using for years to power a wireless mouse. So I clobbered together an Arduino program using DxCore, and logged battery voltage data with the AVR-DB ADC.
The results were quite interesting. I knew these batteries were in somewhat poor health, but since powering a mouse is a very undemanding application, I never really cared much.
But man, they were in really bad shape. While discharging (at 150 mA) the voltage initialy rose, then peaked in finally dropped as the battery got depleted. Battery capacity had degraded to 1/3 of nominal.
(I discharged to 900 mV, because I didn't want to go to zero, and 900 mV seemed a good number, yeah even though I'm a chemist my knowledge of batteries is pretty low ).
Then I recharged the battery, and did another discharge cycle.
This time the discharge looked "normal" and the battery capacity had increased a lot (still only about 3/4 of nominal, but hey, that's fine by me given how I mistreated these batteries over 10 years or so...)
After some research, it turns out this is a know issue with NiMH batteries https://rightbattery.com/tag/voltage-depletion/ but mine really were an extreme case, it seems (probably I never fully discharged them until now - ever).
Picture with actual circuit (except for serial link, I used realterm and a USB/serial adapter to log data, it's in csv format):
Also attached program in case someone is interested.