Gentle Bonking

For the last few months, I’ve been putting together a tiny workshop at my desk at Orbital and planning the next actuator test. I think this is it: the setup that will make it into my first robotic drum prototype.

Third test: solenoid with duty cycle

I’ve finally gleaned enough electronics know-how to set up an Arduino with a MOSFET that switches a cheap 12V 1A push solenoid, and not fry everything in the process. (RIP pin 13, though.)

This circuit can use digital on/off signals to control the solenoid, but it can also use the Arduino’s analog output to apply a duty cycle. This means the solenoid’s armature can be extended with varying force!

The Arduino takes input values from 0 to 255 (where 0 is off and 255 is constantly on). It outputs pulse-width modulation at 490Hz to an analog pin.

2014 09 06 solenoid


It turns out that there’s a minimum duty cycle required to keep the armature extended. Above that threshold, the solenoid can indeed strike at a range of velocities.

Solenoid duty cycle: observations

For a solenoid positioned above a drum head and striking a short distance downward, it looks like there is a useful control range between 95 and 255. MIDI velocity ranges from 0 to 127, so that means it can operate at full resolution!

This is promising. The solenoid armature can play really quickly and expressively, which seems like it will even work well for subtle movements like playing grace notes.