Re: Voltage Monitor
- From: "Chris" <cfoley1064@xxxxxxxxx>
- Date: 23 Apr 2006 19:21:17 -0700
Black Shuck wrote:
Hi, I am looking to construct, what I think would quite a simple circuit
to monitor battery voltage on my motorcycle, showing a normal, overvoltage
and undervoltage condition.
Does anyone have any ideas or sample designs that may do something like
this? Was thinking of driving a tr-coloured LED.
Thanks in advance.
Hi, Black. I'm going to make a guess that your "tri-colored LED" is
one of those two-lead LEDs that are actually back-to-back LEDs, one red
and one green. If you bias the LED one way, the red one lights; bias
it the other way, and the green one light. If you can arrange to
reverse the bias over a hundred times a second, it seems like both the
LEDs are lit, and the light output from the diffused lens seems to be
kind of an orangish yellow.
If that's the case, let's first look at making it light up yellow. In
order to do that, you could use something like this circuit, based on
the 74HC14 (a hex CMOS inverter with Schmitt trigger input) (view in
fixed font or M$ Notepad):
|
| .-----------------------.
| | ~ |
| | |\ ___ ~R | /|
| o-|H>O-o--|___|-o->|-o--o-O<H|-o
| | |/ | 150 | | | \| |
| | | '-|<-' | |
| | |\ | G~ | /| |
| '-|H>O-' ___ ~ '-O<H|-o
| |/ .-|___|--. \| |
| | 220K | |
| | |\ | |
| o--|H>O--o---------'
| .01uF | |/
| ---
| ---
| |
| ===
| GND
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)
Looking at the circuit, you can see the bottom inverter with the 220K
resistor and the .01uF cap. That one works as an oscillator with 50%
duty cycle and an operating frequency of about 1KHz. That's more than
fast enough to cause persistence of vision to see the red + green as
orange-yellow. The output of that oscillator goes to the two
paralleled inverters on the right, and its inverse goes to the two
paralleled inverters on the left. This means that both the LEDs will
light up in turn at 1KHz, 50% of the time.
Note that, technically, a standard HCMOS output should be able to
source or sink 4mA with output voltage remaining within 0.4V of the
power supply rail. However, you should be able to drive the output at
10mA per gate without too much problem, having only a somewhat greater
voltage drop across the output. But since you're driving an LED, and
in one case a CMOS inverter, it should be OK.
Note also that the key to the oscillator is the charging and
discharging of the cap from about 1/3Vcc to about 2/3 Vcc and back
again. If you override this, you can make the oscillator stick either
high or low, depending on what you want.
So, now that we've got that down, let's look at your project. I'll bet
you'll want green to be OK, with yellow as undervoltage and red as
overvoltage. That takes a little thought, but it's very possible by
sourcing or sinking current into that node.
Here's a workable circuit that should do the job for you without too
many parts, as long as you're not interested in millivolt precision (it
goes without saying that a $2 PIC with ADC would be able to do this job
for a lot less cost and hassle with more accuracy, but I'd guess that's
not what you're looking for here).
|
| VCC Vin .-----------------------.
| + o | ~ | 74HC14
| | | | |\ ___ ~G | /|
| .-. .-. VCC o-|H>O-o--|___|-o->|-o--o-O<H|-o
| R1| | | |R3 + | |/ | 150 | | | \| |
| | | | | | | | '-|<-' | |
| '-' '-' VCC.-. | |\ | R~ | /| |
| | | + | | '-|H>O-' ___ ~ '-O<H|-o
| | | | | |10K |/ .-|___|--. \| |
| | | |\| '-' | 220K | |
| | o------|+\ | D | |\ | |
| | | | >-o->|-------o----o--|H>O--o---------'
| | .-. o---|-/ Over | | |/
| |R4| | | |/ | --- |\ N.C.
| | | | | LM393 | --- .-|H>O-
| | '-' |Dual Comparator | |.01uF | |/
| | | | |\ | | ===
| | o--)---|-\ D ___ | === GND
| | | | | >-o-|<-|___|-' GND
| o---)--o---|+/ `Under 47K VCC
| | | |/| ____ +
| .-. .-. === Vin | | |
| R2| | | |R5 GND o--o---|7805|---o
| | | | | +| |____| +|
| '-' '-' D=1N914 C--- | C---
| | | C=10uF --- | ---
| === === | | |
| GND GND === === ===
| GND GND GND
|
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)
In addition to the 74HC14, you've got an LM7805CT and an LM393 dual
comparator. You're using the 5V output from the 7805 as a voltage
reference as well as power supply, so your +5V reference is +/-10%.
Now R1 and R2 establish a reference voltage to the comparators (I'd
pick equal resistors to get the reference at 2.5V). You'll then pick
R3, R4, and R5 to make it so the switching point of the high comparator
occurs at your intended overvoltage point, and the switching point of
the lower comparator occurs when Vin is the undervoltage switching
point.
At normal Vin, the upper comparator has a logic low output, and the
lower comparator has a logic low output, too. That means that the
lower comparator is sinking current from the comparator input faster
than the output can source, so the input to the oscillator stays low.
That means the green LED stays on, and you have a green output.
At undervoltage Vin, the top comparator will stay low, but the lower
comparator goes to a logic high. That means both diodes D are blocking
both comparators from affecting the oscillator, so it starts going,
leading to a yellow output.
At Vin overvoltage, the upper comparator goes high, and the lower
comparator goes low. Logically, both of them should be affecting the
circuit, but since the current from the 10K resistor overpowers the
current from the 47K ressitor, the top comparator controls, and forces
the input to the oscillator high. That results in a RED only LED.
You might want to place a small cap (say, another 10uF) between the
R3-R4 node and GND to cut down on ripple in Vin. Generator ripple
might cause kind of weird transitions where you're not really sure
whether it's green or yellow at idle, or green or red at high RPM (most
motorcycle voltages vary more with RPM than car alternator/regulators).
During a voltage right on the edge between good and high, the LED
might look yellowish.
This should do the job, unless I've missed something (hopefully Mr.
Fields or Mr. Popelish could have a glance?). The basic idea should
work for a low-cost solution to your problem.
Good luck
Chris
.
- References:
- Voltage Monitor
- From: Black Shuck
- Voltage Monitor
- Prev by Date: Re: (Just gotta gloat) Where there's a will, there's a way...
- Next by Date: Re: why is motor start command normally a pulse??
- Previous by thread: Re: Voltage Monitor
- Next by thread: "strip chart recorder" on a PC??
- Index(es):
Relevant Pages
|