From 10MHz sine to square via comparator. Can you help? - Page 1
Forum section: electronics / beginners

author: Moriambar
author_rank: Unknown
timestamp: April 22, 2021, 12:17:40 pm
content: Hello,I'm currently experimenting with my GPSLDO and counters and I'm trying to transform it in a square wave of the same 10MHz frequency.I currently have aTLV3501conveniently mounted on an adapter, a breadboard, and a PSU. I would like to use a single 5V supply voltage.The cable is 50 Ohms. The problem is that I'm ignorant, so here is what I tried (fumbling around).First I tried terminating the cable and feeding that into the comparator. The problem is that I don't know how to precisely achieve the perfect reference voltage, without trimming a resistor divider by hand.I managed to obtain a somewhat "ok" result, by "magic", ie: I put the unterminated 10MHz in series with a cap and a 1k resistor and the input. then with two 10k I obtained ~50% of VCC fed into the reference input of the comparator.On the output I obtain (second case) some kind of square wave but it has a lot of ringing and looks kinda ugly especially for 10MHz.So, am I doing something horribly wrong? What should I learn to do this "properly"? Is the divider the best choice or is there anything else?Thanks a lot.

author: CaptDon
author_rank: Super Contributor
timestamp: April 22, 2021, 02:15:01 pm
content: I would probably try driving something like a 7414 schmitt device which cleans up the input by the hysteresis effect and then since there are multiple gates in the package take the output of the first gate and drive the remaining gates paralleled up for good solid output current drive and waveshape. Your ringing is probably due to long ground leads and breadboarding. It doesn't take much to make 10mhz look bad. Most comparators will suck at 10mhz and their output drive capacity to push loads is pretty feeble. Just play around with your input coupling to the 7414 until you get some stable output. There are CMOS versions available also if you need other than TTL level output.

author: fourfathom
author_rank: Super Contributor
timestamp: April 22, 2021, 03:14:19 pm
content: The TLV3501 is a fast comparator, and well-suited for your 10 MHz application. I'm using this part on the front-end of my Time Interval Counter design, for frequencies under 1 Hz and up to the 200 MHz area. It has a small amount of built-in hysteresis which should provide adequate noise immunity when given a clean input. You wouldn't want to drive a 50 Ohm cable directly with the output of the '3501, but it's fine for short traces and moderate impedances (I drive a FPGA with it).Your ringing is most likely due to your breadboard layout and bypassing. What are you driving with the comparator output?As for biasing the inputs. I have a 1/2 supply voltage divider, bypassed, with 1 Meg resistors from the divider to each of the comparator inputs. One input is then bypassed to ground, and the other capacitively coupled to the input protection network. I am trying to provide a one Meg input impedance, with switchable 50 Ohm option, but if you are only planning on 50 Ohm inputs you should reduce the biasing resistors to 1K or so. This will reduce the input offset-current-induced offset voltage. Not critical though when you have a strong input signal.If your input comes from off-board, then you need a protection circuit. I use two series resistors, and a TLV diode to ground at the junction. For 10 MHz, you can probably use 1K series resistors, which should give good protection. I use the T.I. TPD1E04U04 TLV diode.

author: David Hess
author_rank: Super Contributor
timestamp: April 22, 2021, 07:00:13 pm
content: Bruce as some example circuitsherebut does not go into great detail.There are subtle issues with comparators which influence phase noise and jitter, like hysteresis, but if you have no way to measure these, then a simple design can be used. I would look into a single comparator "data slicer" which takes feedback from the output of the comparator to enforce a 50% duty cycle. A CMOS comparator with its rail-to-rail output is particularly useful here, although in the past I placed a CMOS gate at the output of the comparator to do the same thing.

author: Moriambar
author_rank: Unknown
timestamp: April 22, 2021, 08:45:59 pm
content: Quote from: fourfathom on April 22, 2021, 03:14:19 pmThanks for everything. I'll try capitalizing on your persoonal experience.I'm driving some counters, specifically74AC163

author: Gerhard_dk4xp
author_rank: Frequent Contributor
timestamp: April 22, 2021, 10:15:31 pm
content: Somewhat surreal.That's what i just soldered 20 minutes ago:To the left is the comparator. No input signal = output low.To the right, the rectifier notes if there is AC and creates asignal to switch the 100 MHz VCXO from a trim pot to PLLvia an analog switch.There is an LVC163 also to divide the 100 MHz to 10 forthe 74LV4046 PLL.Gerhard

author: CaptDon
author_rank: Super Contributor
timestamp: April 23, 2021, 01:02:43 am
content: Be aware that the 74AC series are very picky about bypassing and lead lengths!!! They don't don't behave well on breadboards. They were so problematic for me I went back to 74LS in one of my projects.

author: David Hess
author_rank: Super Contributor
timestamp: April 23, 2021, 11:08:33 am
content: Quote from: CaptDon on April 23, 2021, 01:02:43 amThey did not behave well in DIPs either. The AC series in DIPs with standard pinouts never reached its potential performance because of excessive lead inductance. FAST and AS had an advantage here because of slower edge rates while maintaining low delay which is what matters.