LW
Lars Walenius
Sat, Feb 15, 2014 11:13 PM
Bob Stewart wrote:
Tom tried to steer me to the PICTIC recently, and I sort of brushed him off, because, quite frankly I didn't understand. Now that I've really looked at it, it's a much better idea than using a dsPIC33 and brute-forcing it. But, I don't really need everything the PICTIC offers so I started doing surgery, and this is what I've come up with.
The nsVolts would feed one of the 10-bit ADC channels of the 18F2220 on the VE2ZAZ board, and the 1PPS signal does the obvious. I had no idea what to use for the RC, so I used smaller and smaller values till LTSpiceIV showed a large range over 360 degrees of phase. I realize that's probably a bad idea, but I have no point of reference, nor do I probably need the accuracy that would otherwise imply.
The 1PPS input passes through the enabled tri-state buffers U2A and U2C to charge the cap until the Q output from the D-flop is sent high from the 10MHz signal and disables U2C. When the 1PPS goes low, the cap is discharged and the D-FLop is reset. In practice, the chips would be 74AC types. I could only find LTSpiceIV models for 74HCT chips. LTSpice says it's workable, but in practice, I don't know. It might be finicky or unstable. Any comments would be welcome.
http://www.evoria.net/AE6RV/TIC/TIC.png
Bob - AE6RV
Bruce Griffiths wrote:
You should also include the effect of the A/D converter sampling
capacitance and saampling switch series resistace in the model. Since
the RC time constant of the sampling switch and associated sampling
capacitor can be 1us or more (temparature and Vcc dependent) the voltage
waveform at the sampling capacitor differs significantly from that
predicted by your simple modeel.
Aside from the nonlinearity due to the non constant charging current the
principle limitation on the resolution is due to the variable interrupt
latency for ADCs where the conversion is triggered by software.
This problem can be avoided if the ADC conversion can be triggered
directly by an external signal.
What Bruce says is really important.
For the ATmega328 the datasheet says 14pF sampling capacitance and nothing about temperature coefficient.
It also specifies a series resistance 1..100k. So not very precise. If it is 100k the time constant is 1400ns!
I have tested several boards and they seem to behave similar with my 1nF NPO capacitor. With a 47pF I guess it is more uncertain.
I also recommend you to test your model in the real world. I have used two good OCXOs and/or rubidiums with a small offset. Say 1E-9 offset that gives 1nS per sec. One of the channels have had a divider for example HC390s or the excellent PICDIVs from Tom Van Baak to output 1PPS.
I have also applied a heat gun near the circuit to test that the circuit doesn´t drift with temperature. A reasonable goal is to have less than 1LSB drift with a couple of degrees change. This test I have done with the same source for both 10MHz and 1PPS and a high reading from the ADC.
What Bruce says about interrupts is also worth to check in real life as “jitter” due to unexpected interrupts or different timing may give problem. In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS interrupt about 3us and delay the ADC conversion 3us. This is not so critical as it sounds as the ADC input is not changing at this time. For me this jitter gives more problem with the timer1 Reading. This jitter is not so easy to to test as it in the Arduino GPSDO program only happens every 1024secs and if you are (un)lucky it may not be seen at all depending on startpoint of timer1 relative to the 1PPS.
Lars
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
>>Bob Stewart wrote:
>> Tom tried to steer me to the PICTIC recently, and I sort of brushed him off, because, quite frankly I didn't understand. Now that I've really looked at it, it's a much better idea than using a dsPIC33 and brute-forcing it. But, I don't really need everything the PICTIC offers so I started doing surgery, and this is what I've come up with.
>>
>> The nsVolts would feed one of the 10-bit ADC channels of the 18F2220 on the VE2ZAZ board, and the 1PPS signal does the obvious. I had no idea what to use for the RC, so I used smaller and smaller values till LTSpiceIV showed a large range over 360 degrees of phase. I realize that's probably a bad idea, but I have no point of reference, nor do I probably need the accuracy that would otherwise imply.
>>
>> The 1PPS input passes through the enabled tri-state buffers U2A and U2C to charge the cap until the Q output from the D-flop is sent high from the 10MHz signal and disables U2C. When the 1PPS goes low, the cap is discharged and the D-FLop is reset. In practice, the chips would be 74AC types. I could only find LTSpiceIV models for 74HCT chips. LTSpice says it's workable, but in practice, I don't know. It might be finicky or unstable. Any comments would be welcome.
>>
>> http://www.evoria.net/AE6RV/TIC/TIC.png
>>
>> Bob - AE6RV
> Bruce Griffiths wrote:
>You should also include the effect of the A/D converter sampling
capacitance and saampling switch series resistace in the model. Since
the RC time constant of the sampling switch and associated sampling
capacitor can be 1us or more (temparature and Vcc dependent) the voltage
waveform at the sampling capacitor differs significantly from that
predicted by your simple modeel.
Aside from the nonlinearity due to the non constant charging current the
principle limitation on the resolution is due to the variable interrupt
latency for ADCs where the conversion is triggered by software.
This problem can be avoided if the ADC conversion can be triggered
directly by an external signal.
>Bruce
What Bruce says is really important.
For the ATmega328 the datasheet says 14pF sampling capacitance and nothing about temperature coefficient.
It also specifies a series resistance 1..100k. So not very precise. If it is 100k the time constant is 1400ns!
I have tested several boards and they seem to behave similar with my 1nF NPO capacitor. With a 47pF I guess it is more uncertain.
I also recommend you to test your model in the real world. I have used two good OCXOs and/or rubidiums with a small offset. Say 1E-9 offset that gives 1nS per sec. One of the channels have had a divider for example HC390s or the excellent PICDIVs from Tom Van Baak to output 1PPS.
I have also applied a heat gun near the circuit to test that the circuit doesn´t drift with temperature. A reasonable goal is to have less than 1LSB drift with a couple of degrees change. This test I have done with the same source for both 10MHz and 1PPS and a high reading from the ADC.
What Bruce says about interrupts is also worth to check in real life as “jitter” due to unexpected interrupts or different timing may give problem. In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS interrupt about 3us and delay the ADC conversion 3us. This is not so critical as it sounds as the ADC input is not changing at this time. For me this jitter gives more problem with the timer1 Reading. This jitter is not so easy to to test as it in the Arduino GPSDO program only happens every 1024secs and if you are (un)lucky it may not be seen at all depending on startpoint of timer1 relative to the 1PPS.
Lars
_______________________________________________
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
TV
Tom Van Baak
Sun, Feb 16, 2014 1:10 AM
What Bruce says about interrupts is also worth to check in real life as “jitter” due to unexpected interrupts or different timing may give problem. In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS interrupt about 3us and delay the ADC conversion 3us. This is not so critical as it sounds as the ADC input is not changing at this time. For me this jitter gives more problem with the timer1 Reading. This jitter is not so easy to to test as it in the Arduino GPSDO program only happens every 1024secs and if you are (un)lucky it may not be seen at all depending on startpoint of timer1 relative to the 1PPS.
Lars
For those working on microcontroller-based interpolators, you might want to contact Richard McCorkle; I know he has developed a number of other versions since he released the PICTIC II to time-nuts some years ago. One of the reasons he and I and others enjoy working with PIC's is that they have extremely short interrupt latency and no interrupt jitter. Now, I would not recommend anyone switching from Arduino to a PIC, but a working PIC solution may provide an example of what can be done, if nothing else.
For Arduino and other less fortunate uC you can always use external chips to obtain optimal and jitter-free charge/discharge timing. I'm not that familiar with Atmel chips; could capture/compare be used instead of interrupts somehow?
/tvb
> What Bruce says about interrupts is also worth to check in real life as “jitter” due to unexpected interrupts or different timing may give problem. In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS interrupt about 3us and delay the ADC conversion 3us. This is not so critical as it sounds as the ADC input is not changing at this time. For me this jitter gives more problem with the timer1 Reading. This jitter is not so easy to to test as it in the Arduino GPSDO program only happens every 1024secs and if you are (un)lucky it may not be seen at all depending on startpoint of timer1 relative to the 1PPS.
>
>
> Lars
For those working on microcontroller-based interpolators, you might want to contact Richard McCorkle; I know he has developed a number of other versions since he released the PICTIC II to time-nuts some years ago. One of the reasons he and I and others enjoy working with PIC's is that they have extremely short interrupt latency and no interrupt jitter. Now, I would not recommend anyone switching from Arduino to a PIC, but a working PIC solution may provide an example of what can be done, if nothing else.
For Arduino and other less fortunate uC you can always use external chips to obtain optimal and jitter-free charge/discharge timing. I'm not that familiar with Atmel chips; could capture/compare be used instead of interrupts somehow?
/tvb
BS
Bob Stewart
Sun, Feb 16, 2014 1:19 AM
Hi Lars,
I'm lucky in that I'm starting with a PIC running internally at 40MHz. So I think timing is not going to be a real problem. But after getting a response from Richard, I'm concerned about flaws in the spice chip models. I'm also a bit concerned about breadboarding, but come to think of it, in that link you gave me the guy used dead-bug assembly. So maybe that's not a big concern.
I suppose the next thing I need to do is experiment with using the ADC to grab the voltage from the incoming 1PPS pulse. Mine stays high for 50ms, so it should be an easy place to start. In fact, there are lot of things I can do with the 1PPS and an RC to get some experience working with the ADC.
Bob
From: Lars Walenius lars.walenius@hotmail.com
To: "time-nuts@febo.com" time-nuts@febo.com
Sent: Saturday, February 15, 2014 5:13 PM
Subject: Re: [time-nuts] TIC model
What Bruce says is really important.
For the ATmega328 the datasheet says 14pF sampling capacitance and nothing about temperature coefficient.
It also specifies a series resistance 1..100k. So not very precise. If it is 100k the time constant is 1400ns!
I have tested several boards and they seem to behave similar with my 1nF NPO capacitor. With a 47pF I guess it is more uncertain.
I also recommend you to test your model in the real world. I have used two good OCXOs and/or rubidiums with a small offset. Say 1E-9 offset that gives 1nS per sec. One of the channels have had a divider for example HC390s or the excellent PICDIVs from Tom Van Baak to output 1PPS.
I have also applied a heat gun near the circuit to test that the circuit doesn´t drift with temperature. A reasonable goal is to have less than 1LSB drift with a couple of degrees change. This test I have done with the same source for both 10MHz and 1PPS and a high reading from the ADC.
What Bruce says about interrupts is also worth to check in real life as “jitter” due to unexpected interrupts or different timing may give problem. In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS interrupt about 3us and delay the ADC conversion 3us. This is not so critical as it sounds as the ADC input is not changing at this time. For me this jitter gives more problem with the timer1 Reading. This jitter is not so easy to to test as it in the Arduino GPSDO program only happens every 1024secs and if you are (un)lucky it may not be seen at all depending on startpoint of timer1 relative to the 1PPS.
Lars
Hi Lars,
I'm lucky in that I'm starting with a PIC running internally at 40MHz. So I think timing is not going to be a real problem. But after getting a response from Richard, I'm concerned about flaws in the spice chip models. I'm also a bit concerned about breadboarding, but come to think of it, in that link you gave me the guy used dead-bug assembly. So maybe that's not a big concern.
I suppose the next thing I need to do is experiment with using the ADC to grab the voltage from the incoming 1PPS pulse. Mine stays high for 50ms, so it should be an easy place to start. In fact, there are lot of things I can do with the 1PPS and an RC to get some experience working with the ADC.
Bob
>________________________________
> From: Lars Walenius <lars.walenius@hotmail.com>
>To: "time-nuts@febo.com" <time-nuts@febo.com>
>Sent: Saturday, February 15, 2014 5:13 PM
>Subject: Re: [time-nuts] TIC model
>
>What Bruce says is really important.
>
>
>For the ATmega328 the datasheet says 14pF sampling capacitance and nothing about temperature coefficient.
>
>It also specifies a series resistance 1..100k. So not very precise. If it is 100k the time constant is 1400ns!
>
>I have tested several boards and they seem to behave similar with my 1nF NPO capacitor. With a 47pF I guess it is more uncertain.
>
>I also recommend you to test your model in the real world. I have used two good OCXOs and/or rubidiums with a small offset. Say 1E-9 offset that gives 1nS per sec. One of the channels have had a divider for example HC390s or the excellent PICDIVs from Tom Van Baak to output 1PPS.
>
>I have also applied a heat gun near the circuit to test that the circuit doesn´t drift with temperature. A reasonable goal is to have less than 1LSB drift with a couple of degrees change. This test I have done with the same source for both 10MHz and 1PPS and a high reading from the ADC.
>
>What Bruce says about interrupts is also worth to check in real life as “jitter” due to unexpected interrupts or different timing may give problem. In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS interrupt about 3us and delay the ADC conversion 3us. This is not so critical as it sounds as the ADC input is not changing at this time. For me this jitter gives more problem with the timer1 Reading. This jitter is not so easy to to test as it in the Arduino GPSDO program only happens every 1024secs and if you are (un)lucky it may not be seen at all depending on startpoint of timer1 relative to the 1PPS.
>
>
>Lars
>
>
TV
Tom Van Baak
Sun, Feb 16, 2014 1:33 AM
Bob,
I have versions of the picPET that capture an ADC reading along with a timestamp. I used this with one of Richard's simpler interpolator designs. There's some info at http://leapsecond.com/pic/picpet2.htm and the projects aren't final yet but you can contact me or Richard directly.
/tvb
----- Original Message -----
From: "Bob Stewart" bob@evoria.net
To: "Discussion of precise time and frequency measurement" time-nuts@febo.com
Sent: Saturday, February 15, 2014 5:19 PM
Subject: Re: [time-nuts] TIC model
Hi Lars,
I'm lucky in that I'm starting with a PIC running internally at 40MHz. So I think timing is not going to be a real problem. But after getting a response from Richard, I'm concerned about flaws in the spice chip models. I'm also a bit concerned about breadboarding, but come to think of it, in that link you gave me the guy used dead-bug assembly. So maybe that's not a big concern.
I suppose the next thing I need to do is experiment with using the ADC to grab the voltage from the incoming 1PPS pulse. Mine stays high for 50ms, so it should be an easy place to start. In fact, there are lot of things I can do with the 1PPS and an RC to get some experience working with the ADC.
Bob
From: Lars Walenius lars.walenius@hotmail.com
To: "time-nuts@febo.com" time-nuts@febo.com
Sent: Saturday, February 15, 2014 5:13 PM
Subject: Re: [time-nuts] TIC model
What Bruce says is really important.
For the ATmega328 the datasheet says 14pF sampling capacitance and nothing about temperature coefficient.
It also specifies a series resistance 1..100k. So not very precise. If it is 100k the time constant is 1400ns!
I have tested several boards and they seem to behave similar with my 1nF NPO capacitor. With a 47pF I guess it is more uncertain.
I also recommend you to test your model in the real world. I have used two good OCXOs and/or rubidiums with a small offset. Say 1E-9 offset that gives 1nS per sec. One of the channels have had a divider for example HC390s or the excellent PICDIVs from Tom Van Baak to output 1PPS.
I have also applied a heat gun near the circuit to test that the circuit doesn´t drift with temperature. A reasonable goal is to have less than 1LSB drift with a couple of degrees change. This test I have done with the same source for both 10MHz and 1PPS and a high reading from the ADC.
What Bruce says about interrupts is also worth to check in real life as “jitter” due to unexpected interrupts or different timing may give problem. In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS interrupt about 3us and delay the ADC conversion 3us. This is not so critical as it sounds as the ADC input is not changing at this time. For me this jitter gives more problem with the timer1 Reading. This jitter is not so easy to to test as it in the Arduino GPSDO program only happens every 1024secs and if you are (un)lucky it may not be seen at all depending on startpoint of timer1 relative to the 1PPS.
Lars
Bob,
I have versions of the picPET that capture an ADC reading along with a timestamp. I used this with one of Richard's simpler interpolator designs. There's some info at http://leapsecond.com/pic/picpet2.htm and the projects aren't final yet but you can contact me or Richard directly.
/tvb
----- Original Message -----
From: "Bob Stewart" <bob@evoria.net>
To: "Discussion of precise time and frequency measurement" <time-nuts@febo.com>
Sent: Saturday, February 15, 2014 5:19 PM
Subject: Re: [time-nuts] TIC model
> Hi Lars,
>
> I'm lucky in that I'm starting with a PIC running internally at 40MHz. So I think timing is not going to be a real problem. But after getting a response from Richard, I'm concerned about flaws in the spice chip models. I'm also a bit concerned about breadboarding, but come to think of it, in that link you gave me the guy used dead-bug assembly. So maybe that's not a big concern.
>
> I suppose the next thing I need to do is experiment with using the ADC to grab the voltage from the incoming 1PPS pulse. Mine stays high for 50ms, so it should be an easy place to start. In fact, there are lot of things I can do with the 1PPS and an RC to get some experience working with the ADC.
>
> Bob
>
>
>
>
>
>>________________________________
>> From: Lars Walenius <lars.walenius@hotmail.com>
>>To: "time-nuts@febo.com" <time-nuts@febo.com>
>>Sent: Saturday, February 15, 2014 5:13 PM
>>Subject: Re: [time-nuts] TIC model
>>
>>What Bruce says is really important.
>>
>>
>>For the ATmega328 the datasheet says 14pF sampling capacitance and nothing about temperature coefficient.
>>
>>It also specifies a series resistance 1..100k. So not very precise. If it is 100k the time constant is 1400ns!
>>
>>I have tested several boards and they seem to behave similar with my 1nF NPO capacitor. With a 47pF I guess it is more uncertain.
>>
>>I also recommend you to test your model in the real world. I have used two good OCXOs and/or rubidiums with a small offset. Say 1E-9 offset that gives 1nS per sec. One of the channels have had a divider for example HC390s or the excellent PICDIVs from Tom Van Baak to output 1PPS.
>>
>>I have also applied a heat gun near the circuit to test that the circuit doesn´t drift with temperature. A reasonable goal is to have less than 1LSB drift with a couple of degrees change. This test I have done with the same source for both 10MHz and 1PPS and a high reading from the ADC.
>>
>>What Bruce says about interrupts is also worth to check in real life as “jitter” due to unexpected interrupts or different timing may give problem. In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS interrupt about 3us and delay the ADC conversion 3us. This is not so critical as it sounds as the ADC input is not changing at this time. For me this jitter gives more problem with the timer1 Reading. This jitter is not so easy to to test as it in the Arduino GPSDO program only happens every 1024secs and if you are (un)lucky it may not be seen at all depending on startpoint of timer1 relative to the 1PPS.
>>
>>
>>Lars
>>
CA
Chris Albertson
Sun, Feb 16, 2014 2:22 AM
Rather then trying to model the capacitor why not build a reliable clock
and sample the clock before and after the signal you are trying to measure.
In other words you calibrate using a (say) 1 uSec pulse. That would
cover the case of passive parts aging.
On Sat, Feb 15, 2014 at 3:13 PM, Lars Walenius lars.walenius@hotmail.comwrote:
Bob Stewart wrote:
Tom tried to steer me to the PICTIC recently, and I sort of brushed him
off, because, quite frankly I didn't understand. Now that I've really
looked at it, it's a much better idea than using a dsPIC33 and
brute-forcing it. But, I don't really need everything the PICTIC offers so
I started doing surgery, and this is what I've come up with.
The nsVolts would feed one of the 10-bit ADC channels of the 18F2220 on
the VE2ZAZ board, and the 1PPS signal does the obvious. I had no idea what
to use for the RC, so I used smaller and smaller values till LTSpiceIV
showed a large range over 360 degrees of phase. I realize that's probably
a bad idea, but I have no point of reference, nor do I probably need the
accuracy that would otherwise imply.
The 1PPS input passes through the enabled tri-state buffers U2A and U2C
to charge the cap until the Q output from the D-flop is sent high from the
10MHz signal and disables U2C. When the 1PPS goes low, the cap is
discharged and the D-FLop is reset. In practice, the chips would be 74AC
types. I could only find LTSpiceIV models for 74HCT chips. LTSpice says
it's workable, but in practice, I don't know. It might be finicky or
unstable. Any comments would be welcome.
Bruce Griffiths wrote:
You should also include the effect of the A/D converter sampling
capacitance and saampling switch series resistace in the model. Since
the RC time constant of the sampling switch and associated sampling
capacitor can be 1us or more (temparature and Vcc dependent) the voltage
waveform at the sampling capacitor differs significantly from that
predicted by your simple modeel.
Aside from the nonlinearity due to the non constant charging current the
principle limitation on the resolution is due to the variable interrupt
latency for ADCs where the conversion is triggered by software.
This problem can be avoided if the ADC conversion can be triggered
directly by an external signal.
What Bruce says is really important.
For the ATmega328 the datasheet says 14pF sampling capacitance and nothing
about temperature coefficient.
It also specifies a series resistance 1..100k. So not very precise. If it
is 100k the time constant is 1400ns!
I have tested several boards and they seem to behave similar with my 1nF
NPO capacitor. With a 47pF I guess it is more uncertain.
I also recommend you to test your model in the real world. I have used two
good OCXOs and/or rubidiums with a small offset. Say 1E-9 offset that gives
1nS per sec. One of the channels have had a divider for example HC390s or
the excellent PICDIVs from Tom Van Baak to output 1PPS.
I have also applied a heat gun near the circuit to test that the circuit
doesn´t drift with temperature. A reasonable goal is to have less than 1LSB
drift with a couple of degrees change. This test I have done with the same
source for both 10MHz and 1PPS and a high reading from the ADC.
What Bruce says about interrupts is also worth to check in real life as
"jitter" due to unexpected interrupts or different timing may give problem.
In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS
interrupt about 3us and delay the ADC conversion 3us. This is not so
critical as it sounds as the ADC input is not changing at this time. For me
this jitter gives more problem with the timer1 Reading. This jitter is not
so easy to to test as it in the Arduino GPSDO program only happens every
1024secs and if you are (un)lucky it may not be seen at all depending on
startpoint of timer1 relative to the 1PPS.
Lars
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
--
Chris Albertson
Redondo Beach, California
Rather then trying to model the capacitor why not build a reliable clock
and sample the clock before and after the signal you are trying to measure.
In other words you calibrate using a (say) 1 uSec pulse. That would
cover the case of passive parts aging.
On Sat, Feb 15, 2014 at 3:13 PM, Lars Walenius <lars.walenius@hotmail.com>wrote:
>
>
>
>
>
>
> >>Bob Stewart wrote:
> >> Tom tried to steer me to the PICTIC recently, and I sort of brushed him
> off, because, quite frankly I didn't understand. Now that I've really
> looked at it, it's a much better idea than using a dsPIC33 and
> brute-forcing it. But, I don't really need everything the PICTIC offers so
> I started doing surgery, and this is what I've come up with.
> >>
> >> The nsVolts would feed one of the 10-bit ADC channels of the 18F2220 on
> the VE2ZAZ board, and the 1PPS signal does the obvious. I had no idea what
> to use for the RC, so I used smaller and smaller values till LTSpiceIV
> showed a large range over 360 degrees of phase. I realize that's probably
> a bad idea, but I have no point of reference, nor do I probably need the
> accuracy that would otherwise imply.
> >>
> >> The 1PPS input passes through the enabled tri-state buffers U2A and U2C
> to charge the cap until the Q output from the D-flop is sent high from the
> 10MHz signal and disables U2C. When the 1PPS goes low, the cap is
> discharged and the D-FLop is reset. In practice, the chips would be 74AC
> types. I could only find LTSpiceIV models for 74HCT chips. LTSpice says
> it's workable, but in practice, I don't know. It might be finicky or
> unstable. Any comments would be welcome.
> >>
> >> http://www.evoria.net/AE6RV/TIC/TIC.png
> >>
> >> Bob - AE6RV
>
>
>
> > Bruce Griffiths wrote:
> >You should also include the effect of the A/D converter sampling
> capacitance and saampling switch series resistace in the model. Since
> the RC time constant of the sampling switch and associated sampling
> capacitor can be 1us or more (temparature and Vcc dependent) the voltage
> waveform at the sampling capacitor differs significantly from that
> predicted by your simple modeel.
> Aside from the nonlinearity due to the non constant charging current the
> principle limitation on the resolution is due to the variable interrupt
> latency for ADCs where the conversion is triggered by software.
> This problem can be avoided if the ADC conversion can be triggered
> directly by an external signal.
> >Bruce
>
>
> What Bruce says is really important.
>
>
> For the ATmega328 the datasheet says 14pF sampling capacitance and nothing
> about temperature coefficient.
>
> It also specifies a series resistance 1..100k. So not very precise. If it
> is 100k the time constant is 1400ns!
>
> I have tested several boards and they seem to behave similar with my 1nF
> NPO capacitor. With a 47pF I guess it is more uncertain.
>
>
> I also recommend you to test your model in the real world. I have used two
> good OCXOs and/or rubidiums with a small offset. Say 1E-9 offset that gives
> 1nS per sec. One of the channels have had a divider for example HC390s or
> the excellent PICDIVs from Tom Van Baak to output 1PPS.
>
>
> I have also applied a heat gun near the circuit to test that the circuit
> doesn´t drift with temperature. A reasonable goal is to have less than 1LSB
> drift with a couple of degrees change. This test I have done with the same
> source for both 10MHz and 1PPS and a high reading from the ADC.
>
>
> What Bruce says about interrupts is also worth to check in real life as
> "jitter" due to unexpected interrupts or different timing may give problem.
> In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS
> interrupt about 3us and delay the ADC conversion 3us. This is not so
> critical as it sounds as the ADC input is not changing at this time. For me
> this jitter gives more problem with the timer1 Reading. This jitter is not
> so easy to to test as it in the Arduino GPSDO program only happens every
> 1024secs and if you are (un)lucky it may not be seen at all depending on
> startpoint of timer1 relative to the 1PPS.
>
>
> Lars
> _______________________________________________
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
> _______________________________________________
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
--
Chris Albertson
Redondo Beach, California
BS
Bob Stewart
Sun, Feb 16, 2014 2:23 AM
Hi Tom,
I appreciate the offer. I may wind up taking you up on it. But, I'm more interested in doing the project than getting an interpolator that works; if you get my meaning. So I'll just plod along at my own speed on this. I may wind up with questions in the future. I'll address them to the list, you, or Richard as seems appropriate, if that's OK.
Bob
From: Tom Van Baak tvb@LeapSecond.com
To: Discussion of precise time and frequency measurement time-nuts@febo.com
Sent: Saturday, February 15, 2014 7:33 PM
Subject: Re: [time-nuts] TIC model
Bob,
I have versions of the picPET that capture an ADC reading along with a timestamp. I used this with one of Richard's simpler interpolator designs. There's some info at http://leapsecond.com/pic/picpet2.htm and the projects aren't final yet but you can contact me or Richard directly.
/tvb
----- Original Message -----
From: "Bob Stewart" bob@evoria.net
To: "Discussion of precise time and frequency measurement" time-nuts@febo.com
Sent: Saturday, February 15, 2014 5:19 PM
Subject: Re: [time-nuts] TIC model
Hi Lars,
I'm lucky in that I'm starting with a PIC running internally at 40MHz. So I think timing is not going to be a real problem. But after getting a response from Richard, I'm concerned about flaws in the spice chip models. I'm also a bit concerned about breadboarding, but come to think of it, in that link you gave me the guy used dead-bug assembly. So maybe that's not a big concern.
I suppose the next thing I need to do is experiment with using the ADC to grab the voltage from the incoming 1PPS pulse. Mine stays high for 50ms, so it should be an easy place to start. In fact, there are lot of things I can do with the 1PPS and an RC to get some experience working with the ADC.
Bob
From: Lars Walenius lars.walenius@hotmail.com
To: "time-nuts@febo.com" time-nuts@febo.com
Sent: Saturday, February 15, 2014 5:13 PM
Subject: Re: [time-nuts] TIC model
What Bruce says is really important.
For the ATmega328 the datasheet says 14pF sampling capacitance and nothing about temperature coefficient.
It also specifies a series resistance 1..100k. So not very precise. If it is 100k the time constant is 1400ns!
I have tested several boards and they seem to behave similar with my 1nF NPO capacitor. With a 47pF I guess it is more uncertain.
I also recommend you to test your model in the real world. I have used two good OCXOs and/or rubidiums with a small offset. Say 1E-9 offset that gives 1nS per sec. One of the channels have had a divider for example HC390s or the excellent PICDIVs from Tom Van Baak to output 1PPS.
I have also applied a heat gun near the circuit to test that the circuit doesn´t drift with temperature. A reasonable goal is to have less than 1LSB drift with a couple of degrees change. This test I have done with the same source for both 10MHz and 1PPS and a high reading from the ADC.
What Bruce says about interrupts is also worth to check in real life as “jitter” due to unexpected interrupts or different timing may give problem. In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS interrupt about 3us and delay the ADC conversion 3us. This is not so critical as it sounds as the ADC input is not changing at this time. For me this jitter gives more problem with the timer1 Reading. This jitter is not so easy to to test as it in the Arduino GPSDO program only happens every 1024secs and if you are (un)lucky it may not be seen at all depending on startpoint of timer1 relative to the 1PPS.
Lars
Hi Tom,
I appreciate the offer. I may wind up taking you up on it. But, I'm more interested in doing the project than getting an interpolator that works; if you get my meaning. So I'll just plod along at my own speed on this. I may wind up with questions in the future. I'll address them to the list, you, or Richard as seems appropriate, if that's OK.
Bob
>________________________________
> From: Tom Van Baak <tvb@LeapSecond.com>
>To: Discussion of precise time and frequency measurement <time-nuts@febo.com>
>Sent: Saturday, February 15, 2014 7:33 PM
>Subject: Re: [time-nuts] TIC model
>
>
>Bob,
>
>I have versions of the picPET that capture an ADC reading along with a timestamp. I used this with one of Richard's simpler interpolator designs. There's some info at http://leapsecond.com/pic/picpet2.htm and the projects aren't final yet but you can contact me or Richard directly.
>
>/tvb
>
>----- Original Message -----
>From: "Bob Stewart" <bob@evoria.net>
>To: "Discussion of precise time and frequency measurement" <time-nuts@febo.com>
>Sent: Saturday, February 15, 2014 5:19 PM
>Subject: Re: [time-nuts] TIC model
>
>
>> Hi Lars,
>>
>> I'm lucky in that I'm starting with a PIC running internally at 40MHz. So I think timing is not going to be a real problem. But after getting a response from Richard, I'm concerned about flaws in the spice chip models. I'm also a bit concerned about breadboarding, but come to think of it, in that link you gave me the guy used dead-bug assembly. So maybe that's not a big concern.
>>
>> I suppose the next thing I need to do is experiment with using the ADC to grab the voltage from the incoming 1PPS pulse. Mine stays high for 50ms, so it should be an easy place to start. In fact, there are lot of things I can do with the 1PPS and an RC to get some experience working with the ADC.
>>
>> Bob
>>
>>
>>
>>
>>
>>>________________________________
>>> From: Lars Walenius <lars.walenius@hotmail.com>
>>>To: "time-nuts@febo.com" <time-nuts@febo.com>
>>>Sent: Saturday, February 15, 2014 5:13 PM
>>>Subject: Re: [time-nuts] TIC model
>>>
>>>What Bruce says is really important.
>>>
>>>
>>>For the ATmega328 the datasheet says 14pF sampling capacitance and nothing about temperature coefficient.
>>>
>>>It also specifies a series resistance 1..100k. So not very precise. If it is 100k the time constant is 1400ns!
>>>
>>>I have tested several boards and they seem to behave similar with my 1nF NPO capacitor. With a 47pF I guess it is more uncertain.
>>>
>>>I also recommend you to test your model in the real world. I have used two good OCXOs and/or rubidiums with a small offset. Say 1E-9 offset that gives 1nS per sec. One of the channels have had a divider for example HC390s or the excellent PICDIVs from Tom Van Baak to output 1PPS.
>>>
>>>I have also applied a heat gun near the circuit to test that the circuit doesn´t drift with temperature. A reasonable goal is to have less than 1LSB drift with a couple of degrees change. This test I have done with the same source for both 10MHz and 1PPS and a high reading from the ADC.
>>>
>>>What Bruce says about interrupts is also worth to check in real life as “jitter” due to unexpected interrupts or different timing may give problem. In the Arduino GPSDO the timer1 overflow interrupt may delay the 1PPS interrupt about 3us and delay the ADC conversion 3us. This is not so critical as it sounds as the ADC input is not changing at this time. For me this jitter gives more problem with the timer1 Reading. This jitter is not so easy to to test as it in the Arduino GPSDO program only happens every 1024secs and if you are (un)lucky it may not be seen at all depending on startpoint of timer1 relative to the 1PPS.
>>>
>>>
>>>Lars
>>>
>
>
>_______________________________________________
>time-nuts mailing list -- time-nuts@febo.com
>To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>and follow the instructions there.
>
>
BL
Brian Lloyd
Sun, Feb 16, 2014 2:50 AM
For Arduino and other less fortunate uC you can always use external chips
to obtain optimal and jitter-free charge/discharge timing. I'm not that
familiar with Atmel chips; could capture/compare be used instead of
interrupts somehow?
One should investigate the Propeller.
--
Brian Lloyd, WB6RQN/J79BPL
706 Flightline Drive
Spring Branch, TX 78070
brian@lloyd.com
+1.916.877.5067
On Sat, Feb 15, 2014 at 7:10 PM, Tom Van Baak <tvb@leapsecond.com> wrote:
> For Arduino and other less fortunate uC you can always use external chips
> to obtain optimal and jitter-free charge/discharge timing. I'm not that
> familiar with Atmel chips; could capture/compare be used instead of
> interrupts somehow?
>
One should investigate the Propeller.
--
Brian Lloyd, WB6RQN/J79BPL
706 Flightline Drive
Spring Branch, TX 78070
brian@lloyd.com
+1.916.877.5067
CA
Chris Albertson
Sun, Feb 16, 2014 5:14 PM
You all are "inventing problem". Solve them AFTER you find a problem you
can measure. Interrupts are not an issue on a UP like the AVR because
they are completely deterministic. It don't matter the lenth of time as
long as it is 100% deterministic and predictable. On a multi-tasking OS
running on a super scaler CPU you have unknowable latentcy but this is not
the problem on a chip that does one machine cycle per clock cycle.
On Sat, Feb 15, 2014 at 6:50 PM, Brian Lloyd brian@lloyd.com wrote:
For Arduino and other less fortunate uC you can always use external chips
to obtain optimal and jitter-free charge/discharge timing. I'm not that
familiar with Atmel chips; could capture/compare be used instead of
interrupts somehow?
--
Chris Albertson
Redondo Beach, California
You all are "inventing problem". Solve them AFTER you find a problem you
can measure. Interrupts are not an issue on a UP like the AVR because
they are completely deterministic. It don't matter the lenth of time as
long as it is 100% deterministic and predictable. On a multi-tasking OS
running on a super scaler CPU you have unknowable latentcy but this is not
the problem on a chip that does one machine cycle per clock cycle.
On Sat, Feb 15, 2014 at 6:50 PM, Brian Lloyd <brian@lloyd.com> wrote:
> On Sat, Feb 15, 2014 at 7:10 PM, Tom Van Baak <tvb@leapsecond.com> wrote:
>
> > For Arduino and other less fortunate uC you can always use external chips
> > to obtain optimal and jitter-free charge/discharge timing. I'm not that
> > familiar with Atmel chips; could capture/compare be used instead of
> > interrupts somehow?
> >
>
> One should investigate the Propeller.
>
> --
> Brian Lloyd, WB6RQN/J79BPL
> 706 Flightline Drive
> Spring Branch, TX 78070
> brian@lloyd.com
> +1.916.877.5067
> _______________________________________________
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
>
--
Chris Albertson
Redondo Beach, California
BG
Bruce Griffiths
Sun, Feb 16, 2014 6:49 PM
The response time to an external asynchronous interrupt is never
deterministic.
The external interrupt has to be synchronous with the uP clock to avoid
the non deterministic synchronisation delay.
Even when the external event is synchronous with the clock input to the
uP and the uP uses a divider to produce its internal clock then there is
the issue of divider phase shift.
This phase shift can lead to sampling the waveform before the peak
across the sampling cap. This is far from ideal, its better to sample at
or slightly after the peak when the sensitivity to timing variations is
far smaller.
To complicate the issue further the time of occurrence of the peak is
temperature dependent and the sampling switch on resistance is nonlinear
so that peak delay varies with temperature and input signal amplitude.
Its generally quicker and cheaper to estimate the magnitude of such
effects and make appropriate choices than just build a sequence of
breadboards each of which then needs to be extensively characterised.
Bruce
Chris Albertson wrote:
You all are "inventing problem". Solve them AFTER you find a problem you
can measure. Interrupts are not an issue on a UP like the AVR because
they are completely deterministic. It don't matter the lenth of time as
long as it is 100% deterministic and predictable. On a multi-tasking OS
running on a super scaler CPU you have unknowable latentcy but this is not
the problem on a chip that does one machine cycle per clock cycle.
On Sat, Feb 15, 2014 at 6:50 PM, Brian Lloydbrian@lloyd.com wrote:
For Arduino and other less fortunate uC you can always use external chips
to obtain optimal and jitter-free charge/discharge timing. I'm not that
familiar with Atmel chips; could capture/compare be used instead of
interrupts somehow?
The response time to an external asynchronous interrupt is never
deterministic.
The external interrupt has to be synchronous with the uP clock to avoid
the non deterministic synchronisation delay.
Even when the external event is synchronous with the clock input to the
uP and the uP uses a divider to produce its internal clock then there is
the issue of divider phase shift.
This phase shift can lead to sampling the waveform before the peak
across the sampling cap. This is far from ideal, its better to sample at
or slightly after the peak when the sensitivity to timing variations is
far smaller.
To complicate the issue further the time of occurrence of the peak is
temperature dependent and the sampling switch on resistance is nonlinear
so that peak delay varies with temperature and input signal amplitude.
Its generally quicker and cheaper to estimate the magnitude of such
effects and make appropriate choices than just build a sequence of
breadboards each of which then needs to be extensively characterised.
Bruce
Chris Albertson wrote:
> You all are "inventing problem". Solve them AFTER you find a problem you
> can measure. Interrupts are not an issue on a UP like the AVR because
> they are completely deterministic. It don't matter the lenth of time as
> long as it is 100% deterministic and predictable. On a multi-tasking OS
> running on a super scaler CPU you have unknowable latentcy but this is not
> the problem on a chip that does one machine cycle per clock cycle.
>
>
> On Sat, Feb 15, 2014 at 6:50 PM, Brian Lloyd<brian@lloyd.com> wrote:
>
>
>> On Sat, Feb 15, 2014 at 7:10 PM, Tom Van Baak<tvb@leapsecond.com> wrote:
>>
>>
>>> For Arduino and other less fortunate uC you can always use external chips
>>> to obtain optimal and jitter-free charge/discharge timing. I'm not that
>>> familiar with Atmel chips; could capture/compare be used instead of
>>> interrupts somehow?
>>>
>>>
>> One should investigate the Propeller.
>>
>> --
>> Brian Lloyd, WB6RQN/J79BPL
>> 706 Flightline Drive
>> Spring Branch, TX 78070
>> brian@lloyd.com
>> +1.916.877.5067
>> _______________________________________________
>> time-nuts mailing list -- time-nuts@febo.com
>> To unsubscribe, go to
>> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>> and follow the instructions there.
>>
>>
>
>
>
JD
Jimmy D. Burrell
Sun, Feb 16, 2014 7:55 PM
I've looked at several different manufacturer GPS datasheets now regarding the 1 PPS output in an attempt to compare apples to apples. Some of them rate their 1 PPS output as something on the order of "PPS signals have an accuracy ranging 10ns" which seems ambiguous. Does that mean the leading edge of their 1PPS is within 10ns of the GPS clock? Or simply that the stability of their 1 PPS is within 10ns? Or both?
Perhaps there's an industry standard for these specs of which I'm unaware?
The datasheet for my (presumably much older) Globalsat ER-102 seems, to me at least, to be much more clear stating "time reference at the pulse leading edge aligned to GPS sec., +/- 1 us". Which I interpret as the leading edge of my receiver's 1PPS is aligned with the GPS's clock to within +/- 1 us.
Jim...
N5SPE
I've looked at several different manufacturer GPS datasheets now regarding the 1 PPS output in an attempt to compare apples to apples. Some of them rate their 1 PPS output as something on the order of "PPS signals have an accuracy ranging 10ns" which seems ambiguous. Does that mean the leading edge of their 1PPS is within 10ns of the GPS clock? Or simply that the stability of their 1 PPS is within 10ns? Or both?
Perhaps there's an industry standard for these specs of which I'm unaware?
The datasheet for my (presumably much older) Globalsat ER-102 seems, to me at least, to be much more clear stating "time reference at the pulse leading edge aligned to GPS sec., +/- 1 us". Which I interpret as the leading edge of my receiver's 1PPS is aligned with the GPS's clock to within +/- 1 us.
Jim...
N5SPE