This is only a preview of the June 2009 issue of Silicon Chip. You can view 31 of the 104 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "High-Current, High-Voltage Battery Capacity Meter, Pt.1":
Items relevant to "GPS Driver Module For The 6-Digit Clock, Pt.2":
Articles in this series:
Items relevant to "Build A Beam-Break Flash Trigger":
Items relevant to "PICAXE Humidity Measuring Using The HopeRF HH10D":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
Pt.2 By JIM ROWE
GPS Driver For The
6-Digit GPS Clock
Based on the GlobalSat EM-408 GPS module, this compact
GPS receiver/driver board mates with the 6-digit display
described in Pt.1 to form a self-contained GPS clock. It can
also be housed separately and used to provide NMEA 0183
time and date information to a PC, via a serial port.
T
HE 6-DIGIT GPS Clock Display
described in last month’s issue of
SILICON CHIP was originally conceived
as an attachment for the author’s GPSBased Frequency Reference (MarchMay 2007). The idea was that since
the NMEA 0183 stream of GPS time,
date and navigational data was available from the GPS receiver in the
Frequency Reference, we’d provide
a “smart” display unit to receive this
data stream, extract the time information and display it in either its native
UTC form or converted to local time.
However, before the design was
published, we realised that it would
also be of interest to many more people
than those who had built the GPSBased Frequency Reference. That’s
because it could be turned into a fully
36 Silicon Chip
self-contained GPS Clock simply by
building a GPS receiver and display
driver module into the same enclosure. And by taking advantage of one
of the low-cost GPS receiver modules
currently available, this could be done
surprisingly cheaply – with the complete clock costing less than $200. Not
bad for a clock offering you very close
to “atomic time” (and updated every
second), wouldn’t you say?
So that’s the story behind the little
GPS Clock Driver board described
here. Its main application is to convert last month’s 6-Digit Display into
a self-contained GPS clock. Alternatively, it can be used to feed the GPS/
NMEA 0183 data stream into a PC via
a standard serial port. You can then
use a freeware software program such
as “GPS Clock” to process and display
the data – see panel.
How it works
As mentioned above, the heart of
the new driver board is the GlobalSat
EM-408 “GPS Engine” module. This
module was also used in Geoff Graham’s GPS-Synchronised Analog
Clock, described in the March 2009
issue.
The EM-408 is quite small, measuring just 36.4 x 35.4 x 8.3mm. Despite
this, it includes a built-in microwave
“patch” antenna and is very sensitive
(-159dBm). This allows it to operate
reliably indoors using just the patch
antenna, without requiring an external antenna or cabling. The current
drain is also surprisingly modest, at
siliconchip.com.au
D4
K
A
OUT
100 F
16V
100nF
Vcc
EM-408
GPS RX
MODULE
En
Rx
Tx
Gnd
5
1
3
4
430
1k
2x1k
(PATCH ANTENNA)
ADJ
240
SET
3.3V
K
IN
D1
D2
D3
REG1 LM317T
+3.3V
A K
A K
A
+
12V DC
INPUT
–
1000 F
25V
VR1
5k
6
(Rx)
1
2
7
10k
B
2
C
3
8
Q1
BC338
9
E
4
NMEA
DATA
OUTPUT
TO
DISPLAY
(OR PC)
5
DB9F
SOCKET
D1–D4: 1N4004
A
K
LM317T
5 4 3 2 1
SC
2009
EM-408
BC338
CLOCK DRIVER USING EM-408 GPS RECEIVER
B
E
OUT
ADJ
C
OUT
IN
Fig.1: the circuit uses an EM-408 GPS receiver module and an adjustable LM317T regulator to provide a 3.3V supply.
The output from the GPS module appears at pin 4 and is inverted by transistor Q1 to drive the display board.
just 44mA continuous from a 3.3V
supply rail.
As a result, all we have to do to use it
as a clock driver is to provide it with a
source of 3.3V DC power plus a simple
buffer stage to interface its NMEA 0183
data stream output to the serial data
input of the clock display (or a PC).
Fig.1 shows the circuit details.
In operation, the driver board operates from the same +12V DC supply
used for the display board via its own
3.3V regulator circuit (REG1). REG1
is an LM317T adjustable regulator
and is configured in standard fashion, with trimpot VR1 used to set the
output voltage to 3.3V, as required by
the EM-408. Diodes D1-D3 provide
both supply polarity protection and
an additional 1.8V voltage drop from
the 12V source to reduce the power
dissipation of REG1.
Diode D4 protects REG1 from reverse current damage.
As shown in Fig.1, the EM-408’s
Vcc input (pin 5) is connected to the
+3.3V line, while the En input (pin 1)
is pulled high via a 1kΩ resistor to the
same line, to enable it. Also pulled up
via a 1kΩ resistor is the Rx input (pin
3), which is provided on the EM-408 to
allow it to be fed with NMEA settingsiliconchip.com.au
Parts List
1 PC board, code 07106091, 122
x 57mm
1 GlobalSat Technology EM-408
GPS Engine module with cable
(Altronics K-1131)
1 short length of double-sided
adhesive foam tape
1 PC-mount 2.5mm DC connector
(optional – see text)
1 PC-mount DB9F connector
(optional – see text)
1 M3 x 6mm long M3 pan-head
screw
4 M3 x 30mm screws, countersink
head
9 M3 nuts
1 5kΩ horizontal trimpot (VR1)
Semiconductors
1 LM317T adjustable regulator
(REG1)
1 BC338 NPN transistor (Q1)
4 1N4004 diodes (D1-D4)
up commands in some applications.
We don’t need to do this in the
present project, because it comes set
up to do what we want by default –
Capacitors
1 1000µF 16V RB electrolytic
1 100µF 16V RB electrolytic
1 100nF monolithic ceramic
Resistors (0.25W 1%)
1 10kΩ
1 430Ω
3 1kΩ
1 240Ω
Where To Get The EM-408
The EM-408 GPS Engine module
is available in Australia from Altronics
for $99.00 (Cat. K-1131).
Another source for the EM-408 is
SparkFun Electronics of Boulder,
Colorado, USA. Their website is at
www.sparkfun.com and payment
can be made using most popular
credit cards. At the time of writing,
they were offering the EM-408 GPS
module for US$64.95 plus US$3.40
for handling and shipping to Sydney
(check prices to other cities).
ie, it supplies the NMEA data stream
at 4800bps and also supplies the
$GPRMC sentence we need to extract
the time.
June 2009 37
4004
D1
1k
10k
1k
1k
100nF
DB9F
VR1 5k
OPTIONAL
LINK
430
1
5
GLOBALSAT EM-408 GPS
RECEIVER MODULE
(ATTACH WITH
DOUBLE-SIDED TAPE)
CON2
NMEA OUT
SET 3.3V
1
V 3. 3 +
(PATCH ANT)
CON1
4004
D4
D3
4004
4004
1000 F
240
REG1
LM317T
D2
12V DC
100 F
This close-up view shows how the
EM-408 is connected to the PC board
via the 5-way interface cable supplied
with the module – see text.
Q1
BC338
19060170
9002 ©
REVIE CER E MIT SP G
wired directly to the display board).
The optional link shown just to the
right of trimpot VR1 can also be left
out, as it’s not needed for this particular project.
Begin the assembly by installing the
resistors, followed by trimpot VR1 and
the 100nF monolithic capacitor. Table
1 shows the resistor colour codes but
it’s also a good idea to check each one
using a multimeter before installing it.
Note the 10kΩ resistor that’s second to
the left from transistor Q1 – be sure to
install it in its correct location.
The two electrolytic capacitors can
now go in, taking care to fit them with
the correct orientation. Follow these
with the four diodes (D1-D4), then
install transistor Q1 and regulator
REG1. As shown, the latter is installed
with its leads bent down at right angles about 6mm from its body, so that
they go through their matching holes
in the board.
Secure REG1’s metal tab to the board
using an M3 x 6mm screw and nut before soldering its leads. Don’t solder its
leads first. If you do, the solder joints
could be stressed as its tab is bolted
down and this could lift (or crack) the
board tracks.
Check that the diodes, transistor Q1
and the regulator are all installed with
the correct orientation.
Fig.2: install the parts on the PC board as shown here. Note that CON1 (the
DC socket) and CON2 (the DBF9 connector) are both left out if you intend
installing this board in the same case as the display board (see Fig.3).
This view shows the completed assembly. The GlobalSat EM-408 GPS module
is attached using double-sided adhesive foam tape.
The NMEA data stream emerges
from the EM-408 at its Tx output (pin
4) and is then fed to a simple inverting
buffer stage based on transistor Q1.
The inverted signal appearing at Q1’s
collector is then fed to the serial input
of the display board (or to the serial
port of a PC), either directly or via a
DB9F socket and serial cable.
Board assembly
The assembly is straightforward
with all parts, including the EM-408
GPS module, installed on a small PC
board coded 07106091 and measuring
122 x 57mm. This board has cut-outs in
each corner so that it can be housed in
a standard UB3-size (130 x 68 x 44mm)
utility box, if you want to build it as a
separate unit.
Fig.2 shows the assembly details.
Note that there’s provision to mount
both a 2.5mm DC input socket (CON1)
and a DB9F socket (CON2) on the
board. However, these are fitted only
if you intend building an external unit.
Leave these parts out if the module is
to be mounted in the clock case (it’s
Fitting the EM-408
The EM-408 GPS engine module
Table 1: Resistor Colour Codes
o
o
o
o
o
No.
1
3
1
1
38 Silicon Chip
Value
10kΩ
1kΩ
430Ω
240Ω
4-Band Code (1%)
brown black orange brown
brown black red brown
yellow orange brown brown
red yellow brown brown
5-Band Code (1%)
brown black black red brown
brown black black brown brown
yellow orange black black brown
red yellow black black brown
siliconchip.com.au
GPS TIME RECEIVER
Fig.3: just three leads are required to connect the
GPS driver board to the display board. Note that
the connections are actually made at the back of the
display board (not at the front, as shown here for
clarity).
© 2009
07106091
(5)
1
(2)
+12V
4004
4004
4004
4004
(GPS DRIVER PC BOARD)
88 8
(MAIN DISPLAY BOARD)
V21+
a
b
c
a
a
f
f
b
g
e
e
c
d
dP
d
g
e
c
e
a
d
b
g
c
f
e
e
b
f
b
d
c
d
dP
19050140
9002 ©
TU ODAER E MIT SP G
c
d
dP
1
(5)
+
(2)
4004
+
+12V
CON2
12V DC IN
is next on the list. This is attached to
the top of the PC board using a strip of
double-sided adhesive foam tape and
must be orientated as shown in Fig.2.
However, before fitting it in place, you
have to make the interconnections
siliconchip.com.au
between it and the PC board.
As supplied, the EM-408 comes with
a matching 5-way interface cable. This
is about 25mm long and is fitted at each
end with a mini 5-way SIL plug, one
of which is plugged into a matching
socket on the GPS module itself.
For this application, you have to
cut the cable in half and then use one
half to make the connections between
the module and the PC board. Remove
about 4mm of insulation from the five
June 2009 39
HOLES A ARE 3.0mm DIAMETER,
COUNTERSUNK
A
A
(UPPER REAR OF ENCLOSURE)
SIDE OF LOWER SECTION OF ENCLOSURE
3.0
A
50
A
19
29
1.0
10
5.0 RADIUS
ALL DIMENSIONS IN MILLIMETRES
98
94
(REAR)
2.5 RADIUS
5
15.5
15.25
20.5
15.5
SIDE OF UPPER (CLEAR) SECTION OF ENCLOSURE
(FRONT)
Fig.4: follow this drilling diagram to mount both the GPS driver module and the display board in the same case.
The semi-circular notches along one edge of the lid and along the top of the base can be made using rat-tail files of
the correct diameter. (Note: if you intend mounting just the display board in the case, using the drilling diagram
published in Pt.1 last month).
40 Silicon Chip
siliconchip.com.au
leads and tin them before soldering
them to the PC board. Be sure to feed
the leads through the board holes in
the correct sequence and note that
the wire with the grey insulation goes
into the uppermost hole (marked “1”
on Fig.2).
After they have all been soldered,
plug the end of the cable into the
matching socket on the end of the
EM-408 module. This is done with the
module orientated socket-end-down
and roughly vertical with respect to
the board. Take care to ensure that
the plug and socket mate correctly –
they’re very small and are polarised.
Once the connection is made, fit
the strip of double-sided adhesive
foam to the underside of the EM-408.
That done, remove the protective tape
from the outer surface of the adhesive
foam and carefully swing the module
down so that it rests on the top of the
PC board. During this process, be sure
to leave a small amount of slack in the
cable so that the plug isn’t pulled out
of its socket.
Once the module is in the correct
position (see photo), press it down
gently to ensure that the adhesive
foam “grabs”.
Finally, if you intend installing the
board into a separate case, fit the DC
socket (CON1) and the DBF9 socket
(CON2). Conversely, leave these parts
out if the module is going to be installed in the same case as the display
board.
That’s it – the module is now complete.
then apply power from an external 12V
DC source. If you’re not using the DC
socket, simply connect the supply’s
positive to D1’s anode. The negative
lead goes to the outside copper earth
pattern.
Next, use your DMM (set to a suitable DC voltage range) to monitor the
output from REG1 (eg, at its metal tab
or at the lower end of any of the 1kΩ
resistors). With VR1 set to mid-range,
this should be close to 3.3V but may
be either slightly lower or higher than
this figure. Adjust VR1 to set the voltage from REG1 as close as possible to
the correct 3.3V.
The driver board assembly is now
finished and can be fitted into either
the clock display enclosure or a separate UB3 jiffy box.
Setting up
Drilling the case
This simply involves adjusting trimpot VR1 to set the output of regulator
REG1 to 3.3V to give the correct supply
voltage for the EM-408 GPS module.
To do this, first set VR1 to mid-range
We’ll assume here that you want
to fit the GPS driver module into the
same case as the display board. If so,
the first step is to connect a 200mm
length of 3-way ribbon cable to the
30mm x M3
SCREW
LED2
LED1
LED3
Fig.5: here’s how the two PC boards
are mounted inside the case.
(DISP1)
25mm UNTAPPED SPACER
(DISP2)
DISPLAY PC BOARD
FILET OF EPOXY CEMENT
TO ATTACH SPACER TO
MOULDED PILLAR
GPS RECEIVER MODULE PC BOARD
ATTACHED TO REAR OF ENCLOSURE
(UPPER CENTRE) VIA 4 x 10mm LONG
CSK HEAD M3 SCREWS & 8 x NUTS
DISPLAY BOARD SCREWS MATE WITH
THREADED INSERTS IN PILLARS
(LOWER PART OF ENCLOSURE)
module’s external wiring points – see
Fig.3. The other end of this cable goes
to the main display board but leave this
end disconnected for the time being.
Having attached the cable, the driver
module and its associated display
board can be installed in the case.
Fig.4 gives the case drilling details. As
shown, four holes must be drilled in
the base (towards the top) and these
are used to mount the driver module.
They should be all be countersunk (ie,
on the outside of the case) using an
over-size drill.
In addition, you have to cut notches
along the mating edges of the top and
bottom halves of the enclosure (these
provide access to the DC socket and the
switches on the display board). These
notches are best made using rat-tail
files of the correct diameter, although
it may be also possible to drill them if
the two halves of the case are secured
together.
Note that all these holes are in
quite different positions from those
shown in Fig.4 last month (ie, for the
into VIDEO/TV/RF?
Television & Video
Technology – by KF Ibrahim
New edition has a full and
compre-hensive guide to
NEW LOW PRICE! video and TV tech-nology
including HDTV and DVD,
$
58 starting with fundamentals.
$
70
DVD Players and Drives
$
95
NEW LOW PRICE!
85
$
– by KF Ibrahim
DVD technology and applications - ideal for engineers,
technicians, students,
installation and sales staff.
Practical Guide To
Satellite TV – by Garry Cratt
The book written by an Aussie for
Aussie conditions. Everything you
need to know – including
what you cannot do! 7th ed.
$
49
Hands-On Zigbee – by Fred Eady
$
96
50
NEW LOW PRICE!
$
75
An in-depth look at the
clever little 2.4GHz wireless
chip that’s starting to be
found in a wide range of
equipment from
consumer to industrial.
There’s something to suit every
RF fan in the SILICON CHIP
reference bookshop: see the
bookshop pages in this issue
$
75
RF Circuit Design
– by Chris Bowick
A new edition of this classic RF
text - tells how to design
and integrate RF components
into virtually any circuitry.
NEW LOW PRICE!design
74
$
Practical RF H’book
– by Ian Hickman
$
reference work for technic90 Aians,
engineers, students and
NEW LOW PRICE!
73
$
the more specialised enthusiast. Covers all the key topics in
RF that you need to understand.
! Audio ! RF ! Digital ! Analog ! TV ! Video ! Power Control ! Motors ! Robots ! Drives ! Op Amps ! Satellite
siliconchip.com.au
June 2009 41
Using A PC To
Display GPS Time
Fig.6: “GPS Clock” from TimeTools
shows UTC time plus longitude and
latitude.
I
F YOUR PC has a serial port, then you
can feed the NMEA 0183 data stream
from this GPS driver module directly into
it and install software from the Internet to
display GPS time.
Two useful programs are GPS Clock
from Time Tools (freeware) and GPS Time
And Test from BrigSoft (shareware but
free to try for 30 days). Download them
from http://www.timetools.co.uk/atomic-
“display only” enclosure). Note also
that you don’t need to make a cutout
to provide access to the DB9F socket
in this version, since the driver board
cable is wired directly to the back of
the main board.
Final assembly
Fig.5 shows the final assembly
details. The new GPS driver board
assembly is attached to the base of
the enclosure using four M3 x 10mm
countersunk-head machine screws,
with four M3 nuts used as short
spacers and another four nuts used to
hold the board in place.
To allow plenty of “breathing space”
between the driver board and the main
display board (especially to provide
some clear space above the EM-408’s
patch antenna), in this version the
main board is mounted much further
forward than in the “display only”
version. This is achieved by mounting
42 Silicon Chip
Fig.7: “GPS Time And Test” synchronises your PC’s clock to the GPS
signal at preset intervals down to as low as one minute. Both programs
also show the incoming NMEA data sentences.
clock/fw/gps-clock.htm and from http://
www.abstime.com
Each does a slight different job. For
example, GPS Clock (Fig.6) shows the UTC
time, along with the date, your longitude
and latitude and the NMEA sentences.
By contrast, GPS Time And Test (see
Fig.7) synchronises your PC’s existing
clock to the correct local time (ie, the
clock is locked to the GPS time signal
it on 25mm-long untapped spacers.
These sit on the existing moulded
mounting pillars in the case and the
assembly secured using M3 x 30mm
machine screws.
Unfortunately, it’s quite tricky to fit
the main board into the enclosure with
the 25mm spacers simply sitting on
the moulded pillars. However, there
is an easy way around this and that is
to glue the spacers to the tops of the
pillars using 5-minute epoxy cement
– see Fig.5.
This is done by first “clamping”
each spacer to its pillar using a 30mm
screw and flat washer. That done, you
can apply a small “fillet” of epoxy
around the bottom of each spacer to
hold it in position. Leave the assembly
for a few hours to allow the epoxy to
set reasonably well before removing
the screws and flat washers.
Once the cement attaching the
spacers has set, the three leads from
but displays local time). Other information displayed includes the time before
and after synchronisation plus the NMEA
sentence containing both the time and the
co-ordinates for latitude and longitude. You
can also set the synchronisation interval
and set various COM port properties.
There’s a lot more GPS software (both
freeware and shareware) out there on the
Internet. Check it out for yourself.
the GPS driver board can be connected
to the main display board. Note that
these leads should be soldered to the
rear of the main board, rather than to
the front of the board as shown (for the
sake of clarity) in Fig.3. If you prefer,
you can fit PC stakes to the three wiring
points (from the copper side) to accept
the lead terminations.
The assembly can now be completed
by securing the display board in position using the M3 x 30mm screws and
then fitting the clear lid to the case.
Applying power
You will need a 12V DC 300mA
plugpack to power the unit. When
this is connected, the displays should
light up immediately and initially
show “0000”.
After a short time (anywhere up to
about 40s), the EM-408 GPS engine
should begin sending the NMEA 0183
data sentences to the clock display.
siliconchip.com.au
This view shows the GPS driver board mounted in the base of the case. The four 25mm untapped spacers which
support the display board are also shown glued to their respective integral mounting posts (see text).
The DC power socket and pushbutton switches on the display board are accessed via holes in the side of the case
(note: the DB9M connector is not necessary on the main board if mounting the GPS driver board internally).
The unit will then display either UTC
time, local standard time for eastern
Australia or daylight saving time
for Eastern Australia, as selected by
switches S1-S3.
If you live in a different time zone
to eastern Australia, then it’s a simple
matter to program in a different offset
from UTC (the default offset is +10
siliconchip.com.au
hours for eastern Australia). This is
done by pressing buttons S4 (hours
increment) and S5 (minutes increment), as described last month in Pt.1.
The clock will then show the correct
local time for your location.
Note that any changes you make to
the offset from UTC time are stored
in the micro’s on-board memory and
are retained even if the power is interrupted.
Note also that if the power is interrupted, the clock will automatically
start displaying the correct time within
30-40s when power is subsequently reapplied. It all depends how quickly the
EM-408 GPS module begins receiving
SC
data from a GPS satellite.
June 2009 43
|