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 119Next »
distemper6 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)  distemper6 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!

Djenne19 days 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 Djenne19 days 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)  Djenne19 days 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 dnhushak18 days 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)  Djenne18 days 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 dnhushak18 days 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!27 days 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.cavalcanti27 days 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.cavalcanti27 days 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.cavalcanti27 days ago

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

dnhushak (author)  ugo.cavalcanti27 days 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 dnhushak29 days 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)  Djenne29 days 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.

joefiorini29 days 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)  joefiorini29 days 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!

teeveebee1 year ago
Could somebody try to remove the 1MΩ resistor that connects to the audio jack? I don't have it and mine makes no sound at all, but I'm not sure if that's the only problem.
dnhushak (author)  teeveebee2 months ago

That resistor is just a pulldown resistor to prevent pops and clicks if there's a line selector or hard relay switch somewhere down the line, it shouldn't affect the audio output at all. I realize you left this almost a year ago, but I hope you've got it figured out!

I got mine working without the volume potentiometer. Simulations didn't work with it connected to ground. Didn't try it irl though. I will try when at home as soon as I have time.

I have headphones with one broken earplug. I use them for these kind of projects with mono sound. No problem if I break the other half. You can also use cheap headphones for testing.

paren0632 months ago

so what is the frequency range for this oscillator? What are the components that regulate this range? Thanks!

dnhushak (author)  paren0632 months ago

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):

hi just built one of these, can anyone point me in the right direction to make a controller for it, cheers

dnhushak (author)  chris.collins.984991235 months ago

Do you mean MIDI controller? Or controller as in something other than just the knobs?

sorry, i meant controller as in cv gate or midi, something so that its not just the drone if that makes sense

ChadYoung1 year ago
Can anyone who's already successfully constructed this help me out? If you can, please respond to this comment with a Skype name or oovoo name or facebook or whatever. Thanks.
dnhushak (author)  ChadYoung1 year ago
ChadYoung1 year ago
Can you post a better picture or diagram of the circuit board that more clearly shows where I need to connect the wires to the board, potentiometers and audio/power jacks? Not a schematic, an actual picture or diagram. Thank you :) if you can do this, it would be a great help.
dnhushak (author)  ChadYoung1 year ago
The actual layout is totally dependent on whichever perf board you get. the physical components will lay out different for every different board, so it's best to just follow the schematic. If you're having trouble/don't know how to read a schematic, just view it as "every line is one electrical connection," so a line between two objects indicates a connection. If there is a third line going to the same line, that end of that particular component is also connected to the same point.
1-40 of 119Next »