Posted: Sun Aug 29, 2010 7:06 am Post subject:
Audio in to a 4093-based oscillator?
I'm really new at this so bear with me.
I've built some 40106-based oscillators and 4093-based oscillators. When I run the 40106 oscs into the 4093 oscs, interesting things result. I was thinking that it might be interesting to run arbitrary audio into the 4093 osc.
I tried to run a Speak & Math through it but the oscillator was silent. I assume that since my 4093 circuit is 9v, the input is too low to trigger the gate. I think what I need to do is amplify the input so that it's loud enough to trigger the gate. I have some LM741 op-amps, but I've never used one before. They should be suitable, right?
You can always try it and find out That's the only sure fire way to know.
I had some problems with my amp circuit, but I've got that cleared up now (I mistakenly connected the amp's V- pin to my 4.5V reference ground instead of 0V).
I have to say that it's definitely makes noise. More experimentation is in order to get a handle on what's really going on, but I can hear a distorted version of the input signal coming out of the 4093 oscillator.
Tuning the oscillator doesn't seem to have much effect at this point, however -- that's the part I need to explore. I expect the oscillator's tuning pot to have more of an effect that it seems to have, but then I've only had a moment to play with it. I'll get back to it this evening.
how are you connecting the external signal in to the 4093?
The 4093 has a designated "gate in" pin.
That's correct. Essentially I'm outputting the NAND of the input signal and the feedback signal. Here is an example of four 40106 oscillators fed into a single 4093 oscillator (I think "wonky" is reasonably accurate):
COREX! This is a pretty decent Lunetta track you have recorded here! The 40 second mark is where it sounds great to me! Are you just connecting all four of the 40106 oscillators to the 4093.... no R2R ladder in between or anything?
I do have a resistor after each 40106 oscillator. I collected them and ran them through a diode (not sure why.... seemed like a good idea) and then from there to the 4093. Here's a pic (before the input circuit was added):
PCB mounting pots! They, would save me a huge amount of real estate on my 3.4"x3.4" perfboards!
I got a handful of them specifically for breadboarding; the pots I will use when I build something are all solder-terms. I've learned that I need a bigger handful of these right-angle pots though -- I used up all my 100Ks on that design, and I could easily tack on several more oscillators. It's enough to prove the concept though.
The photo is huge, it's true. I like 'em that way. It captures exactly how backwards the electrolytic cap is on the 4093...
Thanks for getting my account set up, 'ppreciate it.
I'm still having a problem where the audio input through the 4093 oscillator doesn't behave the way I expect.
I learned how to use Eagle well enough to draw up this schematic. I've checked it a couple of times so I'm reasonably sure it's correct, but I'm new to this so there might still be some mistakes.
I'm not sure what Eagle wanted to do with the power to the 4093 chip (IC2) so I omitted that part. The chip's VDD pin is connected to +9V with a decoupling 0.1uF capacitor to ground, and the chip's VSS pin is grounded to the negative battery terminal.
Also in the drawing you can see that I tied the op-amp's OFFSET pins to +4.5V reference ground with 100K pull-down resistors. I'm not sure if I needed to do that or not, but the op-amp seems to be working so I think that was okay.
I was playing with it a little yesterday morning, trying to better understand what's going on. I tested the oscillator by removing the op-amp from the oscillator's input (IC2A pin 1) and connected that pin's resistor (R7) to +9V instead of ground. In this configuration, the oscillator oscillates normally, and turning POT3 changes its pitch like usual. Leaving the resistor as it was, I connected the op-amp to the input again, and as soon as the connection is made, the oscillator stops oscillating. If the op-amp's audio source is providing audio, then the oscillator outputs that audio. When the op-amp is connected to the oscillator, POT3 seems to have no effect at all.
If the oscillator's input pin is tied to ground by it's pull-down resistor (R7), then it doesn't make sound by itself (0 NAND 0 == 1 and 0 NAND 1 == 1; no oscillation). In this configuration, which should be correct for gating the oscillator by the input from the op-amp, I get the same result, which is that if the op-amp's audio source is providing audio, then the oscillator outputs that audio and POT3 seems to have no effect.
1st thing I'd suggest is putting a diode from the output of the amp to the 4093 input - just to make things neat & tidy
The 2nd thing I'd try is taking the analog signal from the amp & converting it to digital. Right now it maybe sometimes, sorta, kinda makes the kind of signal the 4093 would like to use, but, not in a reliable way.
Placing a comparator, with variable threshold, in between the amp & the 4093 should get you something more like an oscillation on top of the input signal, kind of a crude waveshaper.
I put a diode in there between the amp and the 4093, but it made no difference. Update: That's not completely true. With the diode in place, if R7 is connected to +9V, connecting the amp circuit to that leg of the 4093 no longer stops the oscillator.
I'm not sure about your comparator idea. It might be worth a shot. One thing I notice is that if I adjust the gain of the amp section just right, only the peaks of the audio come through the gate, which leads me to conclude that I'm hearing the level of the Schmitt trigger, and that that leg of the gate must be going on and off. That doesn't necessarily mean it's getting a clean signal, but it's hard to understand the logical behavior. (Then again, it's hard to understand the logical behavior when you leave a leg floating, too.)
That is interesting in that there's a direct connection between the op-amp and the CMOS chip, and the LM386 circuit doesn't have a feedback loop the way that an LM741 or TL071 circuit does.
Unfortunately, I haven't got any LM386 chips on hand. To make matters worse, I currently live in the Middle East, so shipping components from the States can take a really long time.
I'll definitely get my hands on a few LM386s at some point, but for now I would greatly prefer to get something working with the LM741s and TL071s that I have on hand.
The 386 is actually an amp-on-a-chip, its designed to drive a speaker! The genius of that cct. is the amp is smashing the guitar signal into something the logic gates can understand.
Which is why I suggested a comparator with your op-amps. Having the pre-amp (what you have now) & the analog to digital conversion (the variable threshold comparator) as seperate elements actually has another benefit; you can mix all 3 signals together.
Stack clean, digital & NAND in a mixer & you have even more options for sonic fun times! But, yeah, I'm a fan of comparators;
Joined: Feb 02, 2010 Posts: 179 Location: California
Posted: Sun Sep 05, 2010 9:41 am Post subject:
Yea, the 386 the way it is set up in that circuit is outputting a very square, smashed, distorted signal. Pins 1&8 tied together basically maxes the gain on the chip.
386 shouldn't be too hard to come by, but hard to say as I've never gone to the middle east. 386 is used commonly in computer speakers, portable radios, portable TVs, and many other common small amplifier situations. It is sort of the "go to" small amplifier chip.
I switched it around so that it's non-inverting though (otherwise silence activates the oscillator). Definitely seems like it's doing something now. The oscillator seems to gate on the input, more the way that I imagined it.
I need to do some recording of the various signals so that I can inspect them (Audacity is the poor man's o-scope), but I think that's got it. Thanks, DGTom.
Your Proto Squelch video has some particularly neat sounds. I dig it.
Well my comparators built around the TL071 didn't seem to work quite right, and the gain stages I built with the TL071 also never quite worked right. I don't have a scope and so it's difficult to analyze the problems. I suspect that powering them from a 0V and 9V supply (with a reference at 4.5V) coupled with the fact that they don't amplify rail-to-rail might be the root of the trouble, but I can't really confirm that. I gave up and put this aside.
Last week I got a couple LM311s (but forgot to look for LM386s, alas), however while the LM311 works fine for the CMOS circuits (for example, a 40106 oscillator can run through it almost transparently), given input from the Speak & Math, nothing happens. So I put that aside too... no way to really see the problem or do anything more than guess.
Then last night I was flipping through Nic Collins' book and I saw pretty much exactly the input circuit I need... a gain stage based on the 4049 inverter. I've got a few 4069s, so I tacked together the circuit with one of those really quick. It works great!
Finally some success. Running arbitrary audio into CMOS gates is now a reality for me, and it sounds uniquely horrible. Sweet!
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
Please support our site. If you click through and buy from our affiliate partners, we earn a small commission.