it’s slightly different for the chemistries
for li-ion, it’s good if you don’t charge them all the way to 100%.
this increases how many charge cycles you can get out of the battery as a higher voltage / SOC, especially together with higher temperature accelerates aging-induced wear.
It’s also why, for RC LiPo packs at least, recommended it’s recommended to store them at 3.85V = just above 50% SOC per cell and then charge them fully right before using them.
In RC a full charge makes sense since they want maximum runtime and don’t care if they only get 200 cycles but for Li-ion in flashlights, you can avoid charging it that high altogether if you don’t really need maximum capacity.
for NiMH, there are 2 relevant effects:
1
if you charge them up (e.g. to 100) and then discharge them a bit afterwards (FDK goes down to 70), they can keep the charge you put in for longer, i.e. you temporarily decrease self-discharge until the next charge cycle
2
when you charge a NiMH to 100% (or in reality, a bit beyond) with -dV/dt termination, you make them hot, which also accelerates aging processes for the duration it’s hot. for the same temperature, the effect on NiMH is less severe but with -dV/dt on a used battery they can go well beyond 45°C / 113F. Especially as the internal resistance increases with cycles/age, you get higher and higher temperatures at termination, “quickly” degrading the battery more and more.
That’s why I suggested adding inflection point charging, to stop a bit earlier than above 100, decrease termination temperature and thus get more cycles out of the battery for trading a few of mAh.
at least that’s how I understood it
I’d make a settings menu with submenus in UI and save the settings to EEPROM.
so:
for Li-Ion
target charge and discharge voltage selectable from 2.50V to 4.20V in 0.05V increments
current
slow, stepped current reduction before reaching target charge voltage, especially above 4.0V (see AN859 Li-Ion current curve in last post)
minimum detection voltage, default 2.5V but changeable by the user, with a big fat warning in the manual that charging overdischarged Li-Ion batteries can form dendrites and thus internal short-circuit, leading to anything from increased self-discharge current to venting or even serious fire during charging or even up to months after charging (time bomb) and is thus not recommended.
for NiMH charge
charge current
primary mode selector: inflection point / -dV/dt / target voltage / temp
with -dV/dt and temp serving as backup termination methods in inflection point mode
-dV/dt value (2.5mV and above in 2.5mV increments)
target temp value
max. temp value (for overtemp protection)
inflection point parameter, i.e. how much the smoothed battery voltage derivate is allowed to drop after peaking, causing charge termination (see AN417 in the post above, Fig 5). Good defaults will be key here (soon enough after inflection but not succeptible to measurement noise (higher ADC resolution and smoothing will help here), and allowing this to be adjusted by the user allows for getting closer and closer to the charge level -dV/dt would produce.
target voltage value
max. voltage value (for overvoltage protection)
post charge mode selector: nothing / trickle charge / selfdischarge-reduction discharge
trickle charge current: from your preset currents
selfdischarge-reduction voltage, default 1.42V, in 0.01V increments.
selfdischarge-reduction discharge current
bothering with converting NiMH voltages to % is wasted effort in my opinion since voltage-to-SOC curves are so different between NiMH manufacturers / product lines, let alone capacitiessee lygte/HKJ battery comparator
minimum detection voltage, default 0.7V but you should be able to lower it to 0.1V to revive “dead” cells
for NiMH discharge
target voltage value
discharge current
discharge delay in minutes (wait X minutes between charging and discharging if cycling / measuring capacity to allow the battery to cool between cycles)
for NiMH cycling
charge cycle number 1-10000
there should be a counter available to display how many cycles the cell has already done if this mode is active
end state: charged / discharged
I’d add an internal resistance test between the pause after charge and the discharge (a cool battery always has higher/more realistic IR), then here the user can set:
rejection on internal resistance yes/no
maximum internal resistance value before rejection (10-5000 mOhm, default 2000mOhm)
this, together with logging capabilities makes the charger an automated AAcycler-worthy test machine
for NiMH capacity testing
I’d always do charge-discharge test-charge
best add a way to manually calibrate channel voltage readings or even currents and internal resistance measurement current
to save the user from having to select the channel by button each time:
When you insert a battery I’d display a what-to-do-dialogue for this channel (operating mode: charge / discharge / measure IR / capacity test / cycle) and also set desired charge / discharge current for each.
If a battery/channel was previously configured since the charger was powered on, you could pre-select the last entered operating mode and currents.
If there was no battery inserted yet, default to charging and the default current set in the settings menu.
If the user inserts multiple batteries, have the charger remember the order in which they were inserted and ask for each channel before starting any operation. (an array could be used here)
If there is at least one operation going on and the user inserts a battery, continue the operation in background and ask what’s to be done with this channel.
Should a battery be removed before it’s decided what’s to be done that battery is either crossed from the what-to-do-dialogue list or its dialogue is closed again, if it’s the one being displayed.
then during charging I’d only leave an option to change current up/down for the selected channel, but also to pause or abbort, which returns to main menu, showing voltages and allowing to access the settings menu.
that’s all I can think of for a “simple”, powerful user-friendly UI for now.
of course the manual would need to explain every parameter and what-does-what very well but if it’s clear enough people will learn it quickly.
During the operations I’d permanently cycle the display through each active channel, showing voltages and mAh charged / discharged with the option to view other metrics by button.
again, sorry for all the homework BlueSwordM.
If I’d be paying my own bills I’d set aside time to help you in development but studying is more important rn.