Hand crank for music box

Hi, I'm building an "old time" music box, that plays music automatically.

Like this:

An I wanted to add a handcrank, to make it more "Classical".

I'm not looking to power via a hand crank. I just want the music to play according to the speed which the crank is being turned. The machine is still powered externally (or with a battery).

What would be a simple approach to measure how fast something is being turned? I remember something from grade school where a gear would click on switch, and you could measure how many times the switch was hit (Sort of like how some mouse wheels work).

Is there a name for such a componnent? Is there a simpler approach? (I'm a software guy, I'm not good with building H/W)

There are two solutions that I can think of: 1. A potentiometer that bases the music speed on the change in resistance value, dying down if it doesn't change; 2. As you said, a gear+button design.

Rotary encoder - get a series of pulses out, you can determine speed from that. These output 24 pulses per revolution, you can get higher also. http://www.digikey.com/product-search/en?pv395=17&FV=fff4001e%2Cfff80033&k=rotary+encoder&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25

CrossRoads: Rotary encoder - get a series of pulses out, you can determine speed from that. These output 24 pulses per revolution, you can get higher also. http://www.digikey.com/product-search/en?pv395=17&FV=fff4001e%2Cfff80033&k=rotary+encoder&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25

Thanks!

I had a hand in making this https://m.youtube.com/watch?v=Nn5E0htREFE I used a rotary encoder for the wind mechanism, the LEDs round the key indicated the amount of energy left in the "spring", I also built the replay head with the hall sensor's and LEDs picking up magnets pushed into the disc.

Cool. What are you using to generate the sound?

It is MIDI through a fluxamasynth sound generator.

Grumpy_Mike:
I had a hand in making this
https://m.youtube.com/watch?v=Nn5E0htREFE
I used a rotary encoder for the wind mechanism, the LEDs round the key indicated the amount of energy left in the “spring”, I also built the replay head with the hall sensor’s and LEDs picking up magnets pushed into the disc.

That’s neat!

I built an Arduino based “music box” as well, but I stored digitized “pings” from each “tine” of the music generator in PROGMEM then just played each note in sequence (with appropriate note timing) based on a rotary encoder rotation.

Since the music generator itself is always the same, making different song “drums” is simply a matter of a few more lines of code.

BTW, the output is via an R-2R ladder connected to PORTK (analog pins 8 thru 15) which outputs line level audio which is sent to an amplifier (or a bluetooth / analog speaker cube).

8_bit_dac.jpg