Instructables
loading
loading

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
DSCN0484.JPG
merchant.jpeg
merchant-1.jpeg
DSCN0496.JPG
DSCN0501.JPG
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 123Next »
K2DH13 hours 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)  K2DH11 hours 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 dnhushak8 hours 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 K2DH8 hours 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?

IMG_0104[1].JPGIMG_0105[1].JPGIMG_0106[1].JPG
distemper8 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? :)
tnx

dnhushak (author)  distemper8 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:

http://electronicdesign.com/ideas-design/efficient...

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

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

http://www.digikey.com/product-detail/en/UA741CP/296-11107-5-ND/382197

Djenne dnhushak20 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)  Djenne20 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 dnhushak20 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!29 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!

IMG_0211.jpeg
dnhushak (author)  ugo.cavalcanti29 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.cavalcanti29 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.cavalcanti29 days ago

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

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

IMG_0572.jpegIMG_7532.jpegIMG_9166.jpegIMG_5354.jpeg
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: 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!

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

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

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

paren0633 months ago

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

dnhushak (author)  paren0633 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.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.
1-40 of 123Next »