Professional Documents
Culture Documents
Wideband Air-Fuel Mixture Display
Wideband Air-Fuel Mixture Display
Controllers
Digital Signal
Analog
Memory
RF & Wireless
Extend the battery life in your application using PIC® microcontrollers with nanoWatt GET STARTED IN 3 EASY STEPS
XLP Technology and get the industry’s lowest currents for Active and Sleep modes.
1. View the Low Power Comparison
Microchip’s peripheral-rich PIC12F182X, PIC16F182X and PIC16F19XX families offer Active currents videos
of less than 50 μA and Sleep currents down to 20 nA. These products enable you to create battery- 2. Download the Low Power
friendly designs that also incorporate capacitive touch sensing, LCD, communications and other
functions which help differentiate your products in the marketplace.
Tips ‘n Tricks
3. Order samples and development
Microchip’s Enhanced Mid-range 8-bit architecture provides up to 50% increased performance tools
and 14 new instructions that result in up to 40% better code execution over previous-generation www.microchip.com/XLP
8-bit PIC16 MCUs.
www.microchip.com/xlp
The Microchip name and logo, the Microchip logo and PIC are registered trademarks and mTouch is a trademark of Microchip Technology Incorporated in the U.S.A. and other countries. © 2010 Energizer. Energizer and other marks are trademarks
owned by Energizer. All other trademarks mentioned herein are property of their respective companies. © 2010-2011, Microchip Technology Incorporated, All Rights Reserved. ME257DEng/07.11
8.8.8.
Vs CONTROLLER
OXYGENSENSOR4HESEAREÚTTEDTOALL WIDEBAND
H–
vehicles that have fuel injection and 0–5V AIR/FUEL DISPLAY
H+
engine management, although most RATIO SIGNAL INPUT
cars use what is known as a ‘narrow- WIDEBAND
band’ oxygen sensor. SENSOR
In practice, the oxygen sensor is lo- Fig.1: here’s how the display unit is used with a wideband sensor and its
cated in the exhaust system to monitor associated controller. The narrowband S-curve output from the controller is
the exhaust gas after the fuel has been fed to the engine management computer (see text).
+12V
INPUT
8.8.8.
8.8.8.
NARROWBAND WIDEBAND
HEATER S-CURVE OUTPUT DISPLAY
SET FOR RESISTIVE
S-CURVE SENSOR
&IGªTHEªORIGINALªNARROWBANDªSENSORªlTTEDªTOªTHEªCARªCANªBEªUSEDª &IGªHERESªHOWªTOªUSEªTHEªDISPLAYªUNITª
TOªDIRECTLYªDRIVEªTHEªDISPLAYªUNITªIFªACCURACYªISNTªIMPORTANTª4HEª WITHªAªRESISTIVEªSENSORªEGªAªTEMPERATUREª
DISPLAYªMUSTªBEªSETªTOªRUNªINª3
CURVEªMODEª GAUGE
What type of oxygen sensor to use it could be set to show lambda values
from say 0.51 to 1.50 instead.
Alternatively, you can set it up to
display either the air/fuel ratio or the
LAMBDAVALUEATTHEÛICKOFASWITCH)N
that case, there are two sets of values
labelled ‘A’ and ‘B’, and you select
between them.
Similarly, for cars that run on both
unleaded petrol and LPG, it’s possible
to switch the unit so that it displays the
correct air/fuel ratio for the selected fuel.
Narrowband sensor
How the unit is used with a narrowband
oxygen sensor is shown in Fig.2. In
this case, the display includes a preset
response for the standard Bosch LSM11
narrowband oxygen sensor and shows
the air/fuel ratio for unleaded petrol from
11.8 to 20.6 (stoichiometric at 14.7).
A wideband oxygen sensor also requires the use of a wideband controller
unit, such as this Tech edge WB02 2J1. It provides a 0V to 5V output which For air/fuel ratios below 11.8, the
is fed to the Oxygen Sensor Display unit, plus a simulated narrowband display shows an ‘r’ for rich, while
S-curve output that’s fed to the engine management computer. ratios above 20.6 give an ‘L’ for lean.
Similarly, for LPG, the range is 12.6 to
21.4 (stoichiometric at 15.5), with an
V IRTUALLY all cars come fitted with narrowband oxygen sensors, and
if you want to save money and accuracy isn’t important, you can use
the existing sensor with the Oxygen Sensor Display. That said, it’s best to
‘r’ shown for ratios below 12.6 and an
‘L’ for ratios above 21.4.
substitute the Bosch LSM11 narrowband oxygen sensor, since the display unit One option here is to have a dot or
is calibrated for this sensor in narrowband mode. a centred bargraph display for the
S-curve narrowband mode. For more
Conversely, if you want high accuracy, you must use a wideband
information on this, refer to the panel
oxygen sensor such as the Bosch LSU 4.2. This must be teamed with a
titled ‘Using the unit with a narrow-
wideband controller that gives a 0V to 5V output. Such controllers include
band sensor’.
the Tech Edge WB02 2J1 (http://wbo2.com/home/products.htm) and
If the output from the sensor does not
the Innovate Motosports LC-1 (http://www.innovatemotorsports.com/
cover the full 0V to 5V range, then the
products.php).
values set at the 0V and 5V end points
As far as we are aware, there are only a few vehicles, such as Audi and are obtained by extrapolation. This
VW, that have factory-fitted wideband sensors, so the chances are that you INVOLVESÚRSTDRAWINGAGRAPHSIMILAR
will have to buy a wideband sensor and fit it. In most cases, all you have to Fig.9 or Fig.10 that shows two points
to do is remove the existing narrowband sensor, substitute the wideband that correspond to the output from the
sensor and team it with a wideband controller. The simulated narrowband S- sensor and their corresponding values.
curve output from the wideband controller is then connected to the vehicle’s The graph is then extended until it
engine management computer. This replaces the signal from the original reaches the 0V and 5V points.
narrowband sensor and allows the engine to operate normally – see Fig.1. The values that are obtained at the 0V
The 0V to 5V output from the wideband controller unit is connected to the and 5V points are the endpoint values
display unit, which then provides accurate air/fuel mixture readings. that need to be entered into the display
during the setting up procedure.
Fig.1 shows how the unit is used By using the 0V to 5V signal from Bargraph display
with a wideband sensor and its as- the controller, the display unit can be As indicated previously, the LED bar-
sociated controller. As can be seen, set up to show the air/fuel ratio over graph shows the sensor voltage level
the 0-5V output from the controller a set range. For example, it could be and is useful for indicating the voltage
provides the air/fuel ratio signal for set to show air/fuel ratios between 7.4 trend. Its response to voltage changes
the Oxygen Sensor Display. In addi- and 22.0. These values are set to match ISSIGNIÚCANTLYFASTERTHANTHATOFTHE
tion, a wideband controller usually the 0V to 5V range from the wideband digital display, which is deliberately
has a simulated S-curve output and controller, with the unit responding in slowed down so that the values can
this can be used to replace the sig- a linear fashion. be easily read.
nal from the original narrowband That’s not all it can do though. Basi- Fig.4 shows the three bargraph dis-
sensor for the engine management cally, this unit can be set to display play options that are available in the
computer. whatever values you wish. For example, wideband operating mode. Note that
REG1 LM2940CT-5
+12V +5V
IN OUT
ALTERNATIVE
GND 220 PFF 10k DISPLAY
470nF +5V
10V 100nF SWITCH
2.2k MODE SELECT DOWN UP
105 C
0V
S1 S2 S3 S4
E E E E
4 14
B B B B
MCLR Vdd Q1 Q2 Q3 Q4
1
AN2 C C C C
INPUT 2.2k 4x 2.2k
3 16
AN4 RA1
15
RA6
10nF 18
RA0
17
RA7
IC1 K A
+5V PIC16F88-I/P 8x 100 : 3 3 3 a
11 7 LED4
RB5 a A a A a A b
6 6 a a a LED1
RB0 b b b
8 4 c
RB2 c c c LED8
22k 7 2 f b f b f b d
K A RB1 d g d g d g LED6
10 1 e
2 RB4 e e e LED5
K A AN3 13 9 e
RB7 f d
c fe d
c fe d
c f
12 10 g LED3
K A RB6 g g g
9 5 dp dp dp LED2
LDR1 RB3 dp dp dp
K A dp
LED7
DISP1 DISP2 DISP3
8
5 K A
K A LTS542R LTS542R LTS542R
10 DISP4
10-LED BAR ARRAY
LM2940CT
GND
Q1–Q4: BC327
76
B
WIDEBAND OXYGEN
SC WIDEBAND SENSOR
OXYGEN SENSORDISPLAY
DISPLAY 12
34
IN
2008
5 GND OUT E C
Fig.5: the circuit is based on a PIC16F88-I/P microcontroller (IC1). This processes the sensor signal at its AN4 (pin 3)
input and drives three 7-segment LED displays and an 8-LED bargraph in multiplex fashion.
although a 10-LED bargraph display varies. As with the previous two Note that all the segments common
is used, only seven LEDs are used in modes, an inverted display option to each display are tied together. For
these displays. is available. example, the ‘a’ segment of DISP1 con-
Fig.4(a) shows the ‘Bar’ display nects to the ‘a’ segments of DISP2 and
mode. Here, the number of LEDs lit Circuit details DISP3. In addition, LED4 within the
increases from one to seven over six Despite its versatility, the circuit for LED bargraph (DISP4) also connects
steps in response to a rising sensor the Wideband Oxygen Sensor Display to the ‘a’ segments of DISP1 to DISP3.
voltage. Alternatively, it can be set up is really very simple. Fig.5 shows the These ‘a’ segments are driven via the
to increase the number of LEDs lit in details. RB5 output of IC1 via a 100: resistor.
response to a falling sensor voltage (ie, As shown, it’s based on a PIC16F88- As a result, when this output is low, the
an inverted display). I/P microcontroller (IC1), with most ‘a’ segment in one display will light,
The ‘Centred Bar’ mode is dis- of the clever stuff hidden inside its depending on which driver transistor
played in Fig.4(b). In this mode, the ÚRMWARE PROGRAM !PART FROM THAT is turned on.
centre bar is always lit (2.5V sensor there are the three 7-segment LED The PNP transistors Q1 to Q4 are
output), with the bar then extending displays (DISP1 to DISP4), the 10- driven by ports RA0, RA1, RA6 and
either up or down in response to a LED bargraph display, four driver RA7 via 2.2k: resistors. For example,
rising or falling sensor voltage. Once transistors (Q1 to Q4), a 3-terminal transistor Q1 is controlled by RA1,
again, an inverted display option is regulator (REG1) and a few sundry and when this output is high, Q1 is
available. bits and pieces. held off.
This option is the most useful when IC1 monitors the input voltage from Conversely, when RA1 goes low (0V),
showing the air/fuel ratio, with the the sensor, processes the data and Q1’s base (B) is pulled low via its 2.2k:
bars indicating as the mixture moves drives the LED displays to show the resistor and so Q1 turns on. As a result,
into either rich or lean ratios. The calculated air/fuel ratio value. Output any segments within DISP1 that have
centre bar is the stoichiometric ports RB0 to RB7 drive the display seg- their cathodes pulled low via IC1’s RB
point. ment cathodes, while transistors Q1 outputs (and their respective 100:
Finally, Fig.4(c) shows the ‘Dot’ to Q4 switch the common display an- resistors) will now light.
mode option. In this case, there are odes, ie, the displays are multiplexed Transistors Q2, Q3 and Q4 are driven
13 levels, with either one or two so that only one display digit is driven in a similar manner to Q1 to control
LEDs being lit as the sensor voltage at any given time. DISP2, DISP3 and the LED bargraph
S1 S2 S3 S4 ALTERN ATIVE
Q1 Q2 Q3 Q4 DISPLAY
SW ITCH
LDR1 2. 2k 2. 2k 2. 2k 2. 2k DISP4
SIL ARRAY
IC 1 PIC16F 88-I/ P
18011350
10k
d n a b e di w
2. 2k
3 x 100
22k
220 F
5 x 100 SIL ARRAY
100n F 10n F 470n F
REG1
2940- 5
2. 2k
NO TE: DISP
NOTE: 1–DISP4
DISP1-DISP4
ALL
ALLMO UN TED ININ IC
MOUNTED IC Take care to ensure that all the parts are installed on
IN GN D +12V SO CK ETS (SEE
SOCKETS TETEXT)
(SEE XT) the PC board with the correct orientation. The LED
Fig.6: install the parts on the PC board as shown here. bargraph is mounted with its bevelled edge at bottom
The alternative display switch is optional (see text). right (see Fig.6).
DISPLAY CUTOUT
SILICON
CHIP www.siliconchip.com.au
S S S
This view shows the PC board before the 7-segment LED Fig.7: this full-size artwork can be used as a drilling
displays and the bargraph are plugged in. template for the front panel.
fore measuring the input voltage. This designed for automotive applica- rail provides the power-on reset signal
minimises any voltage drops that could tions and are protected against line for IC1.
occur due to supply current in the transients and reverse supply voltage
ground wiring if the displays were lit, (if the supply is reversed, the output Software
and ensures accurate measurements. remains at 0V and no damage occurs). The software program files for the
Timing for IC1 comes from an inter- A 470nF capacitor decouples the Wideband Oxygen Sensor Display will
nal oscillator running at 4MHz. This supply for the regulator input, while be available from the EPE website at:
has an accuracy of about 2%, which a 220ȝ&CAPACITORÚLTERSTHE6OUT- www.epemag.com.
is close enough for this application, as put. This output capacitor supplies
the timing is not critical. the transient current required for the Construction
displays and also prevents the regula- This unit is easy to assemble, with
Power supply tor from becoming unstable. all parts installed on a double-sided
Power is derived from the vehicle’s In addition, the supply rail to IC1 is PC board. This board is coded 825
fused ignition supply. This +12V rail decoupled using a 100nF capacitor at (80mm × 50mm) and is housed in a
is fed to a low-dropout LM2940CT-5 pin 14. The 2.2kȍ resistor between small plastic case measuring 83mm ×
+5V regulator. These regulators are IC1’s MCLR input (pin 4) and the +5V 54mm × 31mm.
THERESISTORSÚRSTTAKINGCARETOPLACE
each in its correct position. Table 1
SHOWSTHECOLOURCODEVALUESBUTYOU
5V VALUE 7.4 (EXAMPLE)
should also use a digital multimeter to
check each resistor before installing
0V 2.5V 5V
it. Note that the 100: resistors are
in single in-line (SIL) resistor arrays. Fig.10: the equation is slightly different when the 0V endpoint value is greater
(OWEVER YOU CAN ALSO USE STANDARD than the 5V endpoint value. In this example, 22.0 has been used for the low
0.25W resistors here and these can be endpoint value, while 7.4 has been used for the high endpoint value.
INSTALLED BY MOUNTING THEM END
ON
To set the values for the display, you only need to set the endpoint values at
as shown in Fig.8.
0V and at 5V. The internal microcontroller then processes the input signal and
.EXTINSTALLTHE0#STAKES4HESEARE
calculates the correct vales for display.
installed from the underside of the PC
board at the three external wiring posi- For example, if the 0V endpoint value is 7.4 and the 5V endpoint value is 22.0, a
tions (the external wiring connects to 2.5V input will give a display reading of 14.7 for the air/fuel ratio. This is calculated
the rear of the board). by first subtracting the low endpoint value from the high endpoint value to get the
Transistors Q1 to Q4 can go in next span value (in this case, 22 – 7.4 = 14.6). This span value is then multiplied by
and these must be installed so that the input voltage, divided by the 5V range and finally added to the low endpoint
their tops are no higher than 12mm value (7.4 in our example). Fig.9 shows this in graphical form.
above the PC board. Follow them with If the unit is set up so that the 0V endpoint value is higher in value than the 5V
the four switches (S1 to S4). These endpoint value, then the calculation is different (see Fig.10). In this case, the 5V
switches can only go in with the cor- endpoint value is subtracted from the 0V endpoint value to get the span value.
RECTORIENTATIONSOIFTHEHOLESDONmT This value is then multiplied by the difference between the input voltage and
LINEUPSIMPLYROTATETHEMBY 5V, after which the result is divided by 5V and added to the 5V endpoint value.
REG1 is next on the list. This device Fig.10 shows the equation for endpoint values of 22 and 7.4.
MOUNTSHORIZONTALLYONTHE0#BOARD Note that in both cases, the 5V value assumes that the reference voltage used
with its leads cranked down through in the Oxygen Sensor Display is exactly 5V. However, the reference voltage from
SOTHATTHEYPASSTHROUGHTHEIRCOR- the regulator that’s used could be anywhere from 4.85-5.15V, so there is an
responding holes. Secure its metal tab adjustment to compensate for this.
to the board using an M3 × 6mm screw If the reference voltage is below 5V, then the Oxygen Sensor Display will not
and nut before soldering its leads. show readings for input voltages that are higher than this reference. Conversely,
/NCE ITmS IN INSTALL THE CAPACITORS if the reference is above 5V, then the unit will show readings for input voltages
Note that 220μF electrolytic adjacent only up to the +5V. By compensating for this reference voltage, the correct value
to REG1 is installed with its leads bent will be shown on the display.
THROUGH)TSBODYLIESHORIZONTALLY In practice, the regulator used for the reference is trimmed during manufacture
ACROSSTHEREGULATORmSLEADSASSHOWN and its output will probably be very close to +5V.
in the photo.
Mounting the displays Once these SIL strips are in, install a Next, with IC1 out of its socket, apply
The 7-segment LED displays and the 20-pin DIP socket for the LED bargraph power to the +12V and GND terminals
10-LED bargraph are raised up off the and an 18-pin DIP socket for IC1. Be and check that 5V is present between
PC board using IC sockets. sure to orientate the socket for IC1 pins 14 and 5 of IC1’s socket. If this
The sockets for the 7-segment dis- with its notched end towards the top is correct, switch off and install IC1
plays are made using a 16-pin DIP (ie, towards the 2.2k: resistor). Don’t and the displays. DISP1, DISP2 and
socket and a 14-pin DIP socket. These plug the displays or IC1 in yet, though. DISP3 mount with the decimal points
5378 2011-09-13 2:43:20
are cut into strips of two 8-pin and Finally, install the LDR (either way to bottom right, while DISP4 (the LED
two 7-pin SIL sockets using a small around) so that its top surface is 15mm bargraph) mounts with its chamfered
hacksaw. One 8-pin and one 7-pin above the top of the PC board. edge at bottom right (note: the chamfer
strip is then installed along the top is quite subtle). IC1 goes in with its
edge of the display positions, while Testing notched end towards the top.
the remaining 8-pin and 7-pin strips .OW FOR THE SMOKE TEST BUT ÚRST GO When power is now reapplied you
are installed along the bottom edge over the board carefully and check for should be greeted with a display on
(ie, the sockets form two 15-pin incorrect component placement and the 7-segment digits and the bargraph.
strips). for missed or shorted solder joints. If not, check the orientation of IC1. If
800
C
D
Enabling the S-curve response
C
E Enabling the narrowband S-curve
F response is easy: just press and hold
600 G
the Mode switch as power is applied.
D The display will then indicate the cur-
rent display mode setting. This can be
H either the Linear (wideband) mode, the
400
S-curve unleaded mode or the S-curve
LPG mode. If the switch is released
I
E before four seconds, the current display
200 mode will not be altered. Conversely, if
J
K the switch is held down, the mode will
F
L cycle from one to the other at a nominal
M G
0 four-second rate. You simply release the
LAMBDA Ȝ
( ) 0.8 0.9 1.0 1.1 1.2 1.3 switch when the required display mode
AIR/FUEL RATIO is shown.
(UNLEADED PETROL) 11.8 13.2 14.7 16.2 17.6 19.0
LPG 12.4 13.9 15.5 17.1 18.6 20.2 It’s also easy to tell which mode the
RICH LEAN
unit is in. The display will show ‘Lin.’ for
the linear mode (or wideband mode),
CENTRED BAR MODE while the two S-curve modes are shown
A B C D E F G
as S.UL (S-curve unleaded) and S.LP
LED1 RICH
(S-curve LPG).
Pressing the Mode switch after power-
LED7 LEAN up has been applied initiates the Settings
mode. As before, this allows you to alter
DOT MODE the way the display operates. You can
A B C D E F G H I J K L M
adjust how the dimming works, set the
LED1 RICH
regulator voltage, alter the unleaded or
LPG selection and change the bargraph
LED7 LEAN display from dot mode to centred bar
mode.
As in wideband mode, the bargraph
LEDs are again used to indicate which
Fig.12: two bargraph options are available when the unit is set to operate setting has been selected. These settings
in narrowband mode – either centred bar mode or a 13-step dot mode. The are somewhat different for the narrowband
S-curve graph at top indicates which bargraph LEDs light in response to S-curve modes, but are altered in exactly
the various sensor output voltages.
the same manner.
Fig.13 shows the details. As before,