Bicycle Drummer

Arduino based battery powered drum sequencer, synchronized to wheel speed

Similar projects worth following
Using Arduino Nano + Dreamblaster S1 synth module + Battery Powered Speakers + recycled reed switch and magnet , I hacked together a 'Bicycle drummer'.

It plays a rock drum pattern, synchronized to the tempo of the bicycle wheel.
It automatically start and stops playing, on detecting bicycle activity/inactivity.

This prototype started its life initially as a tap tempo drum rhythm pedal. When a bicycle computer broke down, I changed the project to become a 'bicycle drummer' !

My son likes riding his bicycle as fast as he can. He looks at his tiny cycle computer to see the max speed he reached. A few weeks ago, this low cost speedometer stopped working. 

This speedometer uses a reed switch + magnet to detect the wheel speed.

I found that the problem was a bad contact between the holder and the cycle computer : the cycle computer slides on the holder and touches 2 contacts, connected to a reed switch.

While repairing, I thought I could do something more fun, and I soldered 2 wires with female headers to the cycle computer holder. This way the original cycle computer is still usable, but you can also add your own hardware. I had this tap tempo drum project laying around. I modified it for use on a bicycle.

How it works : the Arduino measures the period of the reed switch pulse, and adjusts the tempo of a drum sequence accordingly. This drum sequence is sent by TTL level MIDI commands to a Dreamblaster S1 module. The S1 is a low power waveblaster compatible module. It normally uses 5V but can be powered with 9V just as well, it uses very little current. You could use any other waveblaster module from the soundblaster 16/awe32 era. In that case you need to carefully address the power supply requirements, probably you need a clean 5 volt with sufficient current, and +/-12V. Don't blow up your retro gear.  

If the cycle period grows longer than 5 seconds, the sequence is stopped. As soon as a new period is detected the sequence is started and/or the tempo is adjusted. The output of the S1 synth is connected to a low cost battery powered speaker.  

The Arduino code can be found here, it is MIT licensed. For the schematic of the current breadboard setup, see this picture. The prototype worked ok, and now I am designing a PCB, with some improvements (for example proper reset circuit) and some expansions (see below, 'planned improvements').

Be careful when testing, keep an eye on the road. Any usage of this or similar projects is on your own risk.

See this video for a small demo outdoor + a more clear demo indoor :

Planned improvements :

Find a louder portable speaker, the tiny battery powered speaker is a bit quiet. Not sure if the neighbours will appreciate the louder version though.

I'm designing a new PCB now, using the open source package KiCad. It is an Arduino Nano shield that can be used to create bicycle drummer, a tap tempo pedal, or other interactive synth/music spin off projects. I will add the Kicad files to the github repository, as soon as it is assembled and tested. This is how it looks in 3D KiCad rendering now  :

Also I plan to extend the software with different rhythm styles, maybe also additional bass lines. The new PCB has some buttons which you can use to select rhythms/tracks, or trigger some drum sounds manually.

  • 1 × Arduino Nano
  • 1 × Battery powered speaker recycled
  • 1 × Reed switch assembly from old bicycle computer recycled
  • 1 × Dreamblaster S1 synth module
  • 1 × 9 Volt battery and battery connector rechargeable NiMh 9V Battery

View all 9 components

  • The clock is ticking, hurry up !

    serdef07/28/2014 at 17:45 0 comments

    I implemented a clock tick sequence for the bicycle drummer setup. This is just a matter of instrument choice and filter settings on the same sqeuence. But with good speakers or headphones, this could be encouraging : Time is running out, welcome to the machine, you are part of it, push those pedals ! 

    See this video :

  • Square synth lead

    serdef07/26/2014 at 17:07 0 comments

    Same sequence, now with Square Lead 1 instrument.  Also demonstration of gunshot sound. See Video

  • Resonant filter control with potmeter

    serdef07/26/2014 at 09:56 0 comments

    I added a potmeter to the ADC connections and implemented control of the cutoff frequency of the low pass resonant filter. When moving the potmeter it sends the SAM2195 TV cutoff NRPN message for MIDI channel 1.

    Filtering for each of the 16 midi channels can be controlled separately. I noticed when changing filter settings, these new settings apply to the next coming notes, not to the current sound/reverb already playing. It's not a heavy moog filter, still it sounds great, analog-like sound with the Lead 2 sawtooth waveform (instrument 81).

    I should find a way to feed audio directly into my nikon p300 camera  (line in??), the mics do a terrible job.

    Enjoy the video : 

  • bass and synth sequence

    serdef07/25/2014 at 10:58 0 comments


    the bicycle drummer software was updated to include bass line and additional synth sequences.

    The software can now be switched between button tap tempo mode and bicycle tempo mode.

    the arduino sketch is available at

    schematic and pcb information at

    see this video for demonstration :

View all 4 project logs

Enjoy this project?



davedarko wrote 07/25/2014 at 11:12 point
Nice baseline :)

  Are you sure? yes | no

serdef wrote 07/26/2014 at 09:47 point
I tested the resonant filter control today, check it out :

  Are you sure? yes | no

davedarko wrote 07/26/2014 at 10:37 point
Ah cool. I've seen an atmega8 as a SID clone once and wonder if you could get decent tones of the arduino so one would not have to get an extra 30euro board. Somewhat an entry low cost thingy to start with. Will you place the potentiometer on the handle or brakes to keep the "bike as input" theme?

  Are you sure? yes | no

serdef wrote 07/26/2014 at 16:05 point
Hi Dave,
yes the S1 synth module is indeed a bit high end for this job :
it has up to 64 voices polyphony, good drums, and plenty of instruments.
The demo really has a droning bassline with subtle variation and good drums, some reverb. It has high SNR, no audible noise, deep bass. You can see the image shake a bit on the beat, the camera mics don't do it justice.

I think you can't achieve the same sound quality and polyphony on pure atmega.
But for a noisy single bassline, or rythm like lo-fi sound, you can generate this from arduino itself. There are several open source projects doing that and it would be sufficient for the bicycle project.

As I have the S1 laying around here, and I prefer to use this.
It is easy to experiment with and it sounds really good. It is overkill, I know,
that's part of the fun, we can add many features and tracks.

For the potmeter on the bicycle I had the idea to couple it to the direction of the front wheel. Don't want to drill into my son's bike, so still need to find a gentle way to do it.

  Are you sure? yes | no

davedarko wrote 07/27/2014 at 08:33 point
It definitily sounds good, indeed :) as a second mode it could be nice to have something like left pedal kick is snare and rightpedal kick is basedrum. Going up a hill with demotivational slowering music :D

  Are you sure? yes | no

serdef wrote 07/27/2014 at 10:07 point
Dave, that is really a good idea, but how to detect which pedal is down :
We could have pressure sensors on the pedals, so we can sense which pedal is pressed. Also if things are getting intense, like accelerating or going uphill, music could change. And it could sense person taking place before getting speed,
and play some intro or waiting muzak until it gets upto speed.
So to achieve this, I could add piezo sensors on the pedal, but a problem is the wiring, because the pedals are revolving.

An easier, but more limited way could be to add magnets to the pedals, and reed switches on the frame. This would be similar to the tempo control I have now.

  Are you sure? yes | no

davedarko wrote 07/27/2014 at 10:30 point
I would prefer the last one. There is a difference between rolling and kicking the pedals to move ;) I want to implement cadence (kicks per minute) on my bicycle computer project, too. You want to permanently kick the pedals in a steady beat and not just roll the streets when you are exercising - so I see a difference there.

  Are you sure? yes | no

DeepSOIC wrote 06/11/2014 at 23:08 point
I wanted to make similar thing for a car, but with normal MP3ish music. But haven't done anything.

  Are you sure? yes | no

serdef wrote 06/13/2014 at 17:54 point
For a car, you could connect the arduino to a gps module and set the drum tempo according to the incoming ground speed.

  Are you sure? yes | no

DeepSOIC wrote 06/14/2014 at 23:37 point
well, gps is nice since the device can be standalone. But the need to have a number of satellites up in the Space for this simple thing to work bugs me (OK, they are already, I know). And gps IMO is not always accurate enough and, more importantly, not smooth enough.
I was thinking of connecting to CAN bus: the built-in audio system does seem to know the speed. Its automatic adjustment of sound volume looks like being speed-dependent.
Anyway, I don't plan to begin doing this in near future.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates