electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
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
symmetrical waveshaper from 4022
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [16 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
trav



Joined: Sep 11, 2012
Posts: 70
Location: Auckland
Audio files: 14

PostPosted: Fri Jun 14, 2013 2:34 am    Post subject: symmetrical waveshaper from 4022 Reply with quote  Mark this post and the followings unread

Well, first I had a lot of fun with the circuits in the CMOS waveshaper thread: shift register + resistor ladder makes for many interesting wave forms. Then I played around with a 4029 and finally got the up/down count to ping pong, giving me a nice triangle out of the r/2r; but this required an extra flip-flop and AND gate, making three chips for a stepped triangle wave (perhaps someone has a better way to rig the 4029).

So I thought about it and came up with this. No extra logic, just a bunch of diodes :) You could use a 4017 if you wanted more steps, but I prefer the frequency division to be by a power of two. I just tweaked the resistor values until it sounded good. Not sure how close it gets to ground, but with the glide pot cranked and a slow clock into the 4022 I get some nice smooth sweeps.

protip: hang an LED off the 4022's carry out (pin 12) to indicate the output frequency.

[edit: removed useless pot and added extra resistor after more tweaking]


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

ws.png


Back to top
View user's profile Send private message
Cynosure
Site Admin


Joined: Dec 11, 2010
Posts: 657
Location: Toronto, Ontario - Canada
Audio files: 34

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

Cool. I like the 4029 ping-pong idea too.

Got some sound sample of this in action?
Back to top
View user's profile Send private message
RingMad



Joined: Jan 15, 2011
Posts: 219
Location: Montreal, Canada
Audio files: 2

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

Whoa! By "got the 4029 to ping pong" do you mean you got it to count up then back down again, over and over? If so, could you please please tell me how? (or a schematic). I tried to get that to work for a couple of weeks and finally gave up in frustration.

Thanks,
James.
Back to top
View user's profile Send private message Visit poster's website
trav



Joined: Sep 11, 2012
Posts: 70
Location: Auckland
Audio files: 14

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

here's a sample, first clocked at a few different slow rates and fed into a VCO, with some twiddling of the glide pot, then I bring the clock up and listen directly to the output.


ws.mp3
 Description:

Download
 Filename:  ws.mp3
 Filesize:  1.69 MB
 Downloaded:  123 Time(s)

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



Joined: Sep 11, 2012
Posts: 70
Location: Auckland
Audio files: 14

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

RingMad wrote:
Whoa! By "got the 4029 to ping pong" do you mean you got it to count up then back down again, over and over?


yes, and it took some thinking! first the proof: in this sample, again, I first listen to it slow through a VCO, then fast straight out.

schematic to follow


4029.mp3
 Description:

Download
 Filename:  4029.mp3
 Filesize:  959.25 KB
 Downloaded:  104 Time(s)

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



Joined: Sep 11, 2012
Posts: 70
Location: Auckland
Audio files: 14

PostPosted: Sat Jun 15, 2013 1:31 am    Post subject: Reply with quote  Mark this post and the followings unread

Here we are. The carry out (pin 7) dips low at the end of the count (1111 when counting up, 0000 when counting down), so invert that and you have a pulse which can kick a flip-flop everytime you hit one end of the count or the other. The flip-flop then tells the 4029 to reverse direction.

Note that this only counts the endpoints once, ie. it counts from 0000 up to 1110 then from 1111 down to 0001, so there are only 30 clock cycles before the count repeats, not 32. This may or may not be what is desired. It may be possible to get it to repeat the endpoints by doing something with the carry in.

Now, I forked out $5 on a 4514 this week (24 pins!), the next job is to rig up a sequencer.

[edit: messed up my counts; put them in binary for clarity]


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

4029.png



Last edited by trav on Sat Jun 15, 2013 4:08 am; edited 1 time in total
Back to top
View user's profile Send private message
RingMad



Joined: Jan 15, 2011
Posts: 219
Location: Montreal, Canada
Audio files: 2

PostPosted: Sat Jun 15, 2013 3:37 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for the ping pong schematic! I did try something very similar, with a flip flop, but it seemed that the carry out pulse didn't always trigger it. In the datasheet, one can see it's a half-pulse, so I thought it was because of that.

I also tried with a 4040 running with the same clock, using the /32 output (I think) which would trigger the up/down pin. Something like that, but there was a problem wherein it would count up to 15 then dip to 0 then count down from 15, and for my purposes it was a deal-breaker.

Anyway, I shall try your circuit. Finally, I used a PICAXE microcontroller to do what I wanted (and counting 0-255... but I suppose one could maybe cascade two 4029s to get that range).

James.
Back to top
View user's profile Send private message Visit poster's website
trav



Joined: Sep 11, 2012
Posts: 70
Location: Auckland
Audio files: 14

PostPosted: Sat Jun 15, 2013 4:26 am    Post subject: Reply with quote  Mark this post and the followings unread

RingMad wrote:
I did try something very similar, with a flip flop, but it seemed that the carry out pulse didn't always trigger it.

If it makes any difference my NOT gate is on a 40106, and so schmitt triggered. It would also be interesting to try a negative-edge flip flop (I used a 4013, which is positive-edged, and so needed the carry out to be inverted)

RingMad wrote:
I also tried with a 4040 running with the same clock, using the /32 output (I think) which would trigger the up/down pin. Something like that, but there was a problem wherein it would count up to 15 then dip to 0 then count down from 15.

This was my first thought and I had similarly disappointing results. Perhaps a synchronous counter would work? (Oh, and thanks for reminding me that it counts (from 0) up to 15, not 16: reworded what I said above.)

Last edited by trav on Sat Jun 15, 2013 9:06 am; edited 1 time in total
Back to top
View user's profile Send private message
Uncle Krunkus
Moderator


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

PostPosted: Sat Jun 15, 2013 7:28 am    Post subject: Reply with quote  Mark this post and the followings unread

You can do a similar thing by putting all the outputs of a binary counter into their own XOR gate, except the MSB. The other input of all the exclusive XORs goes to the MSB. Send the outputs of the XORs to an R/2R and the wave rises as long as the MSB is 0. Then as the MSB goes high, the same count on the other bits is converted to a down count, and the wave falls. I did it with a 4 bit counter, and you get 8 steps going up, and 8 coming back down. That's only 2 chips. No flip-flop.

Sorry, that might have been 3*NAND gates, I'll have to dig it out and check.

_________________
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
trav



Joined: Sep 11, 2012
Posts: 70
Location: Auckland
Audio files: 14

PostPosted: Sat Jun 15, 2013 8:57 am    Post subject: Reply with quote  Mark this post and the followings unread

Uncle Krunkus: yes! That is a neat trick. XOR sounds right:

Code:
CLK| D | C | B | A || D XOR C | D XOR B | D XOR A | COUNT
-------------------||------------------------------------
 0 | 0 | 0 | 0 | 0 ||    0    |    0    |    0    |  0
 1 | 0 | 0 | 0 | 1 ||    0    |    0    |    1    |  1
 2 | 0 | 0 | 1 | 0 ||    0    |    1    |    0    |  2
 3 | 0 | 0 | 1 | 1 ||    0    |    1    |    1    |  3
 4 | 0 | 1 | 0 | 0 ||    1    |    0    |    0    |  4
 5 | 0 | 1 | 0 | 1 ||    1    |    0    |    1    |  5
 6 | 0 | 1 | 1 | 0 ||    1    |    1    |    0    |  6
 7 | 0 | 1 | 1 | 1 ||    1    |    1    |    1    |  7
 8 | 1 | 0 | 0 | 0 ||    1    |    1    |    1    |  7
 9 | 1 | 0 | 0 | 1 ||    1    |    1    |    0    |  6
10 | 1 | 0 | 1 | 0 ||    1    |    0    |    1    |  5
11 | 1 | 0 | 1 | 1 ||    1    |    0    |    0    |  4
12 | 1 | 1 | 0 | 0 ||    0    |    1    |    1    |  3
13 | 1 | 1 | 0 | 1 ||    0    |    1    |    0    |  2
14 | 1 | 1 | 1 | 0 ||    0    |    0    |    1    |  1
15 | 1 | 1 | 1 | 1 ||    0    |    0    |    0    |  0

there are four gates to an XOR chip, so you could use 5 bits and get 16 steps just as easily. Nice!
Back to top
View user's profile Send private message
richardc64



Joined: Jun 01, 2006
Posts: 611
Location: NYC
Audio files: 25

PostPosted: Sat Jun 15, 2013 11:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Uncle Krunkus wrote:
You can do a similar thing by putting all the outputs of a binary counter into their own XOR gate, except the MSB. The other input of all the exclusive XORs goes to the MSB.

I once used this method for a back and forth led display. (Think NightRider or Cylons.) Generating a waveform, though, the result isn't quite symetrical, because the count spends twice as long at 0 and 7 than at the intervening counts. Close enough for Lunetta work, though.

If it weren't for the doubling of the terminal count durations, the method could be used for an up/down sequencer.

_________________
"I am endeavoring, ma'am, to create a mnemonic memory circuit... using stone
knives and bearskins." -- Spock to Edith Keeler
Back to top
View user's profile Send private message Visit poster's website
Uncle Krunkus
Moderator


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

PostPosted: Sat Jun 15, 2013 5:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, I actually liked the flat top and bottom, if you put it through an LPF, the flats take it closer to a sine wave anyway. Smoothing out the Lunetta sound is always a nice option to have if you can do it so cheaply. Smile
_________________
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
trav



Joined: Sep 11, 2012
Posts: 70
Location: Auckland
Audio files: 14

PostPosted: Sat Jun 15, 2013 7:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

As for a visual indication of these stepped voltages I have been doing something like this with a non-inverting buffer and duplicate R/2R. Excessive, perhaps?


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

R2R_with_LED.png


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



Joined: Jan 15, 2011
Posts: 219
Location: Montreal, Canada
Audio files: 2

PostPosted: Sun Jun 16, 2013 5:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks folks for the XOR + Counter thing... looks good... for my previous application, the flat top & bottom would have been desirable. Anyway, I don't want to derail this thread too much with the up-then-down counter stuff.

trav... maybe a VU meter is a simpler visual indicator of the voltage?
On the last box I built, I had a more abstract representation of an 8-bit number by running the bits to a 7-segment display (plus the dot).

James.
Back to top
View user's profile Send private message Visit poster's website
trav



Joined: Sep 11, 2012
Posts: 70
Location: Auckland
Audio files: 14

PostPosted: Thu Jun 20, 2013 8:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

breadboarded up the XOR version. How about through a VCA this time?


vca_up_down.mp3
 Description:

Download
 Filename:  vca_up_down.mp3
 Filesize:  348.38 KB
 Downloaded:  89 Time(s)

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



Joined: Sep 11, 2012
Posts: 70
Location: Auckland
Audio files: 14

PostPosted: Mon Jul 01, 2013 8:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

I haven't tried it yet, but I think the circuit Uncle Krunkus described could be made a little bit more versatile with the addition of a simple ON-OFF-ON toggle switch


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

ramp_or_triangle.png


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [16 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
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


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