Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Square wave conversion thing

Status
Not open for further replies.

bunghole

New Member
Hi,

I made this small toy organ, like those ones you make with a couple of transistors and 12 resistors, and is it possible to take the output on it (square wave) and convert it to sine wave to have more of an organ sound?
Can it be done or would i need to build some separate oscillators and tune them?

I did some searching and i think its something like this (see pic)
The schematic is from **broken link removed** under Level Control and Attenuator
I also found this as an oscillator: **broken link removed**
 

Attachments

  • p22_fig4.gif
    p22_fig4.gif
    2.7 KB · Views: 218
If you want to make a squarewave more like a sine wave, you would have to use low pass filters. With that said I have to tell you, a sine wave would sound no way near like an organ, as an organ is rich in harmonic contents.

Compare the image below.
The image is a time and frequency domain showing the output of my keyboard. the one on left is a sine output, notice very pure in spectral content. The right is an organ output, much more harmonic content.

To produce an organ sound, you will have to find the right filter cutoff frequency of your filter. A pure sine would sound more like a plain tone.
 

Attachments

  • sine.gif
    sine.gif
    19.3 KB · Views: 197
Last edited:
I have a schematic for a low pass active filter using a LM741C. Is this the filter? This is from an engineers notebook, but can you explain to me what the formula 1/(2*pi*R*C) means? I get 0.000159155 when R is in ohms.
 

Attachments

  • low_pass_active_filter.jpg
    low_pass_active_filter.jpg
    39.8 KB · Views: 414
Last edited:
Last edited:
Oh, ok thanks. I haven't used this type of formula before. Am I still able to use the low pass filter to make the sine wave more like the square wave?
 
With a LPF you can convert your square wave to something more like a sine wave, but I suspect you will not get the sound you want. To produce an organ sound requires a very complex filter with ripple at known points along the passband. This requires a good deal of knowledge in filter design.
 
I started thinking... I know, not a good thing, lol. Anyways, I think what they do to make complex signals is mix two signals together then filter. I started looking at some old minimoog schematics (Probably before your time). You can find them here.
Minimoog Operation Manual, Minimoog Schematics, Minimoog Sound Charts
Real old tech, but thats what they did before DSP.

Then again, I am sure this way more than you care to know. Sorry, I tend to babble sometimes. Lost my prescription for ADD meds :)
 
Last edited:
So I could mix two slightly different pitches (such as 305Hz and 310Hz or something like that) together, then put it through the filter? But I can use a low pass active filter or would just a regular one do?
I had a look on youtube and minimoog's sound cool
 
There are many things you could try, mix a squarewave with a trianglewave, or sinewave. You could mix pitches, the list goes on. You should make yourself a mixer board with an adjustable filter. I played with this filter a long time ago.
**broken link removed**
There are probably better ones now, but this one is easy to build if you can still get one.
I am sure there is better science behind all this, I am sorry to say I can not give it to you :( Maybe someone else has a better insight in this area.
 
You also might want to check out doing something with this chip.
**broken link removed**

Good luck on your project.
 
I'll make something like a mixer board as a prototype, with separate wave generators, square, sine, triangle and sawtooth, and then I'll be able to mess around with different combinations, along with cutoff frequencies.
 
If anything, you will have fun making strange sounds aside from the ones that exit your orifices. Should prove to be a good project. Keep us posted on your progress.
 
Anytime, and I am sure you will get more suggestions in the days to follow, as it is a weekend afterall.
 
I'm trying to get a triangle wave, and I've got a integrator. How can I generate a square wave with an output of +/- 9V? Or can i use a DC wave? (The frewuency needs to be adjustable too)
 
Also, when you said to try and mix signals together, did you mean wave forms? Because obviously you could mix different pitches together (like a chord).
 
oh boy, this gets tricky to explain. There are a few types of mixers, one just spits out the two signals that you put in at the same time with no notable change to either signal. You don't want this type. You want the mixer that will act as a math function where you produce a sum and difference of the two signals that you input. With this type, you have a rich mixtures of signal components to play with. You can filter anywhere along this spectrum to produce all sorts of sounds. You want your mixer to be of the non-linear type (Not sure how to build one for Audio), not the type that just combine to audio signals into an opamp.

For making your various waveforms. Revisit the link I gave you earlier on the XR2206. That will produce square, sine, triangle, and a few others.
 
Last edited:
OK. I've also found some other schematic thats will change square wave into another wave. I'm not sure I can get a XR2206. I used this RC divider and I get sort of a rounded triangle wave. Can I change it more to a sine wave by taking Vout of the filter and putting through anther filter?

RC constant is

1/(2pi*R*C)
My values
R = 331500ohms
C = 0.001uF

1/(2pi*331500*[0.001*10~-6]) = 480.1Hz

10~-6 is ten to the power of negative six (i don't know how to do the little up arrow)
 
Last edited:
Sorry, I can get a XR2206. Am I right that in Fig. 11, that R1 (the 2M potentiometer) and the 1K connected to pin 7 adjusts the frequency? Sorry all this changes from the chip to the other methods and back so much. At this point I'm getting as much info as I can.
 
Yes, you are correct. See page 11 of data sheet.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top