UART ESC protocol?

625 views
Skip to first unread message

Jonathan Challinger

unread,
Jun 10, 2016, 1:58:02 AM6/10/16
to drones-...@googlegroups.com
Does anyone have an opinion on what protocol a UART ESC should use?

Also, I'd like to connect multiple ESCs (2 to 4) to the same single UART. Each ESC has a single UART. I think a ring network would be easiest for this (each node forwards messages not intended for it to the next node), and the nodes could work out their addresses automatically based on the order in which they are connected. The cost is latency and fault tolerance, I guess. Any thoughts?

james pattison

unread,
Jun 10, 2016, 9:00:07 AM6/10/16
to drones-discuss
Ask Qualcomm to implement CANBus on QFlight, and use uavcan.

Robert Lefebvre

unread,
Jun 10, 2016, 10:56:59 AM6/10/16
to drones-discuss
I'm quite far from an expert on such things.  But I've seen it suggested to use use some sort of "one wire" UART protocol with only Rx connected.  Each ESC is listen-only, and they are arranged in star topography.  They each have a unique ID, and they only listen to the commands meant for them.

I don't see why anybody would not just use a protocol that is already developed, such as UAVcan.

On 10 June 2016 at 01:57, Jonathan Challinger <mr.cha...@gmail.com> wrote:
Does anyone have an opinion on what protocol a UART ESC should use?

Also, I'd like to connect multiple ESCs (2 to 4) to the same single UART. Each ESC has a single UART. I think a ring network would be easiest for this (each node forwards messages not intended for it to the next node), and the nodes could work out their addresses automatically based on the order in which they are connected. The cost is latency and fault tolerance, I guess. Any thoughts?

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jonathan Challinger

unread,
Jun 10, 2016, 12:46:46 PM6/10/16
to drones-...@googlegroups.com

Oh, I will be implementing CAN bus on the same ESC, but UART also needs to be an option for applications that don't require fault tolerance.

On Jun 10, 2016 6:00 AM, "james pattison" <pattiso...@gmail.com> wrote:
Ask Qualcomm to implement CANBus on QFlight, and use uavcan.

Andrew Tridgell

unread,
Jun 10, 2016, 5:53:40 PM6/10/16
to Jonathan Challinger, drones-...@googlegroups.com
Hi Jonathan,

You could use SBUS or DSM, but both run at low framerates. SBUS can't
run at higher than 300Hz, and to have reliable framing needs to run at
150Hz or less.

So you either need a higher baudrate, or you need to send less
channels.

I'd suggest a protocol similar to SBUS, but with the following changes:

- running at 230400 baud
- don't use inverted logic
- a two byte prefix to help with framing
- a two byte crc
- a chancount byte, so it doesn't always send all channels when not needed

Cheers, Tridge

james pattison

unread,
Jun 10, 2016, 9:18:54 PM6/10/16
to drones-discuss
CastleCreations and esc32 both have serial esc protocols that may provide a starting point. Of course there are likely others too.

Randy Mackay

unread,
Jun 10, 2016, 9:24:00 PM6/10/16
to drones-...@googlegroups.com, Jonathan Challinger

Mikrokopter ESCs use a serial protocol a bit like Jonathan described. They're already supported in the PX4Firmware as well I think.
https://www.mikrocontroller.com/index.php?main_page=product_info&cPath=69&products_id=504

-Randy

Andrew Zaborowski

unread,
Jun 10, 2016, 9:32:16 PM6/10/16
to drones-...@googlegroups.com
SimonK firmware uses a really simple serial protocol with a one-byte
header and one byte per ESC throttle values, there's no feedback of
any kind. With the processing power to do CAN you can afford
something more versatile including RPM feedback, I think it might even
be possible with the ring topology you descibre if the last ESC's tx
is connected back to the FC.

Best regards

On 11 June 2016 at 02:35, james pattison <pattiso...@gmail.com> wrote:
> CastleCreations and esc32 both have serial esc protocols that may provide a starting point. Of course there are likely others too.
>

Jonathan Challinger

unread,
Jun 10, 2016, 11:46:38 PM6/10/16
to drones-...@googlegroups.com
Looks like I'll be rolling a new protocol.

Jonathan Challinger

unread,
Jun 10, 2016, 11:50:53 PM6/10/16
to drones-...@googlegroups.com
Looks like the mikrocopter ESC driver in PX4 is here: https://github.com/PX4/Firmware/blob/master/src/drivers/mkblctrl/mkblctrl.cpp

Seems to be I2C.

James

unread,
Jun 11, 2016, 9:03:11 AM6/11/16
to drones-...@googlegroups.com
Sorry if my response last night was a bit blunt - I didn't realise you'd left 3DR and this was your own project.


Regards,

James
You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/zxcRu5USOZ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages