Posted: Wed May 29, 2013 3:19 pm Post subject:
CMOS Active Filter Simulator Subject description: PWM Controlled Filter
As some of you might already know, I have been sick for the past while and spent a lot of time in bed and not able to do much. This gave me lots of time to think about crazy CMOS ideas. I ended up bringing a breadboard and a little kit of part to bed and testing things out when I felt well enough to plugin chips and parts. Some of my ideas didn't work too well, but here is one that I think turned out ok.
The idea came to me when I read a post by JovianPyx where he mentioned switched capacitors. I came up with the idea of switching the capacitor in a RC filter on and off at a fast rate with a 4066. This would allow the circuit to be controlled by PWM - something that is a lot easier to create and modify in lunetta land than a control voltage. It also means that the PWM control combined with the fact that it can run on a +5/0V power makes it a perfect circuit to pair up with an Arduino.
EXPLANATION OF THE SCHEMATIC
PWM
The filter is controlled by any PWM source that is running above 30kHz. This frequency shouldn't be a problem for most CMOS circuits. I will leave it up to you to create your own way for generating the PWM source, but I used an Arduino that also provides a squarewave sound source using the Tone function. Other options include sending a squarewave through a highpass filter and buffering the output with a schmitt filter, using a boolean sequencer, or sending white noise through a schmitt filter or shift register to create random modulations.
RESONANCE EMULATOR
NOTE: This is NOT resonance, but rather an attempt to simulate the effect that resonance has on the wave shape. The attached scope shot shows how it actually looks when applied to a square wave. The little wiggles at the top and bottom of the wave look similar to the wiggles you get from resonance (but are audibly different). It is actually more like a ringmod.
The idea here is that the PWM is inverted, and then filtered to create a control voltage. That control voltage is then used to control a 4046 VCO. Since the PWM was inverted, the VCO tracks in the opposite direction of the PWM. This means that the VCO frequency goes down as the source pulse width is widened. This is important (explained two paragraphs down).
The VCO's output is used to control a 4066 that switches a cap to ground in a low-pass filter configuration. When the switch is open, the level of the sound dips a bit because it is being filtered. When the switch is closed, the level of the sound goes back up. This creates the wiggle in the wave shape.
Since the VCO tracks in the opposite direction of the source PWM, the frequency of the wiggles decreases as the pulse width increases and the frequency increases as the pulse with decreases. This simulates the frequency response of resonance by lowering as the filter is closed, and creates a zappy sound similar to that created by resonance.
FILTER
The sound then passes through three low-pass RC filters. The caps on the filters are switched in and out of the circuit using the three remaining switches from the 4066.
The switching is controlled by the PWM. When the pulse width is increased, more of the high frequencies are filtered to ground.
SIGNAL CLEANER
The final stage of the circuit is two low-pass RC filters with a high cutoff that filter out the noise created by the switching.
CONCLUSION
You can now have a CMOS passive filter that sounds and behaves in a similar fashion to a standard VCF. While it doesn't sound exactly the same (especially the resonance) it does have a unique charm to it. It is also a perfect thing to pair up with an Arduino.
THINGS TO TRY
Here are some things I plan to try when I feel up to it. If you get to it before me, then please post here to let me know how it works out.
1. Change the filter section to a standard switched capacitor configuration with a linear 4069 as a buffer.
2. Change the type of filter that is switched on and off to a simple active filter (maybe one based on a linear 4069).
3. Try to add a simple linear 4069 or darlington pair amp to compensate for the amplitude loss. Maybe control its amplification with the PWM.
4. Experiment with buffer and feedback options that would also add real resonance to the circuit.
cmos_filter_demo.mp3
Description:
Sound demo of the CMOS Filter Simulator.
Filesize:
20.34 MB
Duration:
8:53
Viewed:
1994 Time(s)
cmosfilter.png
Description:
Filesize:
29.51 KB
Viewed:
1119 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
cmosfilter_res.png
Description:
Simulated Resonance (Modulation)
Filesize:
8.37 KB
Viewed:
711 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
Joined: May 18, 2010 Posts: 308 Location: Oak Park, IL
Audio files: 5
Posted: Wed May 29, 2013 3:47 pm Post subject:
Hey, hope you are doing better bro. Great ideas there for experimenting with. In my 4046 pitch tracker I noticed I can get auto wah style effects with the bigger cap in the loop filter; crude but useful. Your idea is a step up and worth a build. Never seem to have enough 4046's and 4066's !
Hell, the "clean up" section alone can fill a dead spot in my big lunetta. Toning down those square waves is becoming more important for me lately. Thanks! _________________ Zontar Prevails!
I am feeling like crap again today, but I managed to record a sound demo. To me, it sounds a lot better than the first version. The gain control ads a nice warm distortion.
Thanks ezekiel. I am glad that you like it. I was a little surprised by the lack of comments so far, but I am happy to see that some people may find it useful.
The method I am using isn't even the "proper" way of doing a switched capacitor, but it gives the control required.
There is plenty of room for experimenting, so let me know if you come up with some interesting modifications and how you generate your PWM control.
I was a little surprised by the lack of comments so far, but I am happy to see that some people may find it useful.
I meant to reply to this, but I hadn't got round to it. I will definitely be trying this out as an addition to my slowly evolving lunetta, but it will have to join the list of many things to breadboard. I also need to commit some breadboarded circuits to perfboard so that I have some spare room .
I also think this is a very cool design - i've been studying it. thanks for putting it up! I hope you feel better! _________________ http://soundcloud.com/douglasmseidel
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum