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.

This model is powered either by a 9v battery or an external 9v power supply, has one 1/4" output jack, and has two controls: volume and frequency.

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.

I've attached a saved shopping cart for Newark.com for all of the components you'll need. The total cost of this shopping cart is $36.54 before shipping, so it's a pretty cheap build!

Here's a (linked!) list of everything you'll need:

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 138Next »
dnhushak (author) 7 days 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!

gavox3 years ago
Any chance of getting a clearer schematic? can't see a blind thing on this one...
dnhushak (author)  gavox3 days ago

Three years later haha. I just updated the schematic on here to be much clearer.

dnhushak (author)  gavox3 years ago
http://www.instructables.com/files/orig/FG9/MG8C/GFRWMNFA/FG9MG8CGFRWMNFA.png

That should work.
eunoiahr3 days ago

hi there i have try 3 times to make this project with this material that you give us ...the pictures is not same with your first picture ... i have spent more than 45 euros and is not working ......i am not an expert is my first project ..... i realy disappointment because from what i read you change the material (resistors capacitor ) i have read also some comments from other people that is not corect and they propose something else ....your anwser is o yes you can also do like this ....this is not helping ...you could give us from the beginning the corect instucures ...too sad for you mr

dnhushak (author)  eunoiahr3 days ago

Furthermore, the world of electronics is massive, and there are always multiple ways to do things. People ask for alternatives, some of them work, some of them don't. That's why they ask, and that's why I answer, because I want everybody to have their own good experience with whatever works for them, in the way that they understand it.

dnhushak (author)  eunoiahr3 days ago

I updated the schematic to just look better, it is electronically the same as the previous schematic. The resistors and capacitor values have also been the same since the inception of the instructable. I know a number of other people who have made this with little to no problem, so I apologize for your troubles.

Could you maybe try explaining what troubles you are having with the instructable? Is it simply reading the schematic and breadboarding it, because I do state within this instructable that those skills are beyond the scope of this piece.

If you can ask questions regarding specifically what troubles you're having, I'd be very happy to help sort through whatever issues you have to get you on the road with this. Also, the total cost for this project is going to be $35-50 depending on what components you get, plus tax and shipping anyway, so 45 euros seems like a correct total cost to me.

distemper1 month 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)  distemper1 month 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!

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)  distemper8 days ago

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)  distemper7 days ago

Yep!

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.

ok, will buy them tomorrow... can you just tell me which one to buy, or is 741 also good for summing?

thanks

dnhushak (author)  distemper3 days ago

741 is great for summing!

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

tnx ;)

dnhushak (author)  distemper8 days ago

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

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

K2DH25 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)  K2DH25 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 dnhushak19 days ago

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

dnhushak (author)  K2DH19 days ago

Good to hear!

K2DH dnhushak25 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 K2DH25 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?

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

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

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!

IMG_0211.jpeg
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.

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?

1-40 of 138Next »