This is only a preview of the October 2000 issue of Silicon Chip. You can view 42 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Guitar Jammer For Practice & Jam Sessions":
Articles in this series:
Items relevant to "Fuel Mixture Display For Cars, Pt.2":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
B
efore we start,
we should perhaps emphasise
that there is no way
that you could rely on
a simple breath tester
such as this to determine
if you’re fit to drive (or
operate machinery, etc).
While it will give you
an indication that you
are at or over “oh-five”,
it could just as easily be
reading slightly under
when the boys in blue say
you’re slightly over.
So be warned – this is
not a legal instrument and
makes no pretence to be
one. Then again, what do
you expect for less than
$30? (The “real” units cost
many hundreds, even thousands of dollars!)
Also, you may not realise that
when you’re asked to provide a
By Ross Tester
roadside breath test, even those
(no relation to Breath Tester)
testers are only supplying a relative reading. If this reading is
between the alcohol in your blood“over the limit” you will be destream and the alcohol in your breath
tained for testing on one of the larger,
but there are reasons why it could be
very accurately calibrated machines.
different.
Only at this stage do the Police obtain
(A quick tip: it’s often higher in the
a blood alcohol level reading which
bloodstream than on the breath, so if
will stand up in court.
you’re determined to demand your
Even then, you usually have the
“rights” you could end up in even
right to demand a blood test to deterdeeper doggie doo-dah!).
mine the actual blood alcohol content
By the way, just in case you’re
(or BAC) because that’s what you are
thinking “gee, I wonder if all this is
actually charged with.
from experience” the answer (touch
There is a very close correlation
28 Silicon Chip
wood) is no. But I am the
proud owner of a “responsible service of alcohol”
course certificate. So there!
Our breath tester
Now we’ve covered the
legalities, let’s get on with
the project.
It’s built into a disposals
case and has an alcohol sensor
at one end, into which you
blow. This detects the amount
of alcohol on your breath and
registers it on a series of LEDs,
the more LEDs alight, the more
alcohol you’ve consumed.
It is powered by 12V DC, for
example, from a car cigarette
lighter (a suitable lead & plug is
supplied in the kit). As such, it
could be left in the car – but once
again, please don’t rely on it!!!
The circuit is by no means new –
it’s been around for perhaps twenty
years. In that time there have been
significant advances in the alcohol
sensor, which forms the heart of the
unit. The display side is based on an
old friend, the LM3914 LED driver.
The sensor
A high quality, thick film semiconductor gas sensor is used to detect the
presence of alcohol on the breath.
There are many different types of gas
sensors – some detect the presence of
the various “fuel” hydrocarbons such
as propane, octane, etc and are used
extensively in bilge alarms for boats.
The sensor used in this project,
It might not quite stand
up in court but this
simple little breath
tester can give a
quite reasonable
indication of your
soberity sobrity sob
how much you’ve
had to drunk.
It’s easy to build
– and fun to calibrate!
though, is made to detect alcohol –
specifically ethyl alcohol.
In the presence of gaseous alcohol,
its resistance decreases dramatically,
in direct proportion to the amount
of alcohol detected. It is this feature
which makes it ideal for our project.
Incidentally, while each sensor is
made to detect a certain type of gas
there is almost always some sensitivity to other hydrocarbons, so the
reading may be quite erroneous if
there are other gases about.
As you might imagine, the sensor
is extremely sensitive. It must detect
the presence of alcohol at better than
one part in 5000 (.05%). Not only that,
the sensor needs to be free of any contamination – even lying around not
even turned on it can be affected by
other gases. For this reason, the sensor
has an inbuilt heating element which
“purges” the sensor unit itself so the
readings are of the gases detected at
that time and not before.
The relatively heavy current drawn
by the heater (125mA) means that
battery operation of this unit is not
really a proposition. Yes, it could be
done but you’d be always changing
or charging batteries.
So we have a sensor which has
an element (actually two elements)
October 2000 29
Fig.1: the circuit could hardly be
much simpler! A semiconductor
sensor changes resistance in the
presence of alcohol, varying the
voltage at pin 5 of IC3. This in turn
lights the appropriate LED(s) to
indicate the amount of alcohol.
which change resistance in the presence of alcohol. Now all we need to
do is detect that change and display it.
Detector/display
As we mentioned before, the display uses the LM3914 LED driver, a
device we have often used in such
things as audio level meters, fuel mixture meters and similar projects which
require a LED “bargraph” display.
This IC is designed to have a LED
connected to each of its ten output
terminals and will progressively light
the LEDs according to the voltage at
its input (pin 5).
If the voltage is low none or few
light but as the voltage increases, more
and more LEDs will light up. (This
of course assumes we are using the
LM3914 in its “bargraph” mode (ie, it
lights all LEDs in a column from the
minimum up to the LED indicating
the reading).
It can also be used in “dot” mode
by leaving out the link – only the
LED indicating the reading is lit in
this mode.
We use a selection of green, orange
and red LEDs to simulate OK, borderline and not OK alcohol levels.
Ideally, the orange LED, or perhaps
the transition between the last green
and the orange should occur at the
0.05% alcohol level.
30 Silicon Chip
The range of voltages over which
the LM3914 responds is set by the
ratio of resistors connected between
pins 7 and 8, and 8 and ground. These
are set up to match the output levels
of the sensor.
Back to that input, pin 5. As you can
see, it is connected directly to one of
the elements of the sensor, pins 4 and
6, with a resistor and pot connected to
earth. The other element, pins 1 and 3,
Parts List
1 Breath Tester PC Board*
1 Plastic Case*
1 Cigarette-lighter plug & lead*
Semiconductors
1 alcohol sensor (IC1)
1 LM7805 5V regulator (IC2)
1 LM3914 LED Driver IC (IC3)
5 3mm green LEDs (LED 1-5)
4 3mm red LEDs (LED 7-10)
1 3mm orange LED (LED 6)
Capacitors
1 100µF 25VW PC electrolytic
1 10µF 16VW PC electrolytic
Resistors (0.5W, 5%)
1 1.8kΩ (brown-grey-red-gold)
1 2.7kΩ (red-violet-red-gold)
1 3.9kΩ (orange-white-red-gold)
1 10kΩ PC-mounting trimpot
* see text
is connected to the +5V supply from
the 7805 5V regulator.
Remember that the resistance between the elements is variable. This
then forms a “voltage divider” across
the 5V supply.
Normally (ie, no alcohol detected)
the sensor resistance is high, so the
voltage at pin 5 will be low. But when
it detects alcohol the sensor resistance
drops, so the voltage at pin 5 will be
high. The actual voltage is in direct
inverse proportion to the sensor element’s resistance, which itself varies
in direct inverse proportion to the
amount of alcohol detected.
The 1.8kΩ resistor and 20kΩ pot are
used to calibrate the circuit – we set
the LED display so that the orange LED
lights when 0.05% alcohol is detected. We’ll look at calibration shortly.
The 100µF and 10µF capacitors
on the input and output of the 7805
regulator help to smooth out any
variations in the supply and also to
remove any noise on the supply line,
both of which could affect the accuracy and/or readings.
Building it
All components, including the gas
sensor, mount on a single PC board.
There are only a few components
to solder in place but as usual, it is
wise to start with the lowest profile
Fig.2 (above) is the component overlay. At right, reproduced
same size, is the completed PC board connected to a section
of the PC board from the disposals case. The only reason
for using this board is to take advantage of its 2.5mm DC
socket. Note there is an error in the PC board overlay – the
green LEDs go to the left and the red to the right.
ones (ie, the resistors and trimpot) first.
Next move on to the capacitors, the regulator and the
IC socket. All of these must be soldered in the right way
around or your circuit will not work. Also, the regulator
pins must be bent down 90° so that it lies parallel with the
PC board. A hole is provided for securing the regulator to
the PC board but this is not really necessary.
You need to decide whether you want a bargraph display or a dot display. If you want a bargraph, use one
of the component lead off-cuts to solder a link onto the
PC board where shown. If you want a dot display, don’t
solder the link in.
When you come to solder the sensor in, you will note
that there is nothing to tell you which way around it should
go – the six pins fit in the holes two different ways. While
we said before that this was a semiconductor device (and
therefore you might expect it to be polarised) this particular
semiconductor can go either way around. The sensor is
meant to mount high off the PC board – poke only enough
legs through as you need to for reliable solder joints.
The last components to be soldered in are the LEDs and
we have left these until last because these need special
treatment. They need to be lined up in both the vertical
and horizontal planes.
Before poking them through their holes, though, a
warning: some PC boards may have the screened printing
(on the component side) wrong as it applies to the LED
positions. Holding the board so its label (K080B Breath
Tester) is at the bottom, the RED LEDs go on the left and
the GREEN LEDs go on the right. The orange, of course,
is between them.
The symbols for the LEDs show a flattened side (the
anode) all facing the same way. Make sure you put the
LEDs in this way around or they won’t work!
Now, how do you line them all up? Simple: holding the
LEDs so they won’t fall out, turn the PC board over and
support it long its edges on two books or blocks about
25mm thick. The LEDs will all drop down to the bench
below and be exactly the same height.
Solder just one of each LED’s legs in while the board is
supported like this (it doesn’t matter whether you solder
anode or cathode). Then turn the board over and check the
horizontal alignment – if necessary, push the LEDs until
A close-up view of the PC board end-on, showing how the
alcohol sensor mounts up in the air (as do the LEDs
behind). The reason for this is so both poke through the
front of the case when assembled.
October 2000 31
300mA and up would be fine) go right
ahead. The regulator will cure any
of the ills (hum, noise, etc) from the
plugpack. Just make sure you get + to
+ and – to – or you will probably do
some damage!
The case
You’ll need to drill 11 holes in the
case – a 17mm diameter hole for the
alcohol sensor (top) and 10 3mm holes
for the row of LEDs, seen here just
above the label.
they are all lined up perfectly and
equally spaced. Then turn the board
over again and solder in the other leg
and clip all the excess legs off.
Apart from the power lead, your
Breath Tester PC board is finished.
Power
In the kit there is a car cigarette-lighter lead. Its plug has a LED
to show you power is applied and
inside the plug is a 3A fuse (accessed
by unscrewing the plug tip). On the
other end is a moulded 2.5mm DC
line plug.
You can attach power in one of two
ways – sacrifice the plug and solder
the lead directly to the PC board; or
connect it via the PC board which
comes with the surplus case. This
board has a 2.5mm DC socket so it’s
simply a matter of plugging in. We’ll
look at the second option in a moment.
If you want to solder the lead direct
to the board, cut the cable as close as
you can to the plug (it’s only a 600mm
cable so you haven’t got a lot to play
with). Strip back 10mm of outer insulation to reveal the twin cables inside.
Now here’s a trap for young players:
the white wire is connected to the
centre pin of the cigarette lighter plug
which, of course, makes it the positive. That means the red wire is the
negative! Yes, red is negative. Don’t
say you weren’t warned!
Strip 5mm of insulation off each of
these and solder each to their appropriate points on the PC board.
Of course, there’s nothing in the
good book which says you MUST run
this project from a cigarette lighter. If
you want to run it from a DC plugpack
(anything from 7-12V or so at about
32 Silicon Chip
The Breath Tester is assembled in
a surplus case which used to hold a
mobile phone in a car. It fits quite nicely and requires only a little surgery,
mainly to expose the sensor unit itself.
First, though, we’ll look at power.
We mentioned another PC board a
moment ago. With a little ingenuity
and thought (or is that thought and
ingenuity?) you can cut this board
so that it still fits in the bottom of
the case, with its 3.5mm DC socket
intact. That way you can simply plug
the cigarette lighter lead in without
cutting the plug off.
The main Breath Tester PC board
can then occupy the rest of the case,
as our photographs show.
Of course, you will have to solder
a couple of wires (insulated hookup
wire) from suitable tracks on the
cut-off PC board to the Breath Tester
PC board but this shouldn’t prove
difficult.
You don’t need to connect power
–simply plug the DC plug (on the
cigarette lighter lead) into the DC
socket and with your multimeter on
an “Ohms” or “continuity” range, find
the points on the board that show zero
Here’s how it all fits together inside the
disposals case (which was once a car
adaptor for a mobile phone). No screws
are used to hold the boards in place
–they simply drop over the mounting
posts and are held tight.
ohms (or close to it) between the tip
of the cigarette lighter plug (the “+”
connection) and the springy metal
bits on its side (the “–” connection).
Connect these points via short
lengths of suitably coloured insulated
hookup wire to the + and – power
connection points on the Breath Tester
PC board.
Now, about that surgery we mentioned. The alcohol sensor needs to
have a good airflow around it to detect
properly. For this reason, the end must
poke through a 17mm diameter hole
in the case.
This hole is drilled where the
speaker used to go in the disposals
case – right in the middle of the holes
which let the sound out. In fact, the
extra holes around the sensor are useful in increasing air (gas) flow.
The other holes required are of
course for the 10 LEDs – not much
point in having them flash merrily
away inside the case, is there? The
holes for the LEDs should be 3mm in
diameter, spaced 5mm apart. Only the
tips need to emerge through the holes.
These holes are drilled in a straight
line across the front of the case, exactly 45mm down from the middle of the
sensor hole, as shown in the photo.
In the kit, a printed label is supplied. This fits perfectly in the “well”
in the disposals case and can be glued
into position after being cut to shape
and size. However, it will need to be
protected with some clear self-ad-
What we are aiming to do is set the
Breath Tester up so the orange LED
comes on at 0.05% BAC. Start by adjusting the calibration pot so that the
lowest LED just comes on.
Now, according to that Responsible Service of Alcohol course I was
telling you about before, 0.05 corresponds to 3 standard drinks in one
hour (or less).
Unfortunately, there is no easy way
(at least for the lay person) to calibrate
to this standard so, with much regret,
we’re going to have to ask you to drink
3 middies (or 15oz/385ml glasses) of
full strength beer during the next hour.
We can only apologise for putting you
through this but we haven’t been able
to think of any other way.
Honestly, we wouldn’t ask you to do
this if it wasn’t absolutely necessary
in the interest of global peace and
Fig.3: full-size artwork for the Breath
harmony and the closer alignment of
Tester PC board, viewed from the
the galaxies. Just make sure the beers
copper track side. Use this pattern to
check your PC board for any defects (eg, are nice and cold!
bridges).
If beer is not to your liking, you can
substitute a nip of spirits or a 200ml
hesive contact film or other suitable
glass of wine as a “standard drink”.
material.
We’ve got to warn you, though,
Construction is now complete – all
that wine varies all over the shop in
that remains is calibration.
its alcohol content so could be less
First of all, though, you need to accurate. (Full strength beer is not so
apply power for at least an hour, variable).
preferably several hours, to allow the
And just as importantly, this methheater to completely purge the sensor
od does not take into account differof any gas residue it has picked up ences between males and females nor
since being manufactured.
metabolic rates, bulk, whether you’ve
(A long purge is normally only eaten food, etc – all of which make
required for a new unit. Later purges a significant difference to a person’s
will be done much more quickly – just apparent sobriety.
a few minutes is usually tons of time).
How are those drinks going? The
When you apply power, turn the first one didn’t even touch the sides
calibration pot to both extremes of and you’re into the second already?
its travel. One way you should see
Hey, slow down a bit: you have to be
all the LEDs come on (or the top LED
of sound mind to calibrate this thing.
in dot mode). If one or some of the OK, so we’re too late. Call in a mate
LEDs don’t light, the odds are about and make sure he doesn’t touch a drop
100:1 on that you have it or them in
till it’s done.
back-to-front.
Come to think of it, that’s a good
Perhaps the easiest way to check
move. Once calibrated he can have
that it is working is to open a bottle
three standard drinks and see what
of metho and waft the fumes over the
his reading is!
sensor. Metho is almost pure alcohol
Ready? Good. You’ll need to wait,
so you should get an instant response! say, 15-20 minutes after your last
drink to make sure it’s well and truly
Calibration
in your system.
If you’re younger than 18 years, you
Blow into the sensor and see if any
must not read the following section.
more of the LEDs light. You may need
Avert your eyes immediately lest a fate
to do this several times, adjusting the
worse than death befall ye.
calibration pot a little each time.
Are they gone? Great. We couldn’t
You should be able to get it to the
get into the serious part of calibration point where all the greens and the oruntil they’d left.
ange LEDs come on each time you blow
The cigarette-lighter lead supplied
with the kit has an integral fuse and
LED plus a 2.5mm DC plug. You can
cut this off and solder direct but be
warned: red is negative, not positive!
into it, then slowly die down again.
If all you get is red LEDs, you’ve
either got the calibration pot way too
high – or you’ve sneaked a couple
more beers without us looking.
Once you get it to work, get your
mate to repeat the process. Remember
it takes a while for the alcohol to enter
your bloodstream and then your breath
so results do change significantly over
time.
And to finish…
Finally, let us repeat the warning
we started with.
This device must NOT be relied on
to give any real test of sobriety or otherwise, let alone the ability to drive.
Only the Police Breath Analysis
Unit or a hospital blood test can do
that – by which time it is probably
too late.
SC
Where do you get it?
The Breath Tester project, including
the PC board pattern, is copyright ©
2000 Oatley Electronics Pty Ltd.
They have available a complete kit
of parts, including the disposals
case and the cigarette-lighter lead,
for $29.00 inc GST plus $7.00 pack
and post.
Contact Oatley Electronics at PO Box
89, Oatley NSW 2223, or phone (02)
9584 3653, fax (02) 9584 3651, website www.oatleyelectronics.com.au
October 2000 33
|