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
Is this a new way to modify square waves?
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [13 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
NuttyMonk



Joined: Jun 30, 2020
Posts: 62
Location: UK

PostPosted: Tue Jun 15, 2021 11:45 am    Post subject: Is this a new way to modify square waves? Reply with quote  Mark this post and the followings unread

Hi all,

i've been trying to find a way to use all of the inverters on a CD40106 which are unused in a VCO which i have been working on. It is a saw core VCO which all works fine but with the unused inverters i decided to try something new.

I decided to use an RC network to take the first square wave and delay it by a small amount before sending it into the next inverter and i did that for all of the inverters which were unused. This gives 6 square waves which are all delayed by a small amount. Three of the them are inverted and the other three aren't.

Then i combine them all in a summing opamp configuration and do the usual stuff like removing DC offset and adjusting gain to produce the final wave for output.

I've included the schematics here in a PDF file. The first page is just a relatively standard saw core VCO using the CD40106 which i based partly on the one made by Moritz Klein but modified for a different way to sum the inputs such as Coarse, Fine and CV. It is temperature compensated as well.

This gets sent to a saw-to-square wave converter at the top of page 2 which allows for PWM control by potentiometer and CV. This is all relatively normal and already understood stuff.

The bottom of page 2 is where all of the weirdness goes on. It's quite simple really. Each oscillator apart from the original one has a delay pot and a gain pot. If the gain is at fully CCW, that wave won't have any affect on the output waveform. The more you turn it up the more you will see it in the output. The delay just creates a delay. The images below were all made with the delay up full which provides about 0.036ms of delay between each stage. Not much but when we are dealing with audio level frequencies it is plenty.

The only major downside i can see is that this could have a decent enough impact on the frequency being played that it is no longer in tune and i'm not sure yet how to go about dealing with that, if at all.

Anyway, below is a selection of waveforms for you to look at and see how it modifies the original square wave.

Questions and comments welcome.

Cheers

NM

p.s. this is all Falstad simulation so far. I haven't got round to breadboarding anything yet


Schematic_NuttyMonk CD40106 Fuzzy Oscillator_2021-06-15.pdf
 Description:

Download
 Filename:  Schematic_NuttyMonk CD40106 Fuzzy Oscillator_2021-06-15.pdf
 Filesize:  183.55 KB
 Downloaded:  160 Time(s)


Last edited by NuttyMonk on Tue Jun 15, 2021 11:57 am; edited 1 time in total
Back to top
View user's profile Send private message
NuttyMonk



Joined: Jun 30, 2020
Posts: 62
Location: UK

PostPosted: Tue Jun 15, 2021 11:50 am    Post subject: Reply with quote  Mark this post and the followings unread

The first image is the original waveform with the second stage added at full gain and delay. The rest of the images just add another stage to the previous image with full gain and delay. The difference between odd and even numbers of stages is interesting.

p.s. these images are in reverse order. oops!


6.jpg
 Description:
 Filesize:  21.92 KB
 Viewed:  3539 Time(s)

6.jpg



5.jpg
 Description:
 Filesize:  20.68 KB
 Viewed:  3539 Time(s)

5.jpg



4.jpg
 Description:
 Filesize:  20.42 KB
 Viewed:  3539 Time(s)

4.jpg



3.jpg
 Description:
 Filesize:  20.45 KB
 Viewed:  3539 Time(s)

3.jpg



2.jpg
 Description:
 Filesize:  19.5 KB
 Viewed:  3540 Time(s)

2.jpg



Last edited by NuttyMonk on Tue Jun 15, 2021 11:55 am; edited 1 time in total
Back to top
View user's profile Send private message
NuttyMonk



Joined: Jun 30, 2020
Posts: 62
Location: UK

PostPosted: Tue Jun 15, 2021 11:53 am    Post subject: Reply with quote  Mark this post and the followings unread

Here are some more waveform images which are just me mucking about with the gain and number of stages. I left the delay at maximum on each stage so it is easier to see what is going on.


a5.jpg
 Description:
 Filesize:  17.56 KB
 Viewed:  3538 Time(s)

a5.jpg



a4.jpg
 Description:
 Filesize:  18.5 KB
 Viewed:  3538 Time(s)

a4.jpg



a3.jpg
 Description:
 Filesize:  19.63 KB
 Viewed:  3538 Time(s)

a3.jpg



a2.jpg
 Description:
 Filesize:  17.63 KB
 Viewed:  3538 Time(s)

a2.jpg



a1.jpg
 Description:
 Filesize:  21.59 KB
 Viewed:  3538 Time(s)

a1.jpg


Back to top
View user's profile Send private message
NuttyMonk



Joined: Jun 30, 2020
Posts: 62
Location: UK

PostPosted: Tue Jun 15, 2021 1:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

p.s. there are errors in the schematic. The power supply of U3.7 on page 1 should be +12V, not -12V and on page 2 the resistor going to Jack4 should be 1k not 100k.

Also, i wonder if i could get CV control for the delay and gain of each stage.
Back to top
View user's profile Send private message
NuttyMonk



Joined: Jun 30, 2020
Posts: 62
Location: UK

PostPosted: Tue Jun 15, 2021 1:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

Updated schematic minus the errors and with an LFO select switch to switch between audio and LFO frequencies.

Also i should point out that adding in the Saw wave to the final output gives the horizontal parts of the wave form a diagonal shape instead.

I wonder what the harmonics are like with this setup? Damn, will have to try breadboarding it soon.

Cheers

NM


Schematic_NuttyMonk CD40106 Fuzzy Oscillator_2021-06-15.pdf
 Description:

Download
 Filename:  Schematic_NuttyMonk CD40106 Fuzzy Oscillator_2021-06-15.pdf
 Filesize:  186.75 KB
 Downloaded:  181 Time(s)

Back to top
View user's profile Send private message
NuttyMonk



Joined: Jun 30, 2020
Posts: 62
Location: UK

PostPosted: Tue Jun 15, 2021 1:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here is the Falstad sim to play with...


NuttyMonk CD40106 Fuzzy Oscillator Falstad Sim.txt
 Description:

Download
 Filename:  NuttyMonk CD40106 Fuzzy Oscillator Falstad Sim.txt
 Filesize:  3.18 KB
 Downloaded:  127 Time(s)

Back to top
View user's profile Send private message
Steveg



Joined: Apr 23, 2015
Posts: 182
Location: Perth, Australia

PostPosted: Tue Jun 15, 2021 5:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

It looks to be a combination of two fairly well known techniques. The first is a low pass phase shift process that is usually used for CMOS frequency doublers an the second is mixing alternate normal and inverted waveforms used in analog wavefolders or waveshapers.
That said I haven't seem them used in combination so it looks like you may have something unique (but that may just mean my reading list is too short).
I also looked at longer chains of lowpass filter ->schmitt triggers as a possible way to make a lunetta grade chorus but I never got around to building anything.
Back to top
View user's profile Send private message
NuttyMonk



Joined: Jun 30, 2020
Posts: 62
Location: UK

PostPosted: Tue Jun 15, 2021 6:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks Steveg.

what about the waveforms themselves. There are 6 stages with 6 gains and 6 delays each, all controlled with pots. The possible variations seem to be very large judging from the little bit of messing around i've done so far.

The output is fairly low level, about 4V Peak-to-Peak so it needs a decent amount of amplification and the waveform always has a large DC offset too but hopefully my setup will be ok at dealing with those issues.

Cheers

NM
Back to top
View user's profile Send private message
Steveg



Joined: Apr 23, 2015
Posts: 182
Location: Perth, Australia

PostPosted: Tue Jun 15, 2021 6:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

The waveforms look interesting. Proof of the pudding is what they sound like Smile
And that all depends on what you want to hear. They certainly won't be boring square waves any more.
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue Jun 15, 2021 6:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hah, it seems to be unique enough to me, as in that it is a cool idea that you (or me) never had before Cool

Patentable, I guess not, like Steveg suggests ... but I think it is worthwhile to try out ideas, to not be afraid of failures.

I've no idea if it would be interesting sound wise, but hey, you can always put a filter after or some effects .. the graphs show a richness in overtones that could be very interesting .. but also ... about the inharmonics .. when you tune the delays it could be very harmonic .. look at the delay times .. reciproce them .. as in 1 / delay ... and that will give you a tool to tune it I'd think?

But hen again people also spend time on inharmonic stuff to get a perfect highhat and things like that.

From the schematic I can see you tried to generalize the idea in a nice way, I'd explore it Cool

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
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: Fri Oct 15, 2021 8:29 am    Post subject: Reply with quote  Mark this post and the followings unread

This seems cool. It reminds me of a couple of other Lunetta circuits. You could make similar waveshapes with the old trick of running a 4017 at audio rate, sending each output through a pot, and mixing all of them together.

How "perfect" is that saw wave? Does shape or amplitude change with frequency?

Let's hear some audio demos!

_________________
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 Oct 15, 2021 10:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Steveg wrote:
I also looked at longer chains of lowpass filter ->schmitt triggers as a possible way to make a lunetta grade chorus but I never got around to building anything.

I did a cmos delay with shift registers. You could probably make a chorus with it too.

https://electro-music.com/forum/topic-57022.html

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



Joined: Jun 30, 2020
Posts: 62
Location: UK

PostPosted: Fri Oct 15, 2021 11:47 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi Cynosure,

I've never actually breadboarded it yet. It was just a by-product of me mucking about in Falstad and trying to get phase shifts and delays. Also i was trying to find uses for all 6 inverters on a CD40106.

I'm still in the stage of getting some basic modules built up. May be a while before i get around to this. If you have breadboard space and the components for it, feel free to give it a try for us.

Cheers

NM
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [13 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
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