Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Equipment & Tools From test equipment to hand tools

DIY square wave oscillator
DIY square wave oscillator
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Thread Tools Search this Thread
Old 23rd January 2009, 07:05 PM   #1
zigzagflux is offline zigzagflux  United States
diyAudio Member
zigzagflux's Avatar
Join Date: Oct 2006
Location: Charlotte, NC
Default DIY square wave oscillator

Anyone have a decent quality design for a square wave generator, running from 1 kHz to 2.5 MHz ? Of all the designs I've looked at, the VCO's out there are way up in the Megahertz range, no where close to the range I am looking for. 555 timer based circuits do not work well at 2.5MHz, so that's out.

Ideally, I would like to build my own circuit board containing a simple square wave generator. There will be an additional circuit following this square wave, of course, but that portion I have figured out. Entire assembly will mount inside an enclosure, producing 1.21 gigawatts. :-O Voltage rails are flexible, but 5V would be ideal. I would buy a dedicated IC if I could find one appropriate for the range of operation I am looking for.

Other requirements I can think of is 50% duty cycle. I can use a divide by 2 circuit to guarantee this, but then I will need a 2k to 5M range of operation. Stable frequency. Simple control, pot or encoder. Range switches are not too desirable, but I can deal with it if necessary.

Thanks for the ideas.
  Reply With Quote
Old 23rd January 2009, 07:30 PM   #2
Steerpike is offline Steerpike
diyAudio Member
Steerpike's Avatar
Join Date: Jan 2006
Location: Johannesburg, South Africa
How about a Wien bridge oscillator based on any general purpose wideband op amp (you probably will require several ranges, achieved by switching the timing capacitors, otherwise the frequency control pot will behave in a very coarse manner);
followd by a CMOS or TTL Schmitt buffer to turn it into a square wave.
  Reply With Quote
Old 23rd January 2009, 08:08 PM   #3
wakibaki is offline wakibaki  United Kingdom
Join Date: Jan 2008
There are a few threads out there about square wave generators, it depends what frequency and stability you want.

I'd be tempted to build a DDS, convert the sine to square (you can probably feed it direct into a bit of ECL) and then divide that down to get in the range you want. With a synchronous counter you get octaves at every tap, so you only need an octave of tuning range. No analog design involved, you can get a few DDS boards from ham radio sources.

  Reply With Quote
Old 23rd January 2009, 08:28 PM   #4
thespeakerguy is offline thespeakerguy
diyAudio Member
Join Date: Feb 2001
Location: Silicon Valley
Send a message via Yahoo to thespeakerguy
Default There's many ways

One difficulty is resolution over such a wide range. I would make a basic ring oscillator with 74HC14, and use a potentiometer to adjust frequency across a 16x or so range, perhaps 150kHz to 2.5MHz.

Use an MC14040 12 bit divider to provide 16x ranges or so by tapping Q4 (/16) Q8 (/256) and Q12 (/4096). THis puts the minimum frequency around 36Hz.

A SP4T switch selects the range you want
  Reply With Quote
Old 23rd January 2009, 11:55 PM   #5
bwaslo is offline bwaslo  United States
diyAudio Member
bwaslo's Avatar
Join Date: May 2006
Location: Portland, Oregon!
The VCO section of the cheap 74HC4046 PLL chips makes a nice square wave generator (and it can be voltage controlled, you can use a pot to adjust frequency). Can cover a very wide range, but for very low frequencies here's a second vote for the suggestion made above-- to use a bank of frequency dividers. That gives a guaranteed 50% duty cycle, and you need to only calibrate frequency once, since the divide by 2^N is precise.
  Reply With Quote
Old 24th January 2009, 03:34 AM   #6
wrenchone is offline wrenchone  United States
diyAudio Member
wrenchone's Avatar
Join Date: Feb 2004
Location: Silicon Valley
Ordinary bipolar 555 timers don't work to well at high frequency, but you may want to try the Texas Instruments TLC555 - it's much, much faster.
  Reply With Quote
Old 24th January 2009, 03:49 AM   #7
Conrad Hoffman is offline Conrad Hoffman  United States
diyAudio Member
Join Date: Mar 2007
Location: Canandaigua, NY USA
Look at the Linear Technology app notes. There are some very wide range VCO circuits there. I think you can also still get Exar chips- they also have some nice oscillators that will probably do what you want.
I may be barking up the wrong tree, but at least I'm barking!
  Reply With Quote
Old 24th January 2009, 12:54 PM   #8
Pjotr is offline Pjotr
diyAudio Member
Pjotr's Avatar
Join Date: Nov 2002
Location: Netherlands
It is out of production but maybe you can get a hand on a MAX038


  Reply With Quote
Old 25th January 2009, 12:23 AM   #9
zigzagflux is offline zigzagflux  United States
diyAudio Member
zigzagflux's Avatar
Join Date: Oct 2006
Location: Charlotte, NC
Thanks guys. I agree the divide by N counter is probably the best solution. I'll pursue a dedicated IC capable of a few MHz, and divide down from there.
  Reply With Quote
Old 28th January 2009, 04:18 AM   #10
quadtech is offline quadtech  India
diyAudio Member
Join Date: Oct 2007
Why not do it using one of those small microcontrollers?
Many of them go to 20MHz clock speeds or more. It
seems your desired freq range could be possible. You
could hook up a rotary encoder and LCD display too. Or you can use
a analog input to read a pot to control the freq.
  Reply With Quote


DIY square wave oscillatorHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sine wave - Square & Triangle wave generator using Transistors / OP-Amps lineup Solid State 20 9th October 2006 12:15 AM
Microphone turns triangle wave into square wave? Circlotron Analogue Source 18 25th January 2003 06:44 AM

New To Site? Need Help?

All times are GMT. The time now is 05:56 AM.

Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 16.67%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright ©1999-2017 diyAudio