How do you use diodes and capapcitors to switch a 4v power supply so it continuously charges a battery when not being used.
I have an hp2621a terminal which had a battery to keep nonvolatile settings (eg baud rate, parity &c). I want a chargeable battery to keep those settings going but to charge when I have the machine on.
Decades ago someone posted how to have a bike generator charge a capcitor so that when you brake, you can power a back red light.