Badtux the Snarky Penguin

In a time of chimpanzees, I was a penguin.

Religious fundamentalists are motivated by the sneaking suspicion that someone, somewhere, is having fun -- and that this must be stopped.


Monday, December 12, 2005

A 12v charging system monitor

As some of you know, I have a Kawasaki KLR-650, which is sort of the Jeep Wrangler of motorcycles i.e. go anywhere type of bike. I recently added heated grips to it, as well as a socket for a heated vest. Now, one of the limitations of the dated KLR design is its pathetic excuse for an alternator, which puts out only 200 watts of power, total, when the engine is revved way up. It's possible to run your battery down if you're put-putting around at slow speeds because the alternator doesn't put out full wattage then and the KLR has no means to monitor your voltage.

I thought about putting a voltmeter on the KLR, but delicate mechanical movements and rugged onroad-offroad motorcycles don't mix too well. I then found the LM3914 chip which could drive a bar LED to basically display a bar graph of the current battery voltage, but a KLR doesn't really have a good place to mount such a LED bar, the instrument panel is very small. There is an area where there is a blank like for an idiot light, but no idiot light behind it. So I decided that what I needed was an idiot light that would go there and light up when my battery voltage got too low to tell me to turn off my heated grips and/or vest. At which point I did a swift Google search and found this design, a simple voltage ladder calibrated to generate 6 volts when the external voltage was 12 volts, and a 6 volt zener diode to drive the base of a transister which in turn switched the power to the LED on when the zener avalanched. So I printed it out and ran it by a friend, who said... "Uhm, you know, this is wrong. This will light up the LED when the battery is *above* 12 volts, not when it's *below* 12 volts."

So he moved the LED so that its cathode was sunk to ground and the anode was between R3 and Q1, so that the zener diode D1 caused the voltage to the LED to quench to ground when the zener diode avalanched at 12volts. Then he said, "You know, you could use a red-green diode and have it show up green at 12 volts, and red below there." He scribbled in another transister to drive the green portion of the LED when the voltage was above 12 volts.

Then I pointed out that a red-green diode actually had *three* states -- red, yellow, and green -- and that we could use this quite usefully via just adding another zener diode and potentiometer so that when the situation was unfavorable but still not disasterous, we got a warning (yellow) prior to the "you're screwed" notice (red), leading to the final design:

The 10K potentiometer for Ladder A is calibrated so that the zener avalanches when the +12v supply is above 12.1 volts. Ladder B is calibrated so that the zener avalanches when the +12v supply is above 11.7v. The cathodes are tied together internal to the LED package and thus must be tied to ground. The three states are like this:

Above 12.1 volts: green: At 12.1V, ladder B is sending power to the green (since the voltage is above 11.7V, but the ladder A transister now turns on and sinks the input to the red LED to ground -- leaving only the green LED on.

Between 11.7v and 12.1v: amber. Red is no longer suck by ladder A, since the voltage is below 12.1v, so the red LED is on. But we're still above 11.7v, so the green LED is also still on. This actually should be yellow, but the 2N3904 inline with the LED in ladder B adds a little bit of resistance to the green, meaning that the output is slightly more reddish than would be expected, since the red LED gets the full current through resister 'x' when ladder A is not activated. Thus "amber". Fiddling with x and y can make it more yellowish, but why bother?

Below 11.7v: red. Ladder B is now below 6 volts, meaning that the green is turned off. Ladder A is still below 12.1 volts, meaning that it's not sinking the input of the red to ground, meaning that red is turned on.

x,y - 620 to 1k ohm depending on LED. My LED states that it needs 20mA of power. Going to our handy dandy Ohm's Law calculator, I enter 12.1volts (the point at which the red LED turns on), and .020 amps (the amount of current for my LED). The calculator spits out that I need a 605 ohm resister which would mean using a 620 ohm resister. The back of the package recommends a 680 ohm resister at 12 volts, presumably because 12 volts might actually be 13.8 volts when the alternator is churning away. So be it. Because this is also .242 watts according to the calculator (i.e., about 1/4th of a watt), I select 1/2 watt resisters rather than 1/4th watt resisters for x and y. This is important because when ladder A turns on, the entire .242 watts flows through resister x and is quenched to ground. BTW, this circuit pulls approximately half a watt total in its most power-hungry state -- the green state, when all power from resister x is being quenched to ground.

In the end, the components can be grid-boarded then put into a small project box and silicon caulked in place to prevent water and vibration from having their way with things, and the LED itself soldered to wires that are then run up into the instrument panel and pushed up through a hole in said panel (there is a blank where that can be done). The project box can be screwed or glued to the back of the instrument panel somewhere where it is out of the way, and all that you see is the battery voltage indicator -- green for good, yellow for "Warning!", and red for "Turn off your electric gear *NOW*!".

After doing this design, I found out that somebody else already did it. Oh well, at least I have my own battery monitor now, and the parts aren't very expensive if you buy them from a discount electronic components vendor rather than from rip-offs like Fry's Electronics or Radio Shack.

Oh, final components list:

Add in some breadboard, wire, a small project box, etc. and you, too, could construct this inexpensive voltage monitor. How much it costs depends on whether you already have all the other stuff (voltmeter, soldering iron, wire, breadboard, a spare potentiometer to use to tweak the input voltage in order to calibrate the ladders, etc.). But if you already have all that kind of stuff and have discount electronic supply houses near you, you could easily put together this circuit for $5. If, on the other hand, you don't have that stuff, it's cheaper to buy it already pre-made...

- Badtux the Electronics Penguin

Posted by: BadTux / 12/12/2005 11:19:00 PM  

Comments:

You like going the long way 'round, don'tcha? Heh.
# posted by Fixer : 13/12/05 11:36 AM  

Post a Comment

<< Home

 My Photo
Name: BadTux
Location: Some iceberg, South Pacific, Antarctica

I am a black and white and yellow multicolored penguin making his way as best he can in a world of monochromic monkeys.

Archives
April 2004 / December 2004 / January 2005 / February 2005 / March 2005 / April 2005 / May 2005 / June 2005 / July 2005 / August 2005 / September 2005 / October 2005 / November 2005 / December 2005 / January 2006 / February 2006 / March 2006 / April 2006 / May 2006 / June 2006 / July 2006 / August 2006 / September 2006 / October 2006 / November 2006 / December 2006 / January 2007 / February 2007 / March 2007 / April 2007 / May 2007 / June 2007 / July 2007 / August 2007 /


Bill Richardson: Because what America needs is a competent fat man with bad hair as President (haven't we had enough incompetent pretty faces?)

Cost of the War in Iraq
(JavaScript Error)
Terror Alert Level
Links
Honor Roll
Technorati embed?
Liberated Iraqis

"Keep fighting for freedom and justice, beloveds, but don't forget to have fun doin' it. Lord, let your laughter ring forth. Be outrageous, ridicule the fraidy-cats, rejoice in all the oddities that freedom can produce." -- Molly Ivins, 1944-2007 "The penalty good men pay for indifference to public affairs is to be ruled by evil men."

-- Plato

Are you a spammer? Then send mail to my spamtrack mailbox to get permenantly banned! Remember, that's iamstupid@badtux.org (hehehhe!).

More blogs about bad tux the snarky penguin.

This page is powered by Blogger. Isn't yours?