[time-nuts] STM32 based thing (was GPSDO Alternatives)

Fabio Eboli FabioEb at quipo.it
Wed Dec 5 13:03:06 UTC 2012

Hello, I've written few messages on this mailing
list, I'm an absolute beginner on timing science.

I've never introduced myself, so this is a sort
of introduction...

Although this has nothing to do with
arduino, reading the post by Chris Albertson
about an arduino-based GPSDO, I will share
what I'm thinking to do.

Now I'm slowly documenting myself, the
argument is so vast and over my head that
I need time to start understanding, the
luck is that this mailing list (their memebers)
is... powerful :)

I'm seriously thinking to attempt a gpsdo.
It's mainly to learn something new.
For some reason I collected some Rb oscillators,
and I'd like to have a 10MHz absolute reference,
so I will try to discipline one of the Rb, and
later maybe an OCXO.

The project will proceed slowly and there is
some probability (small, but not null) that
it will be abandoned, because of time problems
of the author (could be a paradox?).

The platform I will try to use is the STM32F103
microcontroller, the reasons are:
- Mainly I have some devboards I used to develop
some hw in the past, that now sit unused,
and since I've used it in the past I have some
experiece with it.
- It contains extensive timing hw, it can measure
external pulses with internal 72MHz Ck as timebase,
downside is the 72MHz is internally generated by a PLL
from a lower frequency.
- It has two 12bit DAC, and external reference
- It has good and fast (12bit 1uS) ADC useful if one would
try to build a time to amplitude interpolator (is
that name right?).
- DMA facility to collect measurements without
messing with nested interrupts.
- At least two RS232 interfaces, easy to interface
to a PC.

For a beginner probably the learning curve is steeper than
an arduino, but I never used arduino, so cannot compare.
But for who is not accustomed to program an arm
micro, I think it will not be too difficult to try:
- devboards are CHEAP (ST and others seem to sell
them at less than the IC cost alone)
- Programming the flash is easy, the uc contains a
bootloader, you only need an usb-to serial adapter
- Once developed a working example, one can mod
the progam easily, it will be written in C language.
- There are free and working toolchains for these

For now my plans are rather nebulous, but roughly:
- I will start trying to check the jitter of the GPS I
will use (hope I receive it soon), with a counter and a PC.
- I will start building a time interval counter with
the stm32, that will use an external 10MHz as timebase
to measure the PPS of the gps, this will make me
getting familiar with internal micro timers, they have
some million possible configurations.
I will try to use the internal PLL clock as a
digital interpolator, to try to reach better than 20nS
- start to build some form of simple disciplining...
dont know yet how.


Chris Albertson <albertson.chris at gmail.com> ha scritto:

> With the price of T-Bolts now higher, does it make sense to build your own
> What is the simplest phase detecter that could work?  I think only that,
> and then a duouble oven crystal from eBay, a GPS and and Arduido.
> Yes the Aruino is expensive compared to a bare uP chip but using one, I
> thin you could build a GPSDO without a PCB and the Arduino's USB connection
> could be usful for power and logging/control.
> If ther phase detector where simple enough it could be build on a prototype
> board the fits on top of the Arduino.
> There are some other designs but because programming a uP and making a PCB
> seem to be rare skills that job tends to fall on one person.  Anyone can
> program an Arduino and with out need of a PCB the entire design could be
> puted on a web page and the replicated with common parts.

This message was sent using IMP, the Internet Messaging Program.

More information about the time-nuts mailing list