This is only a preview of the April 2013 issue of Silicon Chip. You can view 22 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 "LED Ladybird: An Eye-Catching Electronic Beetle":
Items relevant to "High-Performance CLASSiC DAC; Pt.3":
Items relevant to "Deluxe GPS 1pps Timebase For Frequency Counters":
Purchase a printed copy of this issue for $10.00. |
By JIM ROWE
Deluxe GPS 1pps timebase
for frequency counters
Were you interested in the precision GPS timebase featured in the
February 2013 issue? That was the “no frills” version. Here we
present a Deluxe GPS 1pps Timebase which also suits our recently
described 12-Digit Frequency Counter. It not only provides the
same near-atomic-clock-accuracy 1pps pulses for the counter’s
timebase but also extracts the NMEA 0183 data stream from the
GPS satellites for processing on your PC.
M
EASUREMENT ACCURACY is
the prime reason for building
either the original no-frills version or
this new Deluxe GPS 1pps Timebase.
Either of them represents the simplest
and most economical way to match
the accuracy to the resolution of the
12-Digit High-Resolution Frequency
Counter described in the December
2012 and January 2013 issues of SILICON CHIP.
By using a GPS 1pps timebase, the
counter can achieve a measurement
accuracy approaching ±1 part in 1011.
That’s up in atomic clock territory.
Our February no-frills design comprised little more than a cheap GPS
receiver module with the all-important
1pps output, plus a handful of components to provide the module with
60 Silicon Chip
power and to buffer the output pulses.
Despite its simplicity, this first GPS
1pps Timebase works extremely well.
But while it was under development,
we also had the intention of describing this deluxe version which would
also have the NMEA 0183 stream of
navigation data. This data is provided
by virtually all low-cost GPS modules,
along with the 1pps pulses but separated from them.
So that’s the basis of new Deluxe GPS
1pps Timebase described here. The
NMEA data is fed out to a USB socket
and it’s relatively easy to analyse this
data stream and extract the current
UTC (Universal Time Co-ordinated)
and date, along with such things as
longitude, latitude, altitude and the
number of GPS satellites in view. In
addition, the PC can display the signalto-noise ratio (SNR) of the signals from
the satellites and even the quality of the
“fix” that the GPS module is currently
able to achieve using them. This helps
to confirm the accuracy and reliability
of the 1pps pulses as a timebase.
GPS clock driver
Back in the June 2009 issue of SILICHIP, we described a GPS Clock
Driver module. This took the NMEA
0183 data stream from a low-cost GPS
receiver module and made it available for driving our May 2009 6-Digit
GPS Clock. Alternatively, it could be
fed to a PC via a “legacy” serial port.
There were a number of freeware and
shareware software applications available at the time which could be used
CON
siliconchip.com.au
Par t s Lis t
The parts are all installed on a small PCB which is then mounted on the lid of a
UB3 jiffy box. The lid then acts as the base of the completed unit shown at left.
to analyse the data stream and display
much of the useful information.
So one way of improving the February 2013 GPS 1pps Timebase would be
to simply “bolt on” the relevant parts
of the June 2009 clock driver circuit, to
make the NMEA 0183 data stream from
the GPS receiver module available (as
well as the 1pps pulses). This would
allow the GPS 1pps Timebase unit to
drive the May 2009 clock or the serial
port of a PC, as well as the timebase of
the 12-Digit Frequency Counter.
The problem with this approach is
that most of today’s PCs don’t provide
an RS232 serial port; they only have
USB ports. So our deluxe unit features
a USB port as well as an RS232 port,
so it can be connected to a wide range
of computers and laptops.
This makes it easy to monitor the
receiver’s “fix” status by running a
freeware application called GPS Diagnostics 1.05 (there are many others but
we have found this one to be excellent).
As shown in the accompanying photos, the Deluxe GPS 1pps timebase is
housed in a small plastic case. It can
be powered via its USB port or from
the 12-digit Frequency Counter. The
latter approach is appropriate when
you are not using your computer to
monitor the GPS signal status.
Circuit details
Fig.1 shows the full circuit details
of the Deluxe GPS 1pps Timebase.
It’s still fairly simple but again that’s
because all the complex circuitry
needed to receive the signals from the
GPS satellites and derive both the 1pps
(1Hz) pulses and the NMEA 0183 data
siliconchip.com.au
stream from them is buried deep inside
the GPS receiver module.
We are again specifying either of
two low-cost receiver modules which
are currently available from various
suppliers: the GlobalSat EM-406A
module which is available for as little
as $39.90, or the Fastrax UP501 module which is physically 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
required is one that incorporates its
own ceramic “patch” antenna for the
UHF signals from the GPS satellites,
while also providing an output for the
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 built-on
GPS patch antenna and operates directly from 5V DC. It features the SiRF
Star III high-performance GPS chip set,
very high sensitivity and a relatively
fast time to first fix (from a cold start).
The UP501 and other compatible
GPS modules operate from 3.3V DC,
so we have made provision for fitting
a 3.3V LDO (low drop-out) regulator
(REG1) to provide this lower voltage
for modules that need it. In this case,
we are using an LP2950-3.3 regulator,
which comes in a TO-92 package.
Apart from the power supply arrangements, there is a 40106B hex
CMOS Schmitt inverter (IC1), used
for buffering both the 1pps timebase
pulses for the counter and the NMEA
1 UB3 jiffy box, 130 x 68 x 44mm
1 PCB, code 04104131, 121 x
57mm
1 GPS receiver module with in-built
patch antenna & 1pps output
4 3-pin SIL pin headers (LK1LK4)
4 jumper shunts to match
1 12MHz crystal, HC-49US (X1)
1 5-pin DIN socket, PCB-mount
(CON1)
1 DB9F socket, PCB-mount
(CON2)
1 USB type B socket, PCBmount (CON3)
1 14-pin DIL IC socket
4 M3 x 10mm tapped metal
spacers
4 self-adhesive rubber feet
8 M3 x 6mm machine screws
25 x 25mm double-sided adhesive
foam (to secure GPS module)
Semiconductors
1 40106B hex Schmitt inverter
(IC1)
1 MCP2200 USB2.0 to serial
converter (IC2)
1 LP2950-3.3 LDO regulator
(REG1*)
1 NX2301P P-channel Mosfet (Q1)
1 2N7002 N-channel Mosfet (Q2)
1 3mm green LED (LED1)
1 3mm red LED (LED2)
Capacitors
2 10µF 16V RB electrolytic
1 470nF MMC
2 100nF MMC or MKT
1 33pF NP0 ceramic
1 15pF NP0 ceramic
Resistors (0.25W 1%)
1 47kΩ
3 470Ω
1 10kΩ
1 22Ω
1 1kΩ
*Only required if you are using
a GPS module which requires a
3.3V supply
0183 data stream. IC1c is the buffer
for the NMEA data, with its output
going to pin 2 of CON2. The other five
inverters in IC1 are used for the 1pps
pulse buffer and as a level translator,
with IC1a used as an optional inverter
to restore pulse polarity if necessary.
As shown, IC1b, IC1d, IC1e & IC1f are
connected in parallel and drive pin 3
of CON1, which goes to the counter’s
external timebase input.
April 2013 61
5V
LK1
REG1 LP2950-3.3*
3.3V
OUT
GND
GLOBALSAT
EM406A
GPS RECEIVER
MODULE
Vin
Rx
Tx
GND
1PPS
GND
10 F
1
+5V IN
IN
10 F
100nF
3
14
5
4
5
6
NMEA 0183 OUT
CON2
IC1: 40106B
1PPS POLARITY
LK2
IC1b
1
2
IC1a
LK3
FROM COUNTER
4
8
Tx
GND
Vin
B/UV
1PPS
10
470
2
3
Q1
NX2301P
+5V IN
3
Tx LED
4
LED2
5
A
A
K
6
Rx LED
LED1
6
5
13
12
LK4
10
11
2
X1 12MHz
33pF
47k
MMC
1k
4
470
7
* ONLY REQUIRED FOR GPS RECEIVER
MODULES REQUIRING 3.3V.
15pF
3
1
VDD
RST
D
G
USB TYPE B
GP5
D–
RxLED/GP6
D+ 19
TxLED/GP7
CTS
RX
TX
RTS
OSC1
IC2
MCP2200
GP4
GP3
GP2
GP1/USBCFG
GP0/SSPND
VUSB
OSC2
CON3
18
2
3
1
4
8
9
14
D
15
22
16
G
Q2
2N7002
S
17
Vss
20
470nF
MMC
LEDS
NX2301P, 2N7002
D
DELUXE GPS 1PPS TIMEBASE
S
100nF
K
IC1
PIN1
2013
5
1PPS OUT
1
470
SC
TO
COUNTER
2
7
FASTRAX
UP501
GPS RECEIVER
MODULE
1
CON1
IC1e
11
5
12
IC1d
9
+3.3V
4
IC1f
13
ALTERNATIVES
Rx
2
IC1c
6
3
(CERAMIC PATCH ANTENNA)
DB9F
SOCKET
10k
2
FROM USB
(CERAMIC PATCH ANTENNA)
G
S
LP2950-3.3
GND
K
A
IN
OUT
Fig.1: the circuit consists of the GPS receiver module plus a hex CMOS Schmitt trigger inverter to buffer the 1pps
(1Hz) pulses and NMEA data from the module. The NMEA data is also fed to IC2 which drives the USB serial port.
As with the no-frills circuit, link
LK2 is used to allow the 1pps pulses to
be either 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).
Basically, we need to ensure that
the leading edges of the 1pps pulses
fed to the 12-Digit Frequency Counter
are positive-going. That’s because it’s
the leading edges of the pulses that
are locked closely to the “atomic time”
provided by the GPS satellites.
62 Silicon Chip
The remaining circuitry in Fig.1 is
used to provide the USB serial port.
Here we are using a Microchip MCP
2200, a dedicated USB2.0-to-UART
Protocol Converter device. It appears
to be similar to a PIC18F14K50 microcontroller chip but is “hard wired” to
perform USB/serial and serial/USB
conversion, so that when it’s linked
to the USB port of a PC it behaves as
a “virtual COM port device”.
As a result, Windows will communicate with the MCP2200 via a virtual
COM port (VCP) driver. In addition,
Microchip has a freeware “Configuration Utility” program which can be
used to configure the MCP2200 in
terms of baud rate, data format and
so on. We will describe this in greater
detail later.
The MCP2200 (IC2) needs a 12MHz
crystal (X1) for its clock oscillator. This
crystal is connected between pins 2 &
3, along with two small NP0 ceramic
capacitors. It also needs a 470nF MMC
bypass capacitor connected between
its VUSB pin (pin 17) and ground, together with a 100nF MMC capacitor
siliconchip.com.au
siliconchip.com.au
1PPS
LED2
X1
12MHz
10
LK2
1PPS OUT
GND
CTR
Q1
NX2301P
47k
100nF
2
5
11
1
20
Q2
2N7002
4
1k
33pF
15pF
Rx
IC1 40106B
2
Tx
NC
470
3
GND
A
CON2
5
100nF
LED1
22
A
470
LK4
TX
1PPS
4
DB9F
POLARITY
MCP2200
IC2
RX
CON1
LK3
+V
470
1
GPS/USB
EMIT BSTIME
U/SP32G
RECEIVER
REVIECER 4
13140140 5
04104131
(PATCH ANT)
6
102 C
C 32013
+
USB
+5V
+3.3V
LK1
10k
GLOBALSAT
EM-406A
GPS RX MODULE
10 F
REG1
470nF
+
+5V IN
LP2950-3.3
10 F
1
bypassing the +5V rail from the PC’s
USB port (ie, pin 1 of CON3).
The D- and D+ data lines from CON3
connect directly to pins 18 & 19 of IC2,
while the NMEA data stream from the
GPS receiver module is fed directly to
pin 12 of IC2. IC2 converts this data
stream into USB packets for transmission to the PC via CON3.
NMEA commands are also sent
back from the PC via the USB cable
and these emerge from pin 10 of IC2.
These can be fed back to the Rx input
of the GPS receiver module when link
LK4 is used to complete the circuit. In
this application, we don’t need to send
any commands to the GPS receiver
module – we simply use its default
operating configuration.
However, we found that when this
connection was made in addition to
the main Tx-to-Rx connection to pin
12 of IC2, there could be a conflict
whereby IC2 could prevent the GPS
receiver module from finding a “fix”.
In addition, the GPS receiver could
prevent IC2 from configuring and enumerating correctly. So it seems best to
leave LK4 in the “open” position, as
shown in Fig.1 (and Fig.2).
LED1 (receive) & LED2 (transmit)
are driven from pins 6 & 5 of IC2.
These LEDs flash when data is passing through IC2 in one direction or
the other.
The remaining part of the circuit
involves Mosfets Q1 & Q2, which are
used to allow IC2 to control the +5V
power fed from USB socket CON3 to
link LK3 (this link is used to select
the power source for the GPS receiver
module and IC1). This is done to conform to the USB 2.0 requirement that
current drain from the PC’s USB port
drops to less than 2.5mA when the PC’s
USB host controller holds the device
in “suspended” mode.
IC2’s SSPND-bar output (pin 16)
is connected to Q2’s gate via a 22Ω
suppressor resistor, so that Q2 is only
turned on when IC2 receives a “wake
up from suspension” directive. Then
when Q2 turns on, it turns on Q1
which makes the connection between
pin 1 of CON3 and LK3. So if LK3 is
in the power “From USB” position,
(rather than “From Counter” position),
the GPS receiver module will only
receive power when (a) the project is
connected to a USB port on a PC; (b)
the PC is powered up; and (c) software
is running on the PC and “listening” to
the GPS data stream, so that IC2 is not
CON3
USB
TYPE B
Fig.2: follow this layout diagram to build the unit. Omit REG1 and the 10μF capacitor
to its left if you are using the Globalsat EM-406A module and install LK1 in the +5V
position. Alternatively, install REG1 and the capacitor if your GPS module requires a
3.3V supply and fit LK1 to the +3.3V position.
in suspended mode. Note that the GPS
receiver module can take over a minute
to get a “fix” after power is applied.
Alternatively, be fitting LK3 to the
“From Counter” position, the upper
part of the circuit can be powered
from either the counter or an external
plugpack supply (via CON1). This
means that you don’t have to connect
the unit to a PC in order to simply
derive 1pps pulses.
Building it
All the parts for the Deluxe GPS
1pps Timebase fit on a PCB coded
04104131 and measuring 122 x 57mm.
Fig.2 shows the PCB parts layout
diagram, while Fig.3 shows the pin
connections for the GlobalSat EM406A and Fastrax UP501 GPS receiver
modules. Note that almost half of the
PCB is reserved for mounting the GPS
module itself, which is held in place
using double-sided adhesive foam.
Begin by fitting SMD components
IC2, Q1 & Q2 to the PCB, as it is much
easier to do this before any other parts
are fitted. Take the usual precautions
when soldering these parts, ie, use
an earthed soldering iron with a finetipped bit. Tack-solder one or two
device leads first, so that the device is
held in position while you solder the
rest of the leads. You then re-solder
the original tacked leads to ensure
reliable joints.
Don’t worry if you accidentally
bridge two or more SMD device leads
with solder during this procedure.
These bridges can subsequently be removed quite easily by pressing solder
wick braid against the bridged leads
using the tip of your soldering iron.
This sucks up the excess solder while
leaving the solder joining the leads to
the PCB pads underneath in place.
Once the SMD parts have been
installed, add the SIL pin headers for
links LK1-LK4, followed by the resistors, capacitors and the 12MHz crystal.
April 2013 63
1
Vin (+5V)
3
SERIAL Rx
4
(PATCH ANTENNA
AT TOP)
GND
2
SERIAL Tx
5
GND
6
1PPS OUT
(PATCH
ANTENNA
AT TOP)
6
5
4
3
2
1
BACKUP V+
+3.3V
GND
SERIAL Tx
SERIAL Rx
FIX LED
GLOBALSAT EM-406A
1PPS OUT
FASTRAX UP501
Fig.3: the pin connections for the GlobalSat EM-406A and Fastrax UP501
GPS modules. Check the pin connections if you use a different module.
A 14-pin socket for IC1 can then be
fitted – make sure it’s orientated as
shown.
Connectors CON1-CON3 can then
go in, followed by LED1 & LED2. The
latter are mounted vertically above
the PCB, with their leads left at full
length so that they later protrude
through their matching holes in the
case (see Fig.4).
Voltage regulator option
Regulator REG1 and the 10µF electrolytic capacitor to its left are installed
only if the GPS receiver module you
are using requires a 3.3V DC supply
rather than a 5V supply. This means
that if you are using the EM-406A
module, you won’t need to fit REG1
or that 10µF capacitor.
By contrast, the regulator and the
capacitor must be installed if you are
using the UP501 receiver module,
since this runs off 3.3V. The same
goes for the Digilent PmodGPS and
RF Solutions GPS-622R GPS modules.
The GPS receiver module is installed last but before doing this, you
need to make the connections between
its output pads (or lead wires) and the
relevant pads on the PCB (ie, just to
the left of LK4). Fig.3 shows the outputs for the Globalsat EM-406A and
Fastrax UP501 modules. Be sure to
connect these to their matching pads
on the PCB.
The EM-406A module comes with a
short 6-wire ribbon cable fitted with a
sub-miniature 6-pin plug at each end.
One of these plugs connects directly
to the EM-406A’s output socket. The
plug at the other end of the cable is
cut off and the six wires stripped and
tinned before soldering them to their
PCB pads.
By contrast, the UP-501 module just
has a row of pads along one edge of its
PCB. It’s connected by first cutting six
25mm-lengths of light-duty hookup
wire (eg, from a ribbon cable), then
carefully stripping and tinning all the
wire ends before soldering the leads
into place.
Don’t forget to match the output
leads from the GPS module to the PCB
pads (see Figs.2 & 3), as the connec-
Compatible GPS Receiver Modules
The following GPS receiver modules should be compatible with this project
•
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 and 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
and 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 and 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 GPS-derived 1pps pulses.
Not all GPS modules currently available provide both of these features.
64 Silicon Chip
tions are not “straight through”.
Once all the connections have been
made, the GPS receiver module can be
secured to the top of the PCB using a
25mm-square piece of double-sided
adhesive foam – see Fig.4. Make sure
you attach the module with its patch
antenna facing upwards – it won’t
work very well if it faces downwards!
Fitting the links
LK1’s shunt position depends on the
supply voltage (5V or 3.3V) required
for the GPS receiver module you’re
using, while LK2’s position depends
on the polarity of the 1pps output
pulses from the GPS receiver. In most
cases, LK2 will need to be to the lower
position (ie, nearest Q1).
LK3’s position depends on just how
you plan to power the GPS receiver
module and IC1 (ie, the 1pps timebase
section of the circuit). If you only intend using this part of the circuit when
the unit is connected to a PC via a USB
cable, then LK3 can be fitted in the
USB (lefthand) position (ie, the circuit
is powered from the PC’s USB port).
Alternatively, if you want to use
this part of the circuit continuously
(eg, whenever the 12-Digit Frequency
Counter is on but without having to
fire up the PC), you’ll need to fit LK3
in the righthand CTR (From Counter)
position and power the unit either
from the counter or an external 5V
plugpack via CON1.
Finally, LK4 should almost always
be fitted to the upper position, to break
the connection between pin 10 of IC2
and the Rx input of the GPS module.
Preparing the box
Fig.4 shows how the PCB assembly is fitted inside a standard UB-3
jiffy box. The completed unit can be
mounted near a window to get a good
“view” of the sky.
As shown, the PCB is mounted on
the lid of the box, which then becomes
the base. The main part of the box then
fits down over the lid/board assembly,
to act as a dust cover.
Fig.5 shows the drilling details for
the box. Four mounting mounting
holes have to be drilled in the lid to
accept the PCB, while two holes must
be drilled through the top of the main
box section for the LEDs. In addition,
you have to drill a hole in the rear side
of the box and make cut-outs in the
front side and righthand end.
Use a small (eg, 1.5mm) pilot drill
siliconchip.com.au
HOLE FOR
ACCESS TO CON1
(UB-3 JIFFY BOX)
LED2
HOLE FOR
ACCESS
TO CON2
LED1
DOUBLE-SIDED ADHESIVE FOAM
ATTACHING MODULE TO PCB
EM-406A
GPS Rx MODULE
IC2
15p
RECEIVER PCB
CON3
LK2
LK4
Fig.4 here’s how the PCB
assembly is fitted inside a
standard UB-3 jiffy box. Be
sure to install links LK1LK4 correctly (see text)
before securing the top
section of the case to the lid.
The completed assembly
should be mounted near
a window to give the GPS
module a good “view” of the
available GPS satellites.
CON2
IC1
M3 x 10mm TAPPED SPACERS
UB-3 BOX LID
M3 x 6mm SCREWS
BOX ASSEMBLY SCREWS
to start all the holes, then drill the
3mm holes out to the correct size.
The hole in the rear side of the box
can be enlarged to the correct size
(16mm) using a tapered reamer. The
two square cut-outs can be made by
drilling a series of small holes around
the inside perimeter, then knocking
out the centre piece and carefully filing
the inside edges.
If you are using a GPS receiver
module with a “fix” indicator LED,
you might want to drill an additional
hole in the adjacent side of the box, so
that you can view this LED to confirm
that the receiver does indeed have a
fix. The prototype shown in the photos
uses an EM-406A module, which does
have such a LED in the lower righthand
corner – see Fig.3. That’s the reason
for the 5mm hole you can see in the
front of the box, located 45mm from
the lefthand end and 20mm up from
the outer surface of the lid.
The UP501 module doesn’t have a
“fix” LED, so there’s no need to drill
this hole. However, many other modules do have this LED and the hole
location will depend on the LED’s
location on your particular module.
Once the box holes have been
drilled, the PCB assembly can be
mounted on the lid on four M3 x
10mm tapped spacers and secured
using M3 x 6mm machine screws.
That done, check that you’ve fitted the
jumper shunts to each of the four SIL
pin headers (for LK1-LK4) as required
(see above). The box can then be lowsiliconchip.com.au
Other Uses For This Project
The NMEA output of this Deluxe GPS 1pps Timebase can be used with a range of
navigation software and free Windows GPS-related software packages.
• For nautical chart and navigation software that works with NMEA-compatible GPS
units see: http://capcode.sourceforge.net/
• To show your position on Google Maps as you move (multiple options) see:
http://mboffin.com/earthbridge/
http://download.cnet.com/Google-Maps-with-GPS-Tracker/3000-12940_410494227.html?tag=keyword.feed&part=rss&subj=dl.gps
http://blog.geoblogspot.com/2008/09/navigator-101.html
• For a GPS data logger: https://github.com/javarobots/GpsDataLogger
• Many more here: http://www.maps-gps-info.com/fgpfw.html#Windows
ered down onto the lid, taking care to
ensure that LED1 and LED2 protrude
through their respective holes at the
top, and the assembly secured by fitting the four supplied self-tapping
screws.
Finally, fit four small adhesive rubber feet to the lid (which now becomes
the base) to prevent scratches due
to the protruding screw heads. Your
Deluxe GPS 1pps Timebase is now
complete.
Counter connections
As with the simpler GPS 1pps Timebase unit, only three connections have
to be run to the 12-Digit Frequency
Counter. These can all be made via
a shielded stereo cable fitted with a
5-pin DIN plug which plugs into CON1
of the Deluxe GPS Timebase.
Fig.6 shows the wiring details. One
of the inner conductors of the stereo
cable connects to pin 3 of the 5-pin
DIN plug, to carry the 1pps output
pulses, while the other inner conductor connects to pin 1 of the DIN plug,
to carry the +5V supply rail for the
timebase. The shield braids are both
connected to pin 2 of the plug, to link
the two grounds.
At the other end of this cable, the
1pps signal lead and its shield braid
should be fitted with a BNC plug,
to connect to the counter’s external
timebase input (CON3). The +5V/GND
power lead can either be connected to a
5V DC plugpack or fitted with a 2.5mm
concentric DC plug which mates with
a matching DC power socket added to
the rear of the frequency counter.
In the latter case, you will also have
to connect the +5V and ground lines
inside the counter to the added DC
April 2013 65
16mm
DIAMETER
12.5
13
22
12
11
13
18.25
23.5
18.25
31
RIGHT-HAND END OF UB3 BOX
RH END OF BOX FRONT SIDE
31
RH END OF BOX REAR SIDE
RIGHT-HAND
END
3mm DIAMETER
HOLES
CL
64
11
OUTSIDE OF UB3 BOX
4 x 3.0mm DIAMETER HOLES
49.5
97.5
INSIDE UB3 BOX LID
Fig.5: the drilling details for the UB3 jiffy box. The rectangular cutouts can each be made by drilling a series of small
holes around the inside perimeter, then knocking out the centre piece and filing to shape.
power socket – see Fig.6. Make sure
that LK3 on the timebase PCB is in
the CTR (righthand) position if you are
powering the timebase section (ie, the
GPS module and IC1) from the counter
66 Silicon Chip
or an external plugpack.
Alternatively, if you intend running
the entire unit exclusively from USB
power, then you don’t need to install
this separate supply cable. Instead,
it’s simply a matter of connecting the
Deluxe GPS 1pps Timebase to a USB
port on a PC (or a downstream USB
hub) using a standard USB cable. Don’t
forget to set LK3 to the USB position
siliconchip.com.au
IC17 74AC74
IC13 74AC00
4518B
IC7
74HC00
IC18
IC11 4012B
IC12 74AC10
4518B
IC9
4093B
100nF
100nF
GROUND
IC15 74AC00
1MHz
TP2
74AC163
VC1
6-30pF
8.00MHz
X1
TMR1 IN
+5V SUPPLY
PIC16F877A
100nF
D7
GND
+5V POWER
IC23
CON4 9-12V DC IN
5819
1pps PULSES
100nF
1s
100s
74HC373
100nF
10s
IC22
39pF
IC24
100nF
74HC161
27pF
2.5mm PLUG
100nF
SEL CHAN A
FREQ*/PRD
74HC244
EXT/INT TB
IC19
SEL CHAN B
74HC244
1000s
Fig.6: a shielded stereo cable can be used to make the connections between the Deluxe 1pps GPS Timebase and the frequency counter. The 1pps pulses are fed
in via the counter’s existing BNC socket on the rear panel, while a 2.5mm DC power socket can be added to accept a matching plug to pick up the counter’s +5V
and GND connections. You can omit this DC socket and the supply connections if you don’t intend powering the timebase unit from the counter.
TPG
TP4
HIGH
NORESOLUTION
ITULOSER HGIH
COUNTER
RETNUOC
MAIN
C 2012
DRBOARD
AOB NIAM
tob0411
121111121
140top 2102 C
TP1
TPG
4060B
IC6
X2
32768Hz
TP5 TPG
IC8
4093B
220k
10M
39pF
6-30pF
D6
VC2
1k
1PPS PULSES
CON3
EXT TB IN
IC10
100nF
100nF
IC14
IC16 74HC160
BNC PLUG
100nF
ADDED 2.5mm POWER SOCKET
100nF
100nF
CENTRE PIN
100nF
100nF
CRIMP SLEEVE
100nF
100nF
siliconchip.com.au
100nF
When you first connect the unit to a
PC, Windows will respond by installing its standard “virtual COM port”
driver. Once it’s done that, launch the
Device Manager (eg, via Control Panel)
and look under “Printers and Devices”
to make sure that you now have a “USB
serial port”. You can then also check
its Properties to discover the COM port
number and check that it’s working
properly. You can also set the driver’s
baud rate to match the GPS module’s
rate, which is usually 4800bps.
Assuming this checks out so far,
the next step is to download and
install Microchip’s custom MCP2200
Configuration Utility, available from:
ww1.microchip.com/downloads/en/
DeviceDoc/MCP2200_Configuration_
Utility_v1.3.zip (5.13MB). Unzipping
this provides a self-installing version
of the MCP2200 Configuration Utility.
When you run this and then fire it
up, you should see a dialog window as
shown in Fig.7 – although you won’t
see any text as yet in the “Output”
box. This box will be blank initially,
while some of the smaller boxes will
have different contents.
Before clicking on the “Configure”
button at lower left, you’ll need to
ensure that the contents of all of the
smaller boxes are as shown in Fig.7.
You probably won’t need to change the
contents of the Manufacturer, Product,
Vendor ID or Product ID boxes, nor
will you need to click on the “Update
VID/PID” button. However, you may
need to click on the check box next to
“Enable TX/RX LEDs”, to display the
tick as shown.
Similarly you may need to click on
the check box next to “Enable Suspend
Pin”, to display its tick.
If the “Baud Rate” box is not showing “4800”, click on the down arrow
to its right and then select “4800” from
the drop-down list. Then, if the “I/O
Config” box is showing something
other than “00000000”, click inside
the box so that you can type in the
correct “00000000” text string.
Similarly, if the “Output Default”
box is not showing “11111111”, enter
in that text string yourself.
Now turn your attention to the “LED
Function” section at lower right and
click on the “Blink LEDs” radio button
if this isn’t already selected (ie, dis-
4148
Configuration
D5
4148
22k
if powering the entire unit from a
USB port.
April 2013 67
Fig.7: this is the dialog you will see when you
launch Microchip’s MCP2200 Configuration
Utility (except that the Output box will be
blank). Configure it as described in the text.
playing the central bullet). Similarly,
click on the “200ms” radio button so
that it too is selected.
At this stage you should be seeing
a display very much like that shown
in Fig.7, except that the “Output”
window should be blank. If so, you
can now click on the “Configure” button at lower left. There should then
be a brief pause while the configuration utility “does its thing” with the
MCP2200 chip in your Deluxe GPS
1pps Timebase, then the text shown in
Fig.7 should appear in the “Output”
window. This indicates that the configuration routine has been completed
and that the unit is now communicating with the the PC via the USB cable.
Once it’s done that, you can then
close the Configuration Utility.
Installing the PC software
The final step is to install a software
application to allow your PC to analyse
and display the useful information
carried in the NMEA 0183 output
data stream. There are many software
apps capable of doing this but one that
we particularly recommend is called
“GPS Diagnostics V1.05”. Developed
by CommLinx Solutions, this freeware
program can be downloaded from
download.cnet.com/windows
The quickest way to get to the
68 Silicon Chip
Fig.8: the GPS Diagnostics dialog displays a range of information
from the analysed NMEA data, including UTC time, longitude,
latitude, altitude, the number of satellites in “view” and the signal
strength from each one.
download page is to search for it by
typing its full name in the search box
at top right.
Downloading the software is a 2step process. First, you have to download the customised installer program cbsidlm-tr1_10a-GPSDiag-ORG10055902.exe (620kB). You then run
this installer to download and install
the GPS Diagnostics program itself.
Once it’s installed, launch the
program to bring up a dialog window
much like that shown in Fig.8. The
only differences are that all of the text
boxes and bargraphs will initially be
blank – including the large box at the
bottom labelled “Received data”.
Earlier, when you first plugged the
USB cable from the GPS Time Receiver
into the PC’s USB port, Windows in-
stalled it as a USB Serial COM port.
The allocated port number could then
be determined by going to Device Manager and checking under Ports (COM
& LPT). Usually, this will be COM3,
COM4 or COM5.
Once you’ve determined the allocated port number, the next step is to
select the corresponding port number
in the GPS Diagnostics window. That’s
dome by selecting the appropriate
radio button at upper left. This tells the
program which COM port the incoming NMEA 0183 data stream from the
Deluxe GPS 1pps Timebase will be on
(in our case, it’s COM5).
Analysing NMEA data
You should now find that GPS
Diagnostics starts displaying all the
siliconchip.com.au
This photo demonstrates the accuracy of the counter when using
the Deluxe GPS 1pps Timebase. Here we’re measuring a GPSderived 10MHz frequency and the counter shows 10MHz exactly.
information coming into the PC via
that COM port. You’ll see the NMEA
sentences as they arrive in the large
Received Data window at the bottom
and within a few seconds, you’ll also
see the UTC time and date, the longitude and latitude, the altitude of your
GPS receiver module and a great deal
of other interesting information (see
upper right of Fig.8).
It will also show the number of GPS
satellites currently in “view”, plus a
bar chart for each one indicating the
approximate signal strength. Under
each chart, you’ll also see its PRN
number, its current elevation and
azimuth, its signal-to-noise ratio (SNR)
and whether or not it’s currently being
used. For example, when the screen
grab of Fig.8 was captured, our prototype Deluxe GPS 1pps Timebase was
able to view and use the signals from
no fewer than 12 satellites.
That’s a bit unusual though. Most of
the time, it will use anywhere between
five and nine satellites, while at odd
times there may be only three or four
in view and usable.
So how do you verify that the unit
has a good “fix” and is delivering usable GPS-locked 1pps pulses to your
12-Digit Frequency Counter? That’s
done in GPS Diagnostics by examining
the “Mode” message box. This shows
“Auto 3D” in Fig.8, which means
that it was able to achieve the highest
level of fix when this screen grab was
captured.
When you get this message, you can
be satisfied that your counter is getting
the best possible 1pps pulses.
When the GPS receiver is able to
see only a small number of satellites
(eg, two or three), the Mode box dis-
play can drop back to “Manual 2D”.
This still indicates that the receiver
has achieved a “fix”, although some
of the navigation information won’t
be of high quality. However, the 1pps
pulses being fed to the counter should
still be OK.
It’s only time to worry if the Mode
message box is blank or showing “No
fix”, since that indicates that the unit
will probably not be delivering any
1pps pulses at all. If that happens,
the trick is to try moving the unit to
a location where it can “view” more
of the sky and therefore “see” more
satellites so that it can get a good fix.
In short, GPS Diagnostics is an excellent tool for optimising the position
of your Deluxe GPS 1pps Timebase. It
also allows you to then monitor the
reception conditions on a day-to-day
SC
basis.
Frequency Counter Measurement Accuracy
I
N THE FIRST article describing our
12-Digit Frequency Counter (SILICON
CHIP, December 2012), we advised readers
that by using a GPS-based external 1pps
timebase, it should be possible to achieve
measurement accuracy approaching that
of an atomic clock. In the specifications
panel, we also quoted measurement
accuracy with a GPS 1Hz timebase of approximately ±1 part in 1011.
Subsequent testing has quantified the
accuracy that can be achieved. Over the
last three months, Jim has made measurements using the set-up shown above, with
the 12-Digit Frequency Counter fed with
an external timebase (using the simpler
February 2013 unit for the first five weeks
and the deluxe unit described here for the
remaining seven weeks). The counter was
siliconchip.com.au
measuring the 10MHz output from our
GPS-based Frequency Reference (SILICON
CHIP, March-May 2007) and was set for a
gating time of 1000 seconds, so that each
measurement took 16.66 minutes. This
was done to provide the highest measurement resolution.
The results from this extended testing
are: the GPS-locked 10MHz signal from
the 10MHz Frequency Reference gave
readings of 10,000,000.000 ± 0.003Hz –
with a roughly Gaussian or “bell shaped”
distribution centred on 10,000,000.000Hz.
In other words, a measurement accuracy
of ±3 parts in 1010 can be achieved.
Note that with this measurement set-up
there are three sources of measurement
jitter: (1) the GPS module in the 1pps
timebase(s); (2) the GPS module in the
GPS-Based 10MHz Frequency Reference
and (3) the inevitable jitter in the PLL
(phase-locked loop) inside the 10MHz
Frequency Reference itself (used to lock
the 10MHz output to the GPS 1pps pulses).
Clearly it isn’t easy to separate these
three sources of jitter, but with all three
present they still allowed us to achieve
a measurement accuracy of ±3 parts in
1010. So the true measurement accuracy
of the 12-digit frequency counter with the
GPS 1Hz timebase is somewhere between
±3 parts in 1010 and ±1 part in 1011 – still
very impressive.
Unless you are measuring an atomic
frequency reference, your measurement
accuracy is like to be far in excess of the
drift and jitter of any source that is commonly available.
April 2013 69
|