Silicon ChipSpeed Alarm For Cars, Pt.2 - December 1999 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: High definition TV not wanted in Australia
  4. Feature: JBL's 21st Century Loudspeaker Technology by Louis Challis
  5. Review: Denon AVC-A1D AV Surround Amplifier by Leo Simpson
  6. Serviceman's Log: All the same - only different by The TV Serviceman
  7. Project: Build A Solar Panel Regulator by Design by Alan Bonnard
  8. Product Showcase
  9. Project: The PC Powerhouse by Design by Barry Hubble
  10. Project: The Fortune Finder Metal Locator by John Clarke
  11. Order Form
  12. Project: Speed Alarm For Cars, Pt.2 by John Clarke
  13. Feature: Internet Connection Sharing Using Hardware by Greg Swain
  14. Project: Railpower Model Train Controller; Pt.3 by John Clarke & Leo Simpson
  15. Vintage Radio: The Astor KM that blew its power plug off! by Rodney Champness
  16. Feature: Electric Lighting; Pt.16 by Julian Edgar
  17. Book Store
  18. Notes & Errata
  19. Feature: Index to Volume 12: January-December 1999
  20. Market Centre
  21. Advertising Index
  22. Outer Back Cover

This is only a preview of the December 1999 issue of Silicon Chip.

You can view 39 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 "Build A Solar Panel Regulator":
  • Solar Panel Regulator PCB pattern (PDF download) (Free)
Items relevant to "The PC Powerhouse":
  • PC Powerhouse PCB pattern (PDF download) [12112991] (Free)
Items relevant to "The Fortune Finder Metal Locator":
  • Fortune Finder Metal Locator PCB pattern (PDF download) [04303001] (Free)
  • Fortune Finder Metal Locator panel artwork (PDF download) (Free)
Items relevant to "Speed Alarm For Cars, Pt.2":
  • PIC16F84(A)-04/P programmed for the Speed Alarm for Cars [SPEED254.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F84 firmware and source code for the Speed Alarm for Cars [SPEED254.HEX] (Software, Free)
  • Speed Alarm for Cars PCB patterns (PDF download) [05310991/2] (Free)
  • Speed Alarm for Cars panel artwork (PDF download) (Free)
Articles in this series:
  • A Speed Alarm For Cars; Pt.1 (November 1999)
  • A Speed Alarm For Cars; Pt.1 (November 1999)
  • Speed Alarm For Cars, Pt.2 (December 1999)
  • Speed Alarm For Cars, Pt.2 (December 1999)
Items relevant to "Railpower Model Train Controller; Pt.3":
  • Railpower PCB pattern (PDF download) [09308991] (Free)
  • Railpower panel artwork (PDF download) (Free)
Articles in this series:
  • Build The Railpower; Pt.1 (October 1999)
  • Build The Railpower; Pt.1 (October 1999)
  • Railpower Model Train Controller; Pt.2 (November 1999)
  • Railpower Model Train Controller; Pt.2 (November 1999)
  • Railpower Model Train Controller; Pt.3 (December 1999)
  • Railpower Model Train Controller; Pt.3 (December 1999)
Articles in this series:
  • Understanding Electric Lighting; Pt.1 (November 1997)
  • Understanding Electric Lighting; Pt.1 (November 1997)
  • Understanding Electric Lighting; Pt.2 (December 1997)
  • Understanding Electric Lighting; Pt.2 (December 1997)
  • Understanding Electric Lighting; Pt.3 (January 1998)
  • Understanding Electric Lighting; Pt.3 (January 1998)
  • Understanding Electric Lighting; Pt.4 (February 1998)
  • Understanding Electric Lighting; Pt.4 (February 1998)
  • Understanding Electric Lighting; Pt.5 (March 1998)
  • Understanding Electric Lighting; Pt.5 (March 1998)
  • Understanding Electric Lighting; Pt.6 (April 1998)
  • Understanding Electric Lighting; Pt.6 (April 1998)
  • Understanding Electric Lighting; Pt.7 (June 1998)
  • Understanding Electric Lighting; Pt.7 (June 1998)
  • Understanding Electric Lighting; Pt.8 (July 1998)
  • Understanding Electric Lighting; Pt.8 (July 1998)
  • Electric Lighting; Pt.9 (November 1998)
  • Electric Lighting; Pt.9 (November 1998)
  • Electric Lighting; Pt.10 (January 1999)
  • Electric Lighting; Pt.10 (January 1999)
  • Electric Lighting; Pt.11 (February 1999)
  • Electric Lighting; Pt.11 (February 1999)
  • Electric Lighting; Pt.12 (March 1999)
  • Electric Lighting; Pt.12 (March 1999)
  • Electric Lighting; Pt.13 (April 1999)
  • Electric Lighting; Pt.13 (April 1999)
  • Electric Lighting, Pt.14 (August 1999)
  • Electric Lighting, Pt.14 (August 1999)
  • Electric Lighting; Pt.15 (November 1999)
  • Electric Lighting; Pt.15 (November 1999)
  • Electric Lighting; Pt.16 (December 1999)
  • Electric Lighting; Pt.16 (December 1999)

Purchase a printed copy of this issue for $10.00.

BUILDING THE Speed Alarm Last month, we gave the circuit details of our new compact Speed Alarm. This month, we show you how to build it and give the installation details. We also show you how to fit the speed sensor. Pt.2: By JOHN CLARKE Lack of space prevented us from describing the power supply circuit for the Speed Alarm last month, so we’ll give a brief rundown on how this works before moving on to the construction. You will need to refer back to Fig.1 on page 19 of the November issue to see the circuit details. As shown, a +12V rail is derived 54  Silicon Chip from the vehicle’s battery via the ignition switch. A 10Ω 1W resistor and 47µF capacitor decouple the supply, while 16V zener diode ZD1 protects the circuit from transient voltage spikes above 16V. The decoupled ignition supply voltage is fed to regulator REG1, which provides a +5V rail. This rail is then used to power all the circuitry with the exception of IC2 which is powered directly from the decoupled +12V rail. A second 47µF capacitor plus several 0.1µF capacitors are used to decouple the regula­tor’s output. OK, so much for the circuitry. Of course, most of the clever stuff takes place inside the PIC16F84 micro­ controller under software control. For a broad overview of how this software works, take a look at the accompanying panel. Construction Fortunately, you don’t have to understand how the software works to build this project. Instead, you just buy the ready-programmed PIC chip and “plug it in”. As mentioned earlier, all the parts 7-WAY SOCKET 8-WAY SOCKET BC328 7 x 150 BC328 BC328 2.2k 0.1 D3 D4 47F TO COIL (L1) 15pF 680 22k ZD1 XTAL 1 REG1 7805 # SOLDER XTAL BODY TO WIRE 1 680 1 15pF # 680 500k 2.2k IC2 LM358 VR1 Q2 0.1 Q3 IC1 PIC16F84 Q1 Q4 BC338 0.1 2.2k 1M 10 1W +12V VIA IGNITION SWITCH 2 x 47F 1k CHASSIS 7-WAY SOCKET 560 7-WAY PIN HEADER* 8-WAY PIN HEADER* 0.1 LED1 A K A K LED4 DISPLAY 3 DISPLAY 2 680 A K S3 LED3 MODE 680 S2 DOWN DISPLAY 1 D2 S4 CAL D1 LDR1 10k (except for the piezo alarm and the speed sensor) are installed on two small PC boards. These are coded 05310991 and 05310992 and are stacked together using pin headers and IC sockets. Before installing any of the parts, check both boards care­fully for etching defects. In particular, note that a hole is required just below DISPLAY3 on the display board (05310991). This must be large enough to accept a small screwdriver so that you can later adjust VR1 on the processor board. Fig.4 shows the assembly details. We suggest that you assemble the processor board (05310992) first. Begin by install­ing the seven wire links, then install the resistors, diodes D3 & D4 and zener diode ZD1. Make sure that all the diodes are orient­ed correctly and note that the seven 150Ω resistors are all mounted end on. Next solder in a socket for IC1 (but don’t install the IC just yet), then solder IC2 in place. Take care to ensure that pin 1 of IC2 is nearest to the lefthand side of the board. REG1 can now be installed with its metal tab flat against the board and with its leads bent at rightangles so that they pass through their respective mounting holes. Note that the hole in its metal tab must accurately align with the board mounting hole – see Fig.4. Next, install the capacitors in the locations shown. Watch the orientation of the electrolytic types and note the following points: (1) the two 47µF capacitors below REG1 have their leads bent at right­ angles, so that the capacitors lie horizontally over REG1’s leads (see photo); (2) the 47µF capacitor to the left of D3 & D4 has its leads bent at right­angles, so that it lies across these two diodes. The four transistors, crystal X1 and trimpot VR1 can now be installed. You 680 A K LED2 1k PIEZO BUZZER S1 UP 1k 7-WAY PIN HEADER* * PIN HEADERS MOUNTED ON UNDERSIDE OF PC BOARD Fig.4: install the parts on the two PC boards as shown here. Note particularly the orientation of the three pushbutton switches and switch S4. The terminals of S4 must be oriented as shown. should also fit PC stakes to the board at the external wiring points. Note that transistor Q4 is a BC338 while the others are BC328s, so don’t get them mixed up. The crystal lies flat against the PC board and is secured by soldering a short length of tinned copper wire between the end of its case and an adjacent PC pad (to the right of Q2). Finally, the single in-line sockets (two 7-way and one 8-way) can be fitted. These are made by cutting 14pin and 16-pin IC sockets into single in-line strips using a sharp knife or fine-toothed hacksaw. Clean up the rough edges with a file before installing them on the PC board. Display board Now for the display board. Begin by installing the eight links, diodes D1 & D2 and the resistors, then mount the three 7-segment LED displays with Capacitor Codes    Value IEC Code EIA Code 0.1µF 100n   104 15pF  15p   15 Resistor Colour Codes  No.   1   1   1   3   3   6   1   1 Value 1MΩ 22kΩ 10kΩ 2.2kΩ 1kΩ 680Ω 560Ω 10Ω 4-Band Code (1%) brown black green brown red red orange brown brown black orange brown red red red brown brown black red brown blue grey brown brown green blue brown brown brown black black brown 5-Band Code (1%) brown black black yellow brown red red black red brown brown black black red brown red red black brown brown brown black black brown brown blue grey black black brown green blue black black brown brown black black gold brown DECEMBER 1999  55 the pin headers are installed from the copper side of the board, with their leads protruding 1mm above the surface. You will need a fine tipped soldering iron to solder the pin header leads to the copper pads on the board. It is necessary to slide the plastic spacers along the leads to give sufficient room for soldering to take place. Final assembly The display board (above) plugs into the pin header sockets on the processor board (top), to make the electrical connections between the two. Note how the three red LEDs on the display board are bent towards the pushbutton switches, to illuminate them at night. their decimal points towards bottom right. Note that seven of the links go under the displays, which is why they’re shown dotted on Fig.4. Next, install switches S1-S3, taking care to ensure that the flat side of each switch faces the direction shown in Fig.4. Switch S4 must also be oriented correctly – it must be installed so that there is normally an open circuit between its lefthand and right­hand leads (you can check this using a DMM). In practice, it’s simply a matter of installing the switch with its terminals oriented as shown on Fig.4. LEDs 2-4 can now be fitted to the board and bent towards their respec56  Silicon Chip tive switches (so that they will illuminate the mounting holes for S1-S3), as shown in one of the photographs. The tops of these LEDs should be at the same height as the top faces of the dis­plays. The LDR can be installed now. It should be mounted so that it is 2mm above the displays, while LED1 should be 3mm above the displays. It doesn’t matter which way around you install the LDR but make sure that all the LEDs are oriented correctly. You can now complete the display board assembly by fitting PC stakes to the buzzer wiring points and by installing the pin headers. Note that Work can now begin on the plastic case. First, use a sharp chisel to remove the integral side pillars, then slide the pro­cessor PC board into the case and drill two mounting holes – one through REG1’s metal tab and the other immediately below the 0.1µF capacitor on the lefthand side. This done, use an oversize drill to countersink these holes on the rear of the case, to suit the specified M3 x 6mm CSK screws. Next, remove the processor board from the case and secure it to the display board as shown in Fig.5. Be sure to use a Nylon screw in the location indicated on Fig.5, to prevent shorts between the two boards. Check that the leads from the parts on the display board do not interfere with any of the parts on the processor board. Trim the leads on the display board if necessary, to avoid this. The front panel label can now be affixed to the panel and used as a template for drilling the various holes and making the display cutout. The holes for switches S1-S3 are made slightly oversize, to take 9.5mm inside diameter translucent rings. These allow the light from the switch LEDs to form a semicircular glowing arc around each switch at night. We made the translucent rings by cutting them from the dispenser nozzles supplied with the containers used in caulking guns. Three nozzles are required and are cut to make the rings which are 11.5mm outside diameter and 2mm thick. Alternatively, you can use the plastic moulding from a PAL line socket which has a 12mm outside diameter and a 10.5mm inside dia­meter. Ream the holes in the front panel so that the rings are a tight fit. They can be held in position by applying a smear of silicone sealant around the edges before they are inserted into the holes. If you don’t wish to use the rings, The unit all fits neatly inside a compact plastic case. Note the cardboard light shield around the 7-segment LED displays. then simply make the holes about 10mm in diameter. Some light will then escape around the switches at night to indicate their positions. The display cutout is made by first drilling a series of small holes around the inside perimeter, then knocking out the centre piece and filing to a smooth shape. The cutout should be made so that the red transparent Perspex or Acrylic window is a tight fit. This window can be further secured by applying several small dabs of super glue along the inside edges. You will also have to drill holes for the alarm LED, the LDR and the piezo alarm, plus a hole to provide probe access to the calibration switch. A hole is also required in the rear of the case to accept a rubber grommet for the external leads. Once all the holes have been drilled, the piezo transducer can be affixed to the inside of the front panel using super glue and its leads connected to the PC stakes on the display board (it can be connected either way around). Note that the PC stakes will need to be trimmed close to the board, so that they don’t foul the transducer when the front panel is attached to the case. Finally, we made a cardboard 2 x 1mm PLASTIC SPACERS 6mm SPACER M3 x 15mm SCREW M3 x 15mm NYLON SCREW DISPLAY BOARD REGULATOR TAB M3 NUT PROCESSOR BOARD 6mm TAPPED SPACER REAR OF CASE M3 x 6mm CSK SCREW Fig.5: this diagram shows how the two PC boards are stacked together. Be sure to use a nylon screw as indicated, to prevent shorts between the two boards. surround for the LED displays (see photo). This prevents the switch LED lighting from encroach­ ing onto the display window at night. In addition, you may wish to apply some black paint to the links running between the displays, so that they cannot be seen during daylight hours. Speed sensor The speed sensor is made by winding 500 turns of 0.18mm enamelled copper wire onto a plastic bobbin measuring 15mm OD x 8mm ID x 5mm. Use electrical tape to secure the turns and leave 10-20mm of lead length at each end. Once the coil has been wound, solder its leads to a suit­able length of shielded cable (one lead goes to the core and the other to the shield). Secure this lead to the side of the coil with some tape, then cover the coil with silicone sealant to waterproof it. We recommend that you use the non-acid cure sili­cone sealant (eg, a roof and gutter sealant). Finally, cover the coil with a short length of heatshrink tubing and shrink it into place using a hot-air gun. The sealant should now be left to dry for about eight hours. Testing It is best to check the supply rails before plugging in the PIC micro­ DECEMBER 1999  57 How The Software Works W E WON’T GO INTO a detailed analysis of the software here – it’s much too complicated for that. However, it can be broken down into a number of easy-to-understand sections, so we can at least give a broad overview of how the software works with the aid of a couple of flowcharts. Basically, there are two separate programs in the speed alarm software and these are called MAIN and INTER. Fig.6(a) shows the flow chart for the MAIN program. This operates when the processor is reset when power is first applied. It sets up the RB0 and RA4 ports as inputs and the RB1RB7 and RA0-RA3 ports as outputs. It then reads the values stored in memory for the last speed setting, display mode and calibration and places these in working memories. Next, the program looks for a pressed Mode, Down or Up switch (these are used to change the speedometer option and repeat alarm feature, as described previously). If one of these switches is pressed, it toggles to the alternative option. The new option is then written to memory for storage. The program now calculates a value called the “speed equival­ent”. This is a value based on the current speed alarm setting. It has a value of eight per 5km/h. For example, if the speed alarm value is 10km/h, then the speed equivalent value is 16. For 60km/h, the speed equivalent value is 96. Interrupts At this point, the program looks for a switch closure and allows interrupts to occur. An interrupt causes the system to jump to a different part of the program whenever it receives an appropriate (ie, interrupt) signal. In this case, we are using two interrupts: (1) an internal signal from a timer which occurs regularly every 353µs; and (2) an interrupt at the speed sensor input. As soon as it receives a signal from either of these sources, the MAIN program is inter­rupted and goes to the INTER program. This flowchart is shown in Fig.6(b). The INTER program does a lot of work. If the interrupt is from the RB0 input (ie, from the speed sensor), it increments the pulse counter. In this way, the pulse counter counts the speed sensor pulses applied to the RB0 input. Alternatively, if the interrupt is from the timer, the program multiplexes the display so that the next display is lit and the previous one is switched off. The 7-segment display 58  Silicon Chip values on the RB1-RB7 outputs are changed accordingly. Basically, this updates the display to show the relevant values, whether in speed alarm, speedometer or off mode. In addition, if the value in the display is below 10km/h, the two lefthand digits are blanked, so that only the righthand digit is shown. Similarly, for speeds below 100, the lefthand digit is blanked and the two righthand digits show the speed. An interrupt from the timer also increases the time period counter. This counter is incremented every 353µs and its value is compared with the calibration number value (assuming that the circuit isn’t in calibration mode). The pulse counter is then reset when the time period counter equals the calibration number. The value in the pulse counter just before it is reset indicates the speed. This value is used for the speedometer mode and for comparing the vehicle speed against the alarm speed setting. What happens is that the speed equivalent value is compared with the pulse count just before reset. If the pulse counter value is equal to or greater than the speed equivalent value, it triggers the alarm output. As described previously, the speed alarm will remain on until the pulse count value drops below the speed equivalent. However, if we were to simply switch off the alarm as soon as the pulse count value was just below the speed equivalent value, we could have a situation whereby the alarm continuously turns on and off as the vehicle travels at the alarm set speed. To counteract this, we add two to the pulse count value and then compare this to the speed equivalent. When this new pulse count value is less than the speed equivalent, the alarm goes off. This provides us with a speed hysteresis of 1.25km/h, where­by the vehicle speed must drop this much below the set alarm speed before the alarm switches off. This provides us with the low threshold setting. Alternatively, the high threshold setting adds two to the speed equivalent value so that the alarm will sound when the speed is 1.25km/h above the alarm set speed. The alarm then turns off when the vehicle’s speed drops back to the alarm set speed. Calibration Let’s now backtrack to the Calibration Mode decision box in the middle of Fig.6(b). If the answer here is ‘Yes’, we allow the pulse counter to continue counting speed pulses and compare its value with the speed equivalent value. Meanwhile, the time period counter is incrementing every 353µs. When the pulse counter equals the speed equivalent value, we read the value in the time period counter and use this as the new calibration number. Note that the calibration process does not change the number of speed pulses per km/h counted in the pulse counter, as this is fixed at 8 per 5km/h. Instead, the calibration process sets the time period over which the pulse counter counts the speed pulses. Switch closures Returning now to the MAIN program, after allowing for the interrupts, the program looks for a switch closure. If there are no switch closures, the program continues looking until a switch is closed. It then detects which switch was closed and acts according­ly. If it is the Cal switch, it clears both the pulse and period counters and sets flags so that the interrupt program will know that it is in the calibration mode. The display is also set to show “CAL”. When the calibration is finished, the display may sometimes show “Err”. This means that the time period counter has overranged before the pulse counter value reached the speed equivalent value. This error message indicates that the calibration was unsuccessful. Alternatively, if calibration is successful, the display will return to the speed alarm setting and the new calibration number will be stored in the onboard EEPROM. This calibration value can be anywhere from 1 to 65,536 although in practice, it will usually be somewhere in the range from 1200 to 6500. This corresponds to speed update times of 0.4 seconds and 2 seconds, respectively. If, on the other hand, the mode switch is pressed, the dis­play will be toggled to the next mode of operation which is then stored in memory. And if the up or down switch is pressed, the speed alarm value will be either increased or decreased accord­ingly, stored in memory and a new speed equivalent value calcu­lated. Note that there are many more details concerning the soft­ware operation that we haven’t mentioned here. Readers who are interested in all the programming details can obtain a full copy of the software (called SPEED.ASM) from our website (www.sili­conchip.com.au). MAIN PROGRAM FLOWCHART MAIN INTER PROGRAM FLOWCHART INTER INITIALISE PORTS RA4, RB0 INPUT RB0 INTERRUPT INPUT RA0-RA3, RB1-RB7 OUTPUT INTERRUPT SOURCE? RB0 INCREMENT PULSE COUNTER TRANSFER EEPROM STORAGE TO WORKING RAM TIMER SHOW CURRENT MODE DISPLAY SPEED ALARM, SPEEDOMETER OR OFF LEADING ZERO BLANKING MODE SET SPEEDOMETER ON OR OFF STORE IN EEPROM IS MODE OR UP SWITCH PRESSED? NO RETURN UP INCREMENT TIME PERIOD COUNTER SET REPEAT ALARM ON OR OFF STORE IN EEPROM YES CALIBRATION MODE NO CALCULATE SPEED EQUIVALENT OF 8 PER 5km/h COMPARE PULSE COUNTER WITH SPEED EQUIVALENT ALLOW INTERRUPTS NOT EQUAL SET END OF CALIBRATION FLAG NO IS A SWITCH CLOSED RETURN COMPARE CALIBRATION VALUE WITH TIME PERIOD COUNTER EQUAL PULSE COUNT USED FOR SPEEDOMETER RETURN YES EQUAL OR MORE CAL WHICH SWITCH ON UP OR DOWN LESS ALARM CLEAR PULSE COUNTER & PERIOD COUNTER SET CALIBRATION MODE WAIT UNTIL CALIBRATION FINISHED STORE TIME PERIOD COUNTER VALUE AS CALIBRATION VALUE MODE SELECT NEXT DISPLAY MODE: SPEED ALARM SPEEDOMETER OR OFF RECALCULATE SPEED EQUIVALENT VALUE OFF RETURN LESS INCREASE OR DECREASE SPEED ALARM VALUE COMPARE PULSE COUNT WITH SPEED EQUIVALENT ADD 2 TO PULSE COUNTER COMPARE WITH SPEED EQUIVALENT EQUAL OR MORE RETURN STORE NEW VALUES IN EEPROM WAIT FOR SWITCH TO OPEN Fig.6a (left) shows the flowchart for the MAIN program, while Fig.6b (above) is the flowchart for the INTER (interrupt) software. The INTER software processes the multiplexing of the displays, the timer update function and the speed pulses. DECEMBER 1999  59 Fig.7: here are the full-size artworks for the two PC boards. Check your boards carefully before installing any of the parts. controller (IC1). To do this, first connect suitable lengths of automotive hookup wire to the +12V and GND (chassis) inputs on the back of the processor board and apply power. Now use your multimeter to check for +5V on pins 4 & 14 of IC1’s socket. If this is correct, disconnect the pow­er and install IC1, taking care to ensure that it is oriented correctly. Now reapply power – the display should light and should show 60km/h. Check that this value can be increased and decreased using the Up and Down switch­es. Now press the Mode switch. The display should show 0 and if you press the switch again, it should show three dashes. Now press the Mode switch yet again and set the display to 0 using the Down switch. The alarm should sound and the alarm LED should light after about 1.6 seconds. The alarm should now sound every 10 seconds if the display is left on 0. Note that if you select the high threshold by pressing the Down switch at power up, the alarm will not sound at the “0” speed setting. Assuming that everything works OK, you can now test the display dimming feature by placing your finger over the LDR and adjusting VR1 until the display dims. If you have a sinewave generator, there are a few more tests that can be carried out. The generator should be 60  Silicon Chip set to provide a 300mV RMS sinewave output and this output should be floating rather than having the common grounded. Alternatively, the power supply should be floating. Attach the signal generator to the coil input terminals on the speed alarm and set the mode to speedometer. The reading should be close to 100km/h per 100Hz input. You can also test the calibration operation by pressing the Cal switch when in the speed alarm display mode (it will not work in the speedometer mode). Installation Be sure to use automotive cable and connectors when in­stalling the unit into a vehicle. The +12V supply is derived via the ignition switch and MAGNETS (4) ALUMINUIM BRACKET (ATTACH TO CHASSIS) 6mm BOLT & NUT DRIVESHAFT COIL CABLE TIE 10mm MAXIMUM GAP Fig.9: the mounting details for the speed sensor. You will probably require 4-6 magnets to obtain a satisfactory update time – see text. Fig.8: the full size front panel artwork. a suitable connection can usually be made at the fusebox. Be sure to choose the fused side of the supply rail, so that the existing fuse is in series. The ground connection can be made by connecting the lead to the chassis via a solder eyelet and a self-tapping screw. Fig.9 shows the mounting details for the speed sensor. As can be seen, the magnets are attached to the driveshaft, while the pickup coil is bolted to an aluminium bracket attached to the chassis. The sensor is then connected to its inputs on the back of the processor board via the attached shielded cable, after which the PC board assembly can be finally installed in the case. Note that the magnets must all be installed with the same polarity facing outwards (ie, the magnets must all have their north pole facing outwards, or they must all have their south pole facing outwards). This can be checked by attaching the magnets together in a stack. This will either give a N-S-N-S, etc stack or a S-N-S-N, etc stack (it doesn’t matter which). The trick is to mark the outside face of the top magnet and remove it from the stack. You then mark the outside face of the next magnet and so on, until all the magnets have been marked and removed. The magnets are then all positioned on the shaft with the marked sides facing outwards and If the small internal buzzer isn’t loud enough, you can substitute an external buzzer similar to the units shown here. is operating in the alarm speed mode. In addition, if there are insufficient pulses from the speed sensor (ie, if the speed is too low), the display will show “Err” to indicate that calibration could not be achieved. By the way, do not attempt to carry out the calibration procedure on your own – it’s all too easy to have an accident if you are distracted. Instead, take an assistant with you and instruct him/her to press the Cal button when the car is travell­ing at the set alarm speed. Check that the speed alarm operates correctly after the calibration procedure. If it does, you can now check the update time. To do this, set the alarm speed to a value that’s below the current vehicle speed, then press the Down switch again. The time it now takes for the alarm to sound (ie, after pressing the switch) is the update time and should be in the range from 0.4 to 2 seconds. If it is much longer than this, you can improve the update time by increasing the number of magnets on the driveshaft. Doubling the number of magnets will half the update time, for example. Conversely, if the update time is much shorter that 0.4 seconds, you can increase it by removing magnets. When the Speed Alarm is operating satisfactorily, you can secure the magnets to the drive shaft with silicone sealant. This will prevent them from sliding out from under the cable tie. Assuming that everything is working correctly, you can now give the unit a final calibration at 100km/h (speed limits per­mitting). This will give a more accurate result than the initial low-speed calibration. Speedometer comparisons The speed sensor coil must be waterproofed before mounting it under the vehicle – see text. temporarily secured with a long cable tie (or several short cable ties joined together). Calibration As mentioned before, the unit is virtually (but not com­pletely) self-calibrating. The first step is to set the Speed Alarm to a speed within the current speed limit (eg, 60km/h). You then drive at that speed as indicated on your car’s speedometer and briefly press the Cal button using a small probe. The Speed Alarm will then automatically calibrate itself so that it matches the vehicle’s speedometer reading. During the calibration period, which should be around 0.4-2 seconds, the display shows the letters “CAL”, after which the display reverts to its normal mode. Note that calibration can only take place when the unit By the way, you may notice that your vehicle’s speedometer is not very linear compared with the very linear speedometer of the Speed Alarm (within ±1 digit on the display). On the other hand, don’t expect the Speed Alarm to indicate speeds much below 15km/h. This is because the magnets need to rotate at a reason­ably fast rate before they induce voltage pulses of sufficient amplitude in the pickup coil for reliable processing by the following circuitry. Finally, if you want to measure very low speeds, use a small magnet-to-coil gap or try using stronger magnets. SC DECEMBER 1999  61