NiCd/NiMH Cycler
NOTE:
- Please read the DISCLAIMER page.
- Even small battery packs can store substantial amounts of energy and be hazardous. If you are considering building something similar, please buy an off the shelf piece of equipment instead and use it in accordance with the manufacturer’s specifications.
- This project was designed for specific NiCd and NiMH cells from a specific vendor and is not relevant for any other cell type, size, brand, or chemistry
Why?
This is another project from the early 2000’s. Also check NiCd/NiMH 3 Pack C/10 Charger for a related project. Back then I flew RC electric planes using NiCd and NiMH sub-C cells. I was too cheap to buy one of the new (expensive) microcontroller controlled fast chargers so I built my own. This project would charge a NiCd or NiMH pack while monitoring voltage and temperature. Nowadays it would be easy to do this all with Arduino components, and snazzy OLED displays, but this was ~2001 (4 years Pre-A), so the starting point was a bit more primitive. However, it is still microcontroller controlled and sent data to a PC which did real-time plotting with a custom C application I wrote in LabWindows CVI (not LabView).
I built this as an early prototype, just to get things to work, but never migrated to a 2nd revision with less ugly packaging. I used an old PC power supply case and a big monster heatsink I pulled out of my junk box, with a mess of wires inside. A second rev would hopefully have been much less messy construction.
What’s inside
As I mentioned, this was pre-Arduino, so I used a BotBoard+ with a Motorola 68HC11E2. No FLASH back then and running at a whopping 2 MHz. The E2 version of the ‘HC11 on that board operated in standalone mode, meaning no external ROM or RAM, so your code had to fit in its internal EEPROM. Really! 2K of EEPROM. And a whopping 256 bytes of internal RAM for variables and the stack. For the curious, the full ‘HC11 MCU datasheet can still be found here.
The ‘HC11 may seem like a pretty limited MCU, but back they really weren’t that bad. They had already been used in industry in “real” applications like automotive antilock brake systems (ABS). They’re even referenced here in an ABS patent (see the “Preferred Embodiment” section, line 49, right column).
A freeware C compiler was around at that time, but it really needed a beefier development board with 8K or 16K of external RAM, which the BotBoard+ board definitely did not have (see above). Running the MCU in standalone mode with only 2K EEPROM for program space meant I had to write my code in 68HC11 assembly language.
I don’t have the code here, but from what I remember, it had the following features:
- read in and normalized a few sensors (voltage and thermistor)
- controlled two relays for either charging or discharging based on a couple of finite state machines
- detected end of charge/discharge criteria
- performed sanity checks and timeouts
- read in a toggle switch and pushbutton for “user interface”
- provided status on a fashionable two color (red/green) LED
- communicated with host PC over a UART (with RS232 level shifter)
Real-time plotting
Real time data was sent to a PC and plotted using LabWindows CVI. This is something very different then LabView. LabWindows CVI was great because you could program in C and have access to tons of nice techie widgets like switches, sliders, scrolling plots, etc. This was before wxWidgets or Qt were that mainstream, so it was a clean, quick way to throw together a Windows GUI back then. I wish I had a screenshot of the GUI since I have no way to run it these days since I haven’t used CVI in years!
68HC11‘s were what I had on hand at the time and I knew them well from even older projects (check out earliest ROBOTS projects), so it was a fun and quick project to design and build.
Overall, it worked well, but I retired it a few year later when I finally bought a “real” off the shelf charger.