Instructables

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

Featured
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:
http://www.pedalpartsplus.com/

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
-Resistors:
   -1x 4.7kΩ
   -5x 1kΩ
   -2x 1MΩ
Capacitors
   -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
-Sharpie
-Breadboard
-Safety Goggles
-Soldering Iron
-Solder
1-40 of 111Next »
ugo.cavalcanti made it!22 hours 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!

IMG_0211.jpeg
dnhushak (author)  ugo.cavalcanti21 hours 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.cavalcanti19 hours 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.cavalcanti18 hours ago

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

dnhushak (author)  ugo.cavalcanti21 hours 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.

IMG_0572.jpegIMG_7532.jpegIMG_9166.jpegIMG_5354.jpeg
Djenne3 days 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)  Djenne3 days 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: http://en.wikipedia.org/wiki/Voltage_divider

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:

http://www.mixaddicts.com/pulse/images/pioneer/3.5...

Let me know if you're still unsure!

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)  Djenne2 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.

joefiorini3 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)  joefiorini3 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!

K2DH7 days 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)  K2DH7 days 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 dnhushak7 days 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 http://www.swamp.net.au/images/productimages/Large/YS137N_YS228.jpg http://www.avid.com/static/Resources/Common/images/products/fasttrackduo/FastTrackDuo_Features_KeyFeature3_475xVariable.png

dnhushak (author)  K2DH7 days 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.

http://www.neutrik.com/en/xlr/combo-i-series/

K2DH dnhushak7 days 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):

http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/square.html

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.984991234 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
facebook.com/darren.hushak
:D
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.
I'm using the exact same perf board you used. I've arranged and soldered the capacitors, resistors and amp to the board. I've also wired the audio jack to the board. My problem is that I can't figure out Where the potentiometers and power jack are wired to on the board based on the schematic. It's very unclear to me. Seriously, I would really appreciate a better picture of the wiring. I have a school deadline for this in two days. Thanks.
ChadYoung1 year ago
In the list of required items, you included 1k Ohm resistors. Then in the schematic they are replaced with 10k Ohm resistors. Which type am I supposed to use?
I think that the 10k resistors is correct. However, I have been trying to figure out if all of the resistors in the schematic are used. I am counting 8 on the breadboard, soldered board, and parts list, but there are 9 in the schematic. Am I looking at something wrong?
dnhushak (author)  pbowers31 year ago
The schematic is the correct one to follow. There should be 3 1MΩ resistors, not 2.
dnhushak (author)  ChadYoung1 year ago
For whatever reason instructables wasn't letting me post replies. 10kΩ resistors are what I use. Sorry for the discrepancy!
dnhushak (author) 1 year ago
Yes, one could, but then you'd have to have a separate set of circuitry to amplify the speaker. Best bet would be to find some cheap computer speakers, rip them apart, and use their amplifier and speaker in the box. If you can find a set of speakers that runs on a 9v power supply that's a bonus.
Mr Tesla1 year ago
Would you be able to make the box a bit bigger and include a basic speaker hooked up where the jack goes?
I know I didn't write this document, but I'm thinking that the answer to that is yes, yes you can.
1-40 of 111Next »