Sunday, 7 April 2013

Oxygen Sensor Circuit Experiment


Oxygen Sensor Display Unit Blog

Component List:

Below is the list of components used in this experiment.  Data sheets are provided as links following each component.

List:


Calculations:

Figure 1.1
Please refer to the circuit diagram provided (Figure 1.1).  The conditions of the circuit was that:
  •       LED’s used has a 1.8V drop
  •       There should be at least 12mA (0.012A) flow through the LED’s and resistors
  •       There should be a 0.63V at pins 2 and 5
  •       There should be 0.23V pins 10 and 13
      Formulas used:  R=V/I        I=V/R

R2, R3 and R4 Resistors

The formula needed will be R=V/I.  The amperage (I) was given earlier with the minimum of 12mA needed.  Other part needed for the equation is the voltage.   We will need the remaining voltage, the incoming raw voltage must be deducted each of the diodes and other components in each of the R2, R3 and R4 lines.

R2 and R4 has the same amount of drops with 0.6V at the first diode (D2), 1.8V at the LED’s and 1V at the op-amp.  Therefore, 12V – 0.6V – 1.8V – 1V = 8.6V.  Then to get the resistance needed we divide 8.6V by 0.012A which we will get 716Ω or less. 

R3 would be similar as well, but with an additional zener and regular diode.  Therefore 12V – 0.6V – 0.6V - 0.6V - 1.8V - 1V = 8.4V.  Then 7.4V ÷ 0.012A = 617Ω or less.
The resistor that will be used in R2, R3 and R4 will a 470Ω resistor. 

R5 Resistor

The same formula R=V/I will be used as well.  The voltage after all the drops would be 12V – 0.6V – 9.1V = 2.3V.  The amperage flow as dictated by the 9V1 zener IzRm of 5.6mA (0.0056A max amperage).  Therefore 2.3V ÷ 0.0056A = 410.7Ω minimum.  A 470Ω will then be used. 

R6, R7 and R8 Resistors

These resistors are part of a voltage divider circuit.  At R6, the voltage drop would be approximately 8.47V.  R8 would have a 0.4V drop and R7 would have a 0.23V drop.  This would provide the required 0.63V output at pins 5 and 2, and 0.23V at pins 10 and 13. 

Utilising a 10K resistor for R6, the amperage needs to be calculated before being able to calculate the for the other resistor values.  Using the I=V/R formula, 8.47V ÷ 10,000Ω = 0.00085A.  Then reverting back to the R=V/I formula, R8 = 0.4V ÷ 0.00085A = 470Ω, and R7 = 0.23V ÷ 0.00085A = 270Ω. 

Technical Explanation

Figure 1.2
For visualisation, please refer to figure 1.2 for the rectified diagram.  In this circuit, there are two input voltages, the supply voltage (12V) from the battery supply and an input sensor voltage (0-1V depending on state).


The supply voltage will travel through several diodes, LED’s and resistors to its corresponding output line of the operational amplifier (op-amp).  The red LED would pass a 470Ω (R2) resistor and connect to pin 7.  The green LED would also pass through a 470Ω (R4) resistor but will connect to pin 14.  For the yellow LED, however, it has two extra diodes (one regular 1N4001 diode and one 5V1 zener diode) connected beforehand and will be connected to another 470Ω (R3) resistor after and finally to pin 8.

Which of these LED’s will light, would depend on which LED would get grounded or not.  The op-amp working as a comparator of two different voltages will determine the direction of the current and voltage lines.

One side of the voltage getting compared by the op-amp are certain constant voltages.  After the 10K resistor (R6), 0.63V has to go through pin 5 and pin 2 (highlighted in red).  After the next resistor (470Ω R8), pins 13 and 10 will receive a 0.23V output voltage (highlighted in blue).  Then R7 (270Ω) will connect to ground.  This is an example of a voltage divider circuit in action whereby a circuit line will utilise certain resistors to achieve certain voltage outputs between them. 

The other input voltage is the signal input from the sensor itself which varies between 0 and 1V (highlighted in yellow).  This voltage will decide which LED’s will light up and which do not. 

If the signal voltage was 0.1V, the voltage will travel through to pin 12 as a non-inverting input.  Comparing with the 0.23V inverting input, it is smaller therefore the negative rail will be activated allowing current to flow through and grounding the line.  The green LED will then light up. 

The signal then passes through pin 9 as an inverting input this time and when compared to the bigger non-inverting input of 0.23V, the positive rail will be activated.  This will not ground the yellow LED and it will not light up. 

Afterwards, the 0.1V signal then proceed to pin 6 again as an inverting input.  The non-inverting input of 0.63V at pin 5 is higher and the positive rail will activate.  The effect will be the same as the yellow LED with the red LED not lighting up as well.  Then the comparison between pins 2 and 3 will result in the negative rail being activated.  The green LED would then indicate that the air-fuel mixture is lean. 

If the signal voltage was 0.4V, at pin 12 (non-inverting input), it is higher than the 0.23V inverting input and the positive rail will be activated.  The green LED would then not illuminate.  As an inverting input in pin 9, it is higher than the 0.23V non-inverting input.  The negative rail will activate and the yellow LED will light up.  On pins 5 and 6, the 0.63V non-inverting input is higher and the positive rail will activate leaving the red LED unable to ground and light up.  The yellow LED will then indicate that the mixture was normal.

If the signal voltage was 0.7V, the green LED would not light up as the non-inverting input being the higher voltage will activate the positive rail and it would not ground.  At pins 9 and 10, the higher inverting input (0.7V > 0.23V) will activate the negative rail and the yellow will ground.  However it will not light up as at pins 2 and 3, the higher non-inverting input (0.7V > 0.63V) will activate the positive rail and output through the diode (D3) and straight to the yellow LED blocking it from being able to ground.

At pins 6 and 5, the inverting input (0.7V) is higher than the non-inverting input (0.63V).  This would then call up the negative rail and ground voltage and current flow of the red LED, lighting it up.  This would then indicate that the mixture was rich.

Other components also play a role in the circuit function.  The 9V1 zener (D1) helped regulate and prepare a 9.1V line for the R6, R7 and R8 resistors to divide into the required voltages.  The capacitors then helped smooth out current flow, prevent voltage spiking, and protect the device. 

Test Procedure


Aside from utilising a potentiometer outputting varying 0-1V, certain readings along the circuit will indicate that the oxygen sensor display unit is functioning properly.  Please refer to Figure 1.3 as reference.  After D2, there should be a slight voltage drop of 0.6V, therefore an approximate 11.4V available voltage should be measured prior to R5, and all LED’s.

The LED’s will then have an approximate 1.8V drop and the red and green LED’s will have around 9.5-9.6V.  For the yellow LED, however, two diodes prior will have an additional 1.2V drop on top of the 1.8V drop.  The voltage reading after the yellow LED should read around 8.4V. 

In order for the voltage divider circuit to properly divide voltages required for the op-amp, a 9.1V available voltage should be read prior to R6.  This will also indicate that the 9V1 zener diode is functioning correctly and regulating the needed voltage. 

As shown in figure 1.2, pins 2 and 5 should read approximately 0.63V, while pins 10 and 13 should have 0.23V.  It is important to maintain this in order for the op-amp to function correctly.   If these voltages are able to be achieved, then the op-amp would be able to perform the comparator duties correctly and the circuit will function well. 

Problems


When I first tested the circuit, the red and the green LED’s functioned as they should but the yellow LED only flashed very quickly as I adjusted the potentiometer.  Upon testing for the available voltages around the circuit, all the readings were fine at the LED’s and their respective electrical lines. 

However testing the voltage divider circuit line and the voltage between the R6 and R5, there were discrepancies found.  First, between R5 and R6, the voltage was 10.1V which indicates that the zener diode was not regulating the voltage needed by the divider circuit.  Upon reading the schematic diagram again, it was found that the zener was not grounded.  After connecting the zener to ground, the voltage readings went down to the needed 9.1V. 

The next problem was the voltage readings at the divider circuit.  At pins 2 and 5, 0.24V was measured while 023V was measure at pins 10 and 13.  This would explain why the yellow LED only flashed while switching between voltages and LED’s.  The yellow led would only have turned on between the 0.23V and 0.24V input signals. 

Consulting the schematic again and looking up the design, I found a flaw in the design of the circuit that I initially thought was alright to do.  Instead of connecting pins 5 and 13 with the 470R (R8) resistor, I used jumper wires from pins 2 to 5, 5 to 13, and used the resistor to connect pins 10 and 13.

I initially thought as long as the resistor was in line or connected to the divider circuit then it was alright to place it anywhere along the line.  However, after thinking about it again, I found this not to be the case.   Recalculating the voltage divider circuit confirmed this.  If only two resistors were used in line (10K and 270R) then the voltage calculated would be around 0.238V which was in the readings taken.  The misplaced 470Ω resistor would only have served to provide resistance between pins 10 and 13 only.  Therefore the design had to be rectified and R8 connecting pins 5 and 13.

After rectifying the placement of R8, testing the circuit again yielded the same results.  I began to wonder if there could be another explanation for the problem.  After going testing the available and voltage drops, it all was exactly the same as before.  Then I found that the pre-existing bridging cables I used to bridge pins 2 and 13 are still present.  This led to a shorting of the pins, having the same effect as putting the resistor between pins 10 and 13.  Figure 1.3 shows the how the old flawed design and the new incomplete rectified design yielded the same short.

Figure 1.3
Once the jumper wires were taken off, the circuit started working perfectly and readings of the divider circuit yielded the need 0.63V and 0.23V readings at the correct pins.

For the fault the partner put in, connecting the circuit showed the green and yellow LED’s being able to switch from one another but the red LED stayed on.  In addition, the yellow LED stayed on longer as I adjusted the potentiometer.  I decided to test the available and voltage drops.  All were normal at the LED lines, zener and voltage divider circuits. Figure 1.4 shows the final design and vera board build.

Figure 1.4
However, the discrepancies were found at the signal input voltages at the pins.  Signal was transferred at pins 12 and 9 but not to pins 3 and 6.  Pins 3 and 6 had 0.6V readings and inspecting the board I found that pins 5 and 6 were bridged.  Therefore, sharing the same voltage inputs, the inverting and non-inverting inputs (pins 2, 6, and 3, 5 respectively) activated neither rail and produced 0V output.  This would activate the red LED as it would be grounded.  The Yellow LED would also stay on because pins 2 and 3 which turns it off once the voltage reaches above 0.63V also was not working.  


Reflection
  

Partaking in this experiment, I was able to learn of the importance of testing for voltages in diagnosing problems.  In addition, using the schematics was also important in helping visualise and understand how the circuit work and occasionally did not work theoretically.    This allowed me to find the faults and repair the accordingly.

I also learned that I should follow the schematic diagram carefully rather than place resistors in certain places which might lead it to not function properly as it would have affected in dividing the voltages needed by the circuit.  As for theory, this experiment also allowed me to visualise and apply voltage divider circuits and using the op-amp as a comparator.  A better understanding was able to be achieved for these concepts.

If I was to build this circuit again, I would try to wire up the components in a different manner, closer together, more compact while achieving the same results.