Does anyone have experience with running BLHeli ESCs in bidirectional mode via DShot for Combat Robot purposes?
Back in October last year I had DShot working on the custom controller I built for Keith the Teeth, but I had to give up and switch back to PWM because while it gave excellent control of speed the BLHeli firmware did not seem to provide a way to stop the motors without disarming and later rearming the ESCs.
DShot isn’t super well documented, but each packet is 16 bits with 11 bits for the command being transmitted, 1 bit for telemetry request and 4 bits for a checksum. This gives 2048 commands you can send, with the first 48 being reserved for special commands.
Based on the documented commands (https://github.com/betaflight/BLHeli_S/blob/master/Dshotprog%20spec%20BLHeli_S.txt) there are a couple of seemingly obvious ways to stop the motors.
The first being sending a zero (DSHOT_CMD_MOTOR_STOP) which at first seemed promising, but as the document says it’s unimplemented on BLHeli. In practice it seemed to arm or disarm the ESC.
Outside of the special commands values 48 through 1047 map to the positive throttle range and 1049 through 2047 to the negative throttle range, and this seemed to work nicely in my tests. This leaves 1048 as a sensible looking value for ‘just stop the motors please’, but again in practive this seems to be just ignored leaving the motor running at the previous speed.
I spent some time poring through the BLHeli code (https://github.com/betaflight/BLHeli_S/blob/master/src/BLHeli_S.asm) and everything I found seemed to confirm these findings, which I guess makes sense since the feature isn’t particularly useful for drone purposes
Given that I’ve heard of people using DShot for their combat robots this leaves me with the question of how they have made it work. Are they using a different brand of ESC where the stop command is respected? Custom firmware with added support? Or am I just missing something obvious?
I’m tempted to have a go at adding support myself, the main blocker being getting setup to flash a new firmware onto an ESC, but I wanted to test the waters and see if others have looked at this in the past (or again, if I’m just missing something).