Вы находитесь на странице: 1из 2

Adding an external TCXO to the MMDVM.

The Processor of the Arduino Due is clocked by a 12 Mhz Crystal. The part used has a frequency
tolerance of ±50 parts per million. Therefore the clock frequency of any individual Arduino can be
anywhere within this range and can vary within that range with changes of temperature.
The DMR protocol requires very precise timing to ensure the TDMA slots remain synchronised.
The DMR Specification calls for a tolerance of ±2 parts per million.

Whilst it would be theoretically possible to replace the Arduino crystal with a more accurate one it
is in practice a very difficult task to do due to the size of the components and the very fine PCB
tracks.

Jonathan has added a frequency calibration option to the MMDVM code. This may be all you need
for your situation. However it cannot compensate for temperature drift which may be an issue with
a remotely sited repeater.

This alternative solution uses an external Temperature compensated crystal oscillator (TCXO)
which is fed into one pin of the standard Arduino headers. This signal is then used to clock the
internal timer counter in place of the normal arduino clock. The processor continues to use the
original 12 Mhz Clock but all timing of the DMR Protocol is now synchronised to the new, more
accurate source.

TCXOs with a tolerance of ±2.5 ppm are available for a cost of a few pounds from several sources,
such as Farnell, Mouser etc. They are also usually available on Ebay. Note however that there are
two main types. One gives a 0.8V Clipped Sinewave output and the other gives a HCMOS level
output. Either can be used but the clipped sinewave type will need a couple of extra components to
change the levels to those required by the Arduino. The two schematics are shown below:-
The frequency of the TCXO must be an integer multiple of 24000 and 48000
Frequencies such as 12.0 Mhz (24000 * 500) and 14.4 Mhz ( 24000 *600) are suitable.
Frequencies such as 10.0 Mhz (24000 * 416.666) or 20 Mhz (24000 * 833.333) are not suitable.

The latest versions of MMDVM now have built in support for the use of an external TCXO.
This can be configured in the Config.h file. This should be done before the code is compiled and
loaded into the Due.

Example lines are included in the Config.h file for several common frequencies. These lines
are commented out by preceding them with // characters.

To configure the code for your oscillator uncomment the relevent line by deleting the // characters.

If your oscillator frequency is not included then you can add your own.
For example to use a 12.288Mhz oscillator add the following line:-

#define EXTERNAL_OSC 12288000

Note that if you are using an external TCXO you must make sure that the setting OscOffset in your
MMDVM.ini file is set to zero. This setting is only for use when calibrating the internal oscillator.
It is not required when using an external clock.

Colin G4EML.

Вам также может понравиться