The project produces a battery charger that may be used to charge NiMH, Li-Ion, NiCad, sealed lead acid, and rechargeable alkaline batteries. There are two channels that the charger imposes which can charge two different batteries at a time at up to 2A each while channel A can be used as a discharger alternatively. All necessary parameters are allowed to be set by a 2x16 LCD display with a 5-key keypad while displaying charging/discharging values including mAH when complete. A fixed voltage, current limited output, fixed current, voltage limited output, and a variable PWM output are provided as a bonus. The brain of the circuit is performed by an ATmega32 microcontroller that runs at 16MHz. In the charging circuit, the inductor/capacitor pair are optimized for a 16kHz pulse width modulated signal and provide and provide a smooth DC output. The raw signal is compensated in software for the drop across the current measurement resistor and lead wires while and the voltage input needs to b...