Posted: Fri Jun 14, 2013 2:34 am Post subject:
symmetrical waveshaper from 4022
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:
868 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
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.
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.
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:
895 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
Last edited by trav on Sat Jun 15, 2013 4:08 am; edited 1 time in total
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).
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
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.
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. _________________ Revenge is a dish best served with a fork... to the eye
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. _________________ What makes a space ours, is what we put there, and what we do there.
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:
719 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
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).
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:
578 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
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
I've been going through the entire history of the Lunetta stuff from everyone here from EM's "day one", to see what cool things that I may have missed.
This one, with the latest schematic from Trav just above this message - looks like it could have some cool possibilities.
Going with the 4024, for it's 7 BIT outputs - take it out to 2 x 4070's.
Instead of having the switch for 1 side of each of the XORs, try switching them individually at first, to hear whether it could be useful aurally?
Try it at first with only 4 x 4070 and the 4 BITs from it.
(And of course - the 4 or more BITs are sent to an R-2R, or, just diode summed.)
Different clock speeds to the 4024 of course. (Or 4040, 4060, etc.)
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