Getting ESC commands (list of PWM values) over serial port?

I’m looking for a way to get a stream of PWM values for all the motors over a serial port. Is there a way to achieve that does not involve modifying the source code?

There’s DShot protocol, but it sends the data over individual outputs, not packed together on the same output.

@VadimZ I am interested in this approach as well. Did you ever figure out a solution?

Thank you

-Brian

Actually ESC telemetry is combined on one output into a serial port.
https://ardupilot.org/copter/docs/common-dshot-blheli32-telemetry.html

Dave-

Thanks for the link. I am actually looking to get the pwm output values being sent to the ESCs in a large rover. In reality, we are not using off the shelf ESCs to control the rover, we are looking to get the pwm commands from the autopilot and use them to decipher the velocity and heading commands from the autopilot.

Thanks!

-Brian

@BRiskas - ended up using UAVCAN in place of a serial port.

Thanks for the info! Did you find that UAVCAN worked for your application?

you can ouput SBus from any serial port, https://ardupilot.org/copter/docs/common-sbus-out.html#connecting-servos-to-a-autopilot

Peter-

Thanks for the info. What we are actually trying to do is to grab the ESC PWM outputs so that we can run them through a custom piece of software that then decodes the outputs into a format that is readable by our motors/drives. We are looking to build a ‘translator’ of sorts that takes the PWM values as an input and then outputs a custom format.

Thank you!

An arduino or other MCUs can read PWM values. I used an arduino to drive a h-bridge that required an PWM and two bit inputs. Right now I use an arduino to read two PWM channels, do some trigonometry and control an active castor wheel on a skidsteer rover. Sbus requires an inverter circuit to be read with an arduino. It might work without one on a teensy.
I never got around trying to use sbus, because PWM works well enough.

Sebastian-

Thank you for the info, we are looking to do much the same thing as you described in your post. I was wondering if there is a way to read the PWM directly out from the serial port, rather than decoding the PWM output using another microcontroller?

We are looking to read the 4x PWM outputs from an omni rover and do some custom motor mixing.

Thank you

I’m not sure why SBus is not suitable for your needs? It does exactly what your asking for.

Peter-

I am probably mis-understanding the capabilities of SBUS out. I read the wiki you linked and it appears that the SBUS out is used for controlling SBUS servos? Can I ingest the SBUS output directly out of the serial port via a companion computer or similar for processing?

Thank you for your patience and willingness to help!

Sbus out “copies” the configured servo outputs. If you have 4 channels setup for your omni rover, the sbus output will consist of those 4 channels. What you do with it is up to you. You could connect sbus servos, but also another flightcontroller or your own hardware.

Yes, there are examples for Pi and Arduino ect.

Because you would just using a normal serial port at each end you probably don’t need to bother with the inversion circuit needed for to talk to servos and receivers.

@count74, @iampete thank you both for the education on SBUS out! It does indeed sound perfect for our application. I have been using ardupilot for years and it never ceases to amaze me the how capable and flexible the platform is. Thank you again for all the help!