0
\$\begingroup\$

Many electronic speed controls provide the same hardware interface to manage them. It's +5 V, GND, PWM wires.

But I have noticed an interesting feature, which is provided by BLHeli based ESC. You can program it with BLHeli suite software. For example, Arduino Nano is programmed to be bootloader, then it will use GND, PWM wires in order to program ESC. I suppose that some kind of UART protocol is used. The most obscure thing for me is possible implementation from ESC's side. How does ESC understand that "PWM" pin should be treated as UART signal? I guess that we can detect some "preamble" signal at the start of ESC, if it's not matched then pin is assumed to receive PWM signal. But it's only my guess-work.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

The source code may reveal how it's done.

There's plenty of ways to implement it even without looking at the source code.

First option is to just have it as a PWM receive pin as usual, and send UART data in such a way that it looks like pulses of PWM signal.

The PWM pin could also be used as UART receive pin if there is no valid PWM. For example waiting a few seconds for any pulses if it is UART data and if nothing happens or it is not valid UART data then start normal PWM reception.

\$\endgroup\$
2
  • \$\begingroup\$ UART data through pwm signal sounds interesting. I'll check that. Unfortunately blheli does not contain source code, otherwise I would read it. \$\endgroup\$ Commented May 11, 2023 at 11:37
  • 1
    \$\begingroup\$ There's nothing interesting about that, send 0x00 and that's the longest low pulse, send 0xFF and that's the shortest low pulse. Choose any bit pattern to have 1 to 9 contiguous zero bits to control the low pulse length. There's a github repo with source code for BLHeli so I don't know if that relates or not to your system. \$\endgroup\$
    – Justme
    Commented May 11, 2023 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.