Build a Square Wave Oscillator - Part 1 of DIY Modular Synths

Picture of Build a Square Wave Oscillator - Part 1 of DIY Modular Synths
Synthesizers have become an incredibly prominent instrument in modern music; it's difficult to hear a track without one anymore! Unfortunately, many synthesizers are incredibly expensive and hard to acquire, making it rather difficult for the hobbyist or budget musician to get any of those sounds. This instructable won't teach you how to build one of those feature-rich, user friendly synths, but it will start you off with a very simple device that can be used with other units to create interesting and unique sounds.

The following is the simplest and most fundamental piece of a synthesizer - an oscillator. This particular oscillator is a "Square Wave" oscillator, and has limited functions, but can still be used every now and then for fun sounds.

Let's get started!
Remove these adsRemove these ads by Signing Up

Step 1: Gather Your Parts

Picture of Gather Your Parts
The square wave oscillator is a rather simple device, so not much is needed to construct it. Most of these parts have some sort of alternative that can be found at radioshack, but I prefer this website for all of my electronics projects:

If you can't find all of these on that website, I would also suggest digikey.

Here's a list of everything you'll need:

-Project Enclosure
-2x 500kΩ Potentiometers
-Radioshack Perfboard
   -1x 4.7kΩ
   -5x 1kΩ
   -2x 1MΩ
   -1x 100µF
   -1x .001µF
-LED, any color
-741 Op Amp
-1/4" Audio Jack
-9v Power Adapter Jack

You will also need a few tools:
-Drill Press
-Drill Bits of Varying Sizes
-Drill Bit Index
-Safety Goggles
-Soldering Iron
1-40 of 132Next »
dnhushak (author) 4 hours ago

Hello everyone! I never anticipated this would become such a popular instructable! Because of its popularity, I'm going to be making some updates addressing the most common questions I've been asked.

First, I have uploaded a much nicer looking schematic, with more detailed notes on it. There is one embedded in the instructable as well as a pdf download for easier/more convenient reading.

Other planned updates:

-A fritzing diagram for the breadboard layout

-An eagle file so you can order a PCB custom made for this project!

-Information on how to get different frequency ranges

-A troubleshooting guide for some of the most common problems people have

If any of you have any suggestions for things you would like to see added/improved, please let me know!

distemper26 days ago

hey guys! i just finished this project and it works like a charm... i just modified it to get larger frequency range.

Many thanks for the schematics ;)

And I was just wondering if it would be possible to build two oscillators with the same power supply and connect both outputs on the same jack out to get two different frequencies? :)

dnhushak (author)  distemper26 days ago

Awesome! Glad the project worked for you!

And totally with the two oscillators, single PSU, just connect all the gnd, +9v, +4.5 and -4.5v nodes together!

As far as mixing them goes, I would suggest altering the volume output portion to include an active summing mixer:

That page should be a good start - let me know if you have more questions!

hey, after a cuple days i finally got some time to spare and started the mission... again :).

i tried building another oscillator on the same breadboard and just connected the outputs, but the effect was that at some pot position oscillator stops working, and quite some frequencies just jump from one to another while turning the pots. it was just a quick test...

thanks for the link, i'll read it and study it ;). its just that i dont have much of a electronic background and some of this things are quite new to me :). but hey, i got to start somewhere, right? :)

dnhushak (author)  distemperyesterday

You mean put both of the outputs together without another summing amplifier in place? That will probably cause some strange things to happen!

so i need 3 op amps in total then? two 741s to generate different frequencies and the third one for summing?

dnhushak (author)  distemper5 hours ago


If you're getting yourself into electronics, I'd suggest buying about 25 of these from the get go. They're one of the most common components in electronics, and they're pretty easy to fry.

ohh, and another question... is there any way to get even lower frequencies?

tnx ;)

dnhushak (author)  distemperyesterday

For the frequency question, I"m just going to copy-paste a response I gave to a similar question below:

Using the schematics shown, you get roughly 207 to 310 hertz. What controls the frequency in this one is the 500kΩ variable resistor and the 1MΩ resistor connected to it (top center of the schematic) To achieve higher frequencies, lower the value of the 1MΩ resistor, and for lower frequencies, raise this resistor value. To achieve a larger sweep, get a larger valued variable resistor.

If I had to do this again (who am I kidding, I probably will!), I would change the 1MΩ resistor to a 300kΩ, and make the 500kΩ variable resistor a 5MΩ for a larger range, extending from 60Hz to 1KHz.

The math for all this is explained on this page (there's even a handy calculator at the very end if you're feeling adventurous enough to try even more values):

K2DH18 days ago

Hi! I've almost made this now. But I have a little problem understanding some of your pictures. The one with the breadboard, on page 4, what are those 4 wires (two thick black and two thick red) being used to? Are they the ones that's connected to the 1/4" jack? and which of them is connected where if that's the case. I only have the jack to wire left now...

dnhushak (author)  K2DH18 days ago

I hope you're designing your circuit off of the schematic, and not off the pictures of the breadboard! Everybody's breadboard will be slightly different, even if the equivalent circuits are the same.

That being said, the two sets of wires in the picture are going to a 9v power supply (which is handled by the power jack), and an oscilloscope to verify the waveform at the output. Basically, if you've followed the schematic, you don't need those cables!

K2DH dnhushak12 days ago

Never mind, I found the right cable, so its working now. Nice tutorial! (Y)

dnhushak (author)  K2DH12 days ago

Good to hear!

K2DH dnhushak18 days ago
I followed the schematic as much as i could understand it, but the on-picture comments all of a sudden wont appear on my screen, so I can't see where the Jack is supposed to be connected. But I also made it look pretty much the same as on the breadboard picture.

(I'll add pictures when I get back on my computer
K2DH K2DH18 days ago

The upper 4 ones are the supposed to be the same as the ones you used (I placed them there before I knew they were for the power supply) but where should I place the Jack then?

Djenne1 month ago

I ordered all parts and got them in today; I only think I got the wrong op amp. Mine is called 'IC Opamp UA741CD STM'; is this the right one, and what (do you think) will happen if I use this, if it is the wrong one?

Djenne Djenne1 month ago

and the legs of my op-amp don't match up with the holes in my breadboard, if that might give a clue.

dnhushak (author)  Djenne1 month ago

Ah, you got a surface mount op amp instead of a DIP op amp. They're electronically the same thing, the only difference is how their leads line up. For sake of your sanity, I'd say just order a dip instead of a surface mount:

Djenne dnhushak1 month ago

I think I should, with the one I got now I'd have to solder every one of those tiny legs on it's own wire; I found the one you suggested. I might try it with the one I have now, but that probably won't work. Do they overheat easily?

dnhushak (author)  Djenne1 month ago

They only overheat if you connect something wrong and have an incredible current draw. Other than that, we're really not working a 741 all that much in this circuit.

Djenne dnhushak1 month ago

ah, okay. I was worried about overheating it if soldering takes too long, but that won't be much of a problem then either, I guess? Anyway, I'll order the right one soon.

ugo.cavalcanti made it!1 month ago

Hello everyone, I've build this Square Wave Oscillator. But it doesn't work: I checked the schematics and it is exactly the same on my breadboard. And I measured 4,00 V at pin 7 and -4,00V at pin 4, too. What can I verify in order to troubleshoot this circuit?

Of course I have a multimeter, but not an oscilloscope. Thank you in advance!

dnhushak (author)  ugo.cavalcanti1 month ago

Also, the + and - rails on the right - are those coming from a 9v power supply? Because it looks like your op amp rails are at 0v and 9v to ground instead of being split across the ±4.5 v

the + and - rails came from a 9v battery, and they are connected to op amp's pin 7 and 4 and to the "external leg" of the voltage divider.

dnhushak (author)  ugo.cavalcanti1 month ago

Oh yeah, that is correct - I was misremembering my own project.

I would say check and make sure that anything else labeled ground on the schematic actually goes to that ground of the voltage divider, and not the - terminal of the 9v.

Another suggestion I would have is to pick a fixed resistor value for the frequency pot (something about half of the max resistance of the pot), and replace that in there.

Also, temporarily lose everything after the opamp output (the 1MΩ resistor and onwards) and make sure that the circuit itself is actually oscillating. That portion is just a passive attenuator. If you get rid of that and your circuit actually makes noise, then your issue is in the attenuator. If you get rid of it and still nothing, then it is in the oscillator circuitry.

Lastly, instead of using the voltage divider, you can temporarily remove that and just use one (or two, if necessary) power supplies to provide ±4.5 volts directly to the op amp rails.

Hope all that helps!

ok, but if I pick a 250k resistor for the frequency pot, what about the 1M resistor? I have to keep it in place?

dnhushak (author)  ugo.cavalcanti1 month ago

Oh yeah, you could just bypass the variable resistor entirely, forgot about the 1M.

dnhushak (author)  ugo.cavalcanti1 month ago

I can't tell entirely from the picture, but it looks like the resistor in the far bottom right (row 51) isn't actually connected to anything

Thanks for answering :) the resistor is connected to gnd, in row 50 not 51. I will upload some other pictures so it will be easier to understand connections.

Djenne1 month ago

I understand almost the whole schematic (that's a whole accomplishment for me, first time trying to read one), but there are two things I don't completely understand:
- the frequency pot: is the 'open' line-thingie on the right the earth?
- the output: I have no idea how I should solder this thing to the rest of the circuit

Anyway, awesome instructable! Can't wait to get started with this project!

dnhushak (author)  Djenne1 month ago

The open is strictly that: open. The frequency pot acts as a standard variable resistor, with the variable being the resistance between terminals one and two. Terminal three serves no purpose. The difference between that and the volume one (which is connected to ground), is the volume one serves as a voltage divider, by changing the ratios of resistances between terminals 1 and 2, and 2 and 3:

Regarding the output - what are you confused about? The rectangular portion of the jack is the "sleeve," and the line with the "V" shaped thing at the end is the tip of the TS output jack.

Hopefully this picture can help a little:

Let me know if you're still unsure!

Djenne dnhushak1 month ago

I see, thanks! For the output, I was thinking of a TRS output Jack with three pins, since those are the ones I've worked with a little before.

Oh, and in the picture, they've got the 'S' and the 'G' connector; which of those is connected to the ground?

dnhushak (author)  Djenne1 month ago

After looking closer at the picture, I don't agree with their choice of letters for labeling, haha. The "G" is what goes to ground in the picture.

joefiorini1 month ago
This is my most advanced circuit and I'm having trouble getting it to work. I wired up a breadboard to test it out. Using a multimeter, it seems that I'm losing current at the op amp. I determined that by first seeing I have 9v on the V+ and V- pins of the op amp, then tried the output and input pins and they don't register at all (neither do any resistors or pots past the op amp).

I'm attaching a picture of my breadboard. It seems the same as the author's from what I can tell. Any thoughts on what I'm doing wrong?
15, 10:48 PM.jpg15, 10:48 PM.jpg15, 10:48 PM.jpg
dnhushak (author)  joefiorini1 month ago

Author here, thanks for giving this a try!

Next thing to check on your multimeter - does the + rail of the op amp show 4.5 v to ground, and the - pin show -4.5 v to ground?

Start from the left; the 9v battery goes into a voltage divider to give you + and - 4.5 v to a common reference.

The middle portion is the actual oscillator, so you can try to get that to work on its own without the volume control portion (the 1MΩ Resistor and onward). As soon as you can see oscillation on an oscilloscope, you can then add the volume control portion.

Another way to test this is to remove the battery and instead get a power supply (or two, depending on your PSU's capability), and plug in the ±4.5v to the op amp rails and breadboard just the center oscillator portion until that works.

In short, segment out your circuits to determine where the problem lies. This sort of "Compartmentalize and Test" troubleshooting method will help you with your studies immensely from here on out =D

Let me know if I can further clarify anything up there!

K2DH1 month ago

HEY! I'm just wondering. Will this Synth work with a Jack/XLR(M) cable inputted in a Mic/Guitar input on a sound card, so that it can be recorded in a DAW? We're going to make something at school, and I thought about giving this a shot. I'm using a AVID (fast travel SC) and the DAW I'm using is FL Studio, and would love to be able to record and mix sound from this Osc, live and with a lot of sound-effects.

dnhushak (author)  K2DH1 month ago

Do you mean an AVID Fast Track? If so, I believe those have combo 1/4" jacks, in which case yes, it would be able to plug in using a standard instrument cable!

K2DH dnhushak1 month ago

Yes, I ment Fast Track. I'm not sure why I wrote Travel, but it's the Duo version. So it has 2 front XLR inputs and 2 1/4" Jacks input and 2 outputs at the back. But I guess its going to only play direct sound if I plug it in through the Jack inputs, as they often are used as an extra sound source and not for recording. That's why I thought of getting an 1/4" Jack to XLR cable

dnhushak (author)  K2DH1 month ago

Yeah, those XLR jacks on the front are actually combo jacks, they can take an XLR or a 1/4". They're "smart" and if if you use either an xlr or a 1/4", they both show up as the same input.

K2DH dnhushak1 month ago

Oh that's awesome! I really didn't know that. Thanks a lot!

1-40 of 132Next »