Frank's A/F ratio meter

Written and conceived by Frank Devocht

Something to keep in mind is that the meter is directly connected to your 02 sensor, so the meter has to avoid 2 things to avoid screwing up the sensor output voltage.  First, it has to NOT draw a noticeable amount of current from the sensor's signal line.  Second, it has to NOT cause much extra current to flow in the sensor's ground wire to the ECU.  The LM3914 has a decent input buffer that draws a small enough current from the sensor signal wire not to bother it noticeably, but the wiring schemes that some folks use cause all of the LED current to flow through the sensor's ground wire, which induces a noticeable voltage drop in that wire which in turn can get added to (or subtracted from) the net sensor output voltage as the ECU sees it.  That's why it's important to connect the LM3914's ground pin (pin 2) to chassis ground (or J&S ground), and connect pin 8 to the sensor ground wire at the ECU.  That way, only about 1mA of display current passes through the sensor return line.

My meter is similar to the others, but since I have a turbo I'm not interested in the usual 0-1V range (0 - 1.25V on real cheap meters) .  Instead I modified the design a bit to allow me to set both the low as the high reference voltage. 

To implement such an expanded scale meter, you use three separate resistors in series, where the sum of the three is about 880 to 1250 ohm (Rtot).  Rtot controls the LED current, which is 12.5/Rtot milliamps.  The max allowable current for a LED is about 15mA.  So if Rtot = 1.25K ohm, there would be 10mA going through the LEDs.  1kOhm will do fine too (12.5mA).  Since the voltage at pin 7 is always 1.25V (relative to pin 8), it's really easy to calculate the resistor values.  These  are chosen so that the voltage at pin 4 is at the bottom of your expanded scale (Vlo), and the voltage at pin 6 is at the top of your expanded scale (Vhi).   
You determine the values for the resistors using these formulas:

T1 = Vlo * Rtot / 1.25
T2 = (Vhi - Vlo) * Rtot / 1.25
R = (1.25 - Vhi) * Rtot / 1.25

I wanted a scale from 0.58 to 0.94V, and wanted the LEDs to light up real bright.  I decided to use a 14mA LED current, which means that Rtot had to be 12.5 / 0.014 = 887 ohm, which meant that the values for the resistors had to be:

T1 = 0.58 * 887 / 1.25 = 412 ohm
T2 = (0.94 - 0.58) * 887 / 1.25 = 255 ohm 
R = (1.25 - 0.94) * 887 / 1.25 = 220 ohm

Of course there are no 412 ohm or 255 ohm resistors available, only 220 ohm is.  So I used a 220 ohm resistor and 500 ohm trimmers for T1 and T2, which I set to 412 and 255 ohm.  Trimmer T1 sets the low scale voltage.  T2 is sets the high scale voltage.  This way my scale was just like I wanted it.  To further fine tune it, I used an adjustable power supply and a DVM to check that my range really was 0.58 to 0.94V. 
I must add that there's interaction between the trimmers, so if you adjust one you'll need to readjust the other a bit too.  It will take some trial and error to get the scale just like you want it, but it's not too big a problem.  Remember that the total resistance controls LED current, so don't set T1 and T2 to low or you'll fry something!

Should you want to limit the LED current (whilst keeping the 0.58 to 0.94V range), choose R = 270 ohm, T2 = 313 ohm and T1 = 505 ohm, which results in a LED current of 11mA.  A photoresistor, as used with the J&S monitor, wouldn't work here, as it would affect the scale of the monitor...
I've been told that you if you put 12V through a 22K resistor on pin7, that it would half the current through the LEDs...haven't yet tested it out though.

I use dot mode instead of bar mode since I feel that it gives a more accurate reading.  Since the LM3914 only has a 1mV overlap between 2 LEDs, you know the exact voltage at 1mV precise when 2 LEDs are lit up.  You can't do this in bar mode.  For example, suppose the first green LED goes on.  This means that the O2 sensor puts out between 820 and 858mV.  When they both go on, you have exactly 859mV, at 1mV precise.  At 860mV, the first green LED goes out again.

With this setup there's a 40mV margin between LEDs.  But then again, 40mV steps are probably more then enough.  Most commercially available A/F meters have a 0 to 1V scale, with 100mv steps.  For the 700 to 800mV range, these meters have 2 LEDs available.  With my setup, there's 5 LEDs for the same range.

This is the setup I have.  When cruising all you'll see is dithering of the LEDs.  There's no constant reading , but that range is not what you're looking at anyway.  At 0in vaccuum or low boost the dithering stops and the yellow LEDs should light up.  Under higher boost you should run a bit richer, about 850 to 880mV, thus the 2 green LEDs.  The last red LED shouldn't go on.  At high rpms, the miata likes to run a bit less rich, but this is hard to accomplish with the an afpr.

Red 940mV    way too rich!
Green 900mV    too rich
Green 860mV    high boost (+ 6psi)
Yellow 820mV    boost (3~6 psi)
Yellow 780mV    low boost
Yellow 740mV    0 psi
Yellow 700mV    vacuum
Red 660mV    
Red 620mV    
Red 580mV    way to lean

Number 1 pin of an IC chip is sometimes marked with a small dot beside the pin, see the schematic. If not, orient the chip as in the schematic, the semicircle upwards. Pay attention to LED numbering, LED bar grows downwards in the schematic (LED1 lights up first).

A short introduction on O2 sensor connectors.

1-wire sensor
wire: signal
sensor body: signal ground
wires: signal and signal ground
2 wires of the same color: sensor heater power and power ground
the third wire: signal
sensor body: signal ground
two wires of the same color: sensor heater power and power ground (usually gray)
two other wires: signal and signal ground (usually white and black)