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
SINE wave from CMOS?
Post new topic   Reply to topic Moderators: mosc
Page 2 of 2 [42 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2
Author Message
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Sat Oct 11, 2008 12:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sorry, I can see how that could be a little unclear.

It could be simulated a million different ways from SPICE to C code. I chose Mathworks Simulink because that's what I'm using at the moment.

The circuit doesn't need a DAC whether its built in hardware or software. What it does need is an analog mixer to change the ratio/mix of the Walsh functions.

I've only made the saw and sine since those are the coefficients I have. They sound good, better than you'd expect from a "4-bit" equivalent. I haven't done much musical with them, just test tones. I didn't research or think/test enough what the input pulse wave input has to be for a given output frequency so I didn't play chromatic notes. Doing a simulation with MIDI input and some knobs to control the function ratios would probably take more work than putting it in hardware, so I'm not sure I'll get any useful demos up (other than "4-bit" sine and sawtooth at fixed frequency if you'd like).
Back to top
View user's profile Send private message
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Sat Oct 11, 2008 12:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

You could filter or slew limit the output of a Walsh generator but that would be missing the point a little I think. The extra harmonics from the quantization steps should be useful in a musical filtering context, running the output through your favorite filter as opposed to a fixed filter to "smooth" the waveform.

Things I have to look into are how musical or useful is the outputs if you sweep the coefficient values by twisting the knobs on the mixer and how precise do the mixing ratios have to be to achieve a proper sine or saw output for example.
Back to top
View user's profile Send private message
aerogramma



Joined: Feb 27, 2008
Posts: 156
Location: Roma, Italy - London, UK
Audio files: 13

PostPosted: Wed Oct 15, 2008 4:36 am    Post subject: Reply with quote  Mark this post and the followings unread

jnuaury wrote:
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/




thanks! I like the bith depth method...

I don't have a 4018 (the Johnson counter) right now can anyone suggest a substitute?

Wink

aero
Back to top
View user's profile Send private message Visit poster's website
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Wed Oct 15, 2008 12:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Wow the Johnson generator has similar results to a Walsh generator but is much simpler. Shocked
Back to top
View user's profile Send private message
richardc64



Joined: Jun 01, 2006
Posts: 679
Location: NYC
Audio files: 26

PostPosted: Wed Oct 15, 2008 12:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

I found this http://home1.gte.net/res0658s/fatman/4069_lfo.html , from our own ScottG, who admits it isn't quite a sinewave. Still, you can get two from a single 4069.
_________________
Revenge is a dish best served with a fork... to the eye
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sun Nov 16, 2008 11:20 am    Post subject: Reply with quote  Mark this post and the followings unread

richardc64 wrote:
I found this http://home1.gte.net/res0658s/fatman/4069_lfo.html , from our own ScottG, who admits it isn't quite a sinewave. Still, you can get two from a single 4069.


Or you can build one oscillator and follow it with linear amplifier stages in the same IC to make a better sinewave output.

Note that with a smaller capacitor, this LFO becomes an audio oscillator - not voltage controlled, but at least knob controlled. And the same use for extra gates applies for an audio oscillator too - you can follow the S-shape triangle output of the bare oscillator with some linear amplifier gain stages which will further S shape the waveform making it more sinelike.

The secret to a good sinewave output using this method is to play with the gain of and the number of linear amplifier stages used.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
aerogramma



Joined: Feb 27, 2008
Posts: 156
Location: Roma, Italy - London, UK
Audio files: 13

PostPosted: Thu Apr 09, 2009 9:25 am    Post subject: Reply with quote  Mark this post and the followings unread

[deleted!]
Last edited by aerogramma on Thu Apr 09, 2009 9:32 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
aerogramma



Joined: Feb 27, 2008
Posts: 156
Location: Roma, Italy - London, UK
Audio files: 13

PostPosted: Thu Apr 09, 2009 9:30 am    Post subject: Reply with quote  Mark this post and the followings unread

[deleted]
Back to top
View user's profile Send private message Visit poster's website
aerogramma



Joined: Feb 27, 2008
Posts: 156
Location: Roma, Italy - London, UK
Audio files: 13

PostPosted: Wed Aug 19, 2009 4:58 am    Post subject: more on cmos and sinewaves Reply with quote  Mark this post and the followings unread

hi again,
just stumbled into this 4018 sinewave generator.

seems worth trying however it mentions a 'pulse' and is not too clear to me what exactly is intended for pulse here..

something from a 555 timer? pulses from 4093? a squarewave?

any ideas?

aero

Wink


Sine_Wave_Generator.gif
 Description:
 Filesize:  26.21 KB
 Viewed:  1753 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Sine_Wave_Generator.gif


Back to top
View user's profile Send private message Visit poster's website
fluxmonkey



Joined: Jun 24, 2005
Posts: 708
Location: cleve

PostPosted: Wed Aug 19, 2009 8:05 am    Post subject: Re: more on cmos and sinewaves Reply with quote  Mark this post and the followings unread

aerogramma wrote:
hi again,
just stumbled into this 4018 sinewave generator.

seems worth trying however it mentions a 'pulse' and is not too clear to me what exactly is intended for pulse here..

something from a 555 timer? pulses from 4093? a squarewave?

any ideas?

aero

Wink


this is essentially the same as the link given above to a "johnson counter"... http://www.robthefiddler.com/electronics-audio-diy/circuit-experiments/big-johnson-signal-generator/...

_________________
www.fluxmonkey.com
Back to top
View user's profile Send private message
aerogramma



Joined: Feb 27, 2008
Posts: 156
Location: Roma, Italy - London, UK
Audio files: 13

PostPosted: Wed Aug 19, 2009 8:14 am    Post subject: Reply with quote  Mark this post and the followings unread

indeed, maybe just easier to understand for me ...

so perhaps this time i'll be able to make it do something ... Wink
Back to top
View user's profile Send private message Visit poster's website
DGTom



Joined: Dec 08, 2008
Posts: 211
Location: Adelaide
Audio files: 3
G2 patch files: 1

PostPosted: Fri Aug 28, 2009 5:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

This 4018 cct. is pretty cool.
might have to try one with a 4017, or some other counters, got some 4029s yesterday... Binary or Decade sine wave!? Laughing

When I first breadboarded it I just croc clipped one of my existing lunetta oscs. in, one of my Tom Bugs 40106s... I discovered by feeding the clock input with an oscillator that is synced to another osc. produces some very slimy tones! I replaced the 10uf with a 2.2uf, which brought a few harmonics back but the level drop isn't so bad, 10uf makes the signal drop right off.

This is a problem I've hit a few time w/ my lunetta.. need to figure out a decent way to boost and/or build some passive attens in for all the bastard loud squarewaves in other modules!

I also got it running pretty nice with synthmongers simple 2n3904 / 40106 VCO.
Back to top
View user's profile Send private message
picsynth



Joined: Oct 16, 2008
Posts: 27
Location: New Zealand

PostPosted: Sun Sep 20, 2009 6:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

Don Lancaster describes simple sine wave generators in his CMOS Cookbook. He uses a 4018 walking ring counter and some resistors. The Cookbook contains tables of resistor values for different resolution sine waves.

You could then run through a low pass filter to remove any higher harmonics.

I haven't tried this circuit but it sounds like a great idea.
Back to top
View user's profile Send private message
synthmonger



Joined: Nov 16, 2006
Posts: 578
Location: flada
Audio files: 3

PostPosted: Thu Sep 24, 2009 3:05 am    Post subject: Reply with quote  Mark this post and the followings unread

I'm surprised nobody said anything about using multiple binary/decade counters with their outputs summed together through an R2R ladder. This would create a high resolution sine (or any waveform really).

I haven't tried it but it should work right? You may need to use quite a few counters in order to eliminate a lot or most aliasing artifacts though. I kind of like that 'digital' sounding wave form.


I was planning on making some sort of module that takes a square wave input and outputs a saw/sine/tri wave using this technique. Each waveform would have it's on "reset" aka sync and other goodies.

_________________
Youtube!
modular demos!
Whacky tunes!
Back to top
View user's profile Send private message Visit poster's website
Uncle Krunkus
Moderator


Joined: Jul 11, 2005
Posts: 4761
Location: Sydney, Australia
Audio files: 52
G2 patch files: 1

PostPosted: Thu Sep 24, 2009 6:21 am    Post subject: Reply with quote  Mark this post and the followings unread

Hey Synthmonger,
You should do a search for my "ReAnimator". Very closely related to what you're talking about. You might be able to solve the problem I got bogged down on.

_________________
What makes a space ours, is what we put there, and what we do there.
Back to top
View user's profile Send private message Visit poster's website
slabman



Joined: Sep 01, 2005
Posts: 102
Location: UK

PostPosted: Fri Sep 25, 2009 3:01 pm    Post subject: commutating filter Reply with quote  Mark this post and the followings unread

I guess, in theory, you could also clock a switched capacitor filter at a high frequency, and crank up the resonance till it oscillates? I imagine there'd be some aliasing though
Back to top
View user's profile Send private message
FredM



Joined: Nov 17, 2007
Posts: 2
Location: U.K.

PostPosted: Sat Jun 26, 2010 6:44 pm    Post subject: Re: SINE wave from CMOS?
Subject description: any advice on how to get one?
Reply with quote  Mark this post and the followings unread

aerogramma wrote:
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 Smile

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

Wink


you can get close by using an XOR and mixing two high frequencies - this provides a PWM-like string of pulses which, when integrated, get close to sine (they actually correspond to a triangle waveform)..

See: http://www.element-14.com/community/groups/theremin-general-resources

and more specifically Digital Heterodyning.pdf - link: http://www.element-14.com/community/docs/DOC-16892/l/digital-heterodyningpdf
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 2 of 2 [42 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2
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