lambda meter problem

Status
Not open for further replies.

dope40

Member level 4
Joined
Oct 3, 2011
Messages
76
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bulgaria
Visit site
Activity points
1,777
Hi, i am planing to build o2 meter for my car using PIC 16FXXX and i don't know how to make it when it reads the voltage in one of the pins (for example RA2) it converts it into the appropriate lambda value.

**broken link removed**


Here is how it is suppose to convert the analog value , but i am new to the PIC world and i dont know how to make it ... Please help :-(
 

Hi,

Not that difficult, you read in the o2 sensor data via an adc port, then convert that value to your Lambda scale via some suitable conversion table and display the result on your meter display.

The points you have not detailed, you need to choose a Pic16F with the ADC feature ( most have them), you do not detail what the 02 sensor is, as to if it can feed directly into a Pic or needs some amplifier / buffer.
Also what kind of display unit are you thinking of ?
all these will partly determine the Pic chip you need.

What programming language are you looking to use and have you got a dev board or programmer ?
 
Reactions: dope40

    dope40

    Points: 2
    Helpful Answer Positive Rating
The lambda meter feeds the voltage directly into the PIC , also i plan to use 7 segment display ( more specifically 3 of them ).I will write the code in C , my biggest problem is the conversion table , i dont know how to make and use it .
 

You can find project in EPE magazine Wideband Air-Fuel Mixture Display PIC16F88 also there is lots of other project as TE-WB 5301...


Use this diagram:



- - - Updated - - -

One additional question: Where you plan to put Lambda sensor on which part of exaust system ?
 
Last edited:
Reactions: dope40

    dope40

    Points: 2
    Helpful Answer Positive Rating
i plan to put the lambda in the exhaust manifold.

Of course, but exactly where ?

If you plan to use one Lambda sensor place it to sum point for all cylinders. Its very important to get correct readings.

One basic illustration :

**broken link removed**
 
Last edited:
Reactions: dope40

    dope40

    Points: 2
    Helpful Answer Positive Rating
i am going to use only one , so mounting it at the sum point will give me the most acurate reading. The lambda sensor is not the problem , the conversion table is...
 

i am going to use only one , so mounting it at the sum point will give me the most acurate reading. The lambda sensor is not the problem , the conversion table is...

Your original post shows a nice even voltage rise 0 to 3v, where does that come from ? - I assumed you were using some other sensor rather than a Lambda.

The little I know about Lambda sensors is that they output a stream of pulses between 0.2v and 0.8v.
You cannot feed that into an ADC port and get a sensible reading.

Are there now Lambda sensors that produce an even dc output voltage ?

The conversion is the easy part, you just create a small Lookup Table.
 
Reactions: dope40

    dope40

    Points: 2
    Helpful Answer Positive Rating
The voltage comes directly from the lambda meter,there are 2 kinds of lambda meters :
Narrow band - they produce from 0 to 1 volts (in stream of pulses )
Wide band - they produce from 0 to 5 volts (in stream of pulses )
I have just find out that i can take the input voltage and use a simple formula
(a/f ratio = 2*voltage+10) to get the mixture ratio (for example if i have 2.35v i get 14.7:1 a/f ratio)
and i dont have to use Lookup Table.So how can i feed the pulses in the PIC and still get a sensible reading , and display it on 7 segment displays.
 

Hi,

For your 5v sensor, you are basically wanting to read the signals as a frequency meter, so perhaps look at the comparator inputs or the PortB interrupt system
 
Reactions: dope40

    dope40

    Points: 2
    Helpful Answer Positive Rating
how do i do that

Hi,

First you need to define what your input signal is, assume its a genuine 5v digital signal ? or does it need some conditioning ?

The actual pulses, what changes, the time between the pulses or the width of the pulses, know as mark and space ratios.

What language are you programming in ?

You can look at the datasheet for info, but they can be difficult for the beginner, better to search for an online tutorial or ready made example.
 
Reactions: dope40

    dope40

    Points: 2
    Helpful Answer Positive Rating
I am using C , i cant find any tutorials or projects ... also the mark and space ratios change in time .... can i somehow make the pulses into continuous singnal , because i only need to mesure the amplitude ?
 

Hi,

So you are saying not only does the mark space ratio change, but the amplitude of the signal also changes ?

If the m/s changes you can measure that with the comparator/ interrupt fuctions, if the amplitude of a continuous signal changes you can measure it with the ADC feature.

How to measure when both m/s and amplitude changes to the same signal, think you need some extra circuitry or clever micro programming as clearly its used in all cars, but no idea what or how ..sorry


Hopefully someone else knows how its done and can help you further..
 
Reactions: dope40

    dope40

    Points: 2
    Helpful Answer Positive Rating
i want to use some extra circuitry because i am not very good at programing , but i dont know what extra circuitry to use
 

Use ADC to measure voltage in range 0-5V. Lambda should not give you pulsed voltage, voltage should be continual, what I know, but there is many sensors everything is possible.
 

How to make the code read the input voltage and convert it using a formula.

Nernst's Equation
http://www.tf.uni-kiel.de/matwis/amat/elmat_en/kap_2/backbone/r2_4_3.html

OXYGEN SENSOR OUTPUT VOLTAGE ANALYSIS
**broken link removed**

Nernst Equation:
Voutput= (R*)(T) / (F) * ln[(Po, air)/(Po, exh)]


where,
Voutput= O2 sensor's output voltage ( 0 to 1.0 volt is normal range)
R* = Universal Gas Constant = 8.3143 [Joule/gram-mole * K]
T = Temperature of the exhaust gas [Deg K]
n = number of electrons involved in the reaction = 4 in this case
F = Faraday constant = 96,480 [Coulomb/gram-mole]
Po, air = Partial pressure of O2 in the atmosphere [Pascals]
Po, exh = Partial pressure of O2 in the exhaust gas at temp [Pascals]
Note: Volt = [J/Coulomb] or Coulomb = J/V


Check your Lambda sensor is it just Lambda switch or can measure values in various Lambda ranges.



Best regards,
Peter

:wink:
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…