[time-nuts] Another "atomic" clock question
albertson.chris at gmail.com
Fri Mar 7 18:33:05 EST 2014
Let's see what is needed.
The ADC is 10-bits so it can read to one part in 1024. It's a 5 volt
full scale so we are only able to measure 5 millivolt increments
The uP runs about 16 million instructions per second. What if we wait
1000 instructions to read the ADC what will the error be? The "1000"
number is conservative by at least a factor of 10. The discharge
resister has (assume) a one second time constant.
The read delay would be 1000/16,000,000 or 63 uSec. in that time the
voltage would have changed about 300 microvolts. The change is about
15 times less then the DAC is able to measure. But because of the
conservative estimate it might 150 times to small to measure. So
randomly delayed reads of the ADC will not matter. That said I'm sure
we can do 100X better then the 63 uS estimate.
On the other side, charging the cap. Let's say I mis-measured a wire
and it is 1cm longer then I though. The added delay adds a tiny delay
but this is not going to show up in a 10-bit ADC. Same if the
propagation delay changes through the 74HC390 based variable loading
of other output pins or noise from the 78ls05 voltage regulator. The
DAC is set up for 5 mV steps. I just don't need to worry about errors
that are well under 0.5 mV.
If I were building this using a 24-bit ADC and wanted to take full
advantage of its resolution then tiny things matter.
On Fri, Mar 7, 2014 at 12:47 PM, Jim Lux <jimlux at earthlink.net> wrote:
> On 3/7/14 12:31 PM, Chris Albertson wrote:
>> On Fri, Mar 7, 2014 at 10:28 AM, Lars Walenius
>> <lars.walenius at hotmail.com> wrote:
>>> Chris, about using one Arduino for two GPSDO controllers:
>>> Even if a microcontroller has lots of capacity I would recommend to use
>>> separate controllers for each oscillator. One of the reasons is what Tom van
>>> Baak said about using only one interrupt to avoid jitter and even if you
>>> trigger both channels from the same PPS and have just one interrupt you will
>>> have a problem that you can´t read two ADC´s at the same time.
>> You don't have to read both at the same time. All you need is to have
>> a constant time between the interrupt and when you read the ADC. That
>> constant can be any reasonable number so long as it remains constant
> there are plenty of Arduino-like boards out there that have ADCs triggered
> by the timer, which also fires the interrupt, but you don't have to worry
> about reading the ADC late.
> The teensy3.1 (new version of the teensy3 from PJRC) has a dual ADC, which
> can simulataneously sample. I've run the teensy3 at 300ksps+ (48 MHz
> processor clock). Right now, I've got software that is interrupt driven at
> 50 kHz that does two adc reads in a row and then feeds a 2 stage CIC
> decimator chain. It consumes about 60% of the processor, the bulk of which
> is the actual ADC read and the first integrators.
> for <$20, it's hard to beat.. the only downside is that you can't go down to
> radio shack and buy one on the spur of the moment.
> They'll also do a not very optimized fixed point 128 point FFT in about 0.9
> N pts μs
> 128 897
> 64 402
> 32 175
> 16 82
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to
> and follow the instructions there.
Redondo Beach, California
More information about the time-nuts