How I Made An Electric Vehicle Battery Monitoring System

By Tim Wong

System Overview

This website contains all schematics, layout files, and parts lists detailing my battery monitoring system. I have it here as a resource for Electric Vehicle owners as well as a place for me to archive it.

Layouts and schematics are all in both pdf form as well as the ExpressPCB program file type.

I had been happily driving my electric car, a Soleq Evcort, for a few months when I found that my vehicle range had dropped, based on the voltage sag under acceleration current load. After some investigation, I found that I had two batteries that had reversing cells so that their voltages were dropping from a nominal 6+V to 2.5V! This is, of course, not good for the batteries (they never recovered). In retrospect, I should have broken the car in - it had been sitting for a long time.

I decided I wanted a system to measure and display each battery's voltage. I found that nobody made a production system, so I decide to build my own. I found Gordon Stalling's outstanding system, which I used as a starting point for my system. Superficially mine is very similar to his. Gordon's system is extremely well isolated by using opto isolators on the input. If I didn't want decimal voltage measurement, his would have been the way to go! See his system here:

I decided to make a system that would accurately measure the voltage of each battery individually, send each battery's voltage to a PC, and have a graphical display to use while driving (to prevent battery damage). Like Gordon Stalling's system, I used a small sensing box in each of my two battery compartments, which measures the voltage of the batteries in the boxes, converts analog to digital, and sends the voltage number to a processing unit inside the instrument cluster. The processing unit has a Basic Stamp module which sequentially requests the battery voltages from the sense boxes. The battery voltages are sent to an LCD as a bar graph, voltage number, or sent via RS232 to a PC.

The system operates in three modes: bar graph, voltage, and data collection. In bar graph mode, the voltage of all batteries is plotted in a continuously updating bar graph. In voltage mode, the voltage of one battery is displayed to two decimal places, and each battery can be selected using a switch mounted on the dash. In data mode, the voltage of each battery can be sent to a PC via RS232. To switch modes, another switch is used. An on/off switch is used to turn on the system when the ignition is off - I use this to collect data while charging.

The sense boxes measure voltage using a differential amplifier that can measure a common mode voltage up to +/-250V. Voltages are measured between each positive tap. The analog voltage is converted to digital with a 10bit ADC. The processor box, containing a Basic Stamp processor, requests the voltages from each ADC (my system has three eight channel ADCs) with 3 wire serial, then, depending on which mode the system is in, presents the voltage to the LCD mounted inside the instrument panel or sends the data over RS232 to a PC.

Here is a picture of my system in the bar graph mode. It updates in less than .5 sec, so I can watch and monitor the weakest battery. When driving long range, I keep the weakest battery above the line indicating 5.25V.

Here is a picture of the system in voltage mode - the selector switch scrolls through all the batteries. In very high or low temperatures, the accuracy is not good enough to have the second decimal place, but it always agrees exactly with my Fluke meter, even to .01V. From the specifications of the parts, it is good to around .05V.

Here is a picture of the system in data collection mode - it can run in high speed or low speed. In low speed, the data comes every 23 sec, and high speed it is something like every .8 sec. I guess I should know exactly, but I don't use the high speed much - the bar graph is fine. Using a laptop, high speed mode can be used to monitor battery voltages while driving.

Here is a picture of some data collected during charging - I summed all the battery voltages up to see the pack charge profile.

First Prototype System

I built the system using online board processing and parts from digikey or mouser electronics. I soldered the system at home, which was easy except for the LCD connector - to do this, I soldered it on roughly, then used solder wick to remove the solder between the pins. Installing it into the car took some doing - I cut the divider between my old fuel and tempeature gauges and put the LCD with the processor behind the hole. The cables were routed through the firewall of the car and into the battery boxes.

I used expresspcb.com to make my boards - the boards were fast to arrive and worked well. My layouts were made using their design program, which can be downloaded for free to view it. The process of having the boards made was very easy - the whole thing is done online, including file transfer, and the boards showed up in a few days. Download the files here:

Here is the layout file for the processor board and the sense boards.

Here is the schematic for my processing unit in pdf and in the Expresspcb schematic drawing program. It is consists of a Basic Stamp with the drive circuitry for the Optrex LCD.

Here is the diagram for the sense box. The main input chip is the Linear Technologies LT1990 - use the LT1990A for higher resolution.

Here is the diagram for my switch input to change menus and turn on the monitor when the ignition switch is off and the power and fusing for the system. I use this to collect data while charging:

Here is the diagram for the cable connecting the control box to the sense box and the switch inputs:

Here is the internal wiring for the sense box from the connector to the PCB, as well as the program cable for programming the Basic Stamp:

Here are the cables connecting the sense box to the batteries - one front and one rear box. The rear box has two sense boards that measure 6 batteries each, and the front box has one sense board. I have 18 batteries, obviously. The system is somewhat modular, so more boxes could be added by changing the software and making up a new cable - the serial communication between the Basic Stamp and the different ADC is controlled by a chip select, allowing for a modular system.

I used a Basic Stamp to avoid buying a development system - it uses RS232 from a PC with free development software to program the chip. The programming language is simple but proprietary. Here are the program files from my system, one for the main program and one variable file.

Here is the parts list for the system that I made. It is a bit messy, and may have errors, but it gives an idea of what parts I used.

Wish List and Next Generation System

I had originally wanted to add one more LT1990 chip for current sensing - just tap off of the existing current measuring resistor (AKA shunt - this exists in most all electric vehicles). This would have been easy to do, and I am extremely annoyed now that I didn't do it. Just add another LT1990 to the layout of the sense board, add another voltage divider to match the shunt, reconfigure the LT1900 for 10x gain, and then add the software to convert the Voltage reading to current. One idea mentioned to me is to use the existing taps off the battery cables and use a battery cable as a shunt to get current after determining the resistance of the specific cable. This would be done by connecting an additional LT1990 across a battery cable, between two LT1990 chips used to measure adjacent batteries, requiring no additional wiring! This relatively simple hardware change allows for all kinds of very useful additional functions including current sensing (obviously), real time power, energy or KWh meter, fuel gage, and probably other things I have forgotten. I feel stupid for, after putting in all this work to make the system, got lazy at the last 1% of work and left out this feature which cut the usefulness of my system monstrously.

Additionally, there are several unused outputs from the basic stamp which could have be used to shut off or control a charger or whatever, and the program memory is only 25% full.

One significant thing I would add would be a small isolating DC to DC converter on each sense board and optoisolators on the 3 wire serial communication lines between the ADC and Basic Stamp I/O. This would isolate the whole 12V dc system from the battery pack.

I prepared the board layout and schematics to include isolated 12V using 3Watt DC to DC converter, isolated communications between the Basic Stamp and the ADC using optocouplers, more robust I/O drivers, and a current sensing LT1990. This was done with LOTS of help from a very knowledgeable electric vehicle and general circuit designer - the design is 90% his. If you have any questions or work for him, I will forward emails to him.

While I HAVE NOT TESTED or built this design, I have prepared and checked the design to the point that, if I ever build another one, I could just send out the boards and build them. The design changes are significant improvements over the original system and address potential problems that have been pointed out by some EVers. The isolating DC to DC converter in the schematic is a C&D technologies NDTD1212C with 1000V isolation rating. Another option is the Mornson WRE1212P-3W which has a specification of "Flash tested for 60sec at 3000V". This may be a better isolation option, but the C&D has worked well for my friend in his systems. The current measurement can be done by simply wiring the LT1990 inputs across a batter cable that has a known resistance - this is already a the sense board, so it only involves adding two jumper wires to the sense board. The Basic Stamp program will work with this system as is, but to take advantage of the current sensing capabilities, additional software would be needed. I would add a new mode that had a bar graph with only the current minimum battery voltage, pack voltage, current draw, and power. Also, energy could be calculated to have a fuel gage given the energy put into the car and charge current data could be collected.

Following are the board layouts and schematics for the next generation system. Only the files that have changed are included here - the other unchanged files are the same as the first generation system. I don't have a parts list, so a new one has to be generated.

Conclusion

In the end I have been happy with the results of this system. On paper it is accurate within about .05V, but it always matches my Digital Fluke Voltmeter to .01V. It is a bit expensive, but I think it was worth it. The system is relatively modular - by adding more modules and changing the software, more batteries can be used. My system is set up for 6V batteries, but it could be adjusted with different resistors to be a 12V system. With the addition of the "Next Generation" features, this system would have everything I would want in a battery monitoring system.

If you ever use this information I would ask that you send me an email to tell me what you did, and also don't use it for financial gain. If you find a horrible flaw in the system or just have questions about it, I would also like to hear from you. My email is:

CLICK HERE TO EMAIL ME

Put "EV BATTERY MONITOR" in the subject so I don't miss it.