Thursday, September 1, 2011

Oxygen sensor circuit

Schematic Wiring Diagram of oxygen sensor circuit.

The above diagram shows the different links to the inputs and outputs of each operational-amplifier from the power source and how each operation amplifier is wired to operate each seperate light emitting diode. Also shows calculations to obtaining each resistor value which is shown in previous blog.

In this diagram shows a DC (direct current) power supply.
The above equipment was used to to supply voltage to the sensor input of the oxygen sensor circuit. This was used to test the oxygen sensor circuit by turning one of the dials on the machine which would send different votage signals to the sensor input, depending on the amount of voltage you turned the DC power supply would determine which circuit of the oxygen sensor would operate. This machine was used to simulate the throttle of a vehicle. the higher you turned the dial would simulate you putting your foot down on the accelerator.


 How it Works?
Starting with a 12 volt power supply voltage flows  through the diode which leaves available vlotage of 11.4 as it causes a 0.6 voltage drop to the resistor (r5) to the 9.1volt zener diode and capacitor. the capacitors are put in the circuit to prevent voltage surges and to keep a steady voltage flow.
Also from the power supply, after diode it has a connection to the op-amp before the resistor (r5) to pin 4 of the op-amp, that is known as the positive voltage rain of the op-amp.
From the zener diode it voltage flows to the next resistor (r6) but because of the zener thier is only 9.1volts availabe. after the resistor it breaks off to pin 2 of the first op-amp and then pin 5 of the second op-amp, and because of the resistance put in the circuit we have 0.63 volts available at both pin 2 and pin 5.
In a straight connection after r6 and after pin 2 and pin 5 inputs voltage flows to the next resistor (r8) which then connects to pin 10 of the third op-amp and pin 13 of the fourth op-amp, and again because of adding the resistance created a 0.4voltage drop so at pin 10 and pin 13 has available voltage of 0.23 volts.
From r8 it goes to another resistor in the circuit r7 which goes to ground. The op-amp has a negative volt rail which is pin 11 and is connected to earth.
Each op-amp has an output, those pins are numbered as pins 1,7,8 and 14. pins 7,8 and 14 each connect to and individual LED which has a positive feed from the 12volt power supply after the diode which leaves 11.6 volts available to each LED, but at pin 8 from the anode side of the LED has a another diode. Between the LED and output pins 7,8 and 14 have resistors r2,r3 and r4. The output pin1 has and diode connected to it which connects to pin 8 in between the resistor and LED on the cathode side of the LED. Each LED with the power supply on is hot at all times.
Input pins 3,6,9 and 12 are connected in parallel and are the sensor inputs.
 
When sensor input is at zero volts, pin 12 of the op amp is lower than pin 13 of the op-amp which has available voltage of 0.23 volts.
since pin 13 is a higher voltage it creates an output connection between pin 11 and pin 14. so the positive voltage from the power supply to the LED will go to ground and doing so will switch the green LED on. The yellow will remain off as the voltage is not high enough at 9 which means thier is a connection from pin 4 to pin 8 and has a positive feed to to the cathode of the LED which keeps the yellow LED off while the green is on. 
  
When the voltage at the sensor input reaches about roughly 3volts at pin 9 will create a output connection between pin 11 and 8 as the input voltage is higher than 0.23volts at pin 13 which means voltage can flow from the power supply through the yellow LED to pin8 to pi 11 through to ground  will will indeed operate the LED. in doin this it will switch the green LED off as pin 12 will also have a 3volt input wihch is higher than 0.23 volts at pin 13 which will create a connection between pin 4 and 14 which means positive voltage will flow from pin 14 to the cathode of the LED which will switch the LED off.
 
When the voltage reaches roughly 0.7-0.8 volts will turn the red LED as the voltage at pin 5 of the input is lower than the voltage of pin 6 which creates a connection between pin 7 and 11 which allows the voltage from the power supply to go to ground which should operate thered LED.
As the input voltage at pin 9 is still higher than the input a pin 10 (op-amp used to switch yellow LED) the yellow LED should still remain on so we've connected output pin 1 between the yellow LED and the resistor. when sensor inputs 0.7 volts will switch on the LED and also create a connection between pin 4 and pin 1 which which allows positive voltage to flow from pin 1 to the cathode side of the yellow LED to switch it off while the red LED is on.


Diagnosing Fault.
I had another person create a fault in my oxygen sensor circuit. I called see it visualy but i wanted to know how that fault was affecting the circuit. So i attached it to the 12 volt power supply and found only the yellow LED remained on at all times no matter if you turned the sensor input voltage up or down. So using a  multimeter set on DC volts, I refered to the wiring diagram and went through the circuit looking at available voltages. From the power supply after the diode was 11.4volts available. After r5 to the zener diode showed 9.1volts which showed that part of the circuit was fine. Placed the meter before the r6 resistor which showed 9.1 volts which is good then after r6 which showed 9.1 volts again when it should have showed 0.63. Than checked before resistor r8 and pin 10 and 13 which showed 1.8milivolts which is next to nothing.
In doing this check showed thier was a break after input pin 5 but before resistor r8. So this showed me why the red LED will not turn on as thier is always 9.1 volts at pin 2 and 5 and the sensor will never reach that high of a voltage because if it did will blow the LED. but was still confused why the yellow LED remained on the whole time. So again using the multimeter checked the available voltage at pin9 and 12 when the DC power supply is set at 0 volts a got a reading of 8.2milivolts, which is known as floating voltage. Since that is still higher than the 1.8 milivolts at pin 10 the yellow LED will remain on. 

Diagram of finshed product of oxygen sensor


Wednesday, August 24, 2011

TTeC 4847 #3


MOSFET. (Metal Oxide Semiconductor Field Effect Transistor) vs BJT (Bi-polar junction transistor)


-The MOSFET is used just like any other transistor where it can be used as a switch in a circuit or used to amplify voltage. just like the Bipolar Junction Transistor (BJT)  it has three main terminals. Where the terminals in the BJT are called Base, Collector and Emitter. The names change in the MOSFET, the terminals are the Gate, Drain and the Source. Also the difference between the BJT and the MOSFET is the BJT requires high current to the Base of the transistor to allow voltage to flow from the collector to the emitter where in the MOSFET it requires voltage at the Gate to allow voltage to flow from the Drain to the Source.
There are two types of different channel MOSFET's, An N-Channel Mosfet, P-Channel Mosfet. 
The N-Channel Mosfet acts like a NPN bipolar junction transistor  where the base of the BJT needs a positive feed to turn on the N-channel Mosfet requires positive voltage at the Gate to turn on. The greater the Gate voltage the increases the size of the channel created.
The P-Channel MOSFET acts like a PNP BJT where the PNP requires a negative feed to the base, so it requires zero voltage to allow voltage to flow the collector to the emitter the MOSFET requires zero voltage at the Gate to allow voltage to flow from the drain to the source but requires positive voltage to switch it off.
These MOSFET's can either be of a Depletion type where it requires voltage at the Gate to turn on or Enhancement type where the voltage at the Gate is used to turn the MOSFET on.



Schematic diagrams of MOSFET's and BJT's
G=GATE
D=DRAIN
S=SOURCE
   P-Channel           N-Channel
 Depletion Type MOSFET's


   P-Channel         N-Channel
Enhancement Type MOSFET's





Operational Amplifiers
Op-Amp

It has two input terminals and an output terminal and a negative and positive  voltage rail. The positive input is known as the inverting terminal and the negative known as the non-inverting terminal and basically the op-amp amplifies the difference between the to inputs.
It can also be used as a comparator in a circuit and the output will be dependant on the difference of the two inoputs and the voltage at the rails.
Below is a diagram of an intergrated circuit chip with four op-amps. I will be using a similar chip to create an oxygen sensor circuit.

Wiring diagram for an oxygen sensor .
The above digram shows four op-amps three LED's three diode's one zener diode and seven resistors all wired together to create an oxygen sensor circuit. But before wiring the circuit together i have to find the values of different resistors to use in the circuit to produce different outputs at each op-amp. Firstly i find the resistor value which is after the power supply and diode so we will call that R5. Also taking not it has a 9.1volt zener diode off that same circuit i created a formula using the ohm's law. resistance = voltage/amperage. Also knowing the amperage required to operate the zener diode at 5.6mA therefore
r5= 12v (power supply)-9.1v(Zener diode)-0.6(rectifying diode)/5.6mA
   = 2.3v/0.0056A (5.6mA)
   = 410.7 ohms
Then going on to find the resistor values for r7 and r8 i have to find the amperage that will flow through as it is a parallel circuit and amperage may vary. As r6 is already given as 10k (10,000 ohms) and the available voltage after the zener diode is 9.1volts and the available voltages given after each resistor
A=voltage/resistance
   = 9.1v-0.63v-0.23/10,000ohms
   =8.24v/10,000ohms
   = 0.000824A (0.824mA)
Now having the amperage we can find r8 which is resistance = voltage/ amperage and since we have two available voltage points
r8 = 0.63v-0.23v/0.824mA
    = 0.4/0.000824
    = 485.4 ohms
r7 = 0.23v/0.824mA
    = 0.23v/0.000824A
    = 279.1 ohms
Now finding the resistor values r2,r3,r4 which lead to the output pins of each op-amp and after the LED. Taking note that the diode creates a voltage drop of 0.6v and the LED's use 1.8volts and require a minimum of 9.5mA to operate according to the datasheet, again using the ohm's law resistance = voltage/ amperage and instead of working with the minimum amperage i decided to go with 10mA, therefore
r2 = 12v-0.6v-1.8v/10mA
    = 9.6v/0.01A
    = 960 ohms
r3 = 12v-(0.6x2)-1.8v/10mA
    = 9v/0.01A
    = 900ohms
r4 = 12v-0.6v- 1.8v/10mA
    = 9.6v/0/01A
    = 960ohms


Tuesday, August 16, 2011

Autotronics TTEC4847



The above diagram is a wiring diagram of the injector circuit and show the different components required to complete this injector circuit and shows calculations to how the different resistors are selected. 

Components: 
                    - 2 x Light Emitting Diodes
                    - 2 x Transistors BC547 NPN
                    - 2 x 220 ohm resistors
                    - 2 x 510 ohm resistors
                    - 12 volt power supply
                    - Function generator

The wiring diagram only gave the value figures of power supply and the amount of voltage delivered by the function generator so i needed to create an equation to find the value resistors i was going to use for each bit of the circuit.
To find the resistor value which leads from the 12 volt power supply to the LED through the collector terminal of the transistor to the emitter terminal of  the transistor i created the following equation using a data sheet i obtained from the Internet in regards to the BC547 NPN transistor and LED's. From the LED data sheet i found it takes 1.8volts with an amperage of 20mA to turn the LED on.

RC = V/A                                                            
      =12 - 1.8(LED)/20mA
      =10.2/0.02A
RC = 510 ohms

To calculate the resistor that leads from the function generator tho the base of the transistor to the emitter, also using the data sheet i had to find what amperage to work with and knowing from the data sheet that the base of the transistor has a peak current of 200mA, I decided to work with half of that as i did not want to damage the transistor. Also the emitter of the transistor is a diode and i know a standard diode uses 0.6volts. I then used the following equation.

RB = V/A
      = 5 - 0.6(diode)/100mA
      = 4.4/0.01A
RB = 210 ohms

After obtaining both resistors to operate one LED I used the same equations to find the values for the resistors in the other side of the circuit.

Breadboard with 2xLED's 2x470 ohm resistors 2x220ohm resistors and 2x BC547 NPN transistors.

The above diagram is a test circuit simulating the injector circuit  on a breadboard. This is to check if the calculations for my injector circuit could operate without complications. In this circuit i use 470 ohm resistors instead of the 510 ohm i calculated as there were no 510 ohm resistors available at the time. As you can see both diodes are emitting light which indicates their current flowing through the circuit and that i have a good earth to complete the circuit.
If light did not emit then there could be a possible break in the circuit or the resistors at the base of the transistors could have too much resistance which wouldn't allow current to flow from the collector to  the emitter which would then not allow current to flow from the collector to the emitter to turn the LED on.





simulation of veraboard injector circuit using  the Lochmaster program

After completing the wiring on the breadboard i then used the Lochmaster program to show how i would wire up the injector on a Vera board which would be my final product. The darker lines of the veraboard are the tracks of the board and that allows voltage to flow through, so basically it is helping eliminate the use of extra wires.
After i completed the circuit on the Lochmaster program i had to do a continuity test to show where the voltage was going and at first i found that i was getting the full 12volt power supply at each end of the resistors and also the LED so i had to put breaks in the tracks of the veraboard in between each terminal of the LED and the terminals of the resistor so only the beginning of the resistor would get the full 12volts. If i had not put breaks in the circuit the injector circuit will not work.

 Picture of injector circuit on a veraboard

 I created an injector circuit on a veraboard using the design from the Lochmaster program and when attached to the function generator and 12volt power supply the LED's both turned on and was blinking accordingly to the function generator which was set at 10hz.
 Using a multimeter i checked voltage drops across the components to compare with my original calculations and also checked for current readings at different terminals of the transistor to determine what kinda region the transistor is in.

Vd across LED = 1.773v
Vd across RB   = 2.538v
Vd across RC   = 5.067v.
Vbe                  = 3.303v
Vce                  = 5.079v
Ic                     = 24.28mA
Ib                     = 12.40mA
Beta                 =  Ic/Ib = 1.95

The above readings are not exact as the function generator pulsates 5volts to the base of the transistor which was set a 10hz. The above current reading of the base and the collector terminals of the transistor show the transistor is in a active region which means it is not fully working as the function generator sends  5volt pulses, which means the transistor acts like a switch to turn on the LED and causing the LED to blink on and off.
 There is a voltage drop across the LED of 1.733volts and voltage drop across the collector and the emitter of 5.079volts which means the resistor at the collector will use the excess voltage which is 5.067volts. If those values are added together it adds up roughly to the power supply.


 Picture of the tracks and soldering on the veraboard

When soldering the components to the veraboard I had to make sure the soldering material did not join the tracks together as then it would act as a conductor and allow voltage to flow to a different part of the circuit causing it to not work.

Function Generator on the left and Power Supply to power my injector circuit on the right

The above diagram shows the power supply i used to supply voltage to my injector circuit. The yellow lead is the positive feed to the circuit and the green represents the negative feed.The function generator on the left will send 5volt pulses to the base of the transistor in my injector circuit. In this case, I'm using the function generator to simulate the RPM's in a motor vehicle.