Published on August 2, 2016
Jam back to the 80s with the Arduino Beat Box drum machine. The Beat Box plays classic drum patterns using lo-fi TR-808 sounds. Here is a list of features:
The Beat Box produces audio using the Arduino's high resolution timer, TIMER1. TIMER1 is programmed to produce an interrupt at the sample rate (22,050Hz) and to generate a high frequency PWM bit stream. The bit stream (Arduino pin D9) is converted to audio by a simple two-stage low pass filter. The low pass filter consists of two resistors and two capacitors which are assembled on a solderless breadboard. The filter is connected to the littleBits modules through a littleBits Proto module.
If you ever wanted to try your hand at basic electronics, this is a great project for beginners -- just a few basic components and a very simple circuit.
The Beat Box has two controls. The dimmer connected to Arduino pin A0 adjusts the tempo from 60 beats-per-minute (BPM) to 188 BPM. The dimmer connected to pin A1 selects one of five classic drum machine patterns.
The Beat Box is a great companion for the littleBits synth. I hooked the Beat Box to littleBits Filter and Delay modules to mess with the sound in real time. Listen to the demo MP3 file to hear the result. I recommend playing the Beat Box itself through good quality monitors as the Synth Speaker module doesn't do justice to the low frequency content in the drum samples.
The Beat Box design is a good starting point for your own projects. It shows how the Arduino can be made to produce audio, how to store samples in program memory (PROGMEM) and how to playback digital audio samples using interrupts. The full design is described at:
Here's a few ideas for your own project. Compose a rhythm pattern of your own and build it into the code. Make a new drum kit. Add new a new drum waveform (samples). Add a Filter module, Delay module, or whatever and mangle the audio. Program the button to add beats of your own so that you can play along with the rhythm pattern. Better yet, replace the button with a sensor to trigger beats.
Duration: A few hours