Simple O2 meter with LM3915

wuemura

May 29, 2006
151
Joined
May 29, 2006
Messages
151
I've found this schematic to use as a base:
diyairtofuelratiogaugev14dotmodeoz1.jpg


Just need to figure the LDR part.

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
R5 in this DIY circuit is 10k. Up to 20 LEDs will have their current flowing through it so its value is way too high. Maybe it should be 10 ohms.
The circuit needs supply bypass caps as per the datasheet.
The value of R3 should be the same as R1. Maybe the values for R3 and R4 are swapped.

I understand that the output voltage of an O2 sensor continuously oscillates high and low. If it doesn't then the car's ECU thinks about tampering or a failed O2 sensor. Therefore a filter is needed at the input of the LM3914 to average the swinging voltage.

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Wellington,
This is much better. ;D
R9 is not needed.
Check the datasheet's explanation about cascading LM3914's and add a resistor across LED #9 and a resistor across LED #11.

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Welington,
I am sorry to hear that the brightness adjustment transistors or the LDR in your circuit don't work.
Here is what you have:
1) the VR terminal of each LM3914 is 1.25V.
2) The LED currents are roughly 10 times the current from VR.
3) The current from VR when the LDR is dark (if it is a very high resistance) is just the 10k resistor so its current is (1.25V/10k= 0.125mA and the LED currents are 1.25mA.
4) The current from VR when the LDR is bright (if it is a very low resistance) is (1.25V-0.6V (transistor Vbe))/ 680= 0.96mA, plus  the 0.125mA current in the 10k resistor above for a total of 1.085mA so the LED currents are 10.85mA.

I don't think your LDR goes from a very high resistance to a very low resistance.
Disconnect the LDR from the circuit to see if the 10k resistors make the LEDs dim enough. Then short the LDR to ground to see if the 680 ohm resistors make the LEDs bright enough. Your vision's response to brightness is logarithmic so 9 times the current in LEDs doesn't make much difference in brightness.

View attachment 39484

 

wuemura

May 29, 2006
151
Joined
May 29, 2006
Messages
151
Hello audioguru!

The circuit work in the reverse way, when is dark the led must bright more, the day light must make the led dim off ;D

Changing the LDR with a 10k resitor make the led bright a bit, about 25% or 30%, shorting the connection make the led bright at 100%, when i say that it bright more i mean the full display. At your schematic i've noticed that you removed VR2 and VR3, VR3 is used to set the low level input and VR3 the high level.

When you turn the device on the first led must turn on,  if not, you ajust VR3.
Injecting 1v DC at the input terminal the 20th led should lit and stop there, if not VR2 make the magic happens.

So, looks like the circuit is working but not the way it should, so working with the 680r resistor or the transistor could make things working, right?

View attachment 39485

View attachment 39486

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
After I attached my simplified copy of your circuit I realized that I forgot to include VR2 and VR3 which are loading the VR of the LM3914 they are connected to which increases its minimum brightness.
Measure the resistance of the LDR when it is lighted and when it is dark to see how it is a very low and a very high resistance to control the transistors.

 

wuemura

May 29, 2006
151
Joined
May 29, 2006
Messages
151
In the light 7.6M, dark 0ohm

 
Last edited by a moderator:

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Wellington,
Wow, your photodetector has a very wide range of resistance. Too wide for an LDR so I think it is a photo-transistor. No wonder its response is backwards.

Swap its position with VR1 and the resistor connected to VR1 (R9?) but its ends must be swapped to keep the correct polarity.

LDRs are used in automatic mains night-lights and in garden solar lights.

 

wuemura

May 29, 2006
151
Joined
May 29, 2006
Messages
151
Hi Audioguru, well i've done the changes but.... some how works. At normal day light the led bright is strong, but just a little shadow make the LED to shut down. :(
Putting all back again, if i change the R9 to 100K the effect become a little more effective, but not that much. Increasing the resistor to 220k and so on, make no changes at all.

If i change the transistor to BC327 or BD140?

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Wellington,
Now the phototransistor is too sensitive. Add a resistor in series with it so it cannot dim the LEDs so much.

 

wuemura

May 29, 2006
151
Joined
May 29, 2006
Messages
151
Hi audioguru, i've added resistors up to 1M and make not change at all, just a little shadow makes the led to turn off. And by the way, is the first photo-transistor that looks very much like a LDR to me.

 
Last edited by a moderator:

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
I wish all your PMs are in this thread so I can see them.
I think you said that the brightness control worked backwards so I thought the LDR is a phototransistor. Now I see that I was wrong and they would both work about the same.

The LDR is a low resistance when it is lighted, so if it is at the bases of the transistors to ground then the transistors will turn on and make the LEDs bright.
Without light on the LDR then it is a high resistance and the transistors turn off but the 10k resistors from pin VR of each LM3915 keeps some current in the LEDs.
If the transistors turn off too much then add a resistor in parallel to the LDR to turn on the transistors a little.

 

wuemura

May 29, 2006
151
Joined
May 29, 2006
Messages
151
Today is a great day, there is no way to put in to words, to develop something and see it working is a great feeling. Since i was a kid and started with electronic at 6 years, we had a very difficult time, my family was very poor so i've never got the oportunity to go to college or learn english at a decent school, all that i know today was result of my own fight to get it and without or few resource.

That's why i would like to thank this space and audioguru for his patience with me, some of you might think that this is too simple, but for a guy like me that has no graduation at electronics, is a great thing.

Audioguru, i've done your changes but did not work the way it should be, so let it be man, the main part it's working.

So here is the photo of the main board (i took that with my cellphone camera)
0708061234wr9.jpg


Here is the circuit when you turn the ignition on
0708061235iv3.jpg


And here is the baby working
0708061236ox5.jpg


This circuit has no precision, but compared with professional equipament, the circuit will respond to very small variations from 0,1mv to more or less 1.4v max. This computers/equipament that mesures this oxigen sensor you see the changes as jumps. Later i will record a video with the circuit installed and working.

Thank you audioguru.

PS: The full schematic and board design is attached with this message, use it, make modifications, sell it i dont care ;D

HallMeter.pdf

 

Attachments

  • HallMeter.pdf
    486.8 KB · Views: 17
Last edited by a moderator:

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Wellington,
Your project looks neat and tidy and it is wonderful that it works well. ;D

 

gearhead98

Aug 4, 2006
26
Joined
Aug 4, 2006
Messages
26
I have been following this post for a little while.  Good to hear you got everything working.  I have a few questions about this setup.

What o2 sensor are you using?  Is it a wideband or narrowband??

in the last pdf you attached on pages 4 and 8 are those schematics printable for transfer??

what size are the boards you are using??

 

ante1

Jan 24, 2004
4,138
Joined
Jan 24, 2004
Messages
4,138
Hi gearhead,

They are printable, only adjust the size if necessary to fit your printer!
I am sure you know the 2.54 mm (or one tenth of an inch) distance between the IC pins, use it as a reference!

 

gearhead98

Aug 4, 2006
26
Joined
Aug 4, 2006
Messages
26
didn't know that.  ??? now i know.  as for the question about whether this is a wideband O2 or a narrowband O2, im guessin it is a narrowband as there is no controller for the O2 sensor.

 
Top