# I hope someone can help

#### 86Tona

Joined Jan 5, 2008
6
I'm working on an air fuel meter using an LM3914 and only four outputs. I need the resolution of the display to be .05v not the standard .1v.

Does anyone know how I can make the LED's change at .05 volts rather than at .1v?

#### beenthere

Joined Apr 20, 2004
15,819
Don't know what you're sourcing the 3914 with, but a 5:1 resistive divider might do what you want.

#### SgtWookie

Joined Jul 17, 2007
22,210
Your resistor divider network is between pins 4 and 6 on the LM3914. There can be as little as 200mV difference between the two pins; providing that neither pin is within 1.5V of V+ and not less than V-. Use bar mode when you're that low for better accuracy. If your difference between pins 4 and 6 is 500mV or greater, you can use dot mode.

200mV difference between pins 4 and 6 will give you 20mV (0.02V) per output.

Pin 6 should be a more positive voltage than pin 4.

I suggest that you use an adjustable voltage regulator IC like an LM317 to set the upper voltage limit of your scale on pin 6 (properly bypassed with a capacitor, of course) and then use a pot from pin 4 to ground, bypassing that pin with a small cap as well.

Note that the LM3914's internal resistive divider will measure approximately 10K Ohms, but may vary from around 8K to 12K Ohms. You'll have to measure that yourself.

Let's say that you want to measure a possible voltage range of 3.0v to 3.15v in 0.05V increments. You're using just the lower four outputs of the LM3914 to power your LED's. You've measured between pins 4 and 6, and discovered the internal resistor network measures 11.2K Ohms.

3.0V + 10 x 0.05V = 3.5V (you have 10 outputs, and you want them to be 0.05v apart, starting at 3.0V)
Set your Vreg to 3.5V, and connect it to pin 6.
You now need to figure out the lower half of the voltage divider network. The upper half measures 11.2K Ohms
You could figure it by current:
I = E/R
I = 0.5V / 11.2K
I = 0.0446429 mA
Now, calculate the lower resistor by:
R = E/I
R = 3.0 / 0.0446429 mA
R = 67.2K
Or, just wire in a 100K Ohm pot from pin 4 to ground (don't forget a small bypass capacitor), and adjust it until you get 3.0V across it.

You might consider using the LM3915 instead of the LM3914. The LM3915 is logarithmic, as are the newer lambda sensors. By limiting yourself to only 4 LEDs over such a small voltage range, you're cheating yourself out of a lot of potentially valuable information.

#### Audioguru

Joined Dec 20, 2007
11,249
The LM3914 and LM3915 have a built-in adjustable voltage reference similar to an LM317. Use it to feed the voltage divider.

#### 86Tona

Joined Jan 5, 2008
6
I really appreciate the input. It has been very informative.

But I do have another question. Could you help me a little more?

In the circuit I'm using pin 6 goes to ground. If I raise this from ground I can supply it a voltage as necessary. What voltage should I supply to pin 6 to have the resolution between LEDs be between 400mv and 500mv. Thanks in advance.

#### 86Tona

Joined Jan 5, 2008
6
Your resistor divider network is between pins 4 and 6 on the LM3914. There can be as little as 200mV difference between the two pins; providing that neither pin is within 1.5V of V+ and not less than V-. Use bar mode when you're that low for better accuracy. If your difference between pins 4 and 6 is 500mV or greater, you can use dot mode.

200mV difference between pins 4 and 6 will give you 20mV (0.02V) per output.

Pin 6 should be a more positive voltage than pin 4.

I suggest that you use an adjustable voltage regulator IC like an LM317 to set the upper voltage limit of your scale on pin 6 (properly bypassed with a capacitor, of course) and then use a pot from pin 4 to ground, bypassing that pin with a small cap as well.

Note that the LM3914's internal resistive divider will measure approximately 10K Ohms, but may vary from around 8K to 12K Ohms. You'll have to measure that yourself.

Let's say that you want to measure a possible voltage range of 3.0v to 3.15v in 0.05V increments. You're using just the lower four outputs of the LM3914 to power your LED's. You've measured between pins 4 and 6, and discovered the internal resistor network measures 11.2K Ohms.

3.0V + 10 x 0.05V = 3.5V (you have 10 outputs, and you want them to be 0.05v apart, starting at 3.0V)
Set your Vreg to 3.5V, and connect it to pin 6.
You now need to figure out the lower half of the voltage divider network. The upper half measures 11.2K Ohms
You could figure it by current:
I = E/R
I = 0.5V / 11.2K
I = 0.0446429 mA
Now, calculate the lower resistor by:
R = E/I
R = 3.0 / 0.0446429 mA
R = 67.2K
Or, just wire in a 100K Ohm pot from pin 4 to ground (don't forget a small bypass capacitor), and adjust it until you get 3.0V across it.

You might consider using the LM3915 instead of the LM3914. The LM3915 is logarithmic, as are the newer lambda sensors. By limiting yourself to only 4 LEDs over such a small voltage range, you're cheating yourself out of a lot of potentially valuable information.
Thanks for the input. The voltage range I am interested in mostly is between 0.98 and 0.78 volts in .04 steps.

The reason I'm only wanting four LEDs is because the information lower than say .82 volts will kill a turbocharged engine under high boost. So I want the warning LED to come on at .90 volts and stay on for a while. I should be able to tie it's 'feed' from several outputs so even with a .04v step I can tie it to say 5 of the outputs and have it lit from .90 to .70 volts. If the driver keeps their foot in it for a while with the red LED on then they deserve to damage the engine #### SgtWookie

Joined Jul 17, 2007
22,210
Ok, I see.

Instead of just having red warning LED's though - how about using various color LED's to indicate the fuel mix and relative fuel economy? Or is fuel economy not a consideration?

#### 86Tona

Joined Jan 5, 2008
6
Ok, I see.

Instead of just having red warning LED's though - how about using various color LED's to indicate the fuel mix and relative fuel economy? Or is fuel economy not a consideration?
I plan to use a green at the 'good' range, yellow in the warning range and one red in the 'something bad is about to happen' range. So from above 1.0v the green LED will be lit. At 0.99 to 0.95 the first yellow LED will light. At 0.94 to 0.90 the second yellow will light. Below 0.90 the red LED will light. I may add a 5th red LED to indicate that the reading is in the 0.80 range. I think I can do this by tying two outputs to one LED. I haven't tried this but I hope it will work. In this way I can have one LED light only for a .05v 'step' and another LED to light for a full .1 (two .05 steps). Make sense?

Fuel economy is not a consideration for this application. I want to warn the driver that their high boost under lean conditions will blow up the engine. So the red LED will be lit starting with .9v and if it ever gets to .78v the engine is blown. So if I can get each LED to change at .04 or .05 v rather than the 'usual' .1 v it would solve my problem.

So if I can figure out what I need to apply to the chip to change the resolution from changing the LED at each .1v to .04 - .05 I'm home free.

Based on your detailed reply above, if I were to apply a difference of .04 to .05 difference I can get the resolution I need.

The circuit currently has pin four gounded. Pin 6 is connected to both the wiper and to one side of a 5k pot. The other side of the pot is connected to pin 7 which then is grounded through a 680K resister. The 5k pot adjusts which LEDs are lit as the voltages change.

#### Audioguru

Joined Dec 20, 2007
11,249
Turbo-charged engines have very poor fuel economy when the turbo is doing its boosting of the power. The meter for the mixture is because a lean mixture and a high amount of boost will blow the head gasket or melt a piston.
I think a turbo engine likes a rich mixture to avoid detonation. Then at high amount of boost the fuel pump or fuel injectors might not be able to produce enough fuel so the mixture turns out lean and KA-BOOM!

#### 86Tona

Joined Jan 5, 2008
6
Turbo-charged engines have very poor fuel economy when the turbo is doing its boosting of the power. The meter for the mixture is because a lean mixture and a high amount of boost will blow the head gasket or melt a piston.
I think a turbo engine likes a rich mixture to avoid detonation. Then at high amount of boost the fuel pump or fuel injectors might not be able to produce enough fuel so the mixture turns out lean and KA-BOOM!
Exactly which is why I want to adjust the LED stepping of the LM3914. #### SgtWookie

Joined Jul 17, 2007
22,210
OK.

Your high reference voltage needs to be 1.18V. This is lower than either your LM3914 or an LM317 can supply without "help". The lowest voltage that the LM3914 can regulate is 1.25V, and that will cause the IC to get quite warm.

This will take a voltage divider network on top of a voltage regulator network.

Going back to what I previously posted, what is your resistance between pins 4 and 6?

This is still possible; but it's going to take a bit of fiddling and calculation, along with an extra resistor.

#### SgtWookie

Joined Jul 17, 2007
22,210
Are you still with us?

I'm waiting to hear what your LM3914 measures between pins 4 and 6.

I tested a couple that I have; one measures 11.53K Ohms and the other measures 11.35K Ohms. The difference is enough to be significant in your application, since you'll need to have resistors on either side of the divider to narrow the range.

But here's how you could figure it out for yourself.

You just missed the 500mV threshold, so for better accuracy use the bar mode rather than the dot mode (connect pin 9 to Vcc for bar mode.)

Tolerances of the resistors used in this circuit are critical; more specifically the ratios between them. If you're off by even a small percentage, the circuit won't do what you want it to do.

Assuming that your LM3914 measures 11.44K Ohms between pins 4 and 6 (the average of the two I sampled), first calculate the current required through the internal resistor network in order to have the correct voltage drop.

VREFhigh needs to be 1.18V, VREFlow needs to be 0.78V
1.18-0.78 = 0.4V
I = E / R
I = 0.4V / 11.44K (insert the resistance value of your divider network instead of 11.44K here)
I = 0.0000349650349650 Amperes
Or roughly 34.96uA.

Now let's set the LM3914's Vref.
This is a bit tricky, because the resistor values not only establish Vref, but also the LED current. For whatever the value of Vref winds up being, the path from Vref via the R1, R2 network to ground establishes the LED current; they will be supplied 10x that current through the network.
In the following paragraph, substitute as follows:
For an LED current of 15.25mA, use 820 Ohms for R1, and set a 500 Ohm pot to 342 Ohms for R2.
For an LED current of 13.75mA, use 910 Ohms for R1, and set a 500 Ohm pot to 390 Ohms for R2.
For an LED current of 10.42mA, use 1.2K Ohms for R1, and set a 1K Ohm pot to 500 Ohms for R2.

Connect R1 from pin 7 (REF OUT) to pin 8 (REF ADJ) on the LM3914. Connect R2 from pin 8 to ground. R2 will give the REF OUT pin a range of 2.29V at maximum resistance down to 1.25V at minimum resistance. Connect a 0.1uF tantalum capacitor from pin 7 to ground to minimize transients. 1.77V is your target reference voltage.

The next step is connecting a resistor from pin 7 (REF OUT) to pin 6 (Rhi) that will drop 1.77V-1.18V = 0.59 volts across itself at 34.96uA.
R = E / I
R = 0.59 V / 0.0000349650349650 Amperes
R = 16,874 Ohms
A precision 18K Ohm resistor in parallel with 270K Ohms would be 1 Ohm high; doesn't get much better than that.

The REFlow is the really critical part. You need to drop 0.78V @ the specified current.
R = E / I
R = 0.78V / 0.0000349650349650 Amperes
R = 22,308 Ohms
Use a fixed 22K resistor and a 500 Ohm pot in series from Rlow (pin 4) to ground.
You should also use a small ceramic bypass capacitor from pin 6 to ground and pin 4 to ground to minimize resistor noise. At such low current levels, it won't take much capacitance to minimize the noise.

You should also use a bypass capacitor across the LM3914's Vcc and ground. a 0.1uF tantalum would likely suffice. The supply line for your LED's will also need a bypass capacitor, around 2.2uF. Instead of using two separate caps, you could combine them and just use the 2.2uF.

To tweak the thing up, adjust R2 (the 500 Ohm or 1K Ohm pot) to get as close as possible to 1.18V on pin 6.
Then adjust the 500 Ohm pot on Rlow (pin 4) to read exactly 0.78V.
Go back and check to see that pin 6 is still 1.18V. If necesary, re-tweak R2, and then you must readjust Rlow.
Remember, Rlow is the most critical setting.