This is only a preview of the January 1992 issue of Silicon Chip. You can view 43 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. Articles in this series:
Items relevant to "Build A 4-Channel Guitar Mixer":
Articles in this series:
Items relevant to "Experiments For Your Games Card":
Articles in this series:
Articles in this series:
Articles in this series:
|
Ever forget to turn your car's
headlights on at night? Or have
you ever left your headlights on
& flattened the battery? This
automatic headlight controller
eliminates both those problems.
Automatic controller
for car headlights
By WALLY HAMMER & JEFF MONEGAL
NY ONE who owns a car knows
what it's like to turn the key in
the ignition only to be greeted
by a horrible clicking noise from under the bonnet. Yep, flat battery. Frustrating, isn't it? You grit your teeth,
get out, kick the car, mutter and wish
that there was some electronic device
that would automatically turn your
car's lights on when they are needed
and off again when they are no longer
required.
The project presented here will do
just that and more. It senses the ambient light level and automatically
A
switches the parking lights and the
headlights on or off to suit the conditions. It is simply wired in parallel
with the existing lighting circuit,
which means that you can still switch
the lights on manually using the existing switch if necessary.
To operate the unit, you simply do
nothing. Once installed correctly, the
project will make the operation of
your car's lights fully automatic. When
the ambient light drops below a preset level, the parking lights will come
on first, followed two seconds later
by the headlights but only if the en-
gine is running. If you switch the engine off, the lights will also go off.
Similarly, the lights will switch off
if the ambient light rises above a certain level.
Another feature that has been added
is a "temporary on" mode. Provided it
is dark, the driver can switch the lights
on for about 30 seconds by pressing a
switch, after which time they will
automatically turn off. This feature is
useful for providing light to find your
way to the front door, for example. All
car batteries should be able to power
the lights for over 30 minutes, so 30
seconds won't cause any problems
with battery charge.
How it works
The prototype was built into two plastic jiffy cases, with the larger unit mounted
behind the dashboard. The smaller case contains only the indicator LED, the
"TEMPORARY ON" switch, and the LDR (on the back panel).
28
SILICON CHIP
Refer now to Fig.1 for the circuit
details.
Schmitt trigger stage ICla and its
associated components shape the
pulses from the negative side of the
coil primary to produce a series of
square-wave pulses on pin 2. When
the engine is off, pin 1 of ICla is held
high py a lO0kn resistor and pin 2
stays low. However, when the engine
is running, negative going pulses from
the coil pass via Dl to ICla's input,
which then switches its output high
and low according to the pulse frequency.
The resulting square-wave pulses
on pin 2 ofICla are differentiated by a
.00lµF capacitor and then inverted
by IC1b to produce a train of short
positive going pulses at pin 12. These
pulses are detected by D5 and used to
charge a lµF capacitor.
If the engine is running, there will
be enough pulses (even at idle) to
charge the 1µF capacitor sufficiently
to produce a logic high on pin 1 of
ICZa. However, if the engine is stopped
or is only being cranked over with the
starter motor, then the pulses coming
into the circuit will not be fast enough
to prevent the lµF capacitor from discharging via the parallel 220kQ resistor. Thus, pin 2 of ICZa will be high
and this high is then inverted by ICZb
after a brief delay to produce a low on
one input of a wired OR gate consisting of D7 & D8.
If either input of the wired OR gate
is low, pin 9 of IC1e is also low and
transistors Q1-Q4 are all off. And when
the transistors are off, the parking light
and headlight relays (RLYl & RLYZ)
are also off.
i!
~
~~~s
...
C>
<Oc,
a:Es
~WMW
c ...
;!
~S:
v--+---~ti~5
-i---e~~~
QX
a:
)
c.:>
,.
-✓
-,
ca;3
N--
+
...
I
~g
C>
C>
c;:1;
::!:
ffi~
a:,-..
Q
,-
"'
::,
::
o=:::;.
z
0
+
+
I
.......
.
>
+
I
~
~;
c.,
~E
<O
:!:
u
.,
:5"'
C>.
....
N
~
"'
!,!
+
c.,
"'
H•·
~
I
.
►
a:
5.
H•·
M
=(]
0
~
C>
C>
~
0
==
~
0
il:
::l+
,-
~~.~~
Light sensing circuitry
8
'-'
Now let's consider the light level
sensi11g circuitry. During daylight
hours, the resistance of the LDR is
low and this holds pin 9 of IC1e low
via inverters IC1c, IC1d and diode DB.
Thus, pin 8 ofICle will be high, which
means that the transistors and relays
will all be off as before.
When the light level falls, the resistance of the LDR increases and a
logic high is now applied to pin 3 of
IC1c. Pin 10 of ICld now switches
high (after a delay set by the RC time
constant on pin 11) and thus pulls the
cathode of D8 high.
If the engine is off, the other input
of the wired OR gate (ie, the cathode
ofD7) will be held low and no further
circuit action takes place. However, if
the engine is running, D7's cathode
will also be pulled high and so pin 9
of IC1e will be pulled high by its
---
::l
· +
,,,.
I-to
:::l
M
.., .,
N
!,!
_H•·
0
a:
w
Q!...
....
..J
..J
0
a:
I-
z
~
0
0
...
.,._
ea>
en
z
I-
::c
..c;...
c.,
:J
C
<(
w
::c
0
+
~
I
.......
Fig.1 (right): the circuitry from D1 to
IC2a determines whether the engine is
running, while the LDR, IClc & ICld
monitors the light level. If the engine
is running & the light level is low, the
cathodes ofD7 & D8 are both held
high & ICle turns on Ql & Q2 to
activate the parking lamps relay
(RLYl). This also turns on Q3 which
then switches on Q4 & RL Y2 after a
1.5-second delay via IC2c & IC2d.
:E
0
I::>
<(
.
+
>
+
I
~
w
~~g~
~ff:c.:>ffi
z
,- --' a:
::z:wOa:
;
35ffig
.,
JA N UARY 1992
29
~~ ~1®·~7re~·
lG
~='"Tte®~~~®~•!
·TC :;!
TO _.,__.
LOR
........!....
:;!
~o
F ffl1
-l:::!i
I~
I
To~O
S1 - - -
~
Q
_001
-
Q+t1
47uF
+ (e(_}•
1uF
~ -
--<e:::>-eoa
1M~-
•
-0:::U
D7.-cl)1 ~
1
Ie
eQD
~2
-
N
•
+12V FROM BAITTRY VIA
15A FUSE
C•
~Lti1
BJ• 0001
+
A----,
{:illJt ~
<Clt '-f
~ ~
01
~~---~
~
'-,J.0,33
•
tOli]e
RELAY
RLY1
· k D11.a::::::,..~ D
10k
~
•01
ill
4584
N
•
t
I
•041
uF
~ t;)
f'!\REG1
I
~ +~j01
100.F-1
TD PARKING LIGHTS
TO C ASSIS
Fig.2: install the five wire links on the board first & note particularly the link
underneath IC1. The remaining parts can be installed in any order but take care
with the orientation of polarised components. Transistor Q4 must be mounted
with its metal face towards IC2 (see Fig.1 for pinout details).
associated 100kO resistor. Thus, pin
8 of ICle switches low and turns on
Ql, Q2 and relay RLYl to activate the
parking lights.
Now let's see how the headlights
are turned on. When Q2 turns on, Q3
also turns on and takes pin 5 of IC2c
high. This in turn switches pin 8 of
IC2d high after a 1.5-second delay, as
set by the RC time constant on pin 9.
Thus, Q4 turns on and activates RLYZ
which then supplies power to the
headlights. Q4 also turns on LED 1 to
indicate that the lights are on.
The reason for the 1. 5-second delay
is to limit the surge current that occurs when the lights are turned on.
This would obviously be very much
higher if both sets of lights were turned on at the same time.
The RC time constant at the output
of IClc provides about 20 seconds of
delay when night/day transitions are
detected. This eliminates false trig-
gering due to short variations in the
light level falling on the LDR. Further
filtering is provided by the l0µF capacitor on pin 3 of IClc.
Switch S1 and IClfprovide the 30second "temporary-on" feature. When
pushbutton switch S1 is pressed, the
associated lO0µF capacitor quickly
charges via a 1.5kO resistor. The resulting high is then inverted by IClc
and pulls pin 3 of ICZb low via Dl 1.
This logic low makes the circuit
think that the engine is running and
so, if it is night time, the lights turn
on. The lO0µF capacitor then begins
discharging through its parallel 330kO
resistor and, after about 30 seconds,
pin 6 of IClf switches high again and
the lights turn off.
Power is derived from the 12V car
battery via reverse polarity protection
diode D6 and 3-terminal regulator
REGl. This gives a regulated +8V rail
to power the circuit but note that the
relays are powered directly from the
+12Vrail. ZDl and its associated 1000
resistor provides protection against
spikes which may be present on the
supply rail from the battery.
Relay ratings
Tests on several makes of car
showed that the parking lights draw
from 4-9A, depending on the number
of lamps in the circuit. For this reason, RLYl is specified with 10A contacts.
The headlights, however, are a different proposition. Most high-beam
lights are rated at 60-lO0W. Ifwe consider that there are two of them and
the supply voltage is around 14V, it
follows that together they draw around
14A. That is why a separate headlight
relay with 30A contacts is used to
switch the headlights.
Construction
Fig.2 shows the wiring details for
the Automatic Headlight Controller.
Check the PC board carefully to ensure that no track faults exist before
you start construction. In particular,
check for shorts between close tracks
and for breaks in tracks.
Once this has been done, start the
assembly by installing the five wire
links. One link runs under ICl, so
ensure that it is installed before the IC
is soldered into place. This done, install the resistors and capacitors but
take care with the electrolytic capacitors as they are polarised.
Next, install the diodes, transistors
and ICs. Once again, take care with
the polarity of these components and
be sure to use the correct device at
each location. Note that the metal face
RESISTOR COLOUR CODE
0
0
0
0
0
0
0
0
0
0
0
0
30
No.
Value
4-Band Code (5%)
5-Band Code (1%)
1
1
2
1
4
470kO
330kO
220kO
150kO
100kO
47kO
15kO
10kO
2.2kO
1kO
1000
yellow violet yellow gold
orange orange yellow gold
red red yellow gold
brown green yellow gold
brown black yellow gold
yellow violet orange gold
brown green orange gold
brown black orange gold
red red red gold
brown black red gold
brown black brown gold
yellow violet black orange brown
orange orange black orange brown
red red black orange brown
brown green black orange brown
brown black black orange brown
yellow violet black red brown
brown green black red brown
brown black black red brown
red red black brown brown
brown black black brown brown
brown black black black brown
3
1
3
1
4
1
SILICON CHIP
PARTS LIST
1 PC board, code CE 91 AL
1 12V PC-mounting relay
(MR301 12HS)
1 12V 30A automotive relay
1 momentary contact pushbutton
switch
1 plastic jiffy case, 130 x 68 x
41mm
1 plastic jiffy case, 83 x 54 x
28mm (to house S1 & LED;
optional, see text)
1 light dependant resistor (LOR)
The PC board can be held in position in the case using foam rubber. Use plastic
cable ties to bind the leads into neat bundles & make sure that you wire the unit
into your car in a professional manner, as described in the text.
of the BD437 transistor (Q4) fac es diode D10.
The 3-terminal regulator and the
relay are the last components to go on
the board. Once these are on, go over
the board carefully and check that all
parts are in their correct locations and
are correctly oriented.
The external leads can now be soldered to the board. Make sure that all
leads have sufficient length to reach
the relevant parts of the vehicle when
the project is installed. For the prototype, we installed the pushbutton
switch (S1), the LED and the LDR in a
separate small zippy box which was
then mounted on top of the dashboard.
Bench testing
Before installing the project in the
car, it should be tested on the bench
using the following procedure:
.
(1). Connect the unit to a 12Vbench
power supply (more than likely nothing will happen) and make sure that
the LDR is in bright light.
(2). Wait 45 seconds for the circuit
to stabilise, then press S1. Again nothing should happen. Now cover the
sensor with a dark cloth, wait for another 45 seconds and again press S 1.
This time RLYl should come on, followed about 1.5 seconds later by headlight rely (RLYZ) and LED 1. Check
that the relays automatically switch
off after about 30 seconds (first RLYl
and then RLYZ 1.5 seconds later).
(3). If all is well so far, connect an
audio oscillator to the input and feed
in a 50Hz 5V (approx.) pulse waveform. If the LDR is in bright light, the
relays should remain off. Cover up
the LDR and check that the relays and
LED 1 switch on after the 45-second
delay. If this is OK, disconnect the
pulse generator and check that th e
relays switch off after a short delay.
If everything checks out as d escribed above, the project can be installed in the car. If you strike trouble ,
then refer to the troubleshooting procedure at the end of this article.
Installation
The position of the LDR is very
important and will determine the effectiveness of this project. In the prototyp e installation, the LDR was
mounted on the back of a small plastic case that also contained the pushbutton switch (S1) and the LED. This
box was then mounted on top of the
dashboard so that the pushbutton
switch could be easily reached by the
driver.
One thing to watch is that the LDR
must be shielded from oncoming
headlights an d overhead street lights,
otherwise the unit could switch the
lights off at the w rong time. Similarly,
it should also be shielded from any
instrument lights, from the lights of
following vehicles and even from the
headlight indicator LED on the front
panel. The final position of the LDR
will, of course, vary from car to car. In
stubborn cases, try mounting it under
the dashboard to the right of the steering column.
Semiconductors
2 4584 hex Schmitt trigger
inverters (IC1 ,IC2)
1 78L08 3-terminal regulator
(REG1)
2 BC558 PNP transistors
(Q1-Q3)
2 BC548 NPN transistors
(Q2-Q4)
4 1N4004 power diodes
(D1,D6,D9,D10)
7 1N914 signal diodes (D2D5,D7,D8,D11)
1 15V 1W zener diode (201)
1 green LE:D (LED1)
Capacitors
2 100µF 16VW electrolytic
2 47µF 16VW electrolytic
3 10µF 16VW electrolytic
1 1µF 16VW electrolytic
4 0.1 µF 5mm-pitch monolithic
2 .0033µF ceramic
Resistors (0.25W, 5%)
1 470kQ
1 15kQ
1 330kn
3 10kQ
2 220kQ
1 2.2kQ
1 150kQ
41kQ
4100kQ
1 100Q 1W
347kQ
Miscellaneous
Automotive connectors, hook-up
wire, 30A hook-up wire (for headlight wiring), nuts and bolts.
The PC board can be housed in a
plastic jiffy case and installed behind
the dashboard, with the necessary
wiring run through the firewall via a
suitable grommet. To connect the parking lights into circuit, simply connect
the lead from the PC board to the
positive lead running to one of the
lamps (the parking lamps are all in
JANUARY 1992
31
Headlights Reminder Circuit
If you don't like
the idea of automatically switching your lights on
and off, or you just want to save
money, why not use the circuit as a
Headlights Reminder instead? The
modifications are straightforward
and, as a bonus, the installation is
much easier.
A practical Headlights Reminder
should sound a warning buzzer
when three conditions are satisfied:
(1) the engine is running; (2) the
light level is low; and (3) the headlights are off. We already have the
engine and light level sensing circuitry, so all we need to do is detect
whether the headlights are on or off.
This can be done using IC1f.
The modifications to the circuit
are as follows:
. , .
,
.
parallel, so energising one energises
the lot).
The external 30A headlights relay
(RLY2) can be mounted in the engine
bay, preferably adjacent to the existing headlights relay. It's then simply a
matter of identifying the leads and
connecting the normally open contacts ofRLYl across the normally open
(1 ). Disconnect the anode of D11
from pin 3 of IC2b and connect it
instead to pin 9 of IC1 e.
(2). Reduce the 100µF capacitor
on . pin 5 of IC1f to 0.1 µF and increase the 1.5kQ resistor to 100kQ.
Delete switch S1.
(3) . Substitute a 12V buzzer for
RLY1 (ie, connect it between the
+ 12V rail and the collector of Q2).
Leave diode D9 in position.
(4) . Delete all components following Q2 and the buzzer, except for
the 47kQ resistor on pin 5 of IC2c
and the 150kQ resistor on pin 6
(these resistors are left in circuit to
prevent the Schmitt triggers from
oscillating). If you are uncertain as
to which parts to leave out (or are
too lazy to work it out), just leave out
Q3, Q4, LED1, D10 and the external relay (RLY2).
contacts of the existing relay.
You can do this quite easily by using double adapter automotive spade
clips. Note that any wiring between
the two relays must be run using 30A
automotive cable. Don't forget to connect the leads from the PC board to
the coil terminals of RLYl.
The connection to the ignition coil
That's all there is to it. To install
the unit, connect it to the ignition coil
as before and connect the free end
of the 100kQ resistor at IC1f to the
switched side of the headlights
switch. The + 12V supply for the circuit should be picked up from the
switched side of the ignition switch,
via one of the existing fuses (this is
possible because the circuit now
draws negligible current and doesn't
have to be permanently powered).
Now, when it's dark, your engine
is running and the lights are off, the
cathodes of D7, D8 & D11 are all
high and IC 1e turns on Q1 & Q2 to
drive the buzzer. When you turn
your headlights on, IC1 f's output
goes low and pulls pin 9 of IC1 e low
via D11. IC1 e's output thus switches
high, Q1 & Q2 switch off and the
buzzer stops.
can be made by terminating the input
lead with an automotive eyelet lug.
Power for the circuit must be obtained directly from the battery side
of the fusebox via a 15A in-line fuse.
Don't use any of the existing fuses
and make sure that the supply remains at+ 12V even when the ignition
is switched off (note: once installed,
the circuit is powered continuously).
Also, don't leave out the 15A in-line
fuse; if you do, you run the risk of a
fire if there is a short circuit.
If you are joining wires to existing
cables, it's best to solder the junction
and then insulate the soldered joint
with a few layers of insulation tape.
Make sure that no strain is placed on
any cables running through the car
and that no metal can wear through
the cable insulation.
Troubleshooting
We mounted the LDR on the rear panel of the control case but this can be varied
to suit your situation. Note that the LDR must be mounted where it will not be
exposed to oncoming car headlights, or to street lights or instrument lights.
32
SILICON CHIP
Hit doesn 't work, the first step is to
check component placement, orientation and soldering. If these checks
don't reveal anything, the next step is
to isolate the faulty circuit section.
The procedure is as follows:
(1). Check the supply voltages, You
should get a reading of +8V at the
output of REGl and on pin 14 of each
IC. Check also that +12V is being supplied to each relay coil. Switch off
immediately and clear the fault if you
don't get the correct readings.
(2). If the supply voltages are correct, remove diodes D7 & DB and check
that both relays turn on. If neither
relay turns on, check the circuitry
around ICle, Ql and Q2. IfRLYl turns
on but not RLY2, check the circuitry
around Q3, IC2c, IC2d & Q4.
(3). If both relays turn on in step 2,
you've cleared the circuitry following
ICle. Now install DB and check that
the relays are off when the LDR is
exposed to bright light (note: you may
have to wait while the 47µF capacitor
on pin 11 of ICld discharges) . If the
circuit passes this test, cover up the
LDR and check that the relays switch
on after 45 seconds. Check the circuitry around the LDR, IClc, ICld &
DB if you strike problems.
(4). If everything is OK so far, then
the fault lies in the engine sensing
circuitry. Install D7 and try pulling
pin 1 ofIC2a high (ie, connect it to the
+BV rail). Provided the LDR is covered up, the relays should close after
a short delay. If they don't, check the
circuitry around IC2a & IC2b. If they
do, try pulling pin 13 of IClb low. If
the circuit still works, check ICla and
Where to buy the kit
A kit of parts for this project is available for $32.95 plus $3.50 p&p from
CTOAN Electronics, PO Box 33, Condell Park, Sydney, NSW 2200. Phone
(02) 708 3763. Orders may be placed using Bankcard, Mastercard, cheque
or money order.
The kit includes the PC board, all on-board components, the pushbutton
switch, the LED, the LOR and the on-board parking lamp relay. It does not
include the plastic cases, headlight relay, cable or automotive connectors.
These parts may be purchased from electronics retailers and automotive
accessory shops.
If you are unable to get the project going, CTOAN Electronics offers a full
baekup repair service. The cost is $15.00 plus $5.00 return postage. Please
note that only kits built as described in this article and with good qualit
soldering can be accepted for repair.
Note: copyright of the PC board associated with this project is retained by
CTOAN Electronics.
its associated components, otherwise
check the circuitry around IClb.
Finally, there are a few simple adjustments you can make to the circuit
if necessary. If the circuit turns the
headlights on too early, increase the
value of the lOOkQ resistor in series
with the LDR. Alternatively, decrease
the value of this resistor if you want
the lights to come on earlier.
The "TEMPORARY ON" period can
be adjusted by changing the 330kQ
resistor on pin 5 of IClf. Increase the
value of this resistor to obtain a longer
period and decrease it to obtain a
shorter period. For example, reducing the resistor value to 150kQ will
give a period of about 15 seconds. SC
Introducing the Protel advantage.
Protetf or Windows':
Protelfor Windows is an entirely new Printed Circuit Board design system createdf or Windows 3. Prate!for Windows
brings the prof essionalism ofProtel's proven PCB design sof tware to the highly productive Windows 3 environment.
New Protel users will start designing sooner and experienced users will work more efficiently than ever. In 386
advanced mode, Windows 3 provides virtual memory capability, which allows advanced PCB users to design without
restrictions on the total number of components, nets, tracks, etc. Protel f or Windows supports the multiple document
•
Copper Trace Layers-81Top
□ Midl
Ill D Mid 8
- □ Mid9
--,
0 Drill Guide
D Drill Draw
L81 Keep Outs
□ Mid 3
0 Mid 4
□ Mid 11
Ill □ Mid 12
□
0 □ Mid 13
-
Mid 5
0 Mid 6
D Mid 7
D
- □ Mid 14
111111 81 Bottom
0
Ill
Ill □ DRC Errors
81 Grid 1L'.J
Ill D Rats Nest Ill L8l Grid 2-
B
Selections
D
Ill
M
[8] Transparent
hanical Layers
ech 1
ech 2
I [Silks
Ill D Bottom Ill . L8l Tc
rsMT Paste Mask
Visible
81 Multi Layer EJ Background
ISolder Mask
I □ Top III D Bottom
LD Top
inteiface (MDI) standard. Any number offiles can be loaded
•••
- -- -- ----,
-
0
lU
0
Ill
llJl!]0Mid10
i
Special -
~
lllll D Mech 3 II D Dithered Colors
B D Mech 4 -
...
at the same time, using standard Windows routines, to move
information between different files or different applications.
Tbe Protel for Windows family consists of Advanced PCB advanced level PCB layout -$1990. Options. Advanced Place
$995, Advanced Route $995. Professional Scbematic' -
schematic capture -$1295. Option: Digital Simulator* $795.
Selecl P1inte1
IPostSc,i?I Printe r on LPTl:
Balch Mode
0
0
Separate Page Fm Each Print
Composite Prinl
<at> Panels [Multiple La}'ers Per File)
~
X Conection ~
YConeclion
■
Te cb u o togy
Scale
PrintScale
Protel Technology Pty Ltd
PO Box 204, Hobart Tasmania 7001
Phone (002) 730100 Fax (002) 730944
Toll-free 008 030 949
~ ~~
Avallable April 1992. Protel is a lr!f<istered trademark. Adva11ced PCB and Professional
Schematic are registered trademarks of Prate/ Technology Ply Ltd. \Vinduu,'S is a registered
trademark of Microsoft Co,poration Inc.
1
JANUA RY 1992
33
|