Silicon ChipAccurate GPS 1pps Timebase For Frequency Counters - February 2013 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Texting while driving could be prevented
  4. Feature: Replace Your Halogen Down-lights With LEDs by Leo Simpson
  5. Feature: The Historic Rubicon Hydroelectric Scheme by Dr David Maddison
  6. Project: High Performance CLASSiC DAC; Pt.1 by Nicholas Vinen
  7. Project: Do-It-Yourself Seismograph With Tsunami Alarm by Dave Dobeson
  8. Project: Mobile Phone Loud Ringer by John Clarke
  9. Project: Improved Jacob's Ladder by Leo Simpson
  10. Project: Accurate GPS 1pps Timebase For Frequency Counters by Jim Rowe
  11. Book Store
  12. Vintage Radio: More Philips Twins - the Dutch 209U and the Australian 112A by Rodney Champness
  13. Market Centre
  14. Advertising Index
  15. Outer Back Cover

This is only a preview of the February 2013 issue of Silicon Chip.

You can view 19 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 "High Performance CLASSiC DAC; Pt.1":
  • CLASSiC DAC main PCB [01102131] (AUD $20.00)
  • CLASSiC DAC revised main PCB [01102134] (AUD $25.00)
  • dsPIC33FJ128GP306T-I/PT programmed for the CLASSiC DAC v1.02 [0110213B.hex] (Programmed Microcontroller, AUD $25.00)
  • Red & White PCB-mounting RCA sockets (Component, AUD $4.00)
  • SMD parts for the CLASSiC DAC (Component, AUD $80.00)
  • CLASSiC DAC front & rear panels [01102132/3] (PCB, AUD $20.00)
  • Firmware for the CLASSiC DAC [0110213B.HEX] (Software, Free)
  • CLASSiC DAC main PCB pattern (PDF download) [01102131] (Free)
  • CLASSiC DAC front and rear panel PCB patterns (PDF download) [01102132/3] (Free)
  • CLASSiC DAC front & rear panel artwork (PDF download) (Free)
Articles in this series:
  • High Performance CLASSiC DAC; Pt.1 (February 2013)
  • High Performance CLASSiC DAC; Pt.1 (February 2013)
  • High Performance CLASSiC DAC; Pt.2 (March 2013)
  • High Performance CLASSiC DAC; Pt.2 (March 2013)
  • High-Performance CLASSiC DAC; Pt.3 (April 2013)
  • High-Performance CLASSiC DAC; Pt.3 (April 2013)
  • High-Performance CLASSiC DAC; Pt.4 (May 2013)
  • High-Performance CLASSiC DAC; Pt.4 (May 2013)
Items relevant to "Do-It-Yourself Seismograph With Tsunami Alarm":
  • Mk2 Seismograph with Tsunami Alarm PCB [21102131] (AUD $20.00)
  • PICAXE-08M BASIC source code for the Mk2 Seismograph with Tsunami Alarm [SeismographV2.bas] (Software, Free)
  • Mk2 Seismograph with Tsunami Alarm PCB pattern (PDF download) [21102131] (Free)
Items relevant to "Mobile Phone Loud Ringer":
  • Mobile Phone Loud Ringer PCB [12110121] (AUD $10.00)
  • Mobile Phone Loud Ringer PCB pattern (PDF download) [12110121] (Free)
  • Mobile Phone Loud Ringer front panel artwork (PDF download) (Free)
Items relevant to "Improved Jacob's Ladder":
  • High Energy Electronic Ignition PCB [05110121] (AUD $10.00)
  • PIC16F88-E/P programmed for the High Energy Electronic Ignition System / Jacob's Ladder [0511012A.HEX] (Programmed Microcontroller, AUD $15.00)
  • ISL9V5036P3-F085 360V, 46A IGBT for the High-Energy Electronic Ignition System (Component, AUD $10.00)
  • High Energy Electronic Ignition System Firmware (HEX/ASM - zipped) [0511012A.HEX] (Software, Free)
  • High Energy Electronic Ignition PCB pattern (PDF download) [05110121] (Free)
Items relevant to "Accurate GPS 1pps Timebase For Frequency Counters":
  • Accurate GPS 1pps Timebase PCB [04103131] (AUD $10.00)
  • VK2828U7G5LF TTL GPS/GLONASS/GALILEO module with antenna and cable (Component, AUD $25.00)
  • Accurate GPS 1pps Timebase PCB pattern (PDF download) [04103131] (Free)
Extremely accurate GPS 1pps timebase for a frequency counter Get maximum accuracy from your 12-Digit Frequency Counter using this GPS 1pps Timebase. It connects to the external timebase input of the counter and will let you achieve measurement accuracy close to that of an atomic clock. You can either build it into the frequency counter or use it as a separate module. (CERAMIC PATCH ANTENNA) 5V LK1 OUT GND GLOBALSAT EM406A GPS RECEIVER MODULE Vin Rx Tx GND 1PPS 1 1k 2 100 F 4 +5V IN 5 22k 6 10k E FASTRAX UP501 GPS RECEIVER MODULE GND Vin B/UV 1PPS SC  2013 Q2 BC328 C LK2 2.2k CON1 4 1 5 3 1PPS OUT 2 100 1 1PPS POLARITY C Q1 BC338 2.2k E 2 3 * REG1 ONLY REQUIRED FOR GPS RECEIVER MODULES REQUIRING 3.3V. USE AN LP2950-3.3 OR AN LM3940IT-3.3 4 5 6 Q1 BASE VIA 10k RESISTOR GPS 1PPS TIMEBASE LP2950-3.3 BC328, BC338 GND IN B OUT E C Fig.1: the circuit consists of the GPS receiver module itself plus a couple of transistors (Q1 & Q2) to buffer and level translate the 1Hz (1pps) pulses. Regulator REG1 is required for GPS modules that operate from 3.3V DC. A RE YOU KEEN to build the new 12-Digit High-Resolution Frequency Counter described in the December 2012 and January 2013 issues of SILICON CHIP? It’s a world-first DIY design but you will also want to get the very best accuracy to go with its 12-digit resolution. To do this, you don’t need our com74  Silicon Chip 2013 issue to publish such a device and here it is. Build it for your frequency counter and you should be able to achieve a measurement accuracy of around ±1 part in 1011! Simple circuit +3.3V B Tx 100 F 3 ALTERNATIVES Rx IN GND B (CERAMIC PATCH ANTENNA) By JIM ROWE REG1* 3.3V plex GPS-based Frequency Reference (SILICON CHIP, March-May 2007), although this can be used if you have it. If you don’t, then there’s a much simpler and cheaper approach: purchase a cheap GPS receiver with 1pps output, bung it on a small interface PCB and you get close to atomic clock precision. In fact, we promised in our January Fig.1 shows the circuit details. It looks simple but that’s because all the complex circuitry needed to receive the signals from the GPS satellites and derive the 1Hz (1pps) pulses is inside the GPS module. We are specifying either of two GPS modules which are currently available from various suppliers: the GlobalSat EM-406A module which is currently available for as little as $39.90 or the Fastrax UP501 module which is smaller but priced at $59.90. The project is also compatible with various other receiver modules, if you find the EM-406A or the UP501 hard to get. The type of GPS receiver module you’ll need is one that incorporates its own ceramic “patch” antenna for the UHF signals from the GPS satellites, while also providing an output for 1pps (pulse per second) time pulses. It can operate from a DC supply of either 5.0V or 3.3V. A few currently available modules are listed in a panel elsewhere in this article. The EM-406A has its own builtin GPS patch antenna and operates siliconchip.com.au Par t s Lis t SERIAL Tx 1PPS OUT +3.3V GND SERIAL Tx SERIAL Rx GLOBALSAT EM-406A FASTRAX UP501 Fig.2: the pin connections for the GlobalSat EM-406A and Fastrax UP501 GPS modules. Check the pin connections if you use a different module. LK1 100 F + +5V TX 5 GND 2.2k BC328 Q2 BC338 Q1 3 1PPS 100 LK2 USING EM406A GPS RECEIVER 1k + 1PPS 22k 1 UB-5 jiffy box, 83 x 54 x 31mm 1 5-pin DIN socket, PCB-mount (Altronics P1188, Jaycar PS0350) 1 5-pin DIN socket, panel mount, for frequency counter (Altronics P1178, Jaycar PS0348) 2 5-pin DIN plugs (Altronics P1150, Jaycar PP0304) 1 2-core shielded cable (Altronics W3020, Jaycar WB1504) 4 M3 x 10mm machine screws +3.3V CON1 2 GND NC Extra parts for jiffy box version FASTRAX UP501 GPS RXEMODULE MI T SP G REVIE CER 13130140 (PATCH 3 1 0 2ANT) C +V RX 6 +5V REG1 LP2950-3.3 OR LM3940IT3.3 100 F + +5V 1 TX 5 2 1PPS 4 CON1 GND GND 3 NC 2 1 Q1 RX Resistors (0.25W, 1%) 1 22kΩ 1 1kΩ 1 100Ω 1 10kΩ 2 2.2kΩ *Only if project is built inside the frequency counter **Only for a GPS module which requires a 3.3V supply +5V 4 +V 1 2 3 4 5 6 10k E MI T SP G REVIE CER 13130140 (PATCH ANT) 3102 C Capacitors 1 100µF 16V RB electrolytic (or 2 if a 3.3V supply required) All the parts fit on a PCB coded 04103131 and measuring just 66 x 46mm. Fig.3 shows the assembly details. Almost half of this tiny PCB is reserved for the GPS module itself which is usually mounted using double-sided adhesive foam. To allow for convenient connection back to the counter when it is being used remotely, we have provided space for a 5-pin mini-DIN socket (CON1) at the righthand end of the PCB. This allows you to use a cable fitted with a 5-pin DIN plug to link the GPS timebase back to the counter, at the same time providing the unit with +5V power. This socket is not needed if the PCB is fitted inside the 12-Digit Frequency Counter’s case. In this situation, the 1 2.2k GLOBALSAT EM-406A GPS RX MODULE Semiconductors 1 BC338 NPN transistor (Q1) 1 BC328 PNP transistor (Q2) 1 LP2950-3.3 (TO-92) or LM3940IT-3.3 LDO regulator** Assembly 1k LK1 to the 12-Digit Frequency Counter are positive-going? Simply because it’s the leading edges of the pulses that are locked closely to the “atomic time” provided by the GPS satellites. The counter uses the positive-going edges of the external timebase pulses to clock its main gate flipflop, so this ensures the highest measurement accuracy. 10k directly from 5V DC. It features the SiRF Star III high-performance GPS chipset, very high sensitivity and an extremely fast time to first fix (ie, from a cold start). The UP501 and other compatible GPS modules operate from 3.3V DC, so for these we have made provision for fitting a 5V-3.3V LDO (low dropout) regulator (REG1). You can use either an LP2950-3.3 regulator which comes in a TO-92 package or an LM3940IT-3.3 which comes in a TO-220 package. Apart from the power supply arrangements, there is a simple buffer and level translator for the 1Hz pulses provided by the GPS module. This uses transistors Q1 (a BC338) and Q2 (a BC328) to ensure that the 1Hz pulses fed out to the counter have a peak-to-peak amplitude of 5V, regardless of the supply voltage used by the GPS module. Link LK2 allows the 1Hz pulses to be inverted or not by the buffer, so that their “leading edges” are positivegoing regardless of their polarity out of the GPS module (some modules may output them as inverted.) Why do we need to ensure that the leading edges of the 1Hz pulses fed 5 6 BACKUP V+ 3 22k 2.2k GND 1 PCB, code 04103131, 66 x 46mm 1 GPS receiver module with in-built patch antenna & 1pps output 1 6-way SIL pin strip 2 3-way SIL pin strips 2 jumper shunts 4 M3 x 10mm untapped Nylon spacers* 4 M3 x 25mm Nylon screws* 8 M3 nuts Hook-up wire for GPS module 25 x 25mm doubled-sided adhesive foam (to secure GPS module) 1PPS OUT BC328 Q2 5 6 5 4 3 2 1 4 SERIAL Rx 4 (PATCH ANTENNA AT TOP) (PATCH ANTENNA AT TOP) 100 F Vin (+5V) 3 BC338 GND 2 2.2k 1 1PPS 100 LK2 USING UP501 GPS RECEIVER Fig.3: follow these two diagrams to build the GPS 1pps Timebase. Omit CON1 if the unit is to go inside the frequency counter’s case and omit REG1 and its 100μF output capacitor if the GPS module uses a 5V supply, eg the GlobalSat EM406A. Alternatively, fit REG1 and the 100μF capacitor for the Fastrax UP501. Don’t forget to set link LK1 accordingly. siliconchip.com.au February 2013  75 IC18 TPG 74HC00 IC12 74AC10 IC11 4012B 100nF 100nF 4093B IC17 74AC74 IC13 74AC00 4518B 100nF IC9 100nF 100nF 4518B IC7 100nF IC10 100nF 100nF 74AC163 100nF 1MHz 100nF TP2 IC14 IC16 74HC160 IC15 74AC00 100nF SEL CHAN A FREQ*/PRD 74HC244 EXT/INT TB IC19 SEL CHAN B 74HC244 VC1 6-30pF 74HC161 39pF IC24 100nF TMR1 IN 8.00MHz X1 27pF D7 5819 76  Silicon Chip 74HC373 IC23 CON4 9-12V DC IN 1s 100s 100nF GROUND +5V SUPPLY 100nF WIRES CONNECTING TO GPS MINI TIME RECEIVER PCB 100nF 1PPS PULSES PIC16F877A 10s IC22 1000s Fig.4: only three leads are required to connect the timebase module to the main PCB in the frequency counter. These leads are connected directly to the GPS timebase board if it is mounted inside the counter case or run to a panel-mount DIN socket (installed on the counter’s rear panel) if the GPS timebase is mounted in a separate case (see panel). IC6 X2 32768Hz TP4 HIGH NORESOLUTION ITULOSER HGIH COUNTER RETNUOC MAIN C 2012 DRBOARD AOB NIAM 0411 tob 121111121 140top 2102 C TP1 4060B 220k 10M 39pF VC2 6-30pF D6 4093B TP5 TPG 4148 IC8 100nF 100nF 1k D5 4148 22k CON3 EXT TB IN TPG Compatible GPS Modules The following GPS receiver modules should be compatible with this unit: • GlobalSat EM-406A: 30 x 30 x 10.5mm including patch antenna. Operates from 5V DC with a current drain of 44mA. Provides a 1pps output plus a “fix” indicator LED. Rated sensitivity -159dBm. • Digilent PmodGPS: approximately 30 x 55 x 12mm including patch antenna. Operates from 3.3V DC with a current drain of 24/30mA. Provides a 1pps output plus a “fix” indicator LED. Rated sensitivity -165dBm. • RF Solutions GPS-622R: 43 x 31 x 6mm including patch antenna. Operates from 3.3V DC with a current drain of 23/50mA. Provides a 1pps output plus a “fix” indicator LED. Rated sensitivity -148dBm/-165dBm. • Fastrax UP501: 22 x 22 x 8mm including patch antenna. Operates from 3.3V DC with a current drain of 23mA. Provides a 1pps output. Rated sensitivity -165dBm. Note that for use in this project, the GPS receiver module should have a built-in ceramic patch antenna and also provide an output for the GPSderived 1Hz pulses. Not all GPS modules currently available provide both these features. GPS PCB is linked to the counter’s main PCB using three short lengths of insulated hook-up wire. Two other components shown in Fig.3 are required only if your GPS module needs a 3.3V DC supply, rather than 5V. These are REG1 and the 100µF electrolytic capacitor connected between its output and ground. If you are using the EM-406A module (which requires 5V) and you are also mounting the receiver inside the counter box, leave out CON1, REG1 and the 100µF capacitor. Conversely, install REG1 and the 100µF capacitor if you are using the UP501 GPS module. As previously stated, LK2 must be fitted in the position that provides output pulses with positive-going leading edges (see scope grab – Fig.7). Most GPS receiver modules, including those specified here, provide 1Hz pulses with this polarity anyway, so the jumper shunt will probably need to be in the upper position; ie, so that siliconchip.com.au This view shows the GPS 1pps Timebase module mounted inside the 2.5GHz 12-Digit Frequency Counter. Note that the unit must be mounted on the lid so that it sits horizontally – important for the antenna to function effectively. the pulses are taken from the non-inverting buffer output (collector of Q2). M3 x 25mm NYLON SCREWS COUNTER BOX LID Mounting Fig.5 shows how the timebase PCB is mounted inside the counter box. This is the easiest mounting option and if you’re using the EM-406 GPS module (which is quite sensitive), it and others should be perfectly workable even if you are inside a building. There are just three connections to be run to the main counter board: 1pps signal, +5V and ground (GND). Fig.4 shows the wiring details. As you can see, the ground wire connects to the ground pin just to the right of IC6, while the +5V wire connects to a PCB via to the left of IC23. The wire carrying the 1Hz pulses from the GPS receiver connects to the righthand end of the 1kΩ resistor behind CON3. On the timebase board, the +5V lead EM-406A GPS Rx MODULE Q1 M3 x 10mm NYLON SPACERS Q2 M3 NUTS DOUBLE-SIDED ADHESIVE FOAM ATTACHING MODULE TO PCB RECEIVER PCB connects to the +5V pad, the ground wire to the GND pad, and the signal lead to the “1PPS” pad. These pads are also labelled “1”, “2” and “3” (corresponding to the pin numbers for CON1, which is left out if the timebase is mounted inside the counter case). Putting it to use There are no setting-up adjustments Fig.5: the timebase module is attached to the lid of the case on M3 x 10mm untapped Nylon spacers and secure using four M3 x 25mm Nylon screws and eight M3 nuts (four used as spacers). to make before the GPS 1pps Timebase is put to use, apart from setting jumper shunts LK1 and LK2 to suit the GPS receiver module you’re using. Jumper shunt LK1 is simply placed on the right if the module needs 5V, or on the left if it needs 3.3V. In most cases, jumper LK2 will need to be placed in the “upper” position, although there may be some GPS Table 1: Resistor Colour Codes o o o o o o siliconchip.com.au No.   1   1   2   1   1 Value 22kΩ 10kΩ 2.2kΩ 1kΩ 100Ω 4-Band Code (1%) red red orange brown brown black orange brown red red red brown brown black red brown brown black brown brown 5-Band Code (1%) red red black red brown brown black black red brown red red black brown brown brown black black brown brown brown black black black brown February 2013  77 (UB-5 JIFFY BOX) 15mm DIAMETER HOLE CUT IN END OF BOX TO ALLOW ENTRY OF DIN PLUG INTO CON1 CON1 UB-5 BOX LID EM-406A GPS Rx MODULE BOX ASSEMBLY SCREWS RECEIVER PCB Q1 Q2 M3 NUTS M3 x 10mm SCREWS Fig.6: here’s how to install the GPS 1pps timebase module in a UB-5 jiffy box. The module (with CON1 installed) mounts on the case lid. Building A Standalone 1pps Timebase Some GPS receivers may not have sufficient sensitivity to work indoors. In that case, it will be necessary to install the timebase PCB in a small utility box which can then be positioned on a window sill (or wherever) for better satellite-reception. The unit can then be connected to the counter via a cable fitted with DIN plugs at either end. Fig.6 shows how the unit is mounted inside a UB-5 jiffy box. You will need to mount DIN socket CON1 on the PCB, then attach the PCB to the case lid using four M3 x 10mm machine screws and eight nuts (four used as spacers). A 15mm-diameter hole will then have to be drilled and reamed in one end of the box, in line with the DIN socket (ie, to Fig.7: the 1Hz pulses from the timebase must have positive-going leading edges as shown on the upper trace of this scope grab. In most cases, the GPS module will provide pulses with this polarity, so link LK2 will have to go in the upper (noninverting) position. If not, then set LK2 to the lower (inverting) position. modules which need it in the lower position. If you are in doubt about this and you have access to a scope, use it to check the polarity of the 1Hz output pulses. The 100ms-wide pulses should be positive-going, as shown in Fig.7. If they’re not, the remedy is to fit LK2 to the lower position. 78  Silicon Chip Alternatively, if you don’t have a scope you can easily determine the correct position for LK2 by trial and error. Be aware that most GPS receiver modules will take some time to achieve a “fix” from the GPS satellites after they are powered up. This allow plug entry). In addition, a matching 5-pin DIN socket should be mounted on the rear panel of the counter and its terminals run to the corresponding pads on the main counter PCB. Finally, you will have to make up a suitable cable with DIN plugs to connect the two units together. This can be made up using shielded 2-core audio cable (red lead = +5V, white lead = 1pps signal and shield = GND). start-up period can be as long as 70-80 seconds, depending on the GPS module’s sensitivity, your location and the signal strength from the GPS satellites. This means that until the module does achieve a fix, the 1Hz pulses from it will either be non-existent or “free running” – ie, not locked to the GPS time reference. So don’t expect to be able to make high-accuracy measurements right from switch-on. You’ll need to wait a couple of minutes while the GPS receiver locks on to the GPS signals. While you are waiting and assuming that you have selected the External Timebase option, the 12-digit counter will not usually show any measurement. Instead, it will continue to display “SILICON CHIP” until pulses are received from the timebase. If you are impatient and don’t want to wait for the GPS 1pps timebase to achieve a fix each time you switch the counter on, there’s a remedy for this too: keep it permanently powered from a separate 5V DC plugpack. That way, the GPS-locked 1Hz timebase pulses will be available to the 12-Digit Frequency Counter whenever you want SC to use it. siliconchip.com.au