Author |
Message |
aerogramma
Joined: Feb 27, 2008 Posts: 156 Location: Roma, Italy - London, UK
Audio files: 13
|
Posted: Thu Oct 09, 2008 12:31 am Post subject:
SINE wave from CMOS? Subject description: any advice on how to get one? |
|
|
Hello!
i've been building my first CMOS based devices in the last weeks and had a lot of fun... and probably avoided to go bankrupt too
I really like the rawness that comes out but I'm also an indestructable SINE wave lover
Is there a simple way to get a sine wave from a CMOS IC?
thanks and all the best from here
aero
|
|
Back to top
|
|
|
Uncle Krunkus
Moderator
Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Thu Oct 09, 2008 7:32 am Post subject:
|
|
|
CMOS are inherently digital, and sine waves sound like they do because they are not. A very steep low pass filter would reduce a square wave to mostly just it's fundamental harmonic, which would be close to a sine wave, but it wouldn't be spot on. Almost certain to contain higher harmonics to some degree. And even then, it would have to be re-adjusted for every note.
Maybe you can waveshape a sine from a square, but I think they tend to use saw or triangle because it's a lot easier.
Sorry. _________________ What makes a space ours, is what we put there, and what we do there. |
|
Back to top
|
|
|
jnuaury
Joined: Feb 28, 2008 Posts: 161 Location: chicago
Audio files: 9
|
Posted: Thu Oct 09, 2008 8:46 am Post subject:
|
|
|
theres two ways to do this
one follows the concept of bit depth and the other is similar to sampling rates
"bit depth" method
you use a divider and make a "dac" with resistors after a square wave to get a sine wave essentially with a bit depth of however many divisions you use
also youll need to clock the square wave at a muh higher frequency than the pitch you want to be the sine-ish wave
link
http://www.robthefiddler.com/electronics-audio-diy/circuit-experiments/big-johnson-signal-generator/
"sampling rate" method
use a counter after the square and then run the separate count outs through resistors (or pots) set up as voltage dividers... its more or less a really fast sequencer and once again you need your square to be much higher than the sine-ish wave
link
http://www.milkcrate.com.au/_other/sea-moss/#8a _________________ az/gde
Flickr
YouTube |
|
Back to top
|
|
|
urbanscallywag
Joined: Nov 30, 2007 Posts: 317 Location: sometimes
|
Posted: Thu Oct 09, 2008 10:17 am Post subject:
|
|
|
Not quite simple, but lookup Walsh functions. You don't need a DAC. |
|
Back to top
|
|
|
Pehr
Joined: Aug 14, 2005 Posts: 1307 Location: Björkvik, Sweden
Audio files: 2
|
|
Back to top
|
|
|
jnuaury
Joined: Feb 28, 2008 Posts: 161 Location: chicago
Audio files: 9
|
Posted: Thu Oct 09, 2008 11:40 am Post subject:
|
|
|
urbanscallywag wrote: | Not quite simple, but lookup Walsh functions. You don't need a DAC. |
i hope i didnt overcomplicate things by relating dividers/counters to bit depth/sample rate...
the dac i was talking about is just a resistor ladder
you route the square wave to a divider (i like the 4040) and then you take different divisions and wire them to the bit inputs on the diagram
different resistor values and different divisions will give you different waveforms...
using a 4017 clocked 10 times above the frequency you want the output to be can done with less trial and error as you can map 10 points onto one period of a sine wave and use that to pick resistor values for each output or just use (trim)pots to tune it in a similar manner to the ian fritz double deka vco _________________ az/gde
Flickr
YouTube |
|
Back to top
|
|
|
urbanscallywag
Joined: Nov 30, 2007 Posts: 317 Location: sometimes
|
Posted: Thu Oct 09, 2008 2:03 pm Post subject:
|
|
|
No I don't think you are over complicating things, its just bizarre that the Walsh generators don't need a DAC. |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24083 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Thu Oct 09, 2008 3:17 pm Post subject:
|
|
|
urbanscallywag wrote: | its just bizarre that the Walsh generators don't need a DAC. |
math = fun. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
aerogramma
Joined: Feb 27, 2008 Posts: 156 Location: Roma, Italy - London, UK
Audio files: 13
|
Posted: Thu Oct 09, 2008 3:21 pm Post subject:
|
|
|
Blue Hell wrote: |
math = fun. |
...if you can really handle it... which i'm not sure i can LOL
thanks to anyone who's repling!
aero |
|
Back to top
|
|
|
urbanscallywag
Joined: Nov 30, 2007 Posts: 317 Location: sometimes
|
Posted: Thu Oct 09, 2008 5:51 pm Post subject:
|
|
|
Blue Hell wrote: | urbanscallywag wrote: | its just bizarre that the Walsh generators don't need a DAC. |
math = fun. |
Is that why it makes my head hurt?
I just wanted to add that I'm sure there are cheaper and better ways to generate a sinusoid using CMOS, Walsh functions are just fresh in my head. |
|
Back to top
|
|
|
andrewF
Joined: Dec 29, 2006 Posts: 1176 Location: australia
Audio files: 4
|
Posted: Thu Oct 09, 2008 6:26 pm Post subject:
|
|
|
haven't tried these, sin_0001 looks the more interesting of the two -
Description: |
|
Filesize: |
49.76 KB |
Viewed: |
453 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
Description: |
|
Filesize: |
53.24 KB |
Viewed: |
459 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
|
|
Back to top
|
|
|
urbanscallywag
Joined: Nov 30, 2007 Posts: 317 Location: sometimes
|
Posted: Thu Oct 09, 2008 9:08 pm Post subject:
|
|
|
The problem with these circuits is making them tunable (let alone voltage controlled) right? |
|
Back to top
|
|
|
jnuaury
Joined: Feb 28, 2008 Posts: 161 Location: chicago
Audio files: 9
|
Posted: Thu Oct 09, 2008 9:59 pm Post subject:
|
|
|
urbanscallywag wrote: | The problem with these circuits is making them tunable (let alone voltage controlled) right? |
well the second one andrew posted does appear to be voltage controlled already.... the pot (im assuming it controls frequency) is wired as a voltage divider supply the circuit 0-15V depending on its position.... _________________ az/gde
Flickr
YouTube |
|
Back to top
|
|
|
urbanscallywag
Joined: Nov 30, 2007 Posts: 317 Location: sometimes
|
Posted: Thu Oct 09, 2008 10:03 pm Post subject:
|
|
|
I guess both of them have pots, but they just aren't included in the equation. Oops! |
|
Back to top
|
|
|
jnuaury
Joined: Feb 28, 2008 Posts: 161 Location: chicago
Audio files: 9
|
Posted: Thu Oct 09, 2008 10:11 pm Post subject:
|
|
|
well the first circuit has the pots wired as variable resistors (rheostats)
but the second one the pot actually divides the voltage meaning you could remove the pot and toss a cv in where the wiper was connected (pin 14)
theoretically at least _________________ az/gde
Flickr
YouTube |
|
Back to top
|
|
|
urbanscallywag
Joined: Nov 30, 2007 Posts: 317 Location: sometimes
|
Posted: Thu Oct 09, 2008 10:15 pm Post subject:
|
|
|
Yeah, I see that. But when I looked at the equations I didn't think they were tunable even though I did see the pots. |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24083 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Fri Oct 10, 2008 1:12 pm Post subject:
|
|
|
The first one seems to be a drum osc, where the sine fades out at a rate controlled by the variable resistor. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
urbanscallywag
Joined: Nov 30, 2007 Posts: 317 Location: sometimes
|
Posted: Fri Oct 10, 2008 1:23 pm Post subject:
|
|
|
I saw the trigger input and thought it was like a bootstrap to get the thing oscillating. |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24083 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Fri Oct 10, 2008 1:35 pm Post subject:
|
|
|
That's about the same thing ... when it can be set to oscillate forever. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
urbanscallywag
Joined: Nov 30, 2007 Posts: 317 Location: sometimes
|
Posted: Fri Oct 10, 2008 1:38 pm Post subject:
|
|
|
I see, the pot is decay control, and with the suggested 22k resistor it should oscillate with continuous amplitude? |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24083 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Fri Oct 10, 2008 1:57 pm Post subject:
|
|
|
When its really a drum osc, but I'm < 100% sure, it would likely decay to zero with 22k. So basically I don't know _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
urbanscallywag
Joined: Nov 30, 2007 Posts: 317 Location: sometimes
|
Posted: Fri Oct 10, 2008 2:33 pm Post subject:
|
|
|
OK if LTSpice has the appropriate components I will try it. |
|
Back to top
|
|
|
loss1234
Joined: Jul 24, 2007 Posts: 1536 Location: nyc
Audio files: 41
|
Posted: Fri Oct 10, 2008 10:35 pm Post subject:
walsh dac? |
|
|
OK..i am no expert. BUT i thought that walsh functions at least as outlined in the Electronotes supplement s-008 definitely DO need a DAC.
I quote from the heading "Digital to Analog Conversion" from supplement s-008 (which is a great read by the way)
"it is of course necessary to combine the various walsh functions in proportion and in the proper sense to get the proper waveform for the calculated walsh coeffecients. Four possible methods are shown below"
one of the methods the show is just a simple opamp summer but even that if used with a resistor for each walsh function is summing the separate functions into one analog waveform...
or at least that is how i understood it. (since all wash functions..like squarewaves are just a combination of high and low, or on and off/1 and 0, and if you can get a sine out of that there has to be a D to A process somewhere.
really not that much different than the Counter method with the resistor ladder someone already mentioned. except walsh functions (i think) could end up a lot more complicated if you want to build the whole first 31 functions. you need a lot of xors and flip flops. and then they still recommend filtering the result.
i find these walsh things really interesting and hope to build a working generator soon.
but really, SO MANY circuits use a simple DAC that i think the term DAC sounds much scarier than it is.
there is a great article free to the public on useful walsh stuff... and it has examples of getting SINES from just a few functions at
http://www.wiseguysynth.com/larry/schematics/walsh/walsh.pdf
great topic! thanks andrew for putting up those cool schematics! are they from the cmos sourcebook? _________________ -------------------------------------------- check out various dan music at: http://www.myspace.com/lossnyc
http://www.myspace.com/snazelle
http://www.soundclick.com/lossnyc.htm http://www.indie911.com/dan-snazelle |
|
Back to top
|
|
|
urbanscallywag
Joined: Nov 30, 2007 Posts: 317 Location: sometimes
|
Posted: Fri Oct 10, 2008 11:27 pm Post subject:
|
|
|
Yeah I started looking into Walsh functions after you asked on SDIY (I asked if anyone had samples). I built/simulated the 31 function generator in software. It doesn't need a DAC. Its bonkers. |
|
Back to top
|
|
|
loss1234
Joined: Jul 24, 2007 Posts: 1536 Location: nyc
Audio files: 41
|
|
Back to top
|
|
|
|