loading
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!

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 158Next »
dnhushak (author) 4 months 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!

dnhushak (author)  dnhushak4 months ago

Update #2!

I have just designed an eagle pcb for this, I've ordered a set and will confirm that it does what it's supposed to do, and then I'll post the eagle file, so everyone can have a nicely laid out PCB!

Tonsil made it!1 month ago

This project was the first electronics project I've ever tried, and I managed to get it all to work the first time, so woot! I bought my supplies locally and followed the breadboard image. I couldn't match the exact circuit as my cheap breadboard only had 2 rails, so I made do. I was amazed that it worked properly the 1st time I powered it up. Thanks! My only request - if someone figures out the mod to give it more of a frequency range, that would be great. My next step is to transfer the osc into a project case so I can take my bleeps and bloops with me.

IMG_2862.JPG
dnhushak (author)  Tonsil1 month ago

That's great to hear!!! I love it when somebody can complete it successfully - it really means a lot to me!

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/electro...

Keep blooping!

adam_kenny3 months ago

Hi, just wondering why there is a differing amount of resistors in the the fritzing diagram and the accompanying image of the breadboard? Also which image should I follow as Im new to all this and planned on matching what I have to the image on here to produce it that way? As well as that im wondering why the arrangement of the two images im talking about is different in terms of where the components are placed. Any help is appreciated :) cheers.

Im struggling to identify which resistors are which too on the fritzing diagram

dnhushak (author)  adam_kenny3 months ago

The resistors are identified by resistor color codes. Here's a code calculator and a chart:

http://www.digikey.com/en/resources/conversion-cal...

As far as the differing number of resistors, I'm assuming you're referring to the 2x 10kΩ resistors vs. the 1x 20kΩ resistor? Those two are basically the same thing. 2 10kΩ resistors running in series just adds up to 20kΩ, so whether you have 2 10s or one 20, it's the same thing.

Long story short, in electronics there are multiple ways to do things yet still be what we call "Electronically equivalent." It's the same idea as 4x2 is mathematically equivalent to 4 + 4.

Honestly I would go off of the schematic instead of the pictures of breadboards, as you can lay out a breadboard an infinite number of ways and still be electronically equivalent; the schematic actually defines the connections. If you don't know how to read a schematic, there are a number of great tutorials online to help you along the way. Here's one from sparkfun: https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

hi, this is what i have so far but it isn't currently working. I replaced the speaker with a simple 1/4" jack output so im not sure if its that, is there anything noticeably wrong with this breadboard layout as ive tried general trouble shooting but to no avail. Thanks in advance :)

image2.JPGimage1.JPG
dnhushak (author)  adam_kenny3 months ago

Troubleshooting breadboard pictures is relatively difficult, but it just looks like there's a lot of stuff in the wrong spot. Take for instance your ground, which is the black wire coming off of those two resistors around rows 35-40; that is plugged into the positive rail of your breadboard, but nothing else is. There should be a lot going to ground. It also appears as if your 1/4" jack is just plugged into the 9v + and -, which won't get you anything.

I would also recheck the pinout of the opamp, as that doesn't look entirely correct at first glance.

Your not wrong they are haha. Ive decided to start over using the fritzing diagram as a guide. The result was the same though unfortunately, this is it at the minute, same rule goes I haven't got a clue as to whats wrong with it. Im starting to understand the basics of schematics but need to complete this for a uni project so worry I wont have time. Also do the numbers shown on my breadboard differ from yours and the fritzing for any particular reason? Again, your help is much appreciated!

IMG_2121.JPG
dnhushak (author)  adam_kenny3 months ago

That looks much better! I can't completely tell in the picture, but that 1MΩ resistor looks like it might be going into pin 3 or 4, when it should be going into pin 2. Might be just the angle of the picture.

What I would do next is bypass all of the output management stuff. So take the positive/tip output of your 1/4" jack and put it directly at pin 6. There you should get the square wave without any attenuation. The next thing to check is to make sure that your power supply is actually spitting out 9 volts. Hopefully you have a voltmeter or something of the sort. (Or just make sure your LED is lighting!). The last thing is you may have blown the op amp - which is not difficult to do.

Hopefully something in there helps!

Hi I got the breadboard set-up working and moved on to the perfboard. This is what I have so far but im finding it hard to understand where the pots and output are on the board from the schematics. Is there any chance anyone could give me a hand in identifying where they should go on the images ive uploaded? Id really appreciate any help, cheers :)

IMG_2164.JPGIMG_2165.JPG

Ahh good, ill look in to getting a few more op amps then to make sure. Ive gone back over everything in relation to the fritzing and it all seems exactly the same but the LED wont light on the breadboard (but will if i just connect the +/- wires of my 9v battery) so I can only assume then that its the op amp. Thank you your a great help :) Ive uploaded a more detailed picture too just to re-confirm that its all right, cheers :)

IMG_2130.JPGIMG_2131.JPGIMG_2128.JPGIMG_2129.JPG

Thanks for the help its much appreciated :)

dnhushak (author)  adam_kenny3 months ago

No problem! Let me know how it goes/if you have any other issues!

adam_kenny3 months ago

Hi, just wondering why there is a differing amount of resistors in the the fritzing diagram and the accompanying image of the breadboard? Also which image should I follow as Im new to all this and planned on matching what I have to the image on here to produce it that way? As well as that im wondering why the arrangement of the two images im talking about is different in terms of where the components are placed. Any help is appreciated :) cheers.

distemper5 months 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)  distemper5 months 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)  distemper4 months 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)  distemper4 months 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)  distemper4 months ago

741 is great for summing!

ok, here's the thing. I have two separated square wave oscillators on my breadboard each one working like a charm for itself. i put the third 741 on there to sum the two frequencies (non inverting mode)... i connected the two outputs each over a 10k resistor to '-', grounded the '+' and added additional 10k resistor connecting '-' and 'out' of the summing amp. out comes something strange (like if just the two outputs of the oscillators were connected together). If i remove the resistors, leaving just the one connecting the '-' and 'out', (assuming that the frequencies pots does their work) and connect the outputs directly to '-' it works, but both oscillators work as one. the higher frequency pot prevails and out comes just the frequency of that oscillator...

i hope its not too confusing, and thanks for helping out ;)

dnhushak (author)  distemper4 months ago

I believe you got your + and - flipped to go with a non-inverting summing amplifier.

You doing something like this?

opamp-sum2.gif
Yep, thats the thing... Is this the right way to do it? oh, i got myself confused with the symbols, i got it right on my board. My bad...
dnhushak (author)  distemper4 months ago

That should work. I will say to make sure your resistors in that portion of the circuit are sufficiently large so they don't alter the impedance of the frequency circuit too much.

I will also add that I haven't tried this myself, but can within the next few weeks to verify that this will work.

if you'd be so kind to verify this i would very much appreciate it... I'm probably just missing something, but it would be nice to know if it works for sure...

Do you maybe know any good sine wave oscillator schematics?

The thing i want to do is to combine three oscillators, each one connected to an on/off and sine/square switch, in one box, one power supply and one output. And a volume pot for each one of course :). i know its a little bit of a long shot but why not try, eh? :)

many thanks!

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

tnx ;)

dnhushak (author)  distemper4 months 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

gavox3 years ago
Any chance of getting a clearer schematic? can't see a blind thing on this one...
dnhushak (author)  gavox4 months 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.
eunoiahr4 months 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)  eunoiahr4 months 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)  eunoiahr4 months 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.

K2DH5 months 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)  K2DH5 months 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 dnhushak4 months ago

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

1-40 of 158Next »