Today we received the AIKON 45A SEFM ESCs we ordered a while ago. Actually that’s a lie: these ESC were received before today, but no one told us until Alexis recalled seeing them when we told him we were waiting for them and pulled them from the top shelf of the cabinet in the back of the classroom. We’ll let it slide, whoever it was, but just this once.
Upon hearing this, Sibille and I immediately decided to put aside for the time being our previous attempts to reflash our most recent motor’s built-in ESC and instead use these new ESCs (which come flashed with BLHeli_S and support DShot out of the box) to control our other motor, the Turnigy Multistar 4225.
To that end, we found an Arduino library for DShot and after locating an Arduino Uno board as that library doesn’t support our Arduino Mega ADK, we were in business !
We had to fiddle around for a while before making it work, and at first the motor would just stutter a bit without ever really spinning up. But then we realised we had to start by sending the value 0 via DShot (which is a value reserved for arming / disarming the ESC) and then wait a bit before sending an actual throttle value. At this point, the motor spun up beautifully :). Next step: make this work with our own code on an STM32.
This Arduino library was also useful because the code revealed how the DShot checksum should be computed. DShot works with 16-bit frames where the first 11 bits contain the throttle value (actually, values 0 – 47 are reserved, leaving 2000 speed steps from 48 to 2047), the next bit is used for telemetry requests, and the last 4 bits are a checksum. It turns out these are computed as a 4-bit xor of the 3 previous half-bytes.
That’s all for today, stay tuned !