Silicon ChipBuild A Radar Speed Gun, Pt.1 - November 2006 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Do people really want a high-performance valve amplifier?
  4. Review: Sony Alpha A100 Digital SLR Camera by Barrie Smith
  5. Review: JVC KD-AVX2 Car Entertainment System by Julian Edgar
  6. Project: Build A Radar Speed Gun, Pt.1 by Jim Rowe
  7. Project: Build Your Own Compact Bass Reflex Loudspeakers by Aaron Waplington
  8. Project: Programmable Christmas Star by David Meiklejohn
  9. Review: Bitscope BS310 Mixed Signal Oscilloscope by Peter Smith
  10. Salvage It: Using the convex lenses from car headlights (bike light) by Julian Edgar
  11. Project: DC Relay Switch For High-Current Loads by John Clarke
  12. Project: LED Tachometer With Dual Displays, Pt.2 by John Clarke
  13. Project: PICAXE Net Server, Pt.3 by Clive Seager
  14. Vintage Radio: Radio Corporation’s WS108 military transceiver by Rodney Champness
  15. Book Store
  16. Advertising Index
  17. Outer Back Cover

This is only a preview of the November 2006 issue of Silicon Chip.

You can view 37 of the 112 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 Radar Speed Gun, Pt.1":
  • PCB patterns for the Radar Speed Gun (PDF download) [DOPPLR1A/DOPPLR1B] (Free)
  • Radar Speed Gun front panel artwork (PDF download) (Free)
Articles in this series:
  • Build A Radar Speed Gun, Pt.1 (November 2006)
  • Build A Radar Speed Gun, Pt.1 (November 2006)
  • Build A Radar Speed Gun, Pt.2 (December 2006)
  • Build A Radar Speed Gun, Pt.2 (December 2006)
Items relevant to "DC Relay Switch For High-Current Loads":
  • PCB pattern for the DC Relay Switch (PDF download) [05211061] (Free)
Items relevant to "LED Tachometer With Dual Displays, Pt.2":
  • LED Tachometer Control PCB [05111061] (AUD $10.00)
  • LED Tachometer Display PCB [05111062] (AUD $5.00)
  • PIC16F88-I/P programmed for the LED Tachometer [ledtacho.hex] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the LED Tachometer [ledtacho.hex] (Software, Free)
  • PCB patterns for the LED Tachometer (PDF download) [05111061/2] (Free)
  • LED Tachometer display mask (PDF download) (Panel Artwork, Free)
Articles in this series:
  • LED Tachometer With Dual Displays, Pt.1 (October 2006)
  • LED Tachometer With Dual Displays, Pt.1 (October 2006)
  • LED Tachometer With Dual Displays, Pt.2 (November 2006)
  • LED Tachometer With Dual Displays, Pt.2 (November 2006)
Items relevant to "PICAXE Net Server, Pt.3":
  • PICAXE-28X BASIC source code for the PICAXE Net Server (Software, Free)
Articles in this series:
  • PICAXE Net Server, Pt.1 (September 2006)
  • PICAXE Net Server, Pt.1 (September 2006)
  • PICAXE Net Server, Pt.2 (October 2006)
  • PICAXE Net Server, Pt.2 (October 2006)
  • PICAXE Net Server, Pt.3 (November 2006)
  • PICAXE Net Server, Pt.3 (November 2006)
  • PICAXE Net Server, Pt.4 (December 2006)
  • PICAXE Net Server, Pt.4 (December 2006)

Purchase a printed copy of this issue for $10.00.

Build Your Own Radar Speed Gun, If you’re into any kind of racing – like cars, bikes, boats or even horses – this project is for you. It’s a microwave Doppler speed radar system, similar to the expensive gear used by traffic police, only much cheaper. It can read directly in km/h or mph for speeds up to 250km/h+. MOST OF US ARE familiar with the radar speed guns used by traffic police to detect speeding motorists. If you’ve been caught speeding yourself and have had to pay a hefty fine, you probably don’t want to know any more about them. But if you’re a car or bike racing enthusiast, you may well have wanted one of them yourself, so you could measure the speed of cars or bikes. In these articles we’re going to show 26  Silicon Chip you how to build a Radar Speed Gun of your own – for much less than the cost of a professional unit. It can measure the speed of cars, bikes, horses, runners or even boats with a bit of ingenuity. It’s compact and light in weight, can read directly in either km/h (kilometres/hour) or mph (miles per hour), and operates from 12V DC. There’s also a hold switch to enable you to freeze the reading. The system is in two parts. There is a microwave head unit in a small shielded box which is mounted on the underside of a cylindrical antenna housing made from two 500g coffee cans joined end-to-end, to form the radar gun assembly. This is linked by a cable to a counter/display unit housed in a UB1 jiffy box. How it works First of all, to get a good undersiliconchip.com.au How Doppler Speed Radar Works Pt.1 By JIM ROWE Fig.1: the basic principle behind a Doppler radar speed gun. standing of the basic principles of Doppler speed radar, please read the explanation and look at the diagram in the accompanying panel. Once you have that under your belt, you will be siliconchip.com.au When an ambulance, fire engine or police car is speeding towards you with its siren going, the frequency (or pitch) of the siren sounds higher than its actual frequency. That’s because as the vehicle is moving towards you, it tends to “catch up” with the sound waves – effectively compressing them. Then when the vehicle is speeding away from you, the frequency of the siren sounds lower than its actual frequency, because the movement of the vehicle is now effectively stretching the sound waves. This is the so-called Doppler Effect, named after Dutch physicist Christian Doppler who first explained it around 1842. This principle is used to measure the speed of cars, bikes, boats and other vehicles by Doppler speed radars, such as the radar guns used by traffic police to detect speeding motorists. The basic idea is shown in the diagram of Fig.1. The radar gun is fixed in position and transmits a narrow beam of microwave radiation (with frequency Fo) towards the moving vehicle. This outgoing radiation propagates towards the vehicle at the normal speed of electromagnetic (EM) radiation in air – at 299,792,458m/s (metres per second); ie, the same as the speed of light (c). Because the vehicle is moving towards the radar gun, the effective frequency of the microwave beam it “sees” is a little higher than Fo. In fact, it’s actually Fo + (Fo . v)/c where “v” is the vehicle speed. This is the frequency of the microwave signal reflected from the vehicle, back towards the radar gun. When this reflected signal is detected by the microwave gun, its frequency is higher again by the same amount (because it is being effectively transmitted by the moving vehicle). As a result, the frequency of the reflected microwave signal returning to the radar gun is given by: Fr = Fo + 2(Fo . v )/c In the radar gun, the reflected signal is heterodyned with the outgoing microwave signal, which generates the difference frequency between the two. This difference frequency is given by: Fd = Fo - [Fo + 2(Fo . v)/c]     = 2(Fo . v)/c    = v(2Fo/c) This is the Doppler frequency and it is directly proportional to the vehicle speed. For example, if we use a microwave frequency of 2.45GHz, the Doppler frequency turns out to be 16.34 times the vehicle speed in metres/second. So if the vehicle is travelling at 60km/h, which is 16.6m/s, the Doppler frequency will be close to 271Hz. If the vehicle is moving away from the radar gun instead of towards it, the reflected microwave signal returning to the radar gun has a frequency which is lower than the outgoing frequency by exactly the same amount. So when the two are heterodyned together in the radar gun as before, the Doppler frequency is exactly the same. The radar gun is therefore able to measure the speed of the vehicle quite accurately by feeding the Doppler frequency to a counter. This counter can be made to indicate the speed directly in km/h (or mph) by adjusting its timebase or gating time to allow for the scaling factor of 2Fo/c. November 2006  27 Fig.2: this diagram shows the circuit blocks used in the Radar Speed Gun. It consists of two main sections: a microwave head section and a counter & display section. ready to follow the block diagram of the project itself, shown in Fig.2. As you can see, the microwave head section has a small UHF oscillator to generate a low-power continuous microwave signal with a frequency of 2.45GHz (2450MHz). This signal is then passed through a UHF amplifier, to achieve a power level which is still low but sufficient to give the unit good Doppler range and sensitivity. The amplified 2.45GHz signal (Fo) is then fed out to the microwave antenna, which is just a very small 1/4-wave “whip” inside the coffee-can gun barrel. The 2.45GHz energy radiated from the antenna is then directed out of the open end of the barrel, towards the vehicle we wish to measure. Microwave energy reflected back from the vehicle returns down the barrel to the antenna and is received as a signal with a frequency Fr which will be higher or lower than the outgoing 2.45GHz signal, depending on whether the vehicle is moving towards the radar gun or away from it. This received signal Fr is then fed into a mixer along with the original signal Fo. As a result, the mixer’s output contains the difference between Fr and Fo (ie, either Fo - Fr or Fr - Fo). This is the Doppler signal, which is quite low in amplitude but its frequency is directly proportional to the vehicle’s speed. It is then passed through a simple audio amplifier stage (the Doppler preamp) to boost it in level before sending it down the cable to the counter/display section. In the counter/display section, the Doppler signal is amplified and passed through an LP (low-pass) filter and then converted into a train of narrow pulses to give it a digital waveform. Its frequency is then measured and displayed on the 3-digit LED readout. The counter’s gating signal is derived from a 38kHz crystal oscillator via a frequency divider chain, programmed to produce the correct gating time to compensate for the Doppler Fig.3: the microwave head section uses a 2.45GHz oscillator based on transistor Q1. This drives a microstrip line, after which the signal is amplified by IC1 and fed to the antenna. The reflected signal is first fed to a mixer stage D1 to produce the Doppler signal and this is amplified by transistor Q2 and fed to pin 3 of CON1. 28  Silicon Chip siliconchip.com.au Parts List Microwave Head Unit 1 PC board, code DOPPLR1a, 51 x 64mm (EC8194) 1 piece of 0.3mm brass sheet, 89 x 76mm, for shield box 2 500g instant coffee tins, 129mm diameter x 173mm long (with one plastic cap, see text) 1 35mm length of 1.25mm diameter copper wire 1 ADCH-80A broadband RF choke (RFC1) 1 PC-mount type A USB connector, (CON1) Semiconductors 1 ERA-2SM wideband UHF amplifier (IC1) 1 BFP182T UHF NPN transistor, SOT-143 package (Q1) 1 PN100 NPN transistor (Q2) 1 1PS70SB82 UHF Schottky diode, SOT-323 package (D1) 1 1N4148 diode (D2) Capacitors 1 220mF 16V RB electrolytic 2 1mF 25V tantalum 4 10nF multilayer monolithic ceramic 5 10nF X7R ceramic, 1206 SMD package 1 1nF COG ceramic, 1206 SMD package Resistors (0.25W carbon composition, 1% unless specified) 1 1.5MW 1 470W 2 10kW 2 100W 1 1kW 1 100W 0805 SMD package frequency/speed scaling factor – and thus give a readout directly in km/h or mph. The divider programming is normally set for a gating time of 220ms which gives a readout in km/h. But if a readout in mph is needed instead, three short tracks on the display PC board can be cut and three alternative links fitted to change the divider programming for a gating time of 137ms. Microwave head circuit Now that you have an overall view of what happens inside the Radar Speed Gun, let’s work through the siliconchip.com.au Counter/Display Unit 1 PC board, code DOPPLR2a, 84 x 148mm (EC8195) 1 UB1 Jiffy box (158 x 95 x 53mm) 8 PC pins 1 mini rocker switch 1 35 x 53mm piece of red perspex sheet 4 25mm long M3 tapped spacers 4 6mm long M3 countersink head machine screws 4 6mm long M3 round head machine screws 1 38kHz mini quartz crystal (X1) 1 PC-mount type A USB connector (CON1) 1 PC-mount 3.5mm stereo socket (CON2) 1 PC-mount 2.5mm concentric DC connector (CON3) 4 14-pin DIL IC sockets 4 16-pin DIL IC sockets 1 USB Type A to Type A cable Semiconductors 3 FND500 common cathode LED displays (DISP1,DISP2,DISP3) 1 LM324 quad op amp (IC1) 1 4093B quad Schmitt NAND gate (IC2) 1 4027B dual JK flipflop (IC3) 1 4553B 3-decade counter (IC4) 1 4511B BCD to 7-segment decoder (IC5) 1 4069 hex inverter (IC6) 1 4020B 14-stage binary counter (IC7) 1 4073B triple 3-input AND gate (IC8) 3 PN200 PNP transistors (Q1,Q2,Q3) 1 PN100 NPN transistor (Q4) 1 1N4004 silicon diode (D1) 1 1N4148 signal diode (D2) Capacitors 1 2200mF 16V RB electrolytic 1 220mF 16V RB electrolytic 2 100mF 16V RB electrolytic 2 47mF 16V RB electrolytic 3 10mF 16V RB electrolytic 6 100nF multilayer monolithic ceramic 1 100nF MKT metallised polyester 2 47nF MKT metallised polyester 1 22nF metallised polyester 1 10nF metallised polyester 1 4.7nF metallised polyester 1 3.3nF metallised polyester 1 2.2nF metallised polyester 2 1nF metallised polyester 1 330pF disc ceramic 2 27pF NPO disc ceramic Resistors (0.25W, 1% unless specified) 1 2.2MW 0.5W carbon film 1 1MW 2 4.7kW 1 330kW 3 1kW 6 100kW 7 680W 4 47kW 1 470W 2 22kW 1 100W 4 10kW 2 47W 1 6.8kW 1 2kW horizontal trimpot (VR1) Where To Buy A Kit This project was sponsored by Jaycar Electronics and they own the design copyright. Kits will be available from Jaycar stores and dealers. Features & Specifications • A compact handheld Doppler speed radar system operating on a frequency close to 2.45GHz. Range is 200+ metres for a family sedan. • Can be set to read directly in kilometres/hour (km/h) or miles/hour (mph), to over 250km/h. • • • • • Resolution is 1km/h or 1mph with an accuracy of around 1%. 2.2 measurements/sec for km/h, or 3.6 measurements/sec for mph. Measured speed is displayed on a 3-digit LED display. Hold switch lets you freeze the reading. Operates from 12V DC, current drain around 130mA. November 2006  29 circuit diagrams to give you a more detailed insight. First, we’ll look at the circuit of the microwave head section – see Fig.3. The 2.45GHz oscillator is formed by the circuitry around Q1, a BFP182T NPN planar UHF transistor. This comes in a very small SOT-143 surfacemount package and has a transition frequency (ft) of over 5GHz, making it suitable for an oscillator operating at 2.45GHz. Here we use it in what is 30  Silicon Chip essentially a Colpitts circuit, with the oscillation frequency determined by the microstrip line connected to the collector. A small amount of 2.45GHz energy from the oscillator is coupled into a second microstrip line running close by and parallel to the collector line. This coupled energy is then fed to the input of IC1, which is a Mini Circuits ERA-2SM wideband UHF amplifier in a very small “pill” SMD package with four leads (two of which are grounded). Boosting the signal IC1 provides a gain of about 12dB, boosting the 2.45GHz signal to the right level for feeding to the antenna. Pin 3 of IC1 is both its output pin and its power supply pin. DC power is fed to it via a 100W bias resistor and RFC1, a special UHF choke. The amplified RF energy is coupled out via a 10nF siliconchip.com.au Fig.4: the counter and display circuit. The incoming signal from the head unit is amplified and filtered using op amps IC1a-IC1d and the resulting signal then used to drive the frequency counter section (IC4, IC5 & the three 7-segment displays). IC6b, crystal X1, IC7, IC8 & IC3 form the 38kHz oscillator and timebase divider circuit for the counter. capacitor, to a third and quite short microstrip line, which takes it to the antenna. The antenna is a 30mm length of 1.3mm copper wire attached to the end of this third microstrip line, positioned at the correct point inside the Radar Gun’s coffee-can barrel to ensure that the 2.45GHz energy is radiated away in a reasonably narrow beam. The microwave energy reflected from the moving vehicle re-enters the siliconchip.com.au barrel and reaches the antenna, which now acts as a receiving antenna. So a small amount of this reflected energy passes back down the antenna feed microstrip line, where it enters mixer diode D1, together with some of the original 2.45GHz energy from IC1. D1 is a 1PS70SB82 Schottky diode in a very small SOT-323 SMD package and with very low capacitance, making it suitable for use in UHF mixers. Here its mixing action results in the Doppler difference frequency appearing across its 1kW load resistor, with all of the UHF signals and mixing products conducted to earth via a 1nF bypass capacitor. The Doppler audio signal from the mixer is then coupled via a 1mF capacitor to the base of transistor Q2, a common emitter amplifier stage. The amplified Doppler signal appears at the collector of Q2 and is coupled via a second 1mF capacitor to November 2006  31 The microwave head section is built onto a small double-sided PC board. This mounts vertically under the barrel assembly with its antenna protruding into the cavity. This is the prototype counter & display board. The full construction details are in Pt.2. pin 3 of CON1, a USB Type A connector used to mate with the cable linking the microwave head with the counter/ display section. The same cable is used to provide the microwave head with +7.5V DC from pin 2 of CON1. Counter/display circuit Fig.4 shows the counter/display circuit. As shown, the Doppler signal from pin 3 of CON1 is first fed to a lowpass filter stage based on op amp IC1a. 32  Silicon Chip It then passes to IC1b, which is a noninverting amplifier stage with a fixed gain of 101 times, as set by the 1MW and 10kW feedback divider resistors. The amplified Doppler signal from IC1b then passes through a high-pass filter stage based on IC1c, to filter out any low-frequency noise which may still be present. The output of IC1c is basically an amplified and cleaned-up version of the Doppler signal, which is now sent in two directions. One is via the 6.8kW resistor to a headphone driver stage using transistor Q4, which allows you to monitor the Doppler signals with a pair of headphones if you wish. This can help in aiming the radar gun at the particular vehicle or object whose speed you want to measure. The second and main path of the Doppler signal from IC1c is to the input of IC1d, which provides further gain. IC1d’s gain can be adjusted from about 20-220 times using trimpot VR1. This allows you to adjust the sensitivity of the Radar Speed Gun, depending on whether the object being measured is close or further away. From IC1d, the boosted Doppler signal is passed through a passive lowpass filter formed by a 10kW resistor and 10nF capacitor, and is then fed into a pulse-forming circuit based on Schmitt NAND gates IC2a and IC2b. The signal emerges from pin 4 of IC2b as a train of narrow (300ms) negativegoing pulses of the same frequency but with an amplitude of about 11.4V peak-to-peak. This “digital” version of the Doppler signal becomes the input for the frequency counter section and can also be monitored using an oscilloscope at test point TP3. The frequency counter is based on IC4, a 4553B 3-decade BCD counter with built-in output latches and display multiplexing. It is coupled to three 7-segment LED displays via IC5, a 4511B BCD-to-7-segment decoder which drives the displays. siliconchip.com.au The digit select outputs from IC4 (pins 2, 1 & 15) are used to turn on each display digit at the correct time via driver transistors Q1, Q2 & Q3. As noted earlier, the counter’s timebase signals are derived from a 38kHz crystal oscillator. The oscillator uses IC6b, part of a 4069 unbuffered hex inverter. Two sections of the same IC (IC6d and IC6c) are used as buffers for the 38kHz clock signal, one to drive the programmable timebase divider and the other to drive test point TP1. The timebase divider is IC7, a 4020B 14-stage binary counter, together with triple AND gate IC8 (a 4073B), used for reset gating to achieve the desired division ratios. Links LK1-LK3 can be used to change the division ratio between 4185:1 (for readings in km/h) and 2601:1 (for mph). The three links are short tracks on the PC board for default readings in km/h, relevant to users in Australia and New Zealand. To change the divisor settings over for readings in mph, simply cut the tracks under the PC board and fit jumper shunts or wire links in the three “mph” link positions instead. Whichever setting has been select­ ed, the timebase pulses from the divider can be monitored at test point TP2. For the default km/h setting, the pulses at TP2 will have a frequency of 9.0778Hz, while for the mph setting, they’ll be at 14.6103Hz. The timebase pulses are used to toggle the two flipflops in IC3, a 4027B dual JK flipflop. The two flipflops are cascaded and, along with gates IC2c and IC2d, run as a simple sequencer for controlling the counter. The output of IC3a is used directly to control the clock input of IC4 (pin 11) and also to gate the Q-bar output of IC3b via IC2d to produce the latch enable signal for IC4 (pin 10). The LE A plastic dust cap fits over the end of the barrel assembly to keep out debris and protect the microwave “whip” antenna. signal transfers each count into IC4’s output latches at the end of each gating period. The output of IC3a is also used to gate the Q output of IC3b via IC2c, to produce (after differentiation) a reset pulse for IC4’s counters (pin 13). The frequency counter therefore runs continuously in a count/latch enable/reset cycle at a rate of 2.2 measurements per second for km/h readings or 3.6 measurements per second for mph readings. The Hold switch to freeze the reading grounds the “K” input (pin 11) of IC3b to disable the flipflop and hold the present reading in the counter. The complete circuit operates from 12V DC and this is applied to the counter/display unit via connector CON3. The total current drain is about 130mA. You can use a pack of eight series-connected C-size alkaline cells or a small 12V sealed lead-acid (SLA) battery like the compact 1.3Ah unit sold by Jaycar as SB-2480. The latter will run the Radar Speed Gun for about 10 hours on a single charge. Construction The construction details are all in Pt.2. Note, however, that the Jaycar kit will not include the two coffee cans that are used to make the Radar’s antenna barrel. So you might want to visit your local supermarket to buy a couple of cans of el-cheapo instant coffee. If possible, get one can with a push-on plastic cap, because this comes in handy as a dust cap for the open front end of the antenna barrel. Alternatively, the plastic top of a bulk CD container can be used as a dust cap, although it won’t be as tight a fit SC as a cap supplied with a can. WIN ME! Commence a new subscription (or renew an existing one) between now and Christmas and you’ll go in the draw to win a pair of these superb M6 bass-reflex kit speakers, valued at $599 – as featured in this issue – courtesy of theloudspeakerkit.com See page 61 for full details siliconchip.com.au SILICON CHIP www.siliconchip.com.au November 2006  33