Author Topic: Rectifying high frequency square wave  (Read 7350 times)

0 Members and 3 Guests are viewing this topic.

Offline jadewTopic starter

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: ro
Rectifying high frequency square wave
« on: November 23, 2012, 12:47:51 pm »
Hello guys,

I'm amplifying a sine wave (up to about 20Mhz), into a square wave using a fast opamp, however, since the opamp is powered from +- 6, I'm getting a square wave that swings from -5 to +5 and I only need it from 0 to +5.

I tried:
  • diode - too slow response
  • 700Mhz rated mosfet - still slow response, after 1Mhz it's like it's not even there - what am I doing wrong?
  • BJT - same thing as the fast mosfet
  • Fast comparator instead of the fast opamp - too slow*

* the comparator I used had only a 80ns response time, while the opamp has a 7ns response time, so definitely faster, but I still tried it.

I don't want to buy a really fast comparator, because they're getting ridiculously expensive after a certain bandwidth, so I'm looking for a cheap solution.

Please advise,
Thanks
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 672
  • Country: us
Re: Rectifying high frequency square wave
« Reply #1 on: November 23, 2012, 01:15:29 pm »
Have you tried using a 1N914 switching diode ?  Switching time is 4ns.

 

Online Psi

  • Super Contributor
  • ***
  • Posts: 12685
  • Country: nz
Re: Rectifying high frequency square wave
« Reply #2 on: November 23, 2012, 01:16:51 pm »
You should be able to do that using a high speed diode and opamp to make a precision rectifier
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline jadewTopic starter

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: ro
Re: Rectifying high frequency square wave
« Reply #3 on: November 23, 2012, 01:21:58 pm »
Thanks for the reply,

I don't think I have any fast diodes around, but the one ptricks suggested is cheap enough, so I'll add it to my next order.

I will also look into how precision rectifiers work.

Thank you
 

Offline jadewTopic starter

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: ro
Re: Rectifying high frequency square wave
« Reply #4 on: November 23, 2012, 01:35:00 pm »
Found some 5ns schottky diodes in my inventory.

They seem to work fine, but it looks like the falling edge is highly dependent on the resistor I'm using in series with the diode, I'm sure I'll figure out the right value tho.

Thanks guys
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: Rectifying high frequency square wave
« Reply #5 on: November 24, 2012, 10:16:07 pm »
Try powering the opamp from +6V supply only, connect the V- to ground  ;)
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 4849
  • Country: us
Re: Rectifying high frequency square wave
« Reply #6 on: November 26, 2012, 08:36:15 am »
A couple of things:

The problem with your FET/BJT solutions is probably that you are using them in a single-ended configuration.  When they are conducting, they provide a nice low impedance drive, but when they are not conducting they go high impedance and you have some external RC time that dominates your response.  The brute force way to solve this is to use a low impedance pull-down.  The better solution is to use two drive transistors in a push-pull configuration.  The same problem can happen with the diode, although my guess is that in the likely configuration you would have a faster RC time here.

It is generally better to avoid using opamps in saturated mode.  RF opamps are better behaved in this respect than their audio frequency friends, but even fast opamps can have problems where they are much slower coming out of saturation than their small-signal behavior would suggest.  Comparators are designed to operate this way, and will generally perform better.

Finally, since you signal is a sine wave, if your amplitude is predictable the best comparator is a logic gate.  Just amplify your signal to ~5 V pk-pk and capacitively couple it to a 74AC series inverter or buffer. You will get a nice, clean, fast square wave out, with very fast edges.  If the signal amplitude varies widely, but your opamp 'comparator' works OK to get a +/- 5 V signal, you can attenuate and capacitively couple that signal to a logic gate to clean up the edges and set the voltages.
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 12685
  • Country: nz
Re: Rectifying high frequency square wave
« Reply #7 on: November 26, 2012, 10:24:15 am »
His signal is a square wave.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 8109
  • Country: au
Re: Rectifying high frequency square wave
« Reply #8 on: November 26, 2012, 12:01:14 pm »
His signal is a square wave.

No,he is starting out with a sine wave then turning it into a square wave with an op amp.
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 12685
  • Country: nz
Re: Rectifying high frequency square wave
« Reply #9 on: November 26, 2012, 12:10:04 pm »
oh, my bad.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: Rectifying high frequency square wave
« Reply #10 on: November 26, 2012, 12:43:11 pm »

Finally, since you signal is a sine wave, if your amplitude is predictable the best comparator is a logic gate.  Just amplify your signal to ~5 V pk-pk and capacitively couple it to a 74AC series inverter or buffer. You will get a nice, clean, fast square wave out, with very fast edges.

+1. Make sure it's a schmitt trigger, 74AC14 or something.
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->