Help with some BLHeli pass-through
Xasin wrote 07/24/2019 at 07:57 • 0 pointsI recently acquired a couple of ESCs and motors to restore an old RC Hovercraft of mine.
My goal was to use an ESP32 as controller, and so far I've had very promising results using the LEDC module to generate OneShot125 PPM signals.
There's just one problem:
The ESCs, running BLHeli_32, don't have reversing enabled, neither do I seem to be able to enter configuration mode by sending a maximum value PWM or PPM signal during initialization. That would have allowed me to enable thrust reversing.
Now, I keep coming across BLHeli pass-through, which supposedly allows the flight controller to reconfigure the esc, probably via some sort of UART.
But oh
My
God
There is absolutely zero documentation on the actual communication protocol.
If anyone has a link to the specs I would be incredibly grateful. Then I could hopefully just reconfigure the ESC from the ESP32
Oh, and before anyone asks, the ESC is a four in one, with no exposed programming headers, so... I'm afraid I can't flash new firmware. Not that I don't want to...
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Try the DSHOT protocol, it's a digital protocol and has a command to reverse direction. For how to communicate with it you can find decent code by looking at open source flight controller software like Betaflight, iNav, dRonin. Hope that helps.
Are you sure? yes | no
Thanks!
I came across DShot before. If it works it'll obviously be a superior protocol, I just haven't tried it out yet because I wasn't sure it was enabled...
It's just standard UART, correct?
In that case, I'll probably just use an ESP UART Module or the RMT.
Thanks for the pointer!
Are you sure? yes | no
Upon initialization the ESC determines the protocol, so the client can tell which form of communication is used. It is a serial protocol, yes. The client has to send the proper greeting "hey, I wanna use this protocol". For this purpose there is no need to change config on the ESC. However, if you hook up the ESC to a flight controller with Betaflight on it, you can configure the ESC using passthrough while connected via USB and with the BLHeliSuite desktop app.
Are you sure? yes | no
That's the thing I was most interested in - figuring out how the BLHeli passthrough works and write a library for it for the ESP32, so that I can "fake" the connection and reconfigure it as I wish. I don't have a flight controller at hand, and I don't feel like buying one just for this either ^^'
I'll try the DShot protocol. If it works it will definitely be good enough :D
Are you sure? yes | no
Please freel free to join Betaflight Slack and ask for help. The code is on GitHub: https://github.com/betaflight/betaflight/blob/master/src/main/drivers/serial_escserial.c#L943
Are you sure? yes | no