10Mhz OCXO Sine to Square - Page 1
Forum section: electronics / projects

author: Bryan
author_rank: Frequent Contributor
timestamp: September 21, 2013, 09:46:18 pm
content: Hi All:Picking up one of those used 10Mhz OCXO off of Ebay. many seem to be the Morion MV89a which outputs a Sine wave. What is the best way to convert the sine wave to a square without compromising the output. Any sample schematics out there.Thanks in advance.

author: eurofox
author_rank: Unknown
timestamp: September 21, 2013, 09:55:51 pm
content: Quote from: Bryan on September 21, 2013, 09:46:18 pmI just got my Morion MV89a yesterday, I will just add a OPAMP LM7171, it will not create a square but I don't think you need it to use it for other instruments to use as a reference.eurofox

author: dannyf
author_rank: Super Contributor
timestamp: September 21, 2013, 10:01:14 pm
content: QuoteYou probably want to tell everyone what "without compromising the output" means.Otherwise, converting a sine wave to a square wave is fairly easy and most of the time unnecessary.

author: Matje
author_rank: Regular Contributor
timestamp: September 21, 2013, 10:34:32 pm
content: Quote from: Bryan on September 21, 2013, 09:46:18 pmAs dannyf pointed out you only need to convert the sine to square if you actually need that to drive digital logic. The reference inputs of many instruments are perfectly happy with a sine wave of about 10dBm (0.7V RMS).You may need to amplify the sine though - which to my surprise turned out not to be as easy as I thought. Search for "low phase noise amplifier" if you want real precision. OpAmps are right out as far as I understand...An example for converting sine -> square can be found here:http://www.qsl.net/zl1bpu/MICRO/SIMPLE/SimpleGPS.htm.U3a and U3b are the relevant parts, apparently using digital inverters this way is superior to using e.g. a comparator. Please note that for this you also may need to amplify the sine wave, its peak-peak voltage should be reasonably close to the supply of the inverters.For a lot more info search for the "time nuts" mailing list or for websites describing "GPS disciplined OCXO".

author: sub
author_rank: Regular Contributor
timestamp: September 22, 2013, 01:13:59 am
content: LT make some nice chips for this purpose, LTC6957 series. There are variations for a few different output types (complementary/in-phase CMOS, LVDS, LVPECL). I've not used them myself, but the was some interest on time-nuts a few months ago.

author: Bryan
author_rank: Frequent Contributor
timestamp: September 22, 2013, 01:24:41 am
content: Quote from: dannyf on September 21, 2013, 10:01:14 pmWhat I was looking to do is sent the output to a series of dividers so that I can divide down to various periods. Example 1us, 10 us, 1ms, 10ms etc. But concerned that converting the sine to a square wave may create jitter, noise in the output that will affect the time periods I am looking for. Want to test the accuracy of a scope.

author: Bryan
author_rank: Frequent Contributor
timestamp: September 22, 2013, 01:44:06 am
content: Quote from: sub on September 22, 2013, 01:13:59 amYup, that looks just perfect for what I need. Thanks for the tip.

author: dannyf
author_rank: Super Contributor
timestamp: September 22, 2013, 02:41:09 am
content: QuoteI am not sure why that would be a concern - or why anyone would think that would happen.Assuming enough swing, all you need is to connect the ocxo's output to a divider's input - sometimes it may require pull down, depending on the oscillator. The digital signal output will have the exact frequency / jitter characteristics of your sine wave output from the ocxo: if not, somehow someone has managed to alter the laws of physics in your universe.

author: Bryan
author_rank: Frequent Contributor
timestamp: September 22, 2013, 07:01:02 am
content: Quote from: dannyf on September 22, 2013, 02:41:09 amConnect a analog sine wave to a TTL divider?

author: sub
author_rank: Regular Contributor
timestamp: September 22, 2013, 09:35:07 am
content: Quote from: dannyf on September 22, 2013, 02:41:09 amDividers introduce noise, just like everything else. A square wave has a higher slew rate at the transition, so a similar level of noise at the input will produce much less jitter.

author: dannyf
author_rank: Super Contributor
timestamp: September 22, 2013, 11:32:55 am
content: QuoteYes, assuming sufficient swing to trigger '1' and '0' reliably.

author: dannyf
author_rank: Super Contributor
timestamp: September 22, 2013, 11:33:42 am
content: QuoteI understand every single word you said. Yet, I have absolutely no idea what you said.

author: mrflibble
author_rank: Super Contributor
timestamp: September 22, 2013, 03:12:49 pm
content: Quote from: dannyf on September 22, 2013, 02:41:09 amIt might be a concern if it's a timing application where every ps counts. And someone would think that it (affecting the time periods) would happen because it happens.QuoteYour divider will definitely be able to introduce some extra jitter. Or do the dividers in your universe have zero noise on the input stage? Voltage noise on the input will affect the point of zero crossing, which will result in timing uncertainty. And the lower the slew rate at the point of zero crossing, the higher the uncertainty. And just to clarify, zero crossing as in point of sine wave with highest slew rate. If you do the crossing at a non-zero voltage (because you use a cmos divider and were too lazy to bias properly for example) still all the above applies.That LTC6957 looks pretty damn neat however.

author: olsenn
author_rank: Frequent Contributor
timestamp: September 22, 2013, 03:38:50 pm
content: I asked myself this precise question when I purchased my Rb 10MHz frequency std. on ebay and needed to convert the +-1Vpp sinusoid to a 0V - 5V square wave. I ended up using a LT1016 as a comparator to accomplish this task and it works fairly well. Well enough that TTL devices can accept it as an input.

author: dannyf
author_rank: Super Contributor
timestamp: September 22, 2013, 04:20:44 pm
content: QuoteWithout it, the TTL devices can accept it as an input too.All those mumble-jumble on noise or ps or etc. are really for nothing: unless you are buying those used ocxo off ebay to measure the speed of light: ps noise for a 10Mhz oscillator?Seriously?

author: mrflibble
author_rank: Super Contributor
timestamp: September 22, 2013, 05:09:27 pm
content: *shrug* The numbers are the numbers, regardless of your mumble-jumble label. The OP can decide for himself what kind of phase noise he'd like to get, and choose a solution based on that. Anyways, for something simple that you might have lying around in the parts box you can use a 74HC14 for example.Oh and as an example of something where ps jitter matters. Try sampling 18-bits at MSPS rates and ignore "a few ps of jitter", see how that works out.Aperture jitter and all that...Or tell those guys doing high speed digital interfaces that ps jitter is mumble-jumble. That should be good. Or when you want to measure time intervals with a decent precision. or or or... So yeah, seriously.But as said, the OP can decide what he needs based on the application. Just slapping in a 74HC14 and seeing how it goes might be good enough.

author: KJDS
author_rank: Super Contributor
timestamp: September 22, 2013, 06:37:31 pm
content: I'd just use a couple of transistors. A pair of BFQ17s, the first in common emitter to amplifier, and the second as an emitter follower if necessary to provide some drive. Make sure they are well decoupled and keep the DC blocking caps small to remove any low frequency noise. Tune the amp a little, but not too much to get rid of broadband noise too.

author: dannyf
author_rank: Super Contributor
timestamp: September 22, 2013, 06:56:33 pm
content: On sine to square wave from oscillators: take a look at the output on a typical crystal oscillator (from a standalone oscillator or from a mcu), 9 out of 10 times, you will find that the output waveform resembles sine far more than square wave. Those oscillators apparently work just fine being directly coupled to a gate.The key here is to look for sufficient swings.

author: mrflibble
author_rank: Super Contributor
timestamp: September 22, 2013, 07:04:44 pm
content: No arguments there. But since the OP mentioned a Morion MV89 chances are he wants to get some proper performance out of it. Those are very nice low phase noise OCXO's, so it's a bit of a shame to then fsck it up. And typically you wouldn't use a morion to supply 10 MHz to your favorite mcu.

author: gerrysweeney
author_rank: Regular Contributor
timestamp: September 22, 2013, 08:03:55 pm
content: You can use an LM361 or other ultra fast comparator to do this. Have a look at the schematic here which is an OCXO board for a HP/Agilent frequency counter. The nice thing about an LM361 is its very low cost.http://gerrysweeney.com/diy-hpagilent-53131a-010-high-stability-timebase-option/Gerry

author: olsenn
author_rank: Frequent Contributor
timestamp: September 22, 2013, 08:47:07 pm
content: QuoteNoise has nothing to do with it. TTL devices can NOT understand a -1V - +1V sinusoid. The minimum value for a logic-1 is greater than 1 volt and negative voltages (below 0.7v) might even cause damage to the device depending on how it's implemented. If it was a 0V - 5V, then it would still work even though it's a sinusoid.

author: Bryan
author_rank: Frequent Contributor
timestamp: September 22, 2013, 08:52:38 pm
content: Yes, that's why i was confused on that point. Easy to do BTW. But I can see the output of the Morion ONLY working straight to a TTL input if it was amplified and then offset.

author: Bryan
author_rank: Frequent Contributor
timestamp: September 22, 2013, 08:55:57 pm
content: Quote from: gerrysweeney on September 22, 2013, 08:03:55 pmThanks Gerry, looks like a very workable solution and your measurements show it works.

author: sub
author_rank: Regular Contributor
timestamp: September 22, 2013, 09:16:36 pm
content: Quote from: dannyf on September 22, 2013, 11:33:42 amImagine you have a 1Vpk 10MHz sinusoid coming in, and want to trigger your flip-flop when it crosses 0V. You have 1mV RMS noise at the input. The slew rate of the sinusoid at the zero-crossing is 63V/us (=2*pi*f*A), so this causes a jitter of 16ps RMS (=1e-3/63e6).Now imagine you have a square wave coming in that goes from -1V to 1V (as before) in 5ns. This gives you a slew rate of 400V/us, and so jitter drops to 2.5ps RMS (=5e-9/400e6).If that isn't clear, I'll draw a picture.

author: dannyf
author_rank: Super Contributor
timestamp: September 22, 2013, 10:02:41 pm
content: QuoteAgreed.QuoteThis conversation did assume that the output from the oscillator has sufficient swing to trigger 0/1 reliably.If that's not the case, you have the option to self-bias a gate and ac couple it to the oscillator.

author: Bryan
author_rank: Frequent Contributor
timestamp: September 22, 2013, 11:01:55 pm
content: Quote from: eurofox on September 21, 2013, 09:55:51 pmDo you know what the output amplitude of the Mv89a is. Specs say ~7dbm

author: dannyf
author_rank: Super Contributor
timestamp: September 22, 2013, 11:47:09 pm
content: QuoteMore than 1Vpk.A guess on my part,

author: Bryan
author_rank: Frequent Contributor
timestamp: September 23, 2013, 01:30:37 am
content: I was thinking since 7dbm is around 5mw and using ohms law with a 50 ohm output around .25v, but that is just a wild guess and probably wrong.

author: KJDS
author_rank: Super Contributor
timestamp: September 23, 2013, 07:18:01 am
content: 0dBm in 50 ohms is 224mV rms.+6dBm will be double that voltage, so +7dBm will be a fraction more, so about 0.5V rms and ~1.5V p-k. Not enough to drive the average logic gate.

author: hli
author_rank: Frequent Contributor
timestamp: September 23, 2013, 09:40:27 am
content: The recommended way seems to be using an inverter gate:http://www.pletronics.com/ple/articles/view/401. I used this very circuit recently, but added a DFF divider after the inverter to get a signal with proper 50% duty cycle (my assumption is that the inverter has at least a stable point where it switches).

author: Bryan
author_rank: Frequent Contributor
timestamp: September 23, 2013, 09:55:31 am
content: Quote from: hli on September 23, 2013, 09:40:27 amLook like a neat solution, only thing is the specs call for a peak to peak of 0.8v. Should be ok according to what KJDS posted

author: dannyf
author_rank: Super Contributor
timestamp: September 23, 2013, 09:56:12 am
content: QuoteDo we know that it is referenced to a 50ohm load?

author: dannyf
author_rank: Super Contributor
timestamp: September 23, 2013, 09:57:44 am
content: QuoteThat's a self-biased gate ac coupled to the oscillator.