This is only a preview of the November 2018 issue of Silicon Chip. You can view 41 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 "Oh Christmas tree, oh Christmas tree...":
Items relevant to "USB digital and SPI interface board":
Items relevant to "Insomnia and Tinnitus killer":
Items relevant to "El cheapo modules, part 20: two tiny compass modules":
Articles in this series:
Items relevant to "GPS-synched, lab-quality frequency reference (Part 2)":
Purchase a printed copy of this issue for $10.00. |
Accuracy better than 100 parts per BILLION!
Lab Quality
Programmable
GPS-synched
FREQUENCY
REFERENCE
...
...
...
Part 2
by
Tim Blythman
and
Nicholas Vinen
Our new GPS Frequency Reference is really accurate, precise and flexible.
It’s also compact and easy to use, thanks to its touchscreen interface. You
can set the frequencies of its three programmable outputs over a wide
range (1-100MHz) and you can save preferred frequencies to a set of four
presets for each output, to make switching between them quick and easy.
L
ast month we described the circuit of our new Frequency Reference project and gave some
details on how the software worked.
We also explained its general concept
and how it achieves such flexibility
and accuracy in the frequencies that
it can produce.
This month, we have detailed assembly instructions and further information on how to
use it, including all the
various customisable
settings.
While the settings
all have sensible defaults, allowing you
to build it and start
using it without any
fiddling, you can tune
the software parameters to
suit your particular requirements.
Construction is pretty
straightforward, despite the use of
78
Silicon Chip
mainly surface-mount components.
There are just one or two that are
slightly tricky but they are not that
difficult, as long as you use the right
tools and take your time to get it right.
Later in this article, we describe
how the voltage-controlled oscillator
(VCO), which forms the heart of this
Frequency Reference, can be manually adjusted.
This can be handy if you have access to a high accuracy frequency meter or can’t access a GPS signal – for
example, if you’re operating the unit
in a basement or the middle of a steelreinforced building.
Building the LCD BackPack
The first step is to build the
Micromite LCD BackPack. You
can use the original 2.8-inch version (described in the February
2016 issue; siliconchip.com.au/
Article/9812) or the revised version from the May 2017 issue,
Australia’s electronics magazine
siliconchip.com.au
Fig.3: use this diagram as a guide
when building the Frequency
Reference. The orientations
of IC1-IC6, LED1, REG2 and
TS1 are critical so take care
to fit them the right way
around, as shown. You only
need to fit one of CON5 or
CON6, not both. Note the
approximate
location of the
bottle cap or
similar cylinder
which encloses the oven
section of the board.
which incorporates the Microbridge
(siliconchip.com.au/Article/10652).
We used the latter in our prototypes.
Note though that you cannot use the
software-controlled backlight option if
you build the BackPack V2 as this uses
pin 26, which we have had to use for
a different purpose on the Frequency
Reference board.
So you need to omit Q1 and Q2 and
fit VR1 instead. The backlight brightness is then adjusted using trimpot
VR1, as it was on the original BackPack.
Both versions of the BackPack are
available as complete kits from the SILICON CHIP Online Shop and can be purchased with the chip pre-programmed
to suit this project (Cat SC3321 or
SC4237).
We do not recommend that you use
the Micromite Plus LCD BackPack as
we have not tested it in this project.
If you need assembly instructions for
either kit, refer to the articles mentioned above.
But once you have the parts, the assembly is pretty easy, as only about 20
components are involved and the position/polarities of most of these are
printed on the PCB.
Solder the components on the PCB
where shown, being careful with the
orientation of the IC(s), regulator and
LED. The capacitors supplied in the
kit will not be polarised types.
Start assembly with the lowest profile components first and work your
way up to the taller ones.
Note that the 18-pin and 4-pin headers are mounted on the back of the
board and these should be fitted last.
You can then plug the screen into
the provided header socket and attach
it to the BackPack board using short
machine screws and tapped spacers.
Trim the solder joints on the top of
the LCD with some sharp sidecutters,
so they do not interfere with the lid
when fitted later.
PCB assembly
Next, we’ll assemble the Frequency
Reference PCB. Use the overlay diagram (Fig.3) as a guide to fitting the
components.
Before starting, check that you have
all the components needed. If you have
a kit of parts, don’t pull them all out yet
as some are hard to distinguish from
others, especially those which have
no markings (eg, ceramic capacitors).
We will refer to the orientation as
though the board is sitting as shown
in Fig.3, with the single BNC socket
(CON3) at the left, and the two BNC
sockets (CON2 and CON4) to the right.
This orientation is convenient since
most of the labels are right-side-up.
It’s easiest to start with the fine-pitch
ICs first as these are more difficult to
solder once surrounding components
have been fitted. So start by fitting IC2,
the CDCE906 PLL IC.
This part is only available in an
SSOP SMD package with a 0.65mm
lead pitch. It requires the most care to
solder but it is not too difficult to do
by hand if you are careful.
The other components are much
larger and have leads spaced further
apart so, after this chip, it’s downhill
all the way. Start by applying a thin
layer of flux paste to the pads for IC2,
then line up the chip with the pads,
ensuring the pin 1 marking is to upper right.
Using a fine-tipped soldering iron,
tack solder one of the corner pins down
and check that the all the IC pins line
up in the centre of the PCB pads and
that the IC is flat on the PCB.
If you are happy with the location of
IC2, carefully solder each pin.
If you have used flux paste as recommended, simply touching the iron
to the pin and pad at the same time
should cause a small amount of solder to flow onto both.
The stability of the reference
may be improved by
reducing the impedance
of ground tracks on the
PCB. This can be done by
soldering a wire from a
ground pad near VCO1 to
the ground end of IC2’s
bypass capacitor, then
another wire
from there to
the ground pad
of IC5’s bypass
capacitor and
also to the via near the GND
terminal of CON1.
siliconchip.com.au
Australia’s electronics magazine
November 2018 79
Here are two views of the completed
PCB, along with our highly technical
purpose-designed oven (in situ on the
right). If it looks just like a milk bottle
cap, then, ummmm . . .
You will need to add a bit of extra
solder to the iron from time to time.
At this stage, if there are solder bridges
between pins, don’t worry about them.
The important thing is to make sure
that all the pins are soldered properly.
Patience, and keeping the tip clean of
impurities like dark oxides will make
this process easier. Once all the other
pins have been done, go back and retouch the first pin.
If you have some solder bridges
(which are almost inevitable), apply
some fresh flux and use solder braid
(wick) to remove the excess.
Check deep between the pins, as
a single hidden bridge is enough to
cause trouble. We’ve found taking a
photo with a smartphone camera can
allow us to zoom in and see bridges
and other defects that aren’t immediately obvious to the naked eye.
Next on the list are the USB sockets, which can be a bit fiddly but fortunately, you only need to install one
of them.
We chose the mini-USB socket as
it is slightly larger and easier to handle but the micro-USB socket is now
the more common type in use (especially on phones), so you can fit that
if you prefer.
Again, start by putting a little flux
paste on the pads. Place the socket
on the PCB and its pegs should drop
into the provided holes in the PCB,
making alignment easier. Solder the
large mechanical pads first, making
sure the socket is flat and flush with
the board.
Now carefully apply a little solder
to each of the small leads to lock them
in place. We only need the pins at either end for power but it’s probably a
good idea to solder them all anyway.
Be sure to check that the USB data
pins are not bridged to the power pins,
80
Silicon Chip
as this may cause problems if the GPS
Frequency Reference is powered from
the USB port on a computer.
You can now fit IC1 and IC4-IC6, using a similar process as for IC2. These
are considerably larger and easier to
handle.
Check that the pin 1 markings are
correct. IC1, IC4 and IC6 have their dot
facing upwards, while IC5 has its dot
facing downwards.
If there is no dot, you might find a
bar on one end of the IC or even a bevel along one edge. In each case, pin 1
is close to the dot/bar/bevelled edge.
Next on the list are REG1, REG2 and
IC3, which are all within the oven outline. This is marked with a circle and
there is also a corresponding copper
pour on the PCB.
While this should not present any
difficulties, you might find that the
extra mass of copper pulls heat away
from the iron, so you may need to turn
its temperature up slightly to compensate.
If you are using the SOT-23 version
of REG1 then it should be soldered
first, as it is quite low. It will only fit
one way, so tack one leg in place, check
the alignment and then solder theother
two leads and touch up the first pin.
If you are using the TO-92 version of REG1, you can fit it lat-
SMD Resistor Codes
1
1
3
1
2
1
6
1
1
4
8.2MΩ
10kΩ
4.7kΩ
2.7kΩ
2.0kΩ
1.1kΩ
510Ω
220Ω
51Ω
39Ω
825
103
472
272
202
112
511
221
511
390
or
or
or
or
or
or
or
or
or
or
8204
1002
4701
2701
2001
1101
5100
2200
51R
39R
Australia’s electronics magazine
er, once all the SMDs are in place.
IC3’s pin 1 goes towards the upper
left corner while REG2’s pin 1 goes to
the top right.
Solder these components using
the same technique as the other ICs.
Now is a good time to solder VCO1.
The pin 1 marking on this module
is one of the smallest we have seen.
If you cannot find it, then rotate your
PCB so that CON3 is at the bottom.
Then place the VCO on the board so
that the writing on it is right-way-up.
You might now see the small marking at the bottom left, matching the
dot on the PCB.
For smaller components like this,
adding a small amount of solder to
one pad before placing the component means that you don’t have to apply solder while trying to position the
component.
Use tweezers to hold the component
flat and aligned while adjusting its position, then when you are happy, solder the other leads in place.
The VCO’s pads are much larger
than necessary, to make it easier for
you to get the iron in contact with
them despite the tiny size of the device. Ensure VCO1 is symmetrical
about the pads so that each one makes
good contact.
Carefully apply more solder if necessary but avoid getting any near the
top of the VCO, as it may stick to the
metal can and cause problems later.
Passive components
The passives should be fitted next.
The capacitors are not usually marked,
so only take them out of the package
one value at a time. Fortunately, they
are not polarised. Fit them where
shown in Fig.3.
Follow with the resistors. There
are several different values but forsiliconchip.com.au
The Frequency Reference PCB
“hangs” underneath the
Micromite BackPack PCB, as
shown here. The BackPack PCB
also holds the bottle cap “oven”
in place. If you mount it
differently, the cap will
need securing to the
PCB via the holes
provided.
tunately, they are marked with codes
indicating their values if you get them
mixed up.
Fit them in the same manner as the
capacitors and again, refer to the overlay diagram to see which goes where.
The final items are three 1.1k resistors. You may have noticed that we
had four 1.1kresistors in our original parts list but there are only three
on the board.
We found that the resistor on IC2’s
Y4 output was limiting the swing on
the 40MHz signal going back to the Micromite, so its frequency wasn’t being
measured accurately.
Thus, we removed this resistor from
the final design.
Through-hole components
Now is a good time to fit Q1, TS1,
LED1 and (if you are using the throughhole version) REG1. Ensure LED1 is
inserted with its longer anode lead
through the pad marked “A” on the
PCB. The orientation of the TO-92
package devices is shown in Fig.3 but
you may need to bend their leads out
(eg, using small pliers) to fit the pads
provided.
Now you can solder the headers
in place. This includes CON1, GPS1,
LK1, JP1 and JP2. These are all fitted
on the same side of the board as the
other components and, except, for
CON1, they are standard pin headers.
CON1 consists of two female header
sockets, one with 18 pins and one with
four pins. You can cut these down from
longer sockets if necessary.
When fitting the GPS header, be
careful to ensure it is perfectly vertical since otherwise, it may be difficult to plug the GPS connecting wires
into it later.
To make sure they will fit, it’s best
to plug the BackPack into the Frequency Reference board after soldering one or two pins on GPS1, so that
you can check that the header clears
the board above.
To help line the CON1 sockets up
correctly, you can plug them into the
siliconchip.com.au
corresponding headers on the Micromite LCD BackPack first and then
insert them into the pads on this
PCB and solder the pins in place.
The final items to fit are the three BNC
sockets, CON2-CON4. The large posts
require a decent amount of solder to
hold them in place (and heat to make
those solder joints).
If you’re building the unit into a
larger box than specified, you could
run some shielded cable out to chassis-mounted sockets.
Setting up the BackPack
If you haven’t used a PIC pre-programmed with the software for this project, you will need to set up the LCD
screen and touchscreen. You can do this
by connecting a USB/serial adaptor to
the 4-pin header and plug it into your
computer, then open up a terminal program, select the correct COM port and
set the baud rate to 38,400.
Reset the Micromite and you should
receive a greeting banner in the console. If you don’t, check the serial wiring, COM port, baud rate, power supply and that you have assembled the
PCB correctly.
Assuming you do get the greeting,
you can set up the display and touch
controller by issuing the following
commands:
OPTION LCDPANEL
ILI9341, L, 2, 23, 6
OPTION TOUCH 7, 15
GUI CALIBRATE
You then need to use a sharp object
(but not too sharp!) like a toothpick
to press on the middle of the targets
which appear on the screen. Once
you’ve done that, you’re ready to load
the BASIC software for this project.
Loading the software
Now that the two PCBs have been assembled plug them together but leave
all the jumpers off for now. The next
step is to load the BASIC software onto
the microcontroller.
If you have a PIC chip in your BackAustralia’s electronics magazine
Pack that was pre-programmed with
the GPS Frequency Reference software then you can skip right to the
testing stage.
We suggest that you then use the
MMEdit software to upload the BASIC program and the following instructions assume you will be using
this method. If you are familiar with
using the Microbridge to upload HEX
files directly to the chip then you can
do that instead.
Open MMEdit and load the BASIC
file for this project, which is available
from the SILICON CHIP website. Connect the Micromite to your PC via the
USB socket on the BackPack itself (not
the one on the GPS Frequency Reference PCB).
Under the Connect menu, select
New and find your Serial port number, then select it. Set the baud rate to
the rate your Micromite is set up for
(the default is 38,400)..
Under the Advanced menu, ensure
that the “Auto Crunch on Load” option is selected. This is necessary as
the program will not fit into the flash
memory without being “crunched”.
Press the button to upload the code
and when it finishes, type
OPTION AUTORUN ON
into the console which appears and
press Enter. This sets the program to
run next time the unit is powered up.
Wiring up the GPS module
There is not much spare room in
the specified enclosure for the GPS
module and anyway, you will probably get better results by mounting
it externally, as we have on our prototype.
Alternatively, you could use a module with an external antenna connector and mount a socket just above the
USB power socket on the case.
Because the GPS header (GPS1) is
so close to the BackPack board above
it, we recommend that you use slim
DuPont-style headers to make the connections.
November 2018 81
The pins are labelled as follows:
V+ (module power supply),
R (goes to Rx/RxD on the module),
T (goes to Tx/TxD on the module),
P (goes to 1PPS output on the module),
G (GND) and
E (enable – connected to V+).
If you are not using the recommended module then your module may not
have an enable pin, or it may require
a different voltage. You will need to
use a module with a 1PPS output and
TTL serial interface.
Testing
Close the console and unplug the
USB cable from the Micromite. Insert
a jumper on the LK1 header. This will
connect the VCO output to the Micromite’s pin 12, and also ensure that the
console does not start up and interfere.
Plug a powered USB cable into the
USB socket on the GPS Frequency
Reference PCB and observe LED1. It
should fade on and off for a few seconds.
At this stage, everything should be
working and the splash screen should
now be shown. To follow the status of
the startup, press the “Status” button.
The six lines at the bottom of the
Status screen are the important ones
to watch, as the top lines are mostly
information taken from the GPS module’s NMEA data.
You may not see all items go to “OK”
in the startup page straight away, particularly the GPS related items, as the
GPS module usually takes some time
to achieve a satellite fix.
If you are using the VK2828 GPS
module, you will know when it has
a fix, as the green LED on it will start
flashing.
The “Temp Sensor” line should read
“OK” and the temperature should be
rising or near the setpoint. That means
the oven is working correctly.
If “Temp Sensor” shows “Not
ready” then TS1 is not wired correctly. If “Temp Sensor” shows “OK” but
the temperature is not rising, there is
a problem with Q1, the 2.7kresistor
or DAC IC6. If the LED was fading
initially then the DAC is probably
working.
There are three lines which indicate
the status of the GPS module. The first
one to check is “GPS Receiver”. If that
does not show “OK” then no data is
being received and you should check
the GPS module’s wiring.
82
Silicon Chip
The “GPS 1PPS” and “GPS Locked”
status lines will typically be the last
ones to show “OK”, as they depend on
the GPS module having a good satellite fix. If you are testing indoors, you
may find they flick between “OK” and
“Not ready”.
The “PLL unit” and “VCO output”
lines are only updated at startup, so
will not change if left for a while. If
“PLL unit” does not show “OK” then
the Micromite cannot communicate
with IC2.
This may be due to problems with
the I2C bus.
“VCO output” shows OK when the
Micromite detects a ~40MHz signal.
That means that the PLL and VCO
are working to some extent. If there
is no “VCO output” then check that
the VCO chip is soldered to the PCB
correctly.
As the 40MHz signal to the Micromite is also fed through the PLL (IC2),
you should confirm that there aren’t
any problems with IC2 as well, eg,
solder bridges between pins or bad
solder joints.
Another test that you may like to do
if you have an oscilloscope or frequency counter is to check that there is an
output from each of the BNC sockets
(or the JP2 header).
Assuming that JP2 is set to the “BC”
position, all of CON2, CON3 and CON4
should be producing a 40MHz signal. If
this is the case, then it is time to complete assembly.
Finishing the oven
While you would have seen the temperature of the oven increasing on the
status page, and the unit is effectively
functional, we can add some insulation to the oven to improve its ability
to hold heat.
This helps to ensure that the temperature inside the oven is uniform,
so that the temperature measured by
TS1 more closely reflects the temperature of the other components inside
the oven.
We’ve sized the oven to be roughly
the same diameter as a bottle cap from
a two-litre milk bottle.
We’ve found that most of them also
have a foam insert which provides extra insulation
The height of our cap was precisely 12mm, which matches the tapped
spacers between the two boards. Unfortunately, due to the components
on the Micromite BackPack PCB, the
Australia’s electronics magazine
available space is reduced slightly, and
the rim of the bottle cap will probably
need to be trimmed.
It’s a good idea to give the lid a thorough clean with soap and hot water to
ensure there is no milk residue.
We can imagine nothing worse than
a GPS Frequency Reference that smells
like mouldy cheese!
If the lid is a snug fit between the
Micromite BackPack PCB and the GPS
Frequency Reference PCB, it can simply be sandwiched in place. Otherwise, holes are provided on the PCB
for cable ties to hold it in place.
Alternatively, you could use a small
amount of neutral-cure silicone sealant around the rim to seal it and stop
it from moving around.
The underside (ie, non-component
side) of the PCB should ideally be insulated as well.
You could either use a foam insert
from another milk bottle (held in place
by the same cable ties) or merely apply
some foam-backed double sided tape
to the back of the PCB.
PCB jumper settings
The jumper on JP1 selects whether the GPS module receives 3.3V or
5V. Most modules will run off 3.3V,
including the VK2828U7G5LF but if
you are not sure, check the module’s
data sheet.
Fit a jumper shunt between the
pins labelled B and C on JP2 if you
want a programmable frequency on
CON2. Alternatively, fit the shunt
between the pins labelled 1 and B
for a (disciplined) 1PPS (1Hz) output
from CON2.
The pins labelled “G” are connected
to ground so you can run a shielded
cable from the pairs of pins at either
end to a chassis connector if you want
to make both of these signals available
externally.
A shunt is placed on LK1 for normal
operation but this prevents programming the Micromite chip, so remove
it if you need to reprogram the chip.
CON7 is for debugging the software
so you can safely ignore it unless you
plan to modify the software.
Putting it all together
Now power down the GPS Frequency Reference and detach the Reference
PCB from the BackPack. If the BackPack display is attached by screws,
remove them to allow the front panel
to be fitted.
siliconchip.com.au
Assuming everything is apart, start
by attaching the LCD to the laser-cut
acrylic UB3 lid panel, using M3 machine screws at the front and tapped
spacers at the back.
Insert 1mm Nylon washers between
the lid and LCD to provide clearance
for the solder joints.
Use 20mm-long machine screws
on the bottom left, bottom right and
top right holes. This is with the touch
panel orientated so that its flex connector is on the right, along with the
14-pin header.
For the top left machine screw, use
one of the shorter ones initially fitted
to the LCD BackPack, again with a
tapped spacer on the back.
This is necessary because a fourth
long screw would interfere with the
GPS header.
The Micromite BackPack PCB can
now be inserted over the three long machine screws shafts and can be loosely
secured with a short machine screw
into the single tapped spacer.
Now feed the tapped spacers over
the three remaining screw shafts. Ensure everything is tight and lines up. In
particular, check that the LCD’s screen
is flush with (or slightly behind) the
lid panel.
Finally, attach the GPS Frequency
Reference PCB to the back of the Mi-
cromite BackPack PCB using the three
remaining short machine screws from
the original BackPack kit.
Putting it in the box
The enclosure specified is a standard UB3 Jiffy box. You will need to
make cutouts at two ends for the BNC
and USB sockets; see Fig.4 for details.
You only need to make one of the cutouts for the mini-USB and micro-USB
socket, depending on what you fitted
to the board.
We used a stepped drill to make the
BNC socket holes although you could
use a standard drill and then enlarge
them to size with a tapered reamer.
We made the vertical slot for CON3
using a hacksaw, cutting straight down
from the top of the side of the box.
The holes for the USB sockets can
be started with a small drill bit and
completed with a file.
If you are feeling lazy, or don’t enjoy cutting square holes, you could
make (slightly larger) round holes for
the USB sockets.
You may find that you have to make
the hole larger than shown in the diagrams if the shroud on your USB plug
is unusually large.
The final step is to carefully thread
CON2 and CON4 into the holes in the
right-hand side of the case and then
lower CON3 down into its slot. Check
that all the holes line up and that a
USB cable will plug in. Then attach
the acrylic lid to the Jiffy box using the
supplied screws (or longer ones, if the
ones that came with your box are too
short) and fit the nuts and washers to
the BNC sockets.
Using it
As you are reading the following
instructions, you may wish to refer
back to the first article on this project
in last month’s issue, as it included
images showing many of the screens
described below.
Once power is applied via the USB
socket, the start screen will show for
three seconds, after which the main
screen appears. Press the STATUS
button to check that everything is
working as expected. The BASIC program is quite busy processing data, so
sometimes it is necessary to press on
the buttons for more than a brief ‘tap’.
The Temperature line shows the current oven temperature and setpoint,
followed by the oven heat controller
DAC output, where zero is off and 4095
is full power.
After the unit has tuned itself and
the oven temperature has reached its
set point, it will provide a high degree
of accuracy.
Fig.4: cutting and drilling templates for the UB3
Jiffy box. You will only need to make a rectangular
cutout for one of the USB sockets, according to
what has been fitted. If required with an external
GPS, the slot to allow CON3 to be lowered into
its hole could instead be used to feed out GPS
antenna wiring, or you could make a dedicated
hole or mount a GPS antenna socket above the USB
connector hole.
siliconchip.com.au
Australia’s electronics magazine
November 2018 83
If your workbench area typically
gets above the 35°C we have set for
the oven, you may need to make the
setpoint a bit higher, so that the oven
has a consistent temperature in all
conditions.
See the Settings section below for
details on how to do that.
The “GPS 1PPS” and “GPS Locked”
status lines need to show “OK” before
oscillator disciplining occurs but once
the unit has got past the start screen,
it is effectively operational, although
it will not yet be operating with full
accuracy or precision.
The tuning algorithm waits until
it has received 1000 1Hz pulses with
GPS lock, then calculates the average
oscillator frequency (as seen on the
top line) and adjusts the VCO control
voltage to bring it closer to 40MHz.
Given that 1000 pulses take about
17 minutes and it takes some time for
the GPS receiver to get a satellite fix, it
should begin tuning itself within about
half an hour of power-on.
You can explore the features of the
unit before it has fully tuned itself;
the initial tolerance on the VCO is
2ppm, which makes it a useful tool
straight away.
Pressing the “BACK” button to go
back to the main menu, you can jump
straight into any of the adjustment pages for CON2-CON4 to set their output
frequencies.
Note that these labels are adjacent to their respective BNC sockets,
which helps you to remember which
is which.
Once you’ve entered one of the output setup screens, the “SEEK F” button allows a frequency to be entered
on a keypad and the unit will find the
nearest frequency that it can synthesise to what you enter.
It will show the frequency, the various PLL dividers and even the PLL’s
internal frequency to allow you to decide if that particular combination is
suitable.
Pressing “OK” will then update the
PLL parameters to those shown and
the new frequency will be immediately available from that output socket. Press “CANCEL” to go back to the
output setup screen without changing
the output frequency.
Manually setting up the PLLs
The “ADVANCED” page permits
manual selection of the N, M and P
dividers in the PLL, except for CON4,
84
Silicon Chip
Fitting the assembly to the
UB3 case is a little tricky –
but it can be done!
After drilling/filing
the required case
holes, you need
to introduce the
boards to the holes
for CON2 and CON4
at a quite steep angle,
as shown here. If
your holes are
accurately drilled,
the board should
slip into place
quite easily . . .
where only the P value can be changed;
the N and M values are fixed because
this PLL is shared with the output
that provides VCO feedback to the
Micromite.
As explained last month, the incoming 40MHz signal is multiplied by N
and divided by M to give the PLL frequency and then divided by P to give
the output frequency.
While the PLL is supposed to operate between 80MHz and 300MHz,
we found that it worked outside this
range (perhaps with more jitter).
The PLL frequency is displayed near
the top of the page, and if it would
be out of range, it is displayed in yellow. In this case, you should verify
that the output frequency is accurate
and stable.
If the resultant output frequency is
above 99999999Hz, it is displayed in
red. Although such frequencies can be
set, they appear to be very unstable and
may cause the PLL to stop functioning.
In any case, the output buffers will
not work well above 100MHz, so we
do not recommend that you use such
frequencies.
The only conditions that are enforced when you enter the PLL configuration manually are that N is between 1 and 4095, M is between 1 and
511, P is between 1 and 127 and that
N is greater than M.
Like with the other configuration
screen, once you have set parameters that you are happy with, press
the “OK” button to update the output
Australia’s electronics magazine
frequency or the “CANCEL” button to
return to the previous screen without
making any changes.
Using frequency presets
The CON2-CON4 setup pages also
show four preset frequencies. They are
initially 80MHz, 40MHz, 20MHz and
10MHz (all using a PLL frequency of
160MHz).
The frequency of the output can be
changed to any of the presets by pressing that button briefly. Or, to change
one of the presets, set the output to
the desired frequency and then hold
down the preset button for more than
one second.
There is also the option to copy
presets between the outputs by using
the “PRESETS” page, which can be
accessed via the “SETTINGS” button
on the main page. The preset page has
two buttons at the top to allow you to
scroll between the various connector presets and output value settings.
Their current values are displayed
below.
Further down, there is a “COPY”
button and a “PASTE” button, followed by the current ‘clipboard’ values. Pressing the “COPY” button copies the currently selected preset or output value to the clipboard and pressing
“PASTE” copies the clipboard value
back to the preset or output value. A
“BACK” button is provided to return
to the main page.
The software will give an error message if you try to copy any setting to
siliconchip.com.au
. . . and then it’s simply a
matter of lowering it all
into place so that
CON3 and the USB
socket mate with their
holes on the left-hand
end. There is no need
for any screws holding
the board from
underneath –
the screws which
hold the front
panel in
place hold
the whole
assembly
snug and
secure.
CON4 which is not compatible, ie, it
does not have N=4 and M=1.
Additional settings
On the “SETTINGS” page, there
are also options to adjust the oven
“TEMPERATURE” control loop
and the “VCO TRIM” settings.
Under the “TEMPERATURE” menu,
there are options for Setpoint, Gain
and Offset.
The Setpoint is the target temperature of the oven, and as we mentioned
earlier, it should be higher than the
highest expected ambient temperature
where the unit is being used. The default is 35°C, which is suitable either
for colder regions or buildings with
air conditioning.
The Gain and Offset values are used
to change the behaviour of the control
loop. It uses simple proportional control and the default values of 1000 for
Gain and 3000 for Offset work well.
It’s unlikely that you would need to
change them unless your transistor
Q1 has a wildly different gain from
the components that we used in our
prototypes.
Both values are in DAC step units
(out of 4095) with Offset being the
DAC output level when the target
temperature is reached and Gain being the change in DAC output level
for a 1°C error.
If you find that the oven temperature
is oscillating wildly, the Gain value
should be reduced. A small amount
of drift (under 1°C) is to be expected
siliconchip.com.au
and is not a cause for concern.
If you find that the oven temperature
is consistently too high or too low, adjust the Offset value. Allow the unit to
settle for about 10 minutes, then check
the current DAC output (the number
in brackets on the STATUS page) and
enter this value as the Offset. You may
need to repeat this a few times to get
an ideal value.
If you change these values, press the
“SAVE” button to store the changes
(shown in yellow) or the “BACK” button to go back to the settings screen
without making any changes.
Adjusting the VCO control
loop
The final settings page is for adjusting the VCO control parameters,
which include a “Gain” value, a “C
Value” (control value) and the “Update s”.
The “Update s” value is the number of 1PPS pulses that are counted
before an adjustment is made to the
VCO. The default is 1000 but this
can be extended to provide further
precision, as more 1PPS pulses will
be sampled.
The C Value is the current VCO control DAC value (0-16,777,215). This is
the value that is changed by the disciplining routine after the correct number of 1PPS pulses have been received.
As such, you should see the value
change as this occurs. The default value is chosen to be at the midpoint of
the VCO’s pulling range.
Australia’s electronics magazine
The Gain value sets the number of
DAC steps by which the C Value is
changed per Hertz of error, and has
been calculated as follows.
The VCO has a pulling range of 0.5
to 2.5V, corresponding to a frequency change of 10ppm (from -5ppm to
+5ppm around nominal). The DAC’s
voltage reference is nominally 2.5V,
so the span of the 2.0V pulling range
corresponds to 13,421,772 DAC steps.
With a 40MHz nominal frequency,
the 10ppm range of variation corresponds to 400Hz. Dividing 13,421,772
by 400 gives 33,554 DAC steps per
Hertz, which is our calculated Gain
value. Another way to look at this is
that each DAC step corresponds to a
change of around 30µHz in the VCO
output, which gives very fine control.
This is all designed to ensure that
the GPS Frequency Reference converges as quickly as possible on the first
round of disciplining; given that this
process is repeated, the unit is also
able to adjust for drift and other factors automatically.
Once again, use the “SAVE” button to commit any changes to flash
memory.
Manual VCO calibration
If you have an accurate frequency
counter, you can use this to adjust the
VCO manually, using the calculations
above. If you want to disable automatic adjustment, you can either remove
the GPS module or set the VCO “Gain”
value to zero. The “C Value” will then
remain constant.
To manually trim the VCO, allow
the oven temperature to stabilise and
set one of the outputs to 40MHz (they
are set to this by default in the initial
firmware settings). Check the frequency using a precision frequency meter
and note the offset in Hertz.
Take this offset, and multiply it by
the 33,554 value we calculated earlier,
and add (if the current frequency is too
low) or subtract (if the frequency is too
high) it from the current “C Value”.
If there is a small residual error, you
can repeat the adjustment to tweak it
further.
Conclusion
That completes the construction
and set-up of the GPS Frequency Reference.
We are sure that you will find it useful; we certainly plan to make good use
of our prototype.
SC
November 2018 85
|