|
|
 |
|
 |
|
 |
| Ev Archive for November 2000 |
 |
| 1333 messages, last added Wed Aug 08 18:50:13 2001 |
[Date Index][Thread Index]
Re: My Battery Monitor
Mark Farver wrote:
> How about using a PIC 12C67x? These are reasonably cheap ($1.77 via
> digikey) 8pin microcontrollers with built in clocks and ADC's...
Yes, there are lots of parts that can be used. But you have to remember
that the parts wrapped around the microcomputer are far larger, more
expensive, and more critical to overall performance than the
microcomputer itself!
Remember that you are monitoring a VERY noisy battery, in a VERY harsh
environment, with huge noise levels, temperature extremes, shock,
vibration, acid, etc. Here is what I think is important:
1. The box you put it in.
- how well is is sealed?
- can water get inside via condensation or wicking?
2. The voltage reference.
- what is its initial accuracy?
- is it temperature stable?
- how much does it drift with time?
- are they repeatable? will different boards match each other?
3. The power supply.
- can it provide stable power to the micro despite huge noise levels?
- is it protected from reversed voltage?
- protected from "load dump" type overvoltage transients?
4. The watchdog/reset circuit.
- will it reliably start if the battery is pulled dead, and then
the voltage s-l-o-w-l-y rises slowly as it gets recharged?
- will it reliably detect "crashes" and reset the micro?
- will it reset the micro even after a pin is hit with a static zap?
(many micros "latch up" if a pin is forced below ground or above
supply voltage, and won't reset properly until power is removed
and then re-applied)
5. Connectors.
- will they corrode or fail when dirty? wet? if acid gets on them?
- can they be hooked up wrong? if so, what happens?
6. Isolation.
- what provides isolation? a single component? what if it fails?
(example; inexpensive optocouplers have a thin piece of plastic
between LED and phototransistor. If it overheats, say from
excessive current, the plastic melts and you lose isolation)
These are the hard questions. Answer them first; then worry about
picking the micro.
The next thing to remember is that manufacturer's data sheets usually
brag about the best-case performance. What really counts is the
WORST-CASE performance. For example, a micro's built-in A/D converter
might have 8-bit resolution, but not 8-bit accuracy. The analog section
may may share a ground pin, or use the digital supply voltage pin as its
reference. Digital noise and supply current can make it impossible to
achieve the full accuracy.
Software is another troublesome area. Most internal A/D's are successive
approximation types, which are very poor at rejecting noise. You either
need aggressive external filters, or sophisticated software to digitally
filter the signal. On one project where we used a PIC to monitor battery
voltage, we had to take 10,000 samples, eliminate obviously bad ones
(noise glitches, etc.) and calculate a running average to get usable
data.
Networking software is another challenge. It is one of the more
difficult things to get micros do do reliably. Simple schemes will
crash, lock up, or allow one micro to take down the whole system.
All these problems are solvable, but it takes some thought and effort.
It's not as easy as throwing a few parts on a board and writing a few
lines of code!
--
Lee A. Hart Ring the bells that still can ring
814 8th Ave. N. Forget your perfect offering
Sartell, MN 56377 USA There is a crack in everything
leeahart_at_earthlink.net That's how the light gets in - Leonard Cohen
 |
 |
|
|