One of the projects I’ve been meaning to build for a while now is an accelerator / elevator for 12mm steel bearing balls running in a 3D printed track. This will mean experimenting with coil pulse timings and durations, and it would really help speed things up if this could be automated.
So, Step 1 was to build a speedometer. (After all, it’s difficult to improve something if you don’t measure it.) Microcontrollers, especially fast ones like the ESP32 family, are really good at measuring differences in timing. If you set photodiode gates across the track from a fixed LED and have the microcontroller scan the photodiode output, it can sense when the beam is blocked, to high precision (microseconds). If you place two of these a fixed distance apart (I’m using 50mm), you can calculate average velocity between them by V = D/T.
The .stl for the frame itself is available here on Thingiverse. It should be printable without supports (the ceiling of the ball channel is arched to allow for airflow and for printability.) A Gikfun photodiode set is used to sense when the ball blocks two light beams 50mm apart. The difference in timing, along with the fixed distance, allows speed to be calculated. This is displayed on the screen in m/sec, along with an arrow showing direction of motion.
Next step, build an accelerator and use this to automate dialing in the parameters. (With the addition of some ramps and such, it wouldn’t make a half-bad experiment for our department’s undergrad Metrology course, too.)