Silicon ChipHeadlight Reminder For Cars - August 2001 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Knowledge nation is a woolly headed wish list
  4. Feature: Geocaching: Treasure Hunting With A GPS by Ross Tester
  5. Project: A Direct Injection Box For Musicians by John Clarke
  6. Feature: A PC To Die For; Pt.3 - You Can Build It Yourself by Greg Swain
  7. Feature: Help Reform Electrical Legislation by Silicon Chip
  8. Project: Build A 200W Mosfet Amplifier Module by Leo Simpson
  9. Feature: The Role Of Electronics In Mine Clearing by Bob Young
  10. Feature: Using Linux To Share An Internet Connection; Pt.3 by Greg Swain
  11. Project: Headlight Reminder For Cars by John Clarke
  12. Project: 40MHz 6-Digit Frequency Counter Module by David L Jones
  13. Order Form
  14. Product Showcase
  15. Weblink
  16. Feature: Uniden Mini UHF Two-Way Radio Competition Winners by Ross Tester
  17. Vintage Radio: Substituting for valves that are no longer available by Rodney Champness
  18. Book Store
  19. Back Issues
  20. Notes & Errata
  21. Market Centre
  22. Advertising Index
  23. Outer Back Cover

This is only a preview of the August 2001 issue of Silicon Chip.

You can view 32 of the 104 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 "A Direct Injection Box For Musicians":
  • Direct Injection Box PCB pattern (PDF download) [01108011] (Free)
  • Panel artwork for the Direct Injection Box (PDF download) (Free)
Articles in this series:
  • A PC To Die For - And You Can Build It For Yourself (June 2001)
  • A PC To Die For - And You Can Build It For Yourself (June 2001)
  • A PC To Die For; Pt.2 - You Can Build It Yourself (July 2001)
  • A PC To Die For; Pt.2 - You Can Build It Yourself (July 2001)
  • A PC To Die For; Pt.3 - You Can Build It Yourself (August 2001)
  • A PC To Die For; Pt.3 - You Can Build It Yourself (August 2001)
Items relevant to "Using Linux To Share An Internet Connection; Pt.3":
  • Linux script files for Internet Connection Sharing (Software, Free)
Articles in this series:
  • Using Linux To Share An Internet Connection; Pt.1 (May 2001)
  • Using Linux To Share An Internet Connection; Pt.1 (May 2001)
  • Using Linux To Share An Internet Connection; Pt.2 (June 2001)
  • Using Linux To Share An Internet Connection; Pt.2 (June 2001)
  • Using Linux To Share An Internet Connection; Pt.3 (August 2001)
  • Using Linux To Share An Internet Connection; Pt.3 (August 2001)
  • Using Linux To Share An Internet Connection; Pt.4 (September 2001)
  • Using Linux To Share An Internet Connection; Pt.4 (September 2001)
Items relevant to "Headlight Reminder For Cars":
  • Headlight Reminder PCB pattern (PDF download) [05108011] (Free)
  • Panel artwork for the Headlight Reminder (PDF download) (Free)
Items relevant to "40MHz 6-Digit Frequency Counter Module":
  • 40MHz 6-Digit Frequency Counter PCB patterns (PDF download) [04108011/2] (Free)

Purchase a printed copy of this issue for $10.00.

Ever turned your headlights on in the early morning gloom... and forgotten to turn them off? Talk about frustrating! Here’s a little project that will put an end to the angst by letting you know that the lights are on as soon as you open the door. No more bat flatteries! by JOHN CLARKE W e’ve all done it – left the lights on, that is – and it’s one of the best ways to unintentionally immobilise your car. And Murphy’s law says it will always happen at the most inconvenient time. The double whammy Murphy also says that it will always happen in the worst possible location – you know, the part of town you’d never be seen dead in after dark . . . Sure, you can call road service, only to find out the delay is a couple of hours or more because there were dozens of other motorists out there who did exactly the same thing. (Road service organizations say that flat batteries are far and away the highest reason for call-outs). But even worse than the delay, when you use jumper leads to start a modern car with an engine management computer you risk doing real (expensive!) damage – sometimes to both vehicles. And even if you don’t, you’re prob70  Silicon Chip ably going to have to reset your car radio’s station memory, reset the clock – and don’t forget rescheduling your appointments because you’re now a couple of hours late! Other options such as clutch starting may briefly spring to mind, only to be dismissed when you realise that your car is (a) parked in, (b) in a very busy Features ✪ Compact unit ✪ Uses inexpensive parts ✪ Modulated alarm on ✪ Monitors lights and igniti tion ✪ Optional door switch detec sounds ✪ Short delay before alarm ✪ Time-out of alarm road, or (c) is an automatic! Fit this Headlight Reminder and you should never have such a problem again. How it works While it’s true that many modern vehicles have a headlight reminder built in, it’s just as true that the vast majority of older cars – especially the “standard” models in the range – do not. And of those that do have them, they’re often just a simple device which cannot be over-ridden or stopped. That can be annoying if you want to have your headlights on for some reason without the engine running. Headlight reminders require a certain degree of logic so that the alarm will not sound under “normal” headlight use. To do this we monitor the headlights, the ignition and also the door switch. In its most basic form, the headlight reminder will only sound the alarm if the headlights are on and the ignition is switched off. While headlight reminders will usuwww.siliconchip.com.au ally sound immediately the ignition is switched off if the headlights are on, this is a bit of an over-exuberance on the headlight reminder’s part. We need a bit of grace when we do remember to turn off the lights. A refinement to this system is to add a delay before the alarm sounds or to add in door switch detection. With this last inclusion, the alarm will not sound when the engine is switched off and the lights are on but will wait until the door is opened. There is another wrinkle: different methods of light and door switching. It is usual to have the headlight/ parker switch supply power to the globes which are earthed on the other side, thereby completing the circuit. But some cars don’t earth the globes – they are powered at all times and the headlight/parker switch connects them to earth. Conversely, it is usual to have the car door switches connect a permanently-powered interior light to earth, with the interior light switch doing the same thing (in parallel). But some cars do the opposite – supply power via the door switches. They’re rare, but they do exist. Sensing of the light’s state is taken from between the switch and the light. If we think in terms of logic “highs” and “lows”, Fig.1 shows earth-side switching gives a high when the light is off and a low when the light is on. www.siliconchip.com.au Battery-side switching gives a low when the light is off and a high when the light is on. The SILICON CHIP Headlight Reminder caters for the different wiring and switching possibilities of car headlight and door switch operation. The headlight reminder is a very compact unit and can be fitted into a small plastic utility case measuring 84 x 54 x 31mm. The circuit The circuit for the Headlight Reminder is quite simple and uses only three low-cost CMOS integrated circuits (ICs) plus a transistor, a few diodes, capacitors and resistors and a piezo buzzer. The inputs for the ignition, lights and door switch are monitored via gates IC1a, IC2a and IC2b respectively. Outputs from these gates are sent through a series of gates which control the alarm signal. These gates simply prevent the alarm signal unless the ignition input is low and the lights are on. The use of the door switch input is optional. Let’s take a look at each of these inputs and see how they control the action of the alarm. IC1a (a Schmitt NAND gate wired as an inverter) monitors the ignition switch state. When the ignition is on, IC1a’s output is low and the output of IC1c is high regardless of the logic level of its other input (pin 5). As we shall see later, this prevents the alarm from sounding. If the ignition is off, IC1a’s output is high and the output of IC1c can go low if its pin 5 input is also brought high by the action of the signals from the lights and door switch gating. IC2a monitors the lights’ input. It can be configured to accept either polarity of headlight switching. If link LK1 is in position (and LK2 out), the circuit suits vehicles with headlight switching on the “earthy” side. Conversely, with LK2 in position and LK1 out, the circuit suits vehicles whose headlights are switched on the battery side. Fig.1: the two types of headlight switching with their equivalent logic states: the top circuit switches power from the battery; the bottom connects the “live” globes to earth. Our circuit caters for both types via movable links. August 2001  71 Fig.2: the circuit is based on only 3 low-cost IC’s and a handful of other components. 72  Silicon Chip In the first case (LK1 in), IC2a’s pin 1 is high, while pin 2 is high when the lights are off and low when they are turned on. If the lights are off, the output of IC2a will be low. This is because the output of an exclusive OR (XOR) gate is low unless one of its inputs is at a different logic level to the other. If the lights are switched on, pin 2 will be low and so IC2a’s output will be high. Similarly, if LK2 is in position and LK1 out, the pin 1 input will always be low. With the lights off, pin 2 is low and the output of the gate stays low. When the lights are switched on, the pin 2 input goes high and so the output goes high. A similar circuit operation occurs with IC2b which monitors the interior light, controlled by the door switches. Here the links are designated LK3 and LK4 for normally high or normally low door closed switching possibilities. The only difference is that we have provided an extra link option with LK5 which can tie the door switch input at pin 5 low if you don’t want to use the door switch feature. High inputs at both pins 1 & 2 of IC1b will produce a low output at pin 3 which is subsequently inverted via IC2c If the ignition is off (IC1c pin 6 input high), a high at pin 5 of IC1c will set a low output at pin 4. In turn, IC2d inverts this low so that the high output at pin 10 allows operation of the oscillator, based around IC1d, another Schmitt NAND gate. When its pin 12 is high (driven by pin 10 of IC2d), IC1d oscillates at about 1Hz, as determined by the 1µF capacitor and 470kΩ resistor connected to pin 13. Ignore diode D2 for the moment – we’ll get to that later. So as IC1d is oscillates its pin 11 goes high and low alternately, turning Q1 off and on to sound the piezo buzzer. So the buzzer turns on and off at once a second. OK, so you’ve left the lights on, the ignition’s off and you’ve opened one of the car doors. Result: the buzzer is sounding on and off. But what if you do want to have the door open and the lights on. This is where IC3 comes into the picture. It provides a timeout facility so that the buzzer stops after 10 seconds or so. The same low at the output of IC1c which is responsible for triggering www.siliconchip.com.au Parts List – Headlight Reminder Reproduced same size, here is the completed project immediately before connecting it to the car wiring. The header pin sets (left side of board) are used to modify the input triggering so the circuit will work with all vehicle types. Fig.3: and here’s the component overlay, viewed as if you were looking through the PC board with X-ray vision. The copper tracks are on the opposite side of the PC board. (Compare this with the PC board pattern shown later). the alarm also triggers the timer, IC3, via the 0.1µF capacitor. This applies a short low trigger voltage to pin 2 of IC3 which sets this timer running. The pin 3 output of IC3 goes high and pulls the cathode of diode D2 high. This reverse biases the diode which means it has no part to play in the charging/discharging of IC1d’s capacitor. However, the 10µF capacitor from pins 6 & 7 of IC3 to ground charges via the 1MΩ resistor towards the +12V supply. When this voltage reaches two thirds the supply, pin 7 and pin 3 both go low. The 10µF capacitor discharges through the IC via pin 7. The low pin 3 output forward biases D2, which in turn pulls pin 13 of IC1d low. So the output of IC1d is forced high, turning off Q1 and the buzzer. Thus the alarm only sounds for the duration of the IC3 timer. The length of time can be varied by increasing (for longer time) or decreasing (for shorter time) the values of the above resistor and capacitor. Power for the circuit is derived www.siliconchip.com.au from the car battery via the automotive fusebox. The 10Ω resistor provides isolation from the automotive supply, while the 16V zener (ZD1) suppresses transients across the supply. With a “normal” vehicle supply of around 13.8V this zener would never conduct; it is only when spikes generated by other electrical equipment in the car or even such things as mobile phones and two-way radios exceed 16V that the zener conducts to shunt the spike safely away. The supply is decoupled with a 47µF capacitor. Inputs to IC1a, IC2a and IC2b are 1 PC board coded 05108011, 78 x 49 mm 1 plastic utility case, 83 x 54 x 31mm 1 100mm length of 0.8mm tinned copper wire 1 12V PC-mount piezo buzzer (Altronics S 6104) 1 3-way PC screw terminal block, 5mm pitch (Altronics P 2039) 1 2-way PC screw terminal block, 5mm pitch (Altronics P 2038) 2 3-way pin headers 1 2-way pin header 3 link pins for (LK1-LK5) (DSE P 2730) 1 150mm length of 0.8mm tinned copper wire Semiconductors 1 4093 quad Schmitt NAND gate (IC1) 1 4030 quad XOR gate (IC2) 1 7555 timer (IC3) 1 BC328 PNP transistor (Q1) 1 16V 1W zener diode (ZD1) 2 1N914 signal diodes (D1,D2) 1 1N4004 diode (D3) Capacitors 1 47µF 16VW PC electrolytic 2 10µF 16VW PC electrolytic 1 1µF 16VW PC electrolytic 1 0.01µF (code 10n or 103) Resistors (0.25W, 5%) 4 1MΩ z 470kΩ 3 100kΩ 2 10kΩ 1 10Ω protected against transient voltages using the internal transient protection diodes and the series 100kΩ resistance at each input. The 1MΩ resistors at the lights, door switch and ignition inputs to IC2a, IC2b and IC1a tie these either high or low via the links LK1-LK4 for IC2a and IC2b and low for IC1a. This RESISTOR COLOUR CODES    No. Value   4  1MΩ    1   470kΩ    3   100kΩ    2   10kΩ    1   10Ω 4-Band Code (1%) brown black green brown yellow violet yellow brown brown black yellow brown brown black orange brown brown black black brown 5-Band Code (1%) brown black black yellow brown yellow violet black orange brown brown black black orange brown brown black black red brown brown black black gold brown August 2001  73 The PC board fits snugly inside the specified case, albeit upside down and with its corners filed away as shown here. There is nothing to hold the board in the case – it is rigid enough once the lid is screwed on. prevents floating inputs before they are connected to the car’s wiring. Construction The Headlight Reminder components are installed onto a PC board coded 05108011, measuring 78 x 49mm. Our design was housed in a small plastic utility case measuring 83 x 54 x 31mm. Before you start construction, inspect the PC board for shorted tracks or breaks in the copper. Compare the PC board against the published pattern to make sure it is correct. Also check that the holes are large enough for the component leads, particularly for the screw terminals. These might have to be drilled out larger because many automated PC board production processes drill all holes the same size. The corners of the PC board must be shaped as shown on the PC pattern so that it can be fitted into the box. A small “rat tail” file is ideal for this purpose. Start construction with the links and resistors, using the resistor colour code table as a guide to finding each value. You could use a digital multimeter to measure them as well. The diodes can then be inserted making sure they are installed the correct way around. IC1 and IC2 can be inserted ensuring they too are oriented correctly. SILICON CHIP And here’s how it all looks assembled, with the cut-out shown here for the five external connections. Naturally, these must be made before the board is placed inside the case and the lid and panel secured! The capacitors can be installed taking care with the electrolytics which must be oriented with the polarity as shown, as must the piezo buzzer. Now solder in transistor Q1 and the pin headers. Finally, install the screw terminals with the wire entry side facing the edge of the PC board. Testing Ensure that all the parts are installed and soldered correctly. Install the links LK2 and LK4. Now connect a 12V power supply to the +12V input and ground. Apply power and check that there is 12V between pins 14 and 7 of IC1 and IC2. IC3 should have 12V between pins 8 and1. At this stage, the outputs of IC2a and IC2b at pins 3 and 4 should be low and pin 10 of IC1a should be high. Connect up short lengths of wire to the lights, door switch and ignition inputs. Now connect the ignition lead and the door and light inputs to +12V. If you lift the ignition input connection, the alarm should sound at a 1Hz rate for about 10 seconds. Installation Before installation you will need to check how your car is wired with regard to the headlights and door switches. Gain access to the lights switch and a door switch and check the polarity when the lights are on and www.siliconchip.com.au 74  Silicon Chip +12V Lights Door Ignition Chassis when the door is opened. For the lights switch measurement, if the voltage is 12V when the headlights are on, use LK2. If the voltage is zero when the headlights are on use LK1. Similarly, for the door switch: if the measured voltage is 12V when the door is open use LK4. If the voltage is 0V when the door is open use LK3. If you do not intend to use the door switch connection use LK5 and LK3. A small rectangular cutout in one end of the case will allow the leads to enter the screw terminals. A large hole at the opposite end will be required to allow the buzzer sound to be heard. The PC board can be installed into the box by simply placing it component side down. The PC board will rest on top of the side mouldings and be held in position by the lid. When wiring use automotive wire and automotive quick connectors to make the tappings into the wiring. You can mount the headlight reminder unit anywhere under the dashboard but do not obstruct the sound outlet hole in the side of the box. Note that the circuit is powered all the time but its standby current is quite low at 200µA and this will not cause the battery to go flat. Neither, now, will leaving your SC headlights on! Full-size artwork for the front panel and PC board pattern. These can also be downloaded from the SILICON CHIP website. www.siliconchip.com.au