You will find articles organized by categories, along with recent comments, along the right hand column of the website. If you are just getting started with the idea of converting a gas car to electric be sure to check out Your First Electric Car
Welcome and enjoy!
Monitoring Systems · 29 December 05
Despite increasing complexity, or perhaps because of it, most cars have a limited selection of gauges and status indicators. So called “dummy lights” have replaced meters in all but the performance orientated automobiles. Even the dummy lights are multi-tasking. If the brake light illuminates it could be for a number of reasons: emergency brake on, brake light out, low brake fluid, or maybe loss of assist vacuum.
The basics necessities for a car come down to: speedometer, gas gauge, some form of engine temperature, and a tachometer for manual transmissions.
The reduction in gauges probably stems from improvements in reliability (with perhaps a bit of user ignorance and manufacturer penny pinching tossed in). Cars these days can easily go thirty thousand miles without much maintenance or worry. Do you put in a gauge and hope a day-to-day commuter will notice low oil pressure? Or do you have the on-board computer do the measuring and flick on a warning light?
In an electric car the monitoring can be pretty simple as well. Instead of keeping track of the “engine” we are more interested in the “fuel” system.
The electric car’s motor and controller are robust and maintenance free…you can go hundreds of thousands of miles with only an occasional motor brush change. The wires and fuses don’t deteriorate, there are no fluids to monitor or replace, and for the most part are not affected by the swings in temperature.
The most complex part of an EV is the battery system. It doesn’t matter if you are using tried and true lead acids or the latest hi-tech lithium polymers, the battery system needs to be monitored and cared for.
At the very least you’ll want to know two things: pack voltage and amps. A voltage reading provides a rough indication of the charge state and, when accelerating, how capable the batteries are of supplying power to the motor. The voltage may look good when parked, but if a battery is going bad or hasn’t been fully charged the voltage could “sag” (drop quite a bit) under load.
Current flow, or amps, let’s you see how much power the motor is drawing at a given moment. Let’s say you start off driving to work along a flat stretch of road every day and the meter typically shows 75 amps. If it started showing higher current draw you would know that something is causing the motor to work harder: low tires, mal-adjusted brakes, or even a bad bearing. These are all things that can happen with any car, but with an EV’s meters it’s easy to spot such changes.
Our Mazda 626 EV used an E-meter (now called a Link-10). The digital display could be switched to show voltage, amps, amp hours, and even a time-remaining estimate (mostly useless for an EV).
Amp hour reading is fun and educational. Think of it as a reverse gas gauge of sorts, showing how much “fuel” has been used. When the car is charging it drains the amp hour meter as fuel is put back into the batteries. Since there’s inherent loss to any transfer of power the charger ends up putting more power back in than what is shown on the amp hour meter.
The E-meter zeros the amp hour reading after it has seen a certain charge level.
The commute with the Mazda was six miles and on the way to work it typically took 6-9ah. That included a mile down hill, and about five miles of mostly flat terrain with a few stop lights along the way. I’d experiment with different routes and driving styles to see how little “juice” I could use.
If I came out in the morning and the amp hour meter wasn’t at zero I’d know that something went wrong with the charge cycle: tripped breaker, bad battery, or I forgot to plug it in the night before. Voltage would also be lower, but not always so much that it was as easy to spot as a bad ah reading.
The E-Meter sports a four digit led “gas gauge,” which tries its best at guessing how much is left in the batteries. Considering that battery chemistry changes with temperature, age, and usage this is an approximation at best.
As a basic “pulse” of your EV the E-meter does a fine job. There’s a few other options available now, like the Bat2 and dedicated meters. I would suggest at least the basics so you can keep track of your battery pack. Batteries are expensive and a pain to change, it seems unwise to put them at risk in order to save a three or four hundred dollars on a meter.
Some EV hobbyists will install a more sophisticated battery monitoring system, or BMS. The simplest version runs a voltage tap from each battery to some form of switch and voltmeter, letting you cycle through and check the voltage of each battery quickly.
More sophisticated BMS may include monitoring and control circuits. Since the battery charger is typically installed across the whole pack it only keeps track of how much voltage the entire lot of batteries is charged to. If one battery needs more charge than the others it can’t really know this.
A BMS monitors each battery and as a battery reaches its charge state will shunt some of the current around the battery. This keeps the battery from over charging, while letting the lesser charged batteries time to come up.
Some form of BMS is almost a requirement with advanced batteries, like AGMs, since they are sealed and overcharging could cause out-gassing. NiMH and Lithium batteries really have to have a BMS since overcharging them could irreversibly damage or destroy a battery.
The folks over at the EVList have talked about making a more sophisticated metering system. It could take the serial data stream output from an EMeter (or equivalent) along with pulses from a drive shaft sensor to know how much distance is driven. Using all of that information it would be easier to plot typical power usage and make a slightly more informed guess about how much “fuel” is left.
I’ve been giving this some thought. The Emeter would need to be modified for serial output (it’s missing a chip and a few components) and then connected to some form of on-board computer and display. The computer could also collect data from other parts of the EV.
Here are a few of the choices:
Small embedded system w/simple LED/Numeric display. Low cost, no operating system more low-level (typically) programming involved. Probably not worth the effort if you already have an existing Emeter or equivalent. (pic, basicstamp, others?)
Small to mid-Level computer. These will typically have a real-time operating system, like Linux, and expansion options. The Gumstix brand come with Linux, lots of input/output (I/O) options, ability to drive a display, and even storage (typically solid state). Medium priced, depending on the options, and a wide array of programming options.
Commercial computer. A Mac Mini or a reduced footprint PC. These can run without a monitor, but provide more bang for the buck when teamed up with a one. Wide variety of programming options but no built-in analog/digital I/O. While these usually come with hard disks they can be modified to use solid state memory instead.
Commercial BMS or Monitoring system. I’m not aware of too many of these. Some come as an option, teamed up with a battery charger. Most of them are system specific. Hybrids like the Prius and Insight no doubt have some form of BMS. No programming, price typically higher.
Each choice has its strengths and weaknesses. Also, there’s nothing to say that you can’t use a couple of them. The low-end devices are ideal for small, purpose-built systems with a few items being monitored and simple output. Those and the mid-level microprocessors usually have good analog and digital I/O. Something like a PC or Mini doesn’t have any I/O at all, at least in a form that we can use.
Let’s talk about data acquisition. I’m not a expert by any means but I’ve worked with a number of systems over the years and gleaned a little knowledge. Data acquisition involves turning outside conditions (voltages, current, switches) into something that the computer can use. There are normally two types of data that you might be interested in getting: analog and digital.
Digital data consists of on/off states, like a switch, and is sometimes referred to as GPIO, or general purpose input output. 5 volts is considered “ON” and a lack of voltage (often a ground) is considered “OFF.” Some micros (microprocessors) have digital inputs, some have outputs, some both, and some can be configured with which pins you’d like as inputs and outputs. You might use a digital input to sense that a door is open or a charger is plugged in. A digital output could be used to turn on/off a relay or illuminate and LED.
Analog covers the rest. Well, technically, it’s all analog but when you see a board sporting analog inputs what they are talking about is being able to measure the level of input voltage at a certain resolution.
If you’ve ever recorded or listened to sound on a computer you have experienced analog I/O. The basic principle is to sample the voltage at a certain frequency (for audio it can be 44.1khz, 48khz, etc..) turning it into a digital “number.” This is called an Analog to Digital Converter (ADC) and is often spec’ed with things like a sample rate (how many times per second it captures a sample of data) and resolution, or how many bits are used to express the value. A DAC (digital to analog converter) takes these numbers and turns them into an analog output. Computer headphones, for example.
When we talk about digital I/O it’s either on or off, a single bit to express a high or low (i.e. 5 volts or 0 volts). Let’s extend this concept a bit (ahem) further. Two bits can express four different values, say: 0, 1.66, 3.33, and 5 volts. 3 bits might offer: 0, 0.8, 1.6, 2.4, 3.3, 4.2, and 5. Each time you add another bit of resolution you break the incoming analog signal down into finer and finer resolutions.
Some micros have a couple channels of analog input, others have a bunch. There’s also single-ended or differential analog inputs. Single-ended means that each analog input is referenced to the same ground, while differential measures across a dedicated signal/ground pair. If you are interfacing to an EV battery pack then you’ll want to provide isolation, you don’t want to share ground lines or have any path for the high voltage to cross.
It might also be hard to find a single chip with enough analog inputs to measure everything you want. To address this you can multiplex the inputs (this is what multi-input chips are doing internally). Let’s say you have 12 batteries to measure and the chip only has two analog inputs. Instead of buying 12 chips you can setup some form of relay switching to connect one battery to the chip at a time, measure the values, and then move on to the next.
Now that we have data in the chip what do we do with it?
With an EMeter the measurement and display are all built into the same unit. But let’s say we want a Mac Mini under the dash which, in addition to playing the podcasts it downloads wirelessly each night, displays system status on-screen. Obviously the Mini doesn’t have analog or digital inputs, so we need to attach some type of external data acquisition device.
Here’s a diagram of a a DATX USB data acquisition board. You can see that it sports digital and analog I/O along with isolated USB. You have to program two things now, the acquisition board and the mini, but they each play different roles. The mini collects and optionally stores data (in a text file or database), using the data to draw pretty graphs and dials on the screen. The remote data collector is responsible for doing the heavy lifting of measuring, collating, and then sending out the data (or making it available when called).
There’s a discussion somewhere on Yahoo Groups (can’t find link at the moment, sorry) about designing a data bus for use in an EV. Called the EVILbus, it’s used to communicate between the individual battery chargers in an EV prototype. Other methods of communicating include serial ports (usually limited to one “discussion”), USB, One-wire, and Ethernet (wired or wireless).
I played around with a small ethernet device called Siteplayer on a refrigerator project years ago. The nice thing about ethernet is that it’s relatively easy to make it wireless, which is excellent for circuit isolation. Costs are higher though, especially if you have a whole bunch of devices to communicate with. Another take on this idea is a concept called Dust Networks, where you have dozens or even hundreds of little “motes” that collect data and communicate it back to a central location.
The Mac Mini appeals to me the most and not just because I can put all of our music in iTunes. OS X is unix based which, like Linux, provides all kinds of programming and data manipulation tools. There’s Perl to process the data, MySQL for storing the data, built in Apache web server with PHP for making local or remotely accessible web pages and graphs (our weather page uses some of these components), and if need be full blown applications can be written using the free Xcode tools (Java/C/C++).
All of this is mostly a pipe-dream at the moment and I’ve greatly generalized some complex subjects. Still, it is fun to think about what is possible. Feel free to share your ideas and links to products/technology.
Related and/or interesting hardware:
- GumStix, related Wiki and a VGA display project.
- Intel XScale (Wiki)
- Freescale embedded systems
- PIC Micros, PIC and C, PIC projects
- Parallax Basic Stamp, stamp tutorials
Ether/Wireless data acq:
Battery Management Systems:
- Lee Hart’s TMSI Battery Balancer
- The EVILbus
- Peter’s homemade Li-Ion PC based BMS
- MPower BMS
- One-wire based BMS
- Society of Robots Microcontroller Basics
- Chart of Data bus types
- Introduction to Data Acquisition Systems