Speed control from every angle

Since our previous post last Thursday, Sibille and I have kept working on speed control. It has taken us much longer than we originally thought, but we’re happy with the result. Now that we have a working product, we’ll go back over what all went into making it work:

As mentioned previously we use a Proportional, Integral, Derivative (PID) control scheme to regulate the throttle command given to our ESC so that the motor speed matches the desired speed.

Speed feedback and speed format

If you’ll recall, Vlaya had previously written code to capture the edges of a once-a-rotation interruption (the “period interruption”) from a Hall sensor or an optical sensor and deduce the elapsed time during the rotation, and from there the speed.… Read more


As explained in this post, Xavier and I worked on a setup to measure the motor speed. We had to laser-print a drilled plastic plate and some fixation for the dev-board with the optical sensor we’ve borrowed from LitSpin (TCUT1600X01). 


The plastic disk is thin enough to slide between the emitter and the receptors of the optical sensor, and has a small aperture on the edge so that once per rotation the receptors see the emitter and their output goes high.

The optical sensor, which we thought we damaged on Friday, actually works very well. We had some bugs when integrating the dshot code to control the motor’s speed, but very quickly we were able to measure the speed, and to determine the correspondence between a dshot command and an actual speed at a given voltage.… Read more