Archives




View Full Version : Concept for an LED-based assist/regen meter for Prius


brick
08-09-2007, 01:24 PM
Let me start by admitting that I know very little about circuit design, and barely made it through my one college EE class. So if I say something stupid please be nice while pointing it out. ;)

With that out of the way, I've been looking for a way to build a simple assist/regen meter for the Prius because it drives me crazy that I have no idea how much current is going into or out of the pack. Hobbit has already done this with an analog gauge as detailed on his site. What I want to do is take that concept and package it more like the meter that Honda gives you with IMA. Specifically, I envision a total of 20 LEDs, 10 for charging and 10 for discharging. The number of LEDs that light up corresponds to the magnitude of the current. E.G. 6 red LEDs would correspond to ~60A worth of braking, 3 green LEDs would correspond to ~30A of assist or EV, etc. Somebody in Japan did it but I haven't found any information on the circuitry.

My crude concept involves using a bunch of op-amps to drive the LEDs. For discharging (signal above 2.5V) you place your op-amp between ground and +5V. The "+" input is connected to the existing current sensor signal, and the "-" input is connected to the junction between a pair of resistors in series that bridge ground and +5V and act as a voltage divider. The voltage at that junction is your setpoint, sending the op-amp output high when the "+" input goes a few mV above it. 10 of these with progressively higher setpoints drive your 10 LEDs. I think the exact same circuit works on the regen side except you have to swap your "+" and "-" inputs on the op-amp so that "+" is your setpoint and "-" follows the current sensor output. This is crude (lots of components) but it **should** result in a nice bar graph to give you a rough idea of what the system is doing.

So. How terrible am I at understanding fundamental electronic theory?

hobbit
08-09-2007, 02:14 PM
There are LED bargraph-driver chips that do exactly that.
You can even gang them together for a longer row. I think
ten-segment units are fairly popular, which would be
perfect, wouldn't it?? Only addition would be a little
input-conditioning stuff [if using the current-sensor
output] ahead of it. Alternatively, a micro with a CAN
interface, programmed with a notion of what bytes to look
for...
.
_H*

brick
08-09-2007, 03:15 PM
Thanks for the feedback! I'll have to look into those driver chips because they sound like a great solution. I bet that would be a whole lot easier to package since my swarm of op-amps and resistors would probably wind up looking like a toaster with blinkey lights. OBD-II would be a good option if not for the complexity. Of course the firmware update for the ScanGauge sounds promising for anyone who wants a numerical readout. Too bad I hate numerical readouts...

My only misgiving with tapping into the current sensor is that I'm concerned about feedback that might interfere with the stock electronics. Probably not as big of a deal as I think but I don't want to ignore it.

brick
08-09-2007, 03:21 PM
Here we go: http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=24272

hobbit
08-09-2007, 10:04 PM
The current sensor output is a fairly studly, low-impedance
op-amp. I ran it to the very high-impedance input of
another op-amp, which poses no risk whatsoever of "feedback".
I probably could have driven my little meter directly from
the donut without any ill effects, though.
.
_H*

Mike Dabrowski 2000
08-10-2007, 12:01 AM
Tim,
The chip you sourced,LM3916, is a log scale, you want the LM3914 which is a linear scale. The output of the current sensor is bipolar though, so you may have to play some op amp games to shift the effective ground so that regen is also positive.
Look at the MIMA schematic where the battery current sensor connects.
http://www.99mpg.com/Data/resources/downloads/harnessdiagrams/finalcontrollerschematic.pdf

I shifted the sensor ground so the signal always is positive. Zero is at 2V, max assist 4V max regen 1V
Get the full data sheet from National Semiconductor, as it has a lot of circuit examples.

brick
08-13-2007, 02:49 PM
Thanks for the info, guys. After studying the spec sheet for the LM3914 I think I have a pretty decent initial design. Rather than daisy-chaining them as a single 20-segment 0-5VDC array I have it drawn up as two separate displays from 0-2.49V and 2.5-5.0V. I'm thinking you could tune them away from each other a bit to provide the "deadband" within x amps of zero current. A fixed 9V regulator drives the whole thing. (Anything over 6.5V seems to be fine.)

Only thing I really want to figure out is how to set up the switch from bar graph to single-dot display, or use a pot to control LED intensity. Eventually I will want one or the other to reduce light output for night driving. If I have time later I'll fire up Visio and create a legible drawing to post.

Mike Dabrowski 2000
08-13-2007, 03:26 PM
Tim,
The bar/dot display switch is pin 9. Connect to +V for bar, and leave open for dot.
~ 10 times the current drawn out of the refout pin (7) will be the LED current. I have the original 1982 Linear manual where the full data sheet and many app notes are shown.
(It sometimes pays to be an old pack rat.)
If you need more info, I could snap copy and e-mail them to you.(send me a PM)
Should work fine without the regulator, as the chip has a built in precision voltage refrence for powering the voltage divider.

brick
08-16-2007, 08:31 PM
Well, I ordered a bunch of components to play with. (My existing supply is woefully inadequate.) I got parts for the display as well as a few extra bits to make a simple 0-5VDC source to test it out on the bench. Should be fun. :)

I still haven't created a legible circuit diagram like I said I would but it wouldn't be that exciting anyway.

Mike Dabrowski 2000
08-17-2007, 08:58 AM
Don't let the magic smoke out.
;)

brick
08-17-2007, 10:33 AM
Things never do work right after the magic smoke is released. I ordered some spares just in case.

brick
08-17-2007, 03:12 PM
Here's what I've been working with:
http://www.cleanmpg.com/photos/data/500/CurrentMeter.JPG

This is pretty much the exact circuit that National gives for a zero-centered meter. The only difference is that I've played with resistors to make it centered at 2.5V +/- 2.5V. No doubt it will need to be refined but it's a start. I should change that top 1k resistor on the regen side to an adjustable so that you can set the zero like the assist side.

Mike Dabrowski 2000
08-17-2007, 06:34 PM
What are the 10-1K resistors for? on the left 3914.
I thought that the led drives were constant current sinks and did not need resistors?
What is the MAX and MIN voltages coming off the current sensor for max assist and regen?

brick
08-17-2007, 07:09 PM
The way it's depicted here, the LEDs on the regen side are wired "backwards", i.e. when the chip draws current they are off, when it stops drawing current they are on. The resistors limit the current to ~9mA through the LEDs when the junction between them isn't grounded. They are necessary in this example because the chip isn't really involved in illumination. It's kinda weird but it's what they suggest for display centered at a given value. Of course there are drawbacks to this, such as lack of brightness control. It's probably better to play with signal conditioning as you have suggested and get rid of the funky LED games.

According to Hobbit the sensor produces a 0-5V linear signal, with 2.5V indicating no current, 0V indicating ~100A into the battery and 5V indicating ~100A out of the battery.

hobbit
08-17-2007, 07:50 PM
um ... no. It's a 200 amp part, and maps 10 mV per amp.
So your nominal swing is 1.5V to 3.5V. I guess you'll
be wantin' 100 mV per segment.
.
_H*

brick
08-17-2007, 09:39 PM
Really? Huh. I wonder where the heck I got my numbers.



Copyright 2006 Clean MPG, LLC. All Rights Reserved.