BattMan II: Build a Computer Controlled Battery Manager
September 1, 2007
BattMan II is a computer controlled battery manager, intended for typical rechargeable batteries used by R/C and electronics hobbyists, as well as various consumer product batteries. BattMan II has the following capabilities:
- Works with Nickel-Cadmium (NiCd), Nickel-Metal-Hydride (NiMH), Lithium-Ion (Li-Ion), Lithium-Polymer (LiPo), Lithium-Nano-Phosphate (LiNP), and Lead-Acid (Pb-Acid) batteries of 1.2 to 14.7 Volts.†
- Discharges batteries to measure capacity at rates of 130mA to 2A.
- Charges at rates of 130mA to 1.3A.†
- Automatically performs repeated discharge/charge cycles to break in new batteries, or erase NiCd voltage depression in old ones.
- Measures internal resistance.
- Monitors self-discharge.
- Real time graphical display lets you see problems like mismatched cells.
- Keeps a log of all operations performed, which can be imported into any spreadsheet program.
- Saves graphs of charge, discharge, auto-cycle, and monitor operations.
- Connects via parallel port to any PC running Microsoft Windows (95, 98, ME, 2000, XP, Vista, or Windows 7).††
- Operating software, complete with source code, is available to download.
†Maximum voltage and current limits depend on the power supply used. Values shown are for the prototype.
††Requires sufficient memory to comfortably run Windows, a few megabytes of free hard disk space, and 800×600 or higher resolution display. If you want to modify the software, you’ll also need Borland C++ Builder 5 or newer.
BattMan II is a fairly complex project, and this article assumes that you have some electronic project building experience. If you’re reasonably careful in construction and follow the testing and calibration instructions closely, you should have no problems getting it to work. Your success with this project will benefit from an understanding of how it works, so please read the next section carefully before you plug in the soldering iron.
If you don’t want to build this project but need a device like this for your consumer electronics batteries, you might consider the La Crosse Technology BC-1000 AlphaPower Battery Charger or Maha Powerex MH-C9000 WizardOne Charger-Analyzer. This performs many of the same functions as BattMan II, but only for AA and AAA NiCd or NiMH cells (up to four at a time). The La Crosse charger also comes with adapters to let you use AAs in devices requiring C or D sized cells.
BattMan II consists of five subsystems: power supply, current control, battery connection, voltage measurement, and logic power.
The power supply I used is a commercial off-the-shelf model that can supply 18 Volts at 2.2 Amps. I purchased mine at a surplus store. Any similar power supply will do, so long as it produces 18 to 20 Volts, and enough current for the maximum charge rate you want to be able to use. Points labeled V+ in the schematic are connected to the positive terminal of the power supply.
CMOS buffers Z2a through Z2d together with resistors R26 through R34 form an R-2R ladder digital-to-analog converter. R34 is used to adjust the output voltage range so that it spans 0 to 0.2 Volts (which can be measured at test point TP2). The input to the converter is taken from the four low-order data bits (D0 to D3) of the parallel printer port that BattMan is connected to.
The output of this D-to-A converter is fed into op-amp Z4a, which together with Q3 (a TIP120 NPN Darlington transistor) and R45 (a 0.1Ω power resistor) forms a constant current sink. Z4a adjusts the base current to Q3 so that the voltage across R45 remains equal to the voltage from the D-to-A converter. The effect is that there will be a constant current flowing into the collector of Q3 (since a constant voltage across a resistor requires a constant current).
Transistor Q1 and relay K1 are used to connect or disconnect the positive terminal of the battery being charged. Q1 is controlled by bit D5 of the parallel port. When this bit is low, the battery is disconnected; when it’s high, the battery is connected.
Whereas K1 controls if the battery is connected, relay K2 controls how it is connected. When parallel port bit D4 is low, Q2 does not conduct and K2 is not energized. This connects the positive battery terminal to the collector of Q3 (the current sink), and the negative battery terminal to ground. Any current flowing through Q3 will come from the battery, thus discharging it.
When D4 is high, Q2 conducts and energizes K2. Now the positive battery terminal is connected directly to the positive power supply voltage, and the negative terminal is connected to the current sink. Current flowing through Q3 now will come from the power supply and pass through the battery, thus charging it.
By far the majority of the components in the circuit are dedicated to accurate measurement of the battery voltage. Because the battery is connected between V+ and Q3 when charging, we can’t measure the battery voltage by just measuring the positive terminal voltage relative to ground. Instead, we have to measure the positive and negative terminal voltages (relative to ground) separately, and then subtract to determine the actual battery voltage.
One way to do this would be with an analog-to-digital conversion chip, but these aren’t exactly easy to find (especially with the resolution we need). Instead, BattMan II uses a digital-to-analog converter controlled by the computer, and compares its output with the voltages being measured. Z1 is a 12-bit CMOS counter, and together with R1 through R25, forms another R-2R D-to-A converter that covers a range of 0 to 3 Volts. The converter is controlled by the two high-order bits (D6 and D7) of the parallel port. Setting D6 momentarily high clears the counter, and restores the D-to-A output (VDAC) to 0V. Then, pulsing D7 causes the counter to increment, and thus the output voltage to increase (the output voltage can be monitored at TP1).
The positive battery terminal is connected to a voltage divider made up of R35, R36, and R37. During initial calibration, R35 is adjusted so that the maximum possible input voltage (the power supply voltage) is divided down to a voltage just slightly less than the maximum possible VDAC voltage (about 3V). Comparator Z3a compares the divided positive terminal voltage with VDAC. The output of Z3a is high when the divided voltage is greater than VDAC, and low when it’s less. It is connected to the ERR input pin of the parallel port.
Voltage divider R39, R40, and R41, together with comparator Z3b perform a similar function for the negative battery terminal. The output of Z3b is connected to the SEL input pin of the parallel port.
The way the computer determines the battery voltage is to first reset Z1, and then start incrementing it while monitoring the SEL and ERR inputs of the parallel port. When SEL changes state, the current count is recorded (the computer can’t read the output of the counter, but since it is controlling the counter, it can perform it’s own internal count and use that). When ERR changes state, the current count is recorded again. Next, the voltage corresponding to each of the two counts is computed (using a table of values supplied during initial calibration). The two voltages are then subtracted to arrive at the battery voltage.
Logic Power Supply and Spare Parts
A 7805 voltage regulator steps down and regulates the 18 Volt power supply to provide a steady 5 Volt supply to the CMOS chips, the voltage comparators, and the relay coils.
There are a few parts left over, namely two CMOS buffers from Z2, and an op-amp from Z4. After designing and building the prototype, I realized that these could have been used to implement a fail-safe that would monitor parallel port bit D7, and turn off the relay after 10 seconds or so of inactivity. This would detect cases of the computer “falling asleep at the wheel” (i.e. it has crashed and is no longer paying attention to running the BattMan device). I may design such a failsafe in the future, but in the mean time, never leave BattMan II unattended while it is turned on and connected to a battery!
The BattMan II software is implemented using Borland’s C++ Builder. It is available to download and install, and includes both the ready-to-run software (requires calibration), and complete source code in the form of a C++ Builder project for those of you who like to tinker with software as much as with hardware. Reading the source code is also helpful in understanding the operation of the hardware.
At present (version 0.1), the software provides the following functionality:
- Discharge: Discharges battery based on selected battery chemistry, expected capacity, number of cells, and discharge current. Plots a graph as the discharge progresses.
- Charge: Charges battery based on selected battery chemistry, expected capacity, number of cells, and charge current. Plots a graph as the charge progresses.
- Auto Cycle: Discharges and then charges as above. Can specify maximum number of cycles, and options to stop when capacity stops increasing, and to save the graph to a BMP file after each cycle.
- Resistance: Measures battery internal resistance at selected discharge and charge currents.
- Monitor: Monitors battery voltage and plots a graph.
- Setup: Gives access to the setup and calibration file, and tools to help with calibration.
- Save: Saves a copy of the currently displayed graph in a BMP file.
Nickel-Cadmium and Nickel-Metal-Hydride Charging Algorithm
NiCd and NiMH batteries should be charged at a constant current. The trick is knowing when to stop, and there are a number of ways of doing this. The method used by BattMan II is to detect the voltage drop that occurs when current continues to flow into the fully charged battery, known as negative delta-V detection. This voltage drop is more pronounced in NiCd batteries than it is in NiMH, so BattMan II looks for a smaller drop when charging NiMH.
Charging begins at the selected constant current. BattMan II monitors the voltage and keeps track of the highest voltage achieved so far during the charge. If the voltage then drops below the highest seen by a specific amount (0.5% for NiCd, 0.25% for NiMH) for some length of time (5 seconds), the battery is assumed to be fully charged and charging is terminated.
The graph shown above illustrates the discharging and then charging of a NiMH battery.
Lithium and Lead-Acid Battery Charging Algorithm
The proper charging method for LiPo, Li-Ion, LiNP, and Pb-Acid batteries is constant-current/constant-voltage (CC/CV). Charging starts at a constant current as it does for NiCd and NiMH, but once the voltage reaches a certain threshold, the current is gradually reduced in order to hold the voltage constant. Once the current required to hold that voltage is low enough (generally about a C/10 rate), charging is terminated.
BattMan II cannot do constant-voltage charging, so a modification of this method is used. Initially, charging proceeds at the selected constant current, as in the CC/CV method. When the threshold voltage is reached (4.17V/cell for LiPo and Li-Ion, 3.57V/cell for LiNP, and 2.45V/cell for PbAcid), BattMan II will reduce the current to the next lower setting (the charge rate displayed at the top of the graph remains the initially selected rate). This will cause the voltage to drop, and charging continues until the threshold is reached once again. The process of reducing the current and resuming charging continues until the current is reduced to zero, at which point charging is terminated. This algorithm is equivalent to CC/CV, except that the current reduction is done in large steps instead of gradually and continuously. The end result is the same, and at no time is the battery allowed to exceed its charge cut-off voltage.
The circuit is best built on a printed circuit board. Refer to my article on the subject, Making Excellent Printed Circuit Boards. Here is the printed circuit layout for BattMan II:
The following diagram illustrates component placement on the board:
Note that not all components are on the board. Specifically, power transistor Q3 is mounted to a heat sink outside the enclosure, and power resistor R45 is mounted inside the enclosure near Q3.
Begin by installing jumpers J1 through J7 and the sockets for all the ICs. Then install all the resistors. I suggest installing all the 20.0kΩ 1% resistors (red-black-black-red) first, followed by all the 10.0kΩ 1% resistors (brown-black-black-red). Be careful, because they look very similar and the circuit won’t function correctly if you mix them up. Next install all the remaining resistors and the capacitors. Also install pins into the test point (TP) holes.
Install the two relays next. I don’t advise using sockets for these because the pins will have to handle fairly high currents (higher than IC sockets are meant for). Then install the diodes, transistors Q1 and Q2, and the 7805 voltage regulator. A small heat sink on the regulator will keep it sufficiently cool. Finally install the three insulated jumpers, shown in green on the component placement diagram and in the photo.
Connectors and Off-board Components
The lead to the battery consists of two heavy gauge (#14) conductors to carry the charge/discharge current and two lighter conductors for measuring voltage (the voltage is not measured through the power leads because there can be a voltage drop along their length). Connect the sense leads to the power leads at the battery connector end. At the circuit board, solder the power leads to BAT+ and BAT- and the sense leads to SEN+ and SEN-.
Next attach leads from the E, B, and C connections on the board to the emitter, base, and collector Q3. The C lead should be heavy gauge because it has to carry the full charge current. The B and E leads can be lighter because they only carry the low base current, and the current sense feedback voltage respectively. When connecting the the E lead to Q3′s emitter, also connect a shorter heavy gauge wire to the emitter. The other end of this wire goes to current sense resistor R45. Connect the other side of R45 to GND on the circuit board, again with heavy gauge wire.
Attach Q3 to a fairly large heat sink (in some cases, Q3 has to dissipate about 30 Watts of heat). Mount a small 5 Volt fan to the heat sink, and connect it to the points marked FAN+ and FAN- on the circuit board.
Connect another pair of heavy gauge wires to V+ and GND and connect their other ends to the power supply or a high current power connector.
For connection to the computer, obtain a DB-25M solder-type connector. Prepare an 11-conductor cable and use it to connect the appropriate pins to the circuit board as shown by the numbers in parentheses along the bottom of the component placement diagram.
I installed the BattMan II prototype into a plastic project box. Q3 and its heat sink and fan are bolted to the back panel on stand-offs, while current sense resistor R45 is glued to the inside of the case.
I made up a very short parallel port cable that just reaches the back panel, and then connected that to the computer with a 25-pin straight-through M-F extension cable (available at any computer store). I used a Deans Ultra Plug on a short lead for the power supply connection on the back panel. The battery lead comes out the front panel for ease of use.
Testing and Calibration
Start by double checking all your work, making sure the components are installed the right way around, and that you haven’t inadvertently created any solder bridges (a magnifying glass is helpful). Do not insert any of the ICs into their sockets yet.
Connect and turn on the power but do not connect BattMan II to a computer or battery yet. Insert a piece of solid hookup wire (telephone wire works well) into pin 16 of Z1′s socket. Momentarily touch the other end of the wire to the the point where parallel port line D4 connects to the board. You should hear relay K2 turning on as you do this. Repeat for D5 and relay K1.
Next disconnect the power, install all the ICs, and reconnect the power. Check that none of the components get hot. If everything seems fine, install the BattMan II software on your computer and connect the parallel cable to your computer’s parallel port. Click the Setup button to open the Setup Assistant. In the Configuration File panel, select the appropriate “base port address” for the parallel port you are using (usually 378 for the main port, 278 for the secondary port, and sometimes 3BC). Save and re-open the Setup Assistant.
In the Relay Control panel, click the Charge radio button. Once again, K2 should turn on. Clicking Discharge should turn it off. Repeat using Connect and Disconnect to test K1. If this doesn’t work, you’ve either got a cable wiring problem, or you’ve selected the wrong parallel port base address.
Voltage Measurement Calibration
Connect a digital voltmeter between test point TP1 and ground (a handy place to connect to ground is the tab of the 7805 regulator). In the D-to-A Control panel, set the Count To field to 0 and click the Set button. The voltmeter should read very close to zero. Change the Count To field to 4095 and click Set again. The voltage should jump to about 3V. Record the exact voltage, which we’ll call VDACmax.
Next, set the Count To field to each of the following twelve values, remembering to press Set after entering the value: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, and 2048. For each value, measure the voltage at TP1 and modify the corresponding lines in the “D/A converter bit weights” table (highlighted in yellow in the image) in the Configuration File. As a sanity check, adding up all the values should get you very close to VDACmax.
Set Rate to Hex 00, set Mode to Charge, and Battery to Connect. Connect your voltmeter between TP3 and ground. Now connect the BAT+ and BAT- terminals (and thus also the SEN+ and SEN-) terminals together. Adjust R35 until the reading is just slightly less than VDACmax (an ideal setting is about 99.5% of VDACmax). Record this voltage as SEN+max.
Move the voltmeter positive lead to TP4, adjust R39 until the voltage is as close as possible to SEN+max, and record this as SEN-max. Then move the voltmeter positive lead to the positive battery terminal (which is currently connected to the positive power supply line through K1 and K2) and record the power supply voltage (V+).
Disconnect BAT+ and BAT- from each other and set Mode and Battery to Discharge and Disconnect respectively. In the Configuration File, edit the two lines labeled “sensor low-side and high-side multipliers” (highlighted in blue in the image) as follows:
- Set the first line to V+ divided by SEN-max.
- Set the second line to V+ divided by SEN+max.
Current Control Calibration
Connect a fully charged 8.4V to 12V NiCd, NiMH, or Lead-Acid battery to the BAT+ and BAT- terminals, with an accurate digital ammeter (rated for at least 5 Amps) in series with the BAT+ connection (positive ammeter lead to the battery). Set Mode to Discharge and Battery to Connect. The current flow should be close to zero.
Now slide the Rate control to maximum (Hex 0F) and adjust R34 to give you the desired maximum current (about 0.2 Amps less than what the power supply can provide, which worked out to 2 Amps in the prototype). Different settings of the Rate control will then give different discharge or charge currents ranging from zero to the maximum, in steps of approximately 1/15th of the maximum.
Record all the rates by editing the sixteen entries in the right hand column (highlighted in red in the image) of the “charge and discharge rate pairs” table in the Configuration File.
Set the Rate back to 00, disconnect the fully charged battery, and connect a discharged one. Set Mode to Charge, and once again slide the Rate control to each of its sixteen settings. Record the charging rates as the first value of each pair (highlighted in green in the image) in the aforementioned table. These should be within about 2% of the corresponding discharge rates (since the same circuit is regulating the current in both cases).
When you’ve completed this step, select Disconnect and unplug the battery. Click the Save button to save all the changes you’ve made to the Configuration File and exit the Setup Assistant.
Number of Charge Rates
If you want to allow for higher discharge rates than charge rates, you can use the “number of charge rates” setting to limit the maximum charge rate. For example, if you adjust R34 for a maximum current of 2A, but your power supply can provide only 1.4A, you can set the number of charge rates to 11 so that none of the rates above 1.4A are available for charging. I had to do this because my power supply, although rated for 2.2A, could only provide up to 1.4A with reasonable stability.
The remainder of the Configuration File contains additional settings that govern operation of BattMan II. The comments in the file describe each of these settings so I won’t go into any further detail here. If you don’t understand what some of these settings do, it’s probably best to leave them set as they are.
Testing and Using the Functions
With calibration completed, you’re now ready to try the various functions BattMan II provides. The sections below describe each function. Monitor progress carefully the first few times to make sure everything is working as it should.
Connect a partially or fully charged battery and click the Discharge button. In the Discharge Settings dialog, select the type of cells, the rated capacity (in mAh), the number of cells in the battery, and the desired discharge rate. Click the Start button to begin discharging.
The first thing BattMan II will do is measure the internal resistance of the battery so that it knows how much the discharging current affects the measured voltage. It will then begin discharging the battery, and plotting a graph as it progresses. The following information appears at the top of the graph:
- The word “Discharge“.
- A description of the battery (e.g. “Battery: 7 NiMH” for a 7-cell NiMH battery).
- The selected discharge rate (e.g. “Rate: 1338mA“).
- The voltage at which discharging will stop (e.g. “VMin: 7.51“).
- The measured internal resistance (e.g. “Resistance: 0.1412 Ohms“).
None of the above will change during the discharge. The bottom of the graph shows progress information:
- Elapsed time in hours, minutes, and seconds (e.g. “Time: 0:07:45“).
- Voltage right now (e.g. “Voltage: 9.23V“).
- Capacity discharged so far in mAh and mWh (e.g. “Discharge: 967mAh (1160mWh)“).
When the battery voltage (under load) has reached VMin, discharging will stop and the information at the bottom of the graph will reflect the total discharged capacity. A summary of the discharge operation will also be written to the log file “
BattMan2.csv“, which can be read into a spreadsheet program for later review.
Connect a partially or fully discharged battery and click the Charge button. In the Charge Settings dialog, select the type of cells, the rated capacity (in mAh), the number of cells in the battery, and the desired charge rate.
After you click Start, BattMan II will begin charging the battery and plotting a graph. The following information appears at the top of the graph:
- The word “Charge“.
- A description of the battery (e.g. “Battery: 7 NiMH” for a 7-cell NiMH battery).
- The selected charge rate (e.g. “Rate: 1347mA“).
- The charge termination criterion. This will be a delta for NiCd or NiMH batteries (e.g. “Delta: 0.33%“), or a maximum voltage for Lithium or Lead-Acid batteries (e.g. “VMax: 12.6V“).
- A safety time limit, at which point charging will stop even if the termination criterion has not been satisfied (e.g. “TLimit: 2:30:20“).
- The measured internal resistance (e.g. “Resistance: 0.1412 Ohms“).
None of the above will change during the charge. The bottom of the graph shows progress information:
- Elapsed time in hours, minutes, and seconds (e.g. “Time: 0:07:45“).
- Voltage right now (e.g. “Voltage: 9.71V“).
- Capacity charged so far in mAh and mWh (e.g. “Charge: 923mAh (1092mWh)“).
- For NiCd and NiMH batteries, the present delta, and if it exceeds the termination delta, how long it has persisted (e.g. “Delta: 0.37% (2s)“).
When the termination criterion is met, charging will stop and the information at the bottom of the graph will reflect the total capacity that was put into the battery. A summary is also appended to “
The Auto Cycle function sets BattMan II apart from other battery chargers and dischargers. Cycling a battery can quickly tell you its capacity, yet leave it fully charged at the end of the operation. Tired NiCd (and to some extend NiMH) batteries can be rejuvenated by cycling, and new NiCd and NiMH batteries can be cycled a few times to achieve their full rated capacity.
Connect a battery in any state of charge and click the Auto Cycle button. The first three sections of the Auto Cycle Settings dialog are a combination of the Discharge and Charge dialogs (since cycling does both). There’s also a section where you can specify:
- The maximum number of cycles to perform. Breaking in a new NiCd battery usually requires about 5 cycles. NiMH generally needs only 3. Rejuvenating an old battery can take 10 or more. You can choose anywhere from 1 to 99.
- That BattMan II should automatically stop cycling when the battery’s capacity has not increased significantly since the previous cycle. This eliminates wasted cycles during break-in or rejuvenation.
- That the discharge/charge graph be saved to a bitmap file automatically after each cycle for later review. The files’ names will be of the form “YYYYMMDD-hhmmss
.bmp“, where the date and time correspond to when the cycle ended.
The information displayed at the top and bottom of the graph during the discharge part of a cycle operation is the same as that displayed during a discharge operation, except that the word “Discharge” on the top is followed by “n of m” indicating the current cycle number. Likewise, the same information appears after the word “Charge” during the charge portion of the cycle. Also, the capacity charged so far, as indicated at the bottom of the graph, is followed by a slash and the capacity that was discharged previously (e.g. “Charge: 1234mAh/2375mAh“).
Between alternating discharge and charge phases, there is a delay to allow the battery to stabilize (to avoid problems like false peak detection). By default, this delay is 60 seconds.
To measure the internal resistance of a battery, connect it and click the Resistance button. BattMan II measures both charging and discharging resistance, at the currents that you specify in the Internal Resistance Test Settings dialog. The measured resistances, and their average, are displayed in the graph pane (which will be otherwise blank).
Clicking the Monitor button lets BattMan II operate as a voltmeter that plots the voltage on a graph as time progresses. This is useful for monitoring the self-discharge of a battery, or perhaps monitoring the battery voltage while it is being charged by a stand-alone charger (such as the charger you might use on the flying field). The following information is displayed and updated at the bottom of the graph:
- Elapsed time in hours, minutes, and seconds (e.g. “Time: 0:07:45“).
- Voltage right now (e.g. “Voltage: 9.32“).
It is important to note that during monitoring, the negative terminal of the battery is connected to ground. This means that the voltage monitoring feature cannot be used if the battery being monitored is connected to a charger that connects the negative terminal to something other than ground. Otherwise, current will flow between BattMan II and the external device, and may damage one or the other (or even your computer). An example of such a problem would be monitoring the operation of a field charger that’s getting its power from a power supply.
However, if the external device is completely isolated from the AC power system your computer is plugged into, there will be no problem (for example, a field charger that is getting its power from a 12V deep cycle battery that is not itself connected to a charger).
After a discharge, charge, cycle, or monitor operation has completed (or has been interrupted by clicking the Stop button), you can save the displayed graph in Windows Bitmap format (.BMP) by clicking Save. You can convert the resulting file to other formats (e.g. GIF, JPEG) using image editing software such as Adobe® PhotoShop®.
The following table lists all the parts needed. These can be obtained at any electronic supply house, such as DigiKey. None of the parts are uncommon or hard to find, so you may already have most of them in your personal inventory. All resistors are ¼W unless otherwise noted. Capacitors should be rated at least 10V unless otherwise noted.
|R1, R2, R4, R6, R8, R10, R12, R14, R16, R18, R20, R22, R24, R26, R28, R30, R32, R33, R37, R41||20.0kΩ 1%|
|R3, R5, R7, R9, R11, R13, R15, R17, R19, R21, R23, R27, R29, R31||10.0kΩ 1%|
|R35, R39||10kΩ trimpot|
|C2, C3, C4, C5, C6, C7||0.1µF|
|Q1, Q2||2N3904 or 2N2222|
|D1, D2||1N914 or 1N4148|
|Z1||CD4040 12-bit CMOS Counter|
|Z2||CD4050 Hex CMOS Buffer|
|Z3||LM393 Dual Voltage Comparator|
|Z4||LM358 Dual Op Amp|
|VR1||7805 Positive 5V Regulator|
|K1||HY1-5V SPDT Relay|
|K2||DS2E-M-DC5V-C DPDT Relay|
|Power Supply||18 to 24V DC, 2 to 3A|
|Miscellaneous||Heat sink for Q3, heat sink for VR1, DB-25M connector, 11-conductor cable, 5VDC mini cooling fan, enclosure.|
There are a number of modifications that will make BattMan II even better. Here are some ideas:
Currently, if the computer that is controlling BattMan II should crash while it is charging or discharging, there’s no guarantee that it will stop. If left unattended, this could have serious consequences.
A fail-safe circuit could monitor line D7 from the parallel port, which is used to increment the D-to-A converter counter. When the BattMan II software is operating normally, it is constantly pulsing this line in order to take voltage readings. If no pulses are seen on this line for some period of time (five seconds perhaps), the fail-safe can assume that the computer has crashed and could turn off relay K1, thus disconnecting the battery from the charger.
It’s probably possible to construct the fail-safe circuit using a few resistors and capacitors, and the unused buffers Z2e and Z2f. There might even be room to modify the existing circuit board layout without having to completely rearrange it.
Parallel ports are still quite common on desktop computers, but they are becoming rare on laptops, having been supplanted by USB. A USB-based interface would allow BattMan II to be used with such PCs.
Rather than adding USB support directly to the circuit, it would be simpler to use a USB Interface experimenter board such as this one or this one. These provide a number of input and output lines that could be connected directly to the parallel I/O pins of BattMan II. The software could then easily be modified to drive the experimenter kit instead of a standard parallel port.
With a sufficiently large power supply and a proportionally larger heat sink and cooling fan for Q3, there’s no reason that the charge and discharge current limits couldn’t be increased to 5 Amps or so. However, at these higher levels, the aforementioned fail-safe is more important than ever.
If you've found this article useful, you may also be interested in:
- USB Powered AA NiMH and NiCd Battery Charger
- High Speed NiCd Charger for Electric R/C
- Low Cost Thermal Peak Detection NiCd Charger
- LED Bargraph Optical Tachometer
- On/Off Motor Controller with Brake
- Analog Bar Graph Expanded Scale Voltmeter
- Versatile Miniature High-Rate ESC with BEC and Brake
- Miniature High-Rate Speed Control with Battery Eliminator Circuit (BEC)
- Miniature High-Rate Speed Control with Brake
- Getting the Most from Your Radio Control System
Buy Stefan a coffee! If you've found this article
useful, consider leaving a donation to help support
Disclaimer: Although every effort has been made to ensure accuracy and reliability, the information on this web page is presented without warranty of any kind, and Stefan Vorkoetter assumes no liability for direct or consequential damages caused by its use. It is up to you, the reader, to determine the suitability of, and assume responsibility for, the use of this information. Links to Amazon.com merchandise are provided in association with Amazon.com. Links to eBay searches are provided in association with the eBay partner network.
Copyright: All materials on this web site, including the text, images, and mark-up, are Copyright © 2014 by Stefan Vorkoetter unless otherwise noted. All rights reserved. Unauthorized duplication prohibited. You may link to this site or pages within it, but you may not link directly to images on this site, and you may not copy any material from this site to another web site or other publication without express written permission. You may make copies for your own personal use.