A 2-Cell NiMH/NiCad Battery Discharger
After building various battery chargers I realized that a battery discharger would come in handy. I built a really simple one using a small PIC to measure the battery voltage and a HEXFET to switch the load on and off. This design is good for two cells but could be modified for other configurations by changing R4 which sets the rate of discharge, and correspondingly changing the voltage measured in the A/D converter in the source code. Remember that the A/D ceiling is 5.0 volts, so a divider may be necessary if more cells are used.
LED D2 gives you an idea of how much current is being drawn. No dropping resistor is used in series with D2 because the voltage across R4 is too low. LED D1 is on when the load is switched on. LEDs D3 and D4 are diagnostic and may be omitted. They show the state of the program. Initially the battery voltage is measured and if the voltage is above a threshold, the load is switched in. When the voltage drops below the threshold, the load is switched out and the program shuts down. The reason is that when the load is removed, the cell voltage rebounds, and I didn't want the discharger to cycle on and off.
Download C source code for the Battery Discharger ( SourceBoost BoostC)