In an effort to move the solenoid armature with a nice soft touch, I had hacked together a goofy, non-standard acceleration algorithm. The hackiness and relative unpredictability was bugging me, so today I replaced it with a standard easing function.
Now I can tune more things:
- The shape of the duty cycle’s acceleration is now a nice even curve. Because low duty cycles don’t do much, a quadratic ease out feels good.
- The amount of time it takes for the armature to extend fully is under exact control. Soft hits take a few hundred milliseconds, while stronger hits take almost no time.