AFR (Air/fuel ratio) gauge

Status
Not open for further replies.

Blueteeth

Well-Known Member
Hi,

I've been asked to build a relatively simple AFR gauge for a car, fitted with a standard narrow-band O2 sensor. I realise this is the electronics forums, and I already have the electronics sorted, just wondering if anyone has done this before....I can't 'view' the signal I'm supposed to be measuring, With it being 'narrow band' its not exactly accurate, but the guy wants an led bargraph, judging by the voltage curve for the sensor I tihnk its just going to oscillate back and forth . Any experiences/info regarding this sort of sensor would be useful....if it varies that much, I was thinking of integrating it as a way of getting better resoultion.

**broken link removed**
https://cherrypicker.tripod.com/id12.html

I might be able to squeeze resolution out of it (0.9-1v) but I'd just thought I'd check here in case people have designed/built such a gauge. Sorry if this is an odd quesiton.

Blueteeth
 
I made one with an LM3914 many years ago. It is not useful for actual tuning in any way. It will bounce back and forth, but that also has alot to do with the ECU running in closed loop. It wouldn't tell you if anything is wrong, unless it's a major problem.

There are plenty of aftermarket LED bargraph gauges. There is no way to make them more accurate, using a 3 or 4 wire sensor.

If an AFR gauge is really desired, go for the cheaper UEGO sensor/controllers. I haven't been keeping up, but you should be able to get them for around $300.00 USD now. He will have to drill and tap a new bung for the new sensor, but it will give relatively accurate real time information. Even good enough for amateur tuning. Some of them have outputs that give relative narrowband voltages, so you can just replace the stock sensor and use the UEGO in it's place.

EDIT: changed would to wouldn't. Ooops.
 
Last edited:
I have heard that the air-fuel sensor's voltage is supposed to oscillate. If it doesn't then the ECU will give an error that the sensor is bad.
 
It will oscillate because the ECU makes it oscillate. Basically if it doesn't react properly to the changes the ECU makes, the ECU will flag an error.

When in steady state driving or idling, the ECU will trip into closed loop mode. It will overcorrect and keep moving the af ratio slightly rich/lean. It's for emmissions reasons and helps the catalytic converter work.

https://www.electro-tech-online.com/custompdfs/2006/09/h64.pdf
 
I guess the change in rich to lean to rich to lean oscillation is too small to feel a change of power.
 
audioguru said:
I guess the change in rich to lean to rich to lean oscillation is too small to feel a change of power.

It mostly happens when under a certain RPM and throttle position where the engine isn't making much power anyway. After a certain threshold (of which there is obviously no standard), most fuel injected cars switch to an open loop fuel map because the O2 sensor isn't fast enough provide adequate feedback in closed loop operation.
 
hi again,

Wow, I just thought I'd drop this in here, you guys seems to have waaay more experience iwth automotive things than I. Thankyou all very much for your replies and advice, I'm just an electronics guy DirtyLude, great *.pdf, very informative!

Hmm, I did some research (not much) and I was pretty sure all my friend would get was a light show if I was to to use a 'direct voltage to bargraph' setup, seems I was right Thankfully, he's tuning it at a garage, using a wideband sensor, however, I don't think he's going to buy a wideband sensor for the gauge, I'll have to work with the stock narrow band, and because of the oscillation, I was thinking of averaging the incoming voltage, essentially just removing the AC to come up with a slow changing voltage, because, I assume if the sensor output varies from fully on to fully of with maybe the odd setling time in the middle (stoich?).

Now, I know this won't strictly indicate the actual mix ratio, in theory it should show 14.7 in the middle normally, but any drift away from that and it should indicate lean/rich depending on the dutycycle. its gonna be tougher than a comparator ladder tuned for the extreme limits of the voltage (0.05-0.1 and 0.9-1.0) but using a small PIC capturing the signal I tihnk it would display something relatively useful, at least a warning if his engine is about to go boom (naturally aspirated btw, no turbo or boost).

Ideally I would be able to 'probe' the signal in question with the engine running, but I won't have access to the car for long so most of the design is gonna have to come from pure theory, then tweak things later. After all, this is purely an 'indicator', its not providing any sort of feedback for anything, and while it may not be brilliant, a way to show a relatively stable output (no flashy flashy LED's going whilst he's driving) would be handy to show just what is happening in the mid-long term, and as DirtyLude said, won't show much uinless theres a real problem (too rich).

Thanks again, I'm still in the dark here really as I do not have an automotive background, I just see a signal and have to find a way of converting it into a display thats useful.

Blueteeth
 
You don't really see too rich or too lean all you see is richer than 14.7, leaner than 14.7, at or near 14.7.

The oscillating only happens under steady state driving. That usually mean highway driving, the gas pedal is steady for a couple seconds. If the gas pedal moves at will jump directly into open loop mode, meaning there will be no oscillating. The ECU works directly off the fuel maps and should show rich on a narrow band display. This is for the reason Phalanx stated above. The 4 wire sensor is too slow to do real time fuel adjustments.

You are not going to get anything out of averaging the data coming in or trying to analyse the signal beyond what it's showing you real time. If you are trying to find some way to make bad data good, you are out of luck.

There are plenty of aftermarket afr bargraph gauges out there which would save time with this.
 
Some Arabs bought US cars. When the "Service Engine Soon" light came on, they just threw away the air cleaner that was full of sand!
 
here is a circuit for you to try it came from ffp motorsprot.
here is a link on building one step by step **broken link removed**
 

Attachments

  • egobar2.jpg
    36.1 KB · Views: 2,509
Last edited:
Hi again,

Thanks musthave, great article there, very handy! Think I'll build that. Thanks to everyone here. Dirtylude, I guess you're right about trying to get more from the signal in question, the oscillation, once averaged out would simply be one voltage anyway, probably the stoich voltage, which would just be centre LED.

I am still thinking of modifications though, both articles descrbied the oscillation well, as a closed loop, first order, system. If the bargraph would vary from min to max at around 10Hz, then thats gonna be pretty distracting to the poor driver. I may add a circuit to the bargraph schem that would just detect this oscillation (be it analogue, or digital counters/timers) and when it starts to bounce up and down, it should switch off the bargraph display and simply light a symbol for 'closed loop'. This is just a minor modification to stop any annoying flashes during an even run, plus, it'll look cool. I wasn't planing on having the averging circuit on all the time, only when oscilaltion occurs, but I reckon the 'timer' idea would be better, although its easy to overcomplicate things, I'll get the bargraph out the way first.

The reason my friend hasn't bought an 'after market' gauge is because he has a small gap in his dash, which is too small for most, and is square, plus I think he wants a custom LED display. Hopefully, the gauge should read around stoich (because of the narrow band, any LED, but at least it'll say 'above' or 'below') and when the revs are steady switch to 'closed loop'.

I assume that the period of this oscillation is down to the reaction time of the engine/sensor. So its duty cycle would be 50/50 and doesn't provide any useful info other than to show that the ECU has closed the loop. Anyway, first I'll knock the basic circuit up, maybe it'll oscillate too quickly so it just looks like all led's are on, less distracting, and still useful as an indication in itself. Might just try a fat cap on the input (after a buffer!) to dampen thinks down a bit.

Thanks again, its always nice to get thoughts and opinions from experienced people, god I love this board

Blueteeth
 
On every car I've seen it on it has a distinctive knight rider speed, back and forth. It just won't go that fast. The speed is maybe 2 or 3 hertz. On my standalones you can usually program the self correcting factors of closed loop. How quickly it responds and how hard it tries to keep stoich, or in the case of a wideband, whatever afr programmed.

On eBay there are usually some cheezy ones that you can rip apart and salvage the insides. As for detecting and reporting closed loop, I don't think you'll be able to do that with anything less than a microcontroller.
 
I made a 30 led bar graph air fuel ratio meter.

It uses three LM3914's.


can't remember exactly the voltages that I set the led drivers but you get the drift:

first LM3914 ranges for 0 to .2 volts ' RED LEAN LEDS
SECOND LM3914 RANGES FROM .2 TO .8 VOLTS 'GREEN SAFE LEDS
THIRD LM3914 RENGES FROM .8 VOLTS TO 1 VOLT ' YELLOW RICH LEDS

It works beautifully.
 
Hi,

I checked out the circuit at ffp motorsport, and whilst it's quite good, an electronics magazine here in Australia called "Silicon Chip" has published a far more sophisticated one. Their design is also based on the LM3914, but has a few additional touches such as auto dimming for night driving, emergency lean-out alarm, and better circuit protection. Another great feature is the ‘dancing’ display which operates when the ECU is operating in closed loop. Jaycar Electronics here in Australia has a kit for this circuit available for AUD$27.95 (plus postage). (www.jaycar.com.au Cat. No. KC5374)

Hope this helps.
 
here'sthe one I designed:

All leds slightly lit-up, with last rich L.E.D fully lit-up @ 1volt.
**broken link removed**
 
Hi,

Screech, riverman, thankyou for your input.

Screech, nice circuit! Its good to see a DIY device like this 'in system' sells the idea of the LM3914 idea well, and I like the idea of using seperate bargraphs for ranges (giving better resolution at the ends of the scale). I'm not sure There is enough space in my mates car for 3 bargraphs, but I could use individual LED's in a 'dial' configuration

riverman, that kit is pretty much perfect.....and cheap!! I'm in the UK, so I'm not sure how much, or how long delivery would be but cheers for introducing me to that site, the most electronic kits I have ever seen anywhere! I may order that kit, even though the PCB is probably too large, it'll give me all the components and I could trace the schem and make a smaller version on stripboard (our prototyping friend).

I tihnk I'll just 'use' the all the idea's mentioned here The 'dimming' of the LED's at night (when the cars lights are on) is a very good idea, last thing I wanna do is blind him whilst driving, or make the LED's invisible in sunlight. as for a 'dancing display' if it 'knightriders' the way DirtyLude said, at a relatively low frequency, I think my mate could cope with that, if I have a spare 8 pin micro, that could handle disabling the bargraph during closed loop, or make it 'dance' or even light up a 'closed loop symbol'.

I've copied/pasted all the idea's here into notepad so I have some things to test out, thankyou all for your input, I must say, I'm quite surprised at how many people have done this, or have experience with such a gauge. Good to know poeple can share info like this, makes me appreciate this forum more, a great place to exchange idea's, advice, experiences etc..

Gonna order some LM3914's and led bargraphs knock up a test circuit and calibrate it whilst I'm travelling in the car. Its all down to the owner really,if he doesn't like something I'll change it, but with all the suggestions here, I'm sure he'll be satisfied with something.

Thankyou all, I hope I can help with some of your projects in the future,

Blueteeth
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…