I added some simple controls to the solenoid circuit to help with testing:
- A 10k potentiometer to set the duty cycle, and
- A tiny button to trigger the solenoid.
These controls feed the Arduino’s analog and digital inputs.
Fourth test: interactive activation and duty cycle
With this beefed-up circuit, I can play around with complex movements by activating the solenoid with varying timing and duty cycles.
Some issues with low duty cycles became clear:
- Light hits don’t extend the armature fully, as we know.
- Quick hits at low duty cycles don’t give the arm enough time to extend fully – it can take awhile to worm out of resting position.
- The armature can be eased out slowly (by gradually increasing the duty cycle) to yield a soft hit.
Some other ideas came out of testing:
- For percussion, the solenoid typically doesn’t need to stay activated for very long after it makes contact with a drum head. (Shorter activation will also minimize heat and noise produced.)
- There could be a logical delay for the armature to retract, and for the solenoid to cool down if that’s an issue.
Also, the breadboard is getting to be a mess of jumper wire. I think it’s refactoring time: I’ll clean up the circuit and pop in some shorter wires.