Re: [time-nuts] Lars GPSDO on EEVblog

2018-09-08 Thread Bob Martin

Charles,

 Attached is another way to do it. A higher charging voltage 
increases capacitor voltage linearity over the range of the ADC 
making curve compensation easier.


The bus switch has a very low on resistance to pretty much discharge 
the cap. The design is pretty old - I'm sure there are better parts 
available now. I believe there was also a calibration cycle that 
occurred fairly often which is why U21 looks so busy.


Cheers,

Bob Martin

On 9/8/2018 8:17 PM, Jim Harman wrote:

Charles wrote,


According to my tests, the B-C junction of a high-quality 2N3904 has
about 50pA of leakage at 20vDC reverse voltage.



That's good to know, but the problem I had with this circuit was with the
forward current at a low forward voltage. With this phase detector, the
HC4046 makes a 0 to 1 usec pulse representing the time difference between
the 1 pps from the GPS and the 1 MHz derived from the OCXO. This charges
the capacitor to a voltage proportional to the width of the pulse, the ADC
measures the capacitor voltage, and the cap discharges through the 1 Meg
resistor during the rest of the second.

When the HC4046 output goes low at the end of the pulse, the voltage on the
other side of the 1N5711 diode goes down to about 0.4 V. With a 1N4148 or
similar diode instead of the transistor, the forward current after the
capacitor is mostly discharged through the 1 meg resistor is enough to
prevent the capacitor from discharging all the way and the minimum voltage
at the ADC is about 0.3 V. or about 120 counts on the ADC. I was able to
get this below 90 counts by using the transistor. It might be possible to
reduce the 1 Meg resistor, but then we risk significantly discharging the
capacitor in the short time between the end of the pulse and the A/D
reading.

I would certainly be interested in any suggestions on improving this
circuit.





___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.

___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.


Re: [time-nuts] Lars GPSDO on EEVblog

2018-09-08 Thread Bruce Griffiths
Use the phase detector output to drive the tristate control input of a fast 
CMOS tristate state buffer (eg 74HC126 or faster) which in turn drives the RC 
network eliminating the diode.
Then correct for the exponential charging characteristics using the micro.

For best results increase ADC resolution by 1 bit or more and set RC charge 
time constant to around the maximum expected time interval.
Using a 2 stage synchroniser to drive the tristate control input of the buffer 
to minimise metastability issues may also be useful.

Even linear Time to amplitude converter circuits using a current source exhibit 
nonlinearities. Its easy enough to calibrate the nonlinearity of a simple TAC.

Bruce
 
> On 09 September 2018 at 14:17 Jim Harman  wrote:
> 
> 
> Charles wrote,
> >
> > According to my tests, the B-C junction of a high-quality 2N3904 has
> > about 50pA of leakage at 20vDC reverse voltage.
> 
> 
> That's good to know, but the problem I had with this circuit was with the
> forward current at a low forward voltage. With this phase detector, the
> HC4046 makes a 0 to 1 usec pulse representing the time difference between
> the 1 pps from the GPS and the 1 MHz derived from the OCXO. This charges
> the capacitor to a voltage proportional to the width of the pulse, the ADC
> measures the capacitor voltage, and the cap discharges through the 1 Meg
> resistor during the rest of the second.
> 
> When the HC4046 output goes low at the end of the pulse, the voltage on the
> other side of the 1N5711 diode goes down to about 0.4 V. With a 1N4148 or
> similar diode instead of the transistor, the forward current after the
> capacitor is mostly discharged through the 1 meg resistor is enough to
> prevent the capacitor from discharging all the way and the minimum voltage
> at the ADC is about 0.3 V. or about 120 counts on the ADC. I was able to
> get this below 90 counts by using the transistor. It might be possible to
> reduce the 1 Meg resistor, but then we risk significantly discharging the
> capacitor in the short time between the end of the pulse and the A/D
> reading.
> 
> I would certainly be interested in any suggestions on improving this
> circuit.
> 
> >
> >
> ___
> time-nuts mailing list -- time-nuts@lists.febo.com
> To unsubscribe, go to 
> http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.


Re: [time-nuts] Lars GPSDO on EEVblog

2018-09-08 Thread Jim Harman
Charles wrote,
>
> According to my tests, the B-C junction of a high-quality 2N3904 has
> about 50pA of leakage at 20vDC reverse voltage.


That's good to know, but the problem I had with this circuit was with the
forward current at a low forward voltage. With this phase detector, the
HC4046 makes a 0 to 1 usec pulse representing the time difference between
the 1 pps from the GPS and the 1 MHz derived from the OCXO. This charges
the capacitor to a voltage proportional to the width of the pulse, the ADC
measures the capacitor voltage, and the cap discharges through the 1 Meg
resistor during the rest of the second.

When the HC4046 output goes low at the end of the pulse, the voltage on the
other side of the 1N5711 diode goes down to about 0.4 V. With a 1N4148 or
similar diode instead of the transistor, the forward current after the
capacitor is mostly discharged through the 1 meg resistor is enough to
prevent the capacitor from discharging all the way and the minimum voltage
at the ADC is about 0.3 V. or about 120 counts on the ADC. I was able to
get this below 90 counts by using the transistor. It might be possible to
reduce the 1 Meg resistor, but then we risk significantly discharging the
capacitor in the short time between the end of the pulse and the A/D
reading.

I would certainly be interested in any suggestions on improving this
circuit.

>
>
___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.


Re: [time-nuts] Lars GPSDO on EEVblog

2018-09-08 Thread Magnus Danielson
Hi Jim,

On 09/08/2018 10:02 PM, Jim Harman wrote:
> Magnus said,
> 
> It would be interesting to test the linearity of the TIC separately for
> 
> instance.
> 
> I have done some testing of the TIC. It works quite well for the Arduino
> Uno with its 1 V full scale ADC setting, but the exponential shape of the
> RC charging from the 5 V is quite evident if you  use a processor like the
> Micro's 32u4 with a 2.56 V sensitivity. This circuit is also sensitive to
> any noise on the 5 V supply. The linearity is not too important for this
> application as long as it does not affect the loop gain so much that the
> loop becomes unstable.

Agreed. It is expected, but it would be fun to see how well it would do.

> However I have modified the circuit to use a simple 2 ma current source as
> shown in the attached schematic, with significantly improved linearity. H/T
> to Horowitz and Hill's The Art of Electronics for the idea of using an LED
> as the voltage reference for the current source. The diode-connected 2N3904
> has less leakage at a small forward voltage than any small-signal diodes I
> tested, so the output voltage with a very narrow input pulse is close to
> zero.

A more serious current source helps.

It comes as no big surprise that this has been a topic of interest to
several designers, hence there exists a number of patents on it.

Different approaches have been used. The HP5335A for instance uses a
three transistor setup, where the current source, a resistor, is
buffered behind the transistor pair that also switches it in and out.
The HP5335A then acts as pulse extender with x200 and a TTL counter to
complete the ADC process. Modern designs use a proper ADC instead but
the basic problem remains the same.

> I could run some tests on my version by setting the oscillator slightly
> off-frequency and capturing the resulting sloped TIC output, and would be
> happy to share the results if you are interested.

Please do. This is one of the methods and probably the easiest to setup
for most. Another approach is to use a programmable delay generator with
enough resolution, but having one of those around isn't as common as a
RF generator which can be detuned with sufficient resolution.

As I spend the evening refactoring the lab-bench, the RF generators gets
a more prominent placement as well as one of the delay generators. Hope
to get the TICs stacked up nicely for ones.

Cheers,
Magnus

___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.


Re: [time-nuts] Lars GPSDO on EEVblog

2018-09-08 Thread Jim Harman
Magnus said,

It would be interesting to test the linearity of the TIC separately for

instance.

I have done some testing of the TIC. It works quite well for the Arduino
Uno with its 1 V full scale ADC setting, but the exponential shape of the
RC charging from the 5 V is quite evident if you  use a processor like the
Micro's 32u4 with a 2.56 V sensitivity. This circuit is also sensitive to
any noise on the 5 V supply. The linearity is not too important for this
application as long as it does not affect the loop gain so much that the
loop becomes unstable.

However I have modified the circuit to use a simple 2 ma current source as
shown in the attached schematic, with significantly improved linearity. H/T
to Horowitz and Hill's The Art of Electronics for the idea of using an LED
as the voltage reference for the current source. The diode-connected 2N3904
has less leakage at a small forward voltage than any small-signal diodes I
tested, so the output voltage with a very narrow input pulse is close to
zero.

I could run some tests on my version by setting the oscillator slightly
off-frequency and capturing the resulting sloped TIC output, and would be
happy to share the results if you are interested.
___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.