Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Fuel gauge adapter

Status
Not open for further replies.
You're right again! R15 location does affect the currents. I think I must have confused two versions of the sim. I'll check what R values are now needed (but if you're going to use two chained chips then different values again will be required :)).
 
Let me know if you come up with R values that will work; in the interest of getting this built in time for the Christmas holiday, I may just draw the line and go with the single-chip solution.
 
Here's the revised circuit with the new values and minus a couple of high-end shunts.
 

Attachments

  • LM3914GaugeDriveCct.gif
    LM3914GaugeDriveCct.gif
    17.3 KB · Views: 184
Many thanks!

One more question: If I find a Windows machine to install LTSPice on, is your LM3914 model generalized enough to work in a 3 x cascaded configuration?
 
I'd have to re-check the LM3914 datasheet, but I think the model could be just replicated, with a few minor tweaks. I'll have to get a wider screen to display the result on, though :). Dear Santa, ........
 
And... one more question. I just noticed that there isn't a part number associated with the diodes on your schematics. I know in theory a diode is a diode is a diode (unless I pull too much current through it); will the 1N914 / 1N4148 silicon diodes that I have lying around work for this application?

Thanks again!
 
Yes, those diodes will be fine. Each carries no more than ~22mA. I didn't specify type in the sim because the name clutters the schematic. I'll be away from the pc for much of today but will get back to the sim when I can.
 
Here's a 20-step version, using 2 x LM3194. To simplify the spice models I made them specific to this application.
 

Attachments

  • GaugeDriver20stepGraph.gif
    GaugeDriver20stepGraph.gif
    7 KB · Views: 135
  • GaugeDriver20step.pdf
    20.3 KB · Views: 149
  • LM3914GaugeDriver20step.asc
    14.3 KB · Views: 133
Wow, thanks. That looks great. Much more accurate between 50% and 100% than it could have been with each step limited to 20 mA max. Now I'm glad that I didn't spend all day at work laying out a PCB design for the single-chip solution. :)
 
It's just occurred to me that the model is based on the assumption that the gauge supply is a fixed 12V. Is the gauge supply the same as the battery you are monitoring? If so, what battery voltage can we take as 'empty' and what as 'full'? The model resistors will need adjusting to cater for a varying gauge supply voltage.
 
It's just occurred to me that the model is based on the assumption that the gauge supply is a fixed 12V. Is the gauge supply the same as the battery you are monitoring? If so, what battery voltage can we take as 'empty' and what as 'full'? The model resistors will need adjusting to cater for a varying gauge supply voltage.

The 12 V bus could be anywhere between 10.5 and 11.8 when the batteries are depleted. I usually assume it goes from 12.5 full to 11.5 depleted.
 
Last edited:
I've remodelled things assuming the input source goes from 0V to 5V as the '12V' bus goes from 10.5V to 13.5V. I've also added a current amplifier (Q1-Q3) to reduce power consumption drastically. Each LM3914 output now sinks only ~ 1.25mA (instead of ~22mA previously). This in turn means that the ICs can run from the 12V bus without getting hot and the 5V regulator is no longer needed.
R4 may need tweaking so that the input voltage on IC pin 5 is a tad over 2.5V when the source is 5V.
R5 is fairly critical to define the first step up the curve.
R28 sets the current-amp gain to define the output span.
R30 sets the 'empty' current at 24mA.
Not shown on the schematic are essential decoupling capacitors for the IC supply pins.
The graphs are the overlapped curves for the circuit response at 10C intervals from -20C to +60C and show that there should now be negligible temperature drift.
 

Attachments

  • LM3914GaugeDriver20step2.asc
    16.1 KB · Views: 116
  • GaugeDriver20stepGraph2.gif
    GaugeDriver20stepGraph2.gif
    10 KB · Views: 155
  • LM3914GaugeDriver20step2.pdf
    21.5 KB · Views: 160
Last edited:
I've remodelled things assuming the input source goes from 0V to 5V as the '12V' bus goes from 10.5V to 13.5V.
Is the "R27" current now impervious to transient flucuations within that range, or are you saying that what's shown on the graph is dependent upon the supply voltage being 10.5 V @ empty, 12.0 V at 50%, and 13.5 V at 100% state of charge?


R4 may need tweaking so that the input voltage on IC pin 5 is a tad over 2.5V when the source is 5V.
What are the implications if R4 isn't adequately tweaked to produce that exact voltage?

Not shown on the schematic are essential decoupling capacitors for the IC supply pins.
What do I need in the way of capacitors, and what nodes should they be attached to?

Thanks.
 
are you saying that what's shown on the graph is dependent upon the supply voltage being 10.5 V @ empty, 12.0 V at 50%, and 13.5 V at 100% state of charge?
Yes. The model uses the equation Vsupply = 10.5 + 0.6 * Vsource.
What are the implications if R4 isn't adequately tweaked to produce that exact voltage?
Step 1 may be at the same level as step 0 (i.e.24mA), or slightly shifted along the x-axis.
What do I need in the way of capacitors, and what nodes should they be attached to?
The datasheet recommends 10uF tantalum or 22uF otherwise, connected as close as possible to the chip supply pins (2,3).
 
Yes. The model uses the equation Vsupply = 10.5 + 0.6 * Vsource.
Oh, yes, I see that now. Hmm. That may not work very well. The supply voltage will never be more than 12.7 V, and shouldn't be less than 11.5 V steady state, with excursions as low as 10.5 V only under heavy acceleration with a depleted battery. (I've always assumed that the brief drop in gauge reading under such conditions was essentially unavoidable. If you've got some trick up your sleeve to provide some sort of truly regulated [as opposed to limited in the less-than-or-equal-to sense] 12 V supply, I'm all ears, although I unfortunately didn't think to add provisions for such a thing when I had the instrument panel out of the car over the summer.)
 
The supply voltage will never be more than 12.7 V
A fully charged common lead acid car battery is normally around 13.8V under light load. Why 12.7?
If you've got some trick up your sleeve to provide some sort of truly regulated [as opposed to limited in the less-than-or-equal-to sense] 12 V supply
There's no voltage headroom to put in a regulator to give the gauge a constant 12V supply, but if you can get at the gauge +V wiring it might be possible to run it from, say, a regulated 9V.
I'm unclear how your 0-5V source operates. Is it merely monitoring battery voltage, or does it monitor charge/discharge current and duration to give an output representing charge state?
 
A fully charged common lead acid car battery is normally around 13.8V under light load. Why 12.7?
You're probably thinking of a traditional car battery application wherein the alternator is providing a constant 13.5-14.3 V charging voltage. Open circuit voltage of a '12V' lead acid battery is never more than 13 V, in this case 12.5-12.7.[/QUOTE]

I'm unclear how your 0-5V source operates. Is it merely monitoring battery voltage, or does it monitor charge/discharge current and duration to give an output representing charge state?
Battery voltage is the only thing it measures directly. If I understand correctly, it monitors transient changes in voltage, and the duration of those reduced voltage levels to infer state of charge by some kind of integration technique. It's a Curtis model 933 battery monitor if you want to look it up. (I believe the monitor is made in the USA, but I salvaged it from a British forklift, so I thought it was a rather interesting coincidence that both of you who responded to this thread are in the UK...)
 
Last edited:
Couldn't find any useful info on the 933.
Can we assume then, for modelling purposes, that the gauge supply drops uniformly from 12.7V to 11.5V, while the monitor (source) drops from 100% to 0%, going from 'full' to empty'? Or do you have an alternative suggestion?
 
Couldn't find any useful info on the 933.
Can we assume then, for modelling purposes, that the gauge supply drops uniformly from 12.7V to 11.5V, while the monitor (source) drops from 100% to 0%, going from 'full' to empty'? Or do you have an alternative suggestion?

That's probably the best assumption we can make. Although I'd go with 12.5 V as the starting point; that's probably the best average amongst different brands of batteries, and 12.7 is especially unlikely as the batteries age, and at temperatures < 30 deg C (i.e. most of the year). And I think I'd rather err on the side of reading off-scale vs. underreporting a fully charged battery (which could lead to overcharging).
 
I've run the sim with a 12.5 to 11.5 supply voltage range and by changing R28 and R30 slightly (to 4k8 and 3k9 respectively) the resulting curve is practically the same as previously. If those two resistors are trimmers you should be able to cater for all component/battery tolerances simply.
What started out as a '1 transistor + 4 resistors' circuit seems to have grown somewhat, but I think we're near the finish line now. Merry Christmas!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top