- Discrete LEDs
- Dot/Bar LEDs
- Matrix LEDs
- 7-Seg LEDs
- LCDs
- Switches
- KBDs
- Sensors
- Motors
- Analog
-
Comm
- Serial -- Software
- Serial -- Hardware
- RS-232 via the MAX3232
- I2C -- EEPROM
- I2C -- DS1307 Real Time Clock
- 1-Wire -- DS18B20, Powered, Single-Drop
- 1-Wire -- DS18B20, Powered, Multi-Drop
- 1-Wire -- DS18B20, Parasitic, Multi-Drop
- TI Link Protocol -- Calculator Demo
- Infrared Communication
- MIDI -- Output Demo
- MIDI -- Input Demo
- MIDI to Analog Synth
- Miscellaneous
Electronic Drum Voice
Here's a really fun project for you to consider: an electronic drum voice. With the values shown in the schematic, this creates a realistic bass drum effect, but is easily modified to produce other sounds like claves, woodblock, tom-tom, bongos, etc. It should find good use in PIC circuits implementing drum kits for electronic music, smart metronomes, even the tick-tock sound for clocks.
The basic idea has been around since the 1960s. Essentially, we'll whip up a Twin-T filter and bring it almost to the point of self-oscillation, but not quite. Then, by injecting an impulse, we'll cause it ring, and die out again. This is called damped oscillation. The oscilloscope shot for the circuit illustrates it clearly:
There are a number of ways of implementing this electronic drum circuit (op-amps, CMOS running in linear mode, etc.), but I elected to go discrete and just use some 2N3904 transistors.
The PMP program in the PIC demonstrates the drum voice by playing a syncopated pattern. Be sure to notice how the pattern is stored in a constant array.
In the photo, above, I'm playing the thing through an Oonzt Angle amplifier, the black unit sitting on the breadboard.
One final thing, you can alter the volume either in hardware or software. In the former case, simply adjust R7 up or down. In the latter, look for the constant WIDTH in the program.
Click to get the source code.
Click to get the schematic PDF.
Next Project: Analog Switch -- Unipolar
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment