$10 Arduino Beatbox (remake of the $5
Picaxe Drum machine)
(click images for
This is my first real Arduino project. It comes after building a
handful of Picaxe projects over
several years. Both platforms are nice, but all things being
equal, the Arduino is more open and hence, offers more freedom.
I'm sure that there are some good comparisons of these devices on the
net, but since you're already here, you can read
my impression of the differences.
This is a simple sequencer machine which uses Capacitative Sensing Code
for input to the Arduino. It is is a combination drumpad and
sequencer. It has just two modes, record, and playback, and needs
very few components; an Arduino (of course), and just 3 resistors and a
piezo speaker. If you're feeling decadent, you can add an LED
(with a resistor) for more "ooomph".
I have a $5 version of
this which runs on a PICAXE microcontroller. As you can see
from the project enhancements, moving
to an Arduino is a nice change since it offers much more potential with
far faster processing, much more memory, and a nice
variant of C which is closer to the high-level object oriented
languages that I like. But I can't give up on the Picaxe
It offers unparalled simplicity, lower cost, and lower power
requirements. In fact, my picaxe projects never needed a
power-switch since they could go to sleep and wake up entirely under
software control. It is just a matter of time before this level
power conservation comes to the Arduino, but its not quite a nanowatt
When the program starts, it expects the sensing buttons to be
untouched, and needs a fraction of a second to calibrate a good
value to distinguish between touched and untouched. It then beeps
a high pitch beep to indicate the start of the record sequence.
At this pont, the user taps a rhythm on any of the 3 pads:
low, medium, and high pitch tones. When finished, tap one final
to indicate when the drum-loop should repeat.
After the recording is finished, the Arduino removes the trailing
silences, and applies a modified median filter to clean up the
recorded track. Capacitive sensing buttons have noise like
you wouldn't believe, making real-time input a bit challenging.
Then playback looping begins. Your track is repeated ad
infinitum, in all its glory. Touching one of the buttons at the
a loop resets the device and enters record mode.
This program contains some good generic code. The capacitive
sensor routines senses a finger touching a wire attached to a
It needs only a 1M ohm resistor, so using this as a UI is cheaper and
easier than buying buttons! And Paul Badgers tone generation
routine is essential knowledge for those who wish to beep.
My capacitive sensing code is based on Paul Badgers code, but should be
easier to read since I don't know the Arduino particularly well!
I wouldn't have used his routines, but using external
libraries with the Arduino software is kind of a hassle. I like
portable code, and will stick with my stand-alone routines until the
Arduino IDE has a mechanism for importing external libraries nicely.
The IDE is ok, but compared to OOP methods using Netbeans and Java,
embedded programming still has a little way to go.
Power is supplied by a wall wart through the onboard
Arduino voltage regulator, or through the USB bus if you have the
programming header connected.
Arduino microcontroller (I used Moderdevice.com's RBBB
1M resistor (3)
some misc hardware
of this project is pretty darn simple. I first assembled it on a
prototype. Its worth having a
a dedicated Arduino on a solderless breadboard so you can quickly
wire-up anything you wish. I then mounted it in a craft box that
was predecordated with tissue-paper and pictures. The RBBB
Arduino just fits inside. 3 small sheet metal screws stick out of
the front of the box and provide the touch pad surface on which the
user taps. There's also an LED. This was of the clear
variety which was difficult to see, so I roughed it up with sandpaper
which converts it nicely to a diffuse LED.
is fairly straightforward. Since I worked out the interface previously,
it was pretty easy to code up. And after programming on a Picaxe
for a while, the richness of the Arduino makes you wonder if there is
anything that you can't do.