Gated ring oscillators for...something

A project log for Microhacks

A collection of small ideas

ted-yapoTed Yapo 12/10/2018 at 01:498 Comments

There have been a few times when I needed an oscillator I could start very quickly, with a small timing jitter.  I had never really found a good solution, until now.  Looking through a datasheet for a time-to-digital converter, I saw they used a gated ring oscillator for timing.  I quickly threw together a prototype using a 74AC02. The enable input is able to start the oscillator in 2.5ns, with a standard deviation (jitter) of only 68ps.

The circuit is extremely simple.  One NOR gate from the package is used as a buffer and inverter for the gate signal input.  The remaining three NORs are connected as a ring oscillator - two of them as inverters, and one used to gate the oscillation - it's an inverter when the other input is low.  39 ohm resistors are used to source terminate the signals sent to the oscilloscope to avoid reflections on the cable.  The cables to the oscilloscope are the same length.

The scope image below shows what's going on here - when the enable input goes low, the oscillator starts up - and very quickly.  You can see the relevant measurements at the bottom of the screen.

The enable input is able to start the oscillator in 2.5ns, with a standard deviation of only 68ps.  This is pretty good for something thrown together in a few minutes.  Once started, the oscillator runs at 76MHz - a version with one NOR (or NAND) gate and two inverters would probably run faster, although the start-up time is dependent on the 2-input gate.

The oscillator output could be used to drive a counter for measuring the period of short pulses, or could be divided down to drive the clock input of a microcontroller for synchronizing code with an incoming signal.  Of course, the frequency of the ring oscillator depends on temperature and supply voltage, so any system using this technique would have to calibrate periodically if accurate timing was required.

I think I'm going to make another version on a PCB with two 74LVC1G04's and a 74LVC1G00 to see how it works.


K.C. Lee wrote 12/15/2018 at 19:14 point

You can also try a 470 ohms series resistor and have the scope side terminated at 50 ohms. This could reduce the loading on the drivers.  50/(470+50) is 0.096 which is close to a 10:1 probe.

  Are you sure? yes | no

Ted Yapo wrote 12/15/2018 at 20:15 point

Yeah this is a good technique. I use 453 ohms (for 10x) and 953 ohms (for 20x) Z0 probes for "random" probing.  I bought some cheap RG174 BNC cables, cut them in half to make two solder-on probes each :-)

  Are you sure? yes | no

Ted Yapo wrote 12/15/2018 at 20:28 point

Oh, and the PCBs I recently sent out had to use the Z0-probe trick because 74AUC can't push enough current to drive a 50-ohm line.

  Are you sure? yes | no

salec wrote 12/15/2018 at 16:40 point

For such short Tpds, propagation time through wiring can get significant part of the total, even for relatively agreeable line lengths. For fastest possible oscillation, perhaps one inverting gate would suffice, if the feedback is routed over sufficiently long line/trace. Thus the loop delay wouldn't be tied only to multiples of two Tpds.

  Are you sure? yes | no

K.C. Lee wrote 12/15/2018 at 18:39 point

I don't think so.  A piece of wire at 10cm would be around 10% of the propagation delay.
(Using e=1 for air wire, trace width=0.5mm, thickness=0.5mm, height = 3mm )

The wiring looks like well below 2cm.

  Are you sure? yes | no

Ted Yapo wrote 12/15/2018 at 20:24 point

Yes, generally, you can't oscillate with one inverter - not enough phase shift to satisfy Mr. Barkhausen, but if you put something else in the feedback loop, sure.  I did see Ian Hickman do this with a MAR6 MMIC amp:

It's from his book "Analog & RF Circuits".  Note that he's using almost 1m of coax for the feedback, and getting around 100 MHz oscillation.

This is an interesting idea - A single NOR gate with a transmission line feedback loop as a gated oscillator.  I'm going to have to try it.

  Are you sure? yes | no

Elliot Williams wrote 12/14/2018 at 19:40 point

Runs faster on inverters? 

You could try swapping them all out for inverters, insert a resistor somewhere in the loop, and then pull that input node stronger to ground to stall the oscillations.  

If the resistor doesn't slow it down too much (wrto gate and parasitic capacitance, etc) this could end up getting you higher frequencies.  

The resistor could in principle be very low-value, but then you'll have one inverter driving as hard as possible into a dead short, which might have other effects.

I do this all the time at audio rates in the Logic Noise series.   Gating oscillators by draining out their feedback current is really useful.

  Are you sure? yes | no

Ted Yapo wrote 12/14/2018 at 21:08 point

Interesting - I have a tube of 74AC04s around somewhere; I'll have to give this a try!

I also sent out a few PCB designs for testing faster parts.  I'm particularly interested in the 74AUC's, which advertise a 1.5 ns Tpd *max* at 1.8V - they should run at least 111 MHz.  They also show a minimum Tpd of 0.4 ns (@2.5 V), so it could possibly go as high as 417 MHz.

  Are you sure? yes | no