electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
CMOS Active Filter Simulator
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Cynosure
Site Admin


Joined: Dec 11, 2010
Posts: 966
Location: Toronto, Ontario - Canada
Audio files: 82

PostPosted: Wed May 29, 2013 3:19 pm    Post subject: CMOS Active Filter Simulator
Subject description: PWM Controlled Filter
Reply with quote  Mark this post and the followings unread

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.


cmosfilter.png
 Description:
 Filesize:  29.51 KB
 Viewed:  905 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

cmosfilter.png



cmosfilter_res.png
 Description:
Simulated Resonance (Modulation)
 Filesize:  8.37 KB
 Viewed:  546 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

cmosfilter_res.png



cmos_filter_demo.mp3
 Description:
Sound demo of the CMOS Filter Simulator.

Download
 Filename:  cmos_filter_demo.mp3
 Filesize:  20.34 MB
 Downloaded:  1323 Time(s)


_________________
JacobWatters.com
Back to top
View user's profile Send private message
Draal



Joined: May 18, 2010
Posts: 308
Location: Oak Park, IL
Audio files: 5

PostPosted: Wed May 29, 2013 3:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

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!
Back to top
View user's profile Send private message Visit poster's website
Cynosure
Site Admin


Joined: Dec 11, 2010
Posts: 966
Location: Toronto, Ontario - Canada
Audio files: 82

PostPosted: Thu May 30, 2013 8:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

I am trying some meds that seem to be helping a bit. I was able to test some more on breadboard today.

This version uses a sallen key filter and switches between two resistor values.

It sounds a lot smoother and also has a gain control to add some nice warm 4069 distortion.


cmosfilter_rev2.png
 Description:
 Filesize:  28.01 KB
 Viewed:  769 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

cmosfilter_rev2.png



_________________
JacobWatters.com
Back to top
View user's profile Send private message
Cynosure
Site Admin


Joined: Dec 11, 2010
Posts: 966
Location: Toronto, Ontario - Canada
Audio files: 82

PostPosted: Fri May 31, 2013 12:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.


cmos_filter_rev2_demo.mp3
 Description:

Download
 Filename:  cmos_filter_rev2_demo.mp3
 Filesize:  5.77 MB
 Downloaded:  1341 Time(s)


_________________
JacobWatters.com
Back to top
View user's profile Send private message
ezekiel



Joined: Oct 17, 2009
Posts: 30
Location: Columbus Ohio

PostPosted: Tue Jun 04, 2013 5:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

Great filter in CMOS +5V! Thanks!

I am going to have to build this just for the "smoothing" of harsh sounds. The "resonance" is a bonus.

(I tried making a 4066-switched capacitor filter a couple years ago. I was doing it all wrong.)

This is surely "sound of the year" for lunettas. I predict many cool additions and variations based on this.
Back to top
View user's profile Send private message
Cynosure
Site Admin


Joined: Dec 11, 2010
Posts: 966
Location: Toronto, Ontario - Canada
Audio files: 82

PostPosted: Tue Jun 04, 2013 7:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Cheers!

_________________
JacobWatters.com
Back to top
View user's profile Send private message
analog_backlash



Joined: Sep 04, 2012
Posts: 393
Location: Aldershot, UK
Audio files: 21

PostPosted: Wed Jun 05, 2013 2:23 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi Cynosure.

Cynosure wrote:
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 Laughing .

P.S. Hope you're feeling a bit better.

Gary
Back to top
View user's profile Send private message
dougseidel



Joined: Feb 10, 2010
Posts: 74
Location: NJ

PostPosted: Wed Jun 05, 2013 6:22 am    Post subject: Reply with quote  Mark this post and the followings unread

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
Back to top
View user's profile Send private message Visit poster's website
Mikmo



Joined: Dec 01, 2005
Posts: 150
Location: Copenhagen - Denmark

PostPosted: Wed Jun 05, 2013 8:45 am    Post subject: Reply with quote  Mark this post and the followings unread

This is very interesting.

There have been a lack of good CMOS filters.

Hope you get better soon.

_________________
Stay Cool
Mikael
http://www.mikmo.dk
Back to top
View user's profile Send private message Visit poster's website
RingMad



Joined: Jan 15, 2011
Posts: 427
Location: Montreal, Canada
Audio files: 4

PostPosted: Fri Jun 14, 2013 3:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

Looks and sounds pretty interesting, Cynosure. I'll put it on my pile-of-circuits-to-try. Thanks for posting it. And I hope you feel better.

James.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Jump to:  

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


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use