Electrical – Precision timing using arduino and external clock

arduinobootloaderclockfrequency

I'm working on a very time limited project (8 weeks). Basically I need to perform measurements and save to memory.
2 identical boxes, 4 hours and no wireless or wired connection.
Each box is measuring on accelerometers.

Due to the limitation in time I need a platform with minimal soldering, PSU design and so forth.

The Arduino is an obvious choice but the crystal is simply to unstable. I need precision of +/- 30 ppb of clock frequency.

I've found OCXO that meet spec but not at 16Mhz..(or 8)..
Changing the clock speed to 12 MHz would help me a lot – but then the libraries becomes an issue.

My idea so far is to use arduino, write a program that sets a digital pin high, then waits x microseconds and then sets digital pin low. This way I can calibrate the x using a oscilloscope to land the right frequency of sampling.. hmm

Ideas?

Best Answer

You can use an Arduino, but calibrate it to an external clock (or replace the clock with the external one).

For instance Teensy 3.0 can use this FreqCount library https://www.pjrc.com/teensy/td_libs_FreqCount.html and basically compare its internal clock with an external one -- for 30 ppb, you'll need to average over 1 minute or so, but you can then calibrate your internal oscillator for basic timing.

To keep things stable you'll need to ensure the temperature of the arduino's crystal doesn't change too quickly for the calibration to catch up.

Alternatively, use an arduino, and replace its crystal with an external OCXO signal.