sloppy sine to square wave

Thread Starter

magnet18

Joined Dec 22, 2010
1,227
so I have a sine wave generator, made to be used in the RF range, 100kHz to a few Mhz, pics of the waveform attached

I want to build a circuit that can-
turn this into a square wave
have tuning function on the duty cycle(either to tune right in at 50, or full pwm fn, not sure yet)
frequency division function so I can get down to lower frequencies
a DC offset feature

I'm looking for quality a bit better than a 555 timer here

anyone have ideas to help me get started?
I know how to use a schmitt trigger and a binary counter for a divider, I'm a bit unpracticed with op-amps though
 

Attachments

#12

Joined Nov 30, 2010
18,224
Slow down magnet. All those ideas at once are scary. Let's do this one block at a time.

20 mv isn't going to work with a Schmidt trigger. Not enough voltage to work with the hysteresis. We need to define a gain bandwidth product and slew rate for an op-amp to jack that 20 mv up to something that will work with probably at least a 5 volt supply on a Schmidt trigger. Or do you have plenty more amplitude in that signal generator?
 

Thread Starter

magnet18

Joined Dec 22, 2010
1,227
Nope, 1v is as high as it goes
So if I want this to work up to 10 Mhz, amplified to 5Vpp, I need a gbwp of 50Mhz
Slew rate 5v/.05uS minimum if I'm thinking that through right
This is sounding like a significant design problem
Do you think adding a transistor preamp stage might help?
Or can this be handled with a few opamps?
I've learned a lot about opamps in school, never had a vhance to design something around one though
 
Last edited:

GopherT

Joined Nov 23, 2012
8,009
I think an NPN to amplify your signal a bit and use discrete logic chips might be the right path forward for a square wave at the frequencies you want.

Look up relaxation oscillator in the ebook section of this site to do the
PwM (adding two diodes and a potentiometer). You could add a switch to turn off the PWM section and insure the 50% duty cycle instead of diddling with the POT.
 

AnalogKid

Joined Aug 1, 2013
11,044
The first scope shot showed an input scale of 20 mV/div, but the displayed input is between 90and 100 mV. An LM318 should be able to get "a few MHz" up to 1 V p-p, more than enough to clip with another 318. Or even better, an ECL gate. Best FM limiter I ever saw. Once you've got a clean edge representing the input freq, you can turn it into just about anything.

ak
 

ScottWang

Joined Aug 23, 2012
7,400
Do you think is this going to work?
Input signal → FET amplifier amplifying to 3~5V → 74HC123 monostable multivibrator
 

Thread Starter

magnet18

Joined Dec 22, 2010
1,227
took some more scope readings today, at 10Mhz I get .9vpp, and I ordered a couple of the AD8099's, which should be more than adequate(I like to de-rate my projects anyway :))


does the attached schematic appear to be on the right track? (ignore part #s, didn't care to find right ones yet)

if so I need to manage DC offset, frequency division, output/input protection, and possibly a sync output for scope
 

Attachments

bertus

Joined Apr 5, 2008
22,277
Hello,

The input opamp can not see below 0 Volts.
That can create problems.
I have inserted a "following" DC offset circuit.
This will only work if the input signal is riding on a DC voltage.



The speed if this RC filter will determine its reaction speed.
I also exchanged the + and - inputs of the input amplifier, to have an inverting amplifier.

Bertus
 

Attachments

Last edited:

AnalogKid

Joined Aug 1, 2013
11,044
does the attached schematic appear to be on the right track? (ignore part #s, didn't care to find right ones yet)
Not quite. The first opamp is configured as a comparator with hysteresis, not an amplifier. If it is a fast part, it's output will be a square wave, so the duty cycle adjust will not have any effect.

Also, If all parts really are running on the same Vcc and GND, then what is the purpose of the resistor and diode at the 7404 input?

ak
 

Thread Starter

magnet18

Joined Dec 22, 2010
1,227
gah, this is why i don't schematic late at night

updated schematic, with the correct power pins, and a zener for logic level voltage clamping (5.1 to -.4)

again, ignore parts numbers for the time being
 

Attachments

Thread Starter

magnet18

Joined Dec 22, 2010
1,227
and this is why I should read all replies before going and changing things, thanks for noticing the switched pins, I corrected it so they're both inverting
 

Attachments

#12

Joined Nov 30, 2010
18,224
That looks good to me.
(I just love seeing an op-amp being provided with plenty of power supply voltage.)
 

bertus

Joined Apr 5, 2008
22,277
Hello,

That looks fine, as long as your signal is close to the zero line.
An DC offset will be amplified too.

Bertus
 

#12

Joined Nov 30, 2010
18,224
You could add a capacitor before the input to eliminate any DC offset from the signal generator. But then, you're smart enough to know that by yourself.
 

Thread Starter

magnet18

Joined Dec 22, 2010
1,227
yea, probably a good idea, 100nF should do

does this chip look like a good one to use for the binary divison?
built in schmidt on the input so it would replace the shcmidt on the current schematic, plus it's programmable which gives me the option to play with the binary input

74hc7292

Normally I would use a CD 4040, but at 5V 10MHz is pushing the max frequency, and I'd rather not have the thing locking up all the time

the 74hc7292 is a bit pricey and a lot overkill, so if you know a better option I'd appreciate it

http://www.mouser.com/ProductDetail...GAEpiMZZMtdY2G%2bSI3N4UNp8dauZvXKjUMRILUFkN0=

Thanks!
 
Top