Posted: Mon Aug 08, 2011 7:42 pm Post subject:
Simple 2 Chip Drum Machine
I was testing out a circuit that uses a 4066 to switch signal on and off, so I needed a bunch of audio signals to test with. I set up a schmidt trigger oscillator on a 40106 and sent that to a 4040 so I had my 4 audio signals to test with. I mixed the 4 outputs from the 4066 so I could hear if the switch was working correctly. I turned the pot on the oscillator and when it dipped below audio level I noticed a familiar rhythm. When I thought about what the 4040 was doing, it all made sense. I explain it all in the video below.
The 4066 isn't needed - just the 40106 and 4040. Then highpass filters for the hihat and snare and low pass filter for the kick.
Again, it is passively mixed so it doesn't sound too great when all mixed together. If I solder this up I will actively mix it and use pots to control the volume of each part. Also, I am using very basic filters. I'm certain that there are other filters that can be used that would make each part sound better, so I included both the basic schematic that any filters can be added and the schematic for the filters that I used.
2chipdrum.gif
Description:
Filesize:
27.04 KB
Viewed:
3683 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
I wired this up again to test it out with the clock output of my C-MOnSter synth. I spent a bit of time working on the filters for snare and hi-hat and actively mixed the sounds. Also, the beats were on the off beat - maybe the 4040 inverts the output or the 4029 and 4514 in the sequencer. So I had to invert the clock before using it.
It is now up to 5 chips, and still a one trick pony, but it is sounding good
drumsample.mp3
Description:
Sound sample of simple drum machine clocked from the sequencer in my C-MOnSter synth.
seriously cool, good design and even better explanation. Im glad to see your working on a drum machine to compliment that awesome synth you made. _________________ There he goes. One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
Hunter S. Thompson movies noise
I'd suggest adding something like a 470-560 ohm resistor, or a bit larger perhaps, in series with all the 50K potentiometers. Doing this will limit the output current from the inverters to sane values, when you turn the pots all the way down to zero resistance. Without them the inverters would be standing with one leg in the grave, when the pots are at zero. 470-560 ohm should be OK for up to 0-15V supply voltage, use a bit larger resistance if you are the belt-and-suspenders type.
Frank.
Edit: Must admit I am not sure that I understand how this is wired together. Suspect there may be parts of the schematic we don't see perhaps?
Edit, part II: Ah, there are two 40106s.
Must admit I am not sure that I understand how this is wired together.
It has changed a bit since the early schematic. The functioning part is pretty much the same, but the filtering and mixing has more stuff. I have to do a schematic for it before I solder, so I will post the latest version when the schematic is complete. I plan on using a pot for each sound at the mixing stage. _________________ JacobWatters.com
*) Replace U4, the TL071, with a TLC271 or a similar, single supply op-amp. Feed U4 pin 3 from a voltage divider, made from 100K connected to +5V, and 56K connected to ground. This should put about 1.8V on pin 3, given your 5V supply. Decouple U4 pin 3 to ground with something like a 1uF capacitor. This will make for a *much* improved mixer. The TL071 is not a good choice for your setup (unless you like the sound, of course. ).
If you use a TLC271, then connect pin 8 to pin 3.
*) Once the mixer is working, increase R9, R11, R13 and R14 to equal and much higher values, at least 100k. Right now your mixer - if it was working - will have a 4.7k input resistance. I'm guessing this is probably not what you want? Among other problems this will severely distort your filter following U3.
*) Belt-and-suspender suggestions (unless you like to run 'em hard): Add 470 ohm resistor in series with R4. Add reverse voltage protection diodes to U2 and U3, for instance a pair of 1N4148. Connect cathodes to pin 14, anode to ground. This will largely protect the ICs from the negative supply voltage pulse, generated while their 'pulse' capacitors, C4 and C5, recharges. Right now they do so by drawing current through U2 and U3 - in reverse.
MadScientist - Thanks for all the suggestions. You were correct about the resistors. The distortion on the snare sounded great, but it was drowning out the kick too. I will try adding distortion another way.
I am using a virtual ground on the TL071. I know it's not the best method, but it is getting the job done for now.
Also, I added the diodes that have the black end at pin 14 and the other end to ground. Is that the way it should be? The other way stopped the sound from working.
I made a few other changes, but have been delayed making the schematic because my wife knocked the breadboard off the desk and I had to put a lot of it back together again (and I didn't remember most of what I had changed). The holidays are coming soon, so it might not be until next week when I get a chance to make the schematic. _________________ JacobWatters.com
I am using a virtual ground on the TL071. I know it's not the best method, but it is getting the job done for now.
The virtual ground is fine, that isn't the issue. The problem is that a TL071 cannot really work on a supply voltage of 5V. The output is listed in the data sheet as being able to be driven to typically 1.5V below the positive supply rail, and 1.5V above the negative. At worst these limits are 3V below and 3V above. So, worst case, your op-amp will not be able to swing *any* voltage around the virtual ground, best case will leave you with 2V of somewhat undistorted output. Maybe.
The result is that you are very/extremely likely to have a flat topping output from U4, regardless of level. This will add harmonics back into the signal, harmonics you may be trying to filter out. A TLC271 is a common part, which is guaranteed to be able to drive its output between 0 and 3.5V on a 5V supply, giving you more wiggle room. The virtual ground I suggest puts about 1.8V on pin 3, which of course is just about halfway between 0 and 3.5V.
If your load is always above 1Kohm, then the positive limit increases to 4.2V, in which case 2.1V may be a better choice for the virtual ground level. (Looking closer at the datasheet, then you should connect pin 8 on a TLC271 to ground in your case, not pin 3.)
Cynosure wrote:
Also, I added the diodes that have the black end at pin 14 and the other end to ground. Is that the way it should be? The other way stopped the sound from working.
Correct, and they shouldn't chance the sound in any way, they just make life easier for U2 and U3.
Cynosure wrote:
I made a few other changes, but have been delayed making the schematic because my wife knocked the breadboard off the desk and I had to put a lot of it back together again (and I didn't remember most of what I had changed). The holidays are coming soon, so it might not be until next week when I get a chance to make the schematic.
Suggest asking her to please be more careful in the future.
I won't be doing much tinkering until after the holidays either, and E-M also seems to be winding down a bit.
After some deliberation and testing, I decided to use a TL072 - one opamp to give extra distortion the the snare and one to mix. The distortion is actually sounding better on the drum sounds - especially the snare. It sounds too zappy without it. _________________ JacobWatters.com
Here is the final schematic. Thanks again for all the input. I decided to go with the TL071's because I want the distortion. I even added a Wasp distortion filter to the kick (modified from the JH Wasp schematic).
SimpleDrumV1-2.gif
Description:
Filesize:
47.19 KB
Viewed:
2321 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.
Looks great, love the unconventional thinking involved.
If some day you do decide you need a more suitable op-amp for a 5V design, then a LM324 should do nicely for most functions. Has about the same voltage limits as the TLC27x series I mentioned.
Here is the final schematic and sound demo video. I made a few minor changes - the kick sounded a little different once soldered up so I adjusted the cap values.
Joined: Nov 10, 2011 Posts: 878 Location: Lancashire, England
Audio files: 14
Posted: Sat Jan 28, 2012 9:32 am Post subject:
I say, that kick drum is admirable I hope you don't mind if I copy your design for it _________________ As a mad scientist I am ruled by the dictum of science: "I could be wrong about this but lets find out"
Joined: Dec 02, 2010 Posts: 106 Location: Victoria BC
Posted: Sat Jan 28, 2012 12:15 pm Post subject:
Lovely job Jacob!
I quite fancy building an UM-TSS. I think I'd want to be able to vary the rhythm a bit. Perhaps a logic chip alongside the 4040 and a patch bay à la Inventor? Or separate CV in jacks to control the individual sounds? Or both?
Joined: Nov 10, 2011 Posts: 878 Location: Lancashire, England
Audio files: 14
Posted: Sat Jan 28, 2012 12:18 pm Post subject:
I don't quite get your kick drum circuit but I think I just need to have a proper read-through of this thread, however I can't right now because my brain is too tired from working on my latest invention all day
Would you be so kind as to give me a run down of whats happening with the kick circuit? Or point me to which posts explain it? _________________ As a mad scientist I am ruled by the dictum of science: "I could be wrong about this but lets find out"
Sonic - I thought about doing that when I was working on it - a patch bay with various logic chips to control the triggers. I also thought about trying a shift register loop as a tap trigger. In the end, I decided to keep this build simple since it was more of a test of what I can do. I have plans for a very complex cmos based drum machine. It will take a lot of time and money to build, but I hope to get around to it some day.
JingleJoe - I will try my best to explain what I can, but I honestly do not know most of it. I build mostly by trying out a bunch of different stuff until it does something interesting, and then I adjust values to tweak the sound. Here is my best guess as to what is happening:
The ON pulse goes through an inverter. Using the output of the 4040, the kick was triggering between beats compared to the hi-hats and snare. Inverting it solved that problem. You might not need to do this if you are triggering it another way.
The ON pulse goes through a capacitor(C10) and into the power pin of a 40106. The cap gives a small reserve of power for the chip.
Once powered, the 40106 starts to oscillate the oscillator that is wired up on pins 1 and 2. As the capacitor(C10) drains, the rate of the oscillator slows down, making the sound start high and finish low. This gives it a bit of a zap. Increasing the value of C10 will increase the duration of the kick sound because it will take longer to drain the power reserve in the capacitor.
The oscillator sound passes through a diode. In the case of the kick, I just used this to prevent the 40106 oscillator from using the capacitors further on in the circuit for oscillation. The hi-hats and snare also use it for highpass filtering. The resistor to ground after the diode is needed to help pull the sound through the diode. I think it is called a pull-down resistor.
The sound goes through an inductor. This acts as a lowpass filter, but doesn't lower the volume as much as a cap to ground.
The sound goes into a Wasp distortion circuit. This is taken from the JH/Fonik schematic, but I modified some of the cap values. As far as I can tell, it uses an inverter to clip the sound, and has a cap to ground for lowpass filtering. Maybe they are linear cmos amplifiers?
The sound is split. One division goes through a low value capacitor(C17), which acts as a highpass filter. The other split goes through a pot and joins up with the highpassed sound. When the pot restricts the sound, then more of the highpass sound comes through. When the pot is opened, then the unfiltered sound comes through and you don't hear the highpassed effect.
R13, C18 and R14 are part of the mixing circuit for actively mixing the sound with the hi-hat and snare.
Joined: Nov 10, 2011 Posts: 878 Location: Lancashire, England
Audio files: 14
Posted: Sun Jan 29, 2012 2:54 am Post subject:
Cynosure wrote:
The ON pulse goes through a capacitor(C10) and into the power pin of a 40106. The cap gives a small reserve of power for the chip.
Once powered, the 40106 starts to oscillate the oscillator that is wired up on pins 1 and 2. As the capacitor(C10) drains, the rate of the oscillator slows down, making the sound start high and finish low. This gives it a bit of a zap. Increasing the value of C10 will increase the duration of the kick sound because it will take longer to drain the power reserve in the capacitor.
OH thats whats I was missing! Thankyou I got many parts of the circuit e.g. pull down resistors and mixing and oscillators, but I missed that, a very interesting idea, thankyou
I have observed the output of a 40106 osc slowly powering down from a still charged psu cap; both the pitch and peak voltage of the wave change- first increasing in frequency because the hysteresis zone shrinks, then decreasing in pitch and volume decreases the whole time. So it;s like you get an envelope and pitch control all in one!
Fantastic, thankyou for putting me on the right track _________________ As a mad scientist I am ruled by the dictum of science: "I could be wrong about this but lets find out"
another awesome machine cynosure. I like the way you added a clock sync and made everything work together. _________________ There he goes. One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
Hunter S. Thompson movies noise
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