[HELP] RMT single wire bidirectional communication (dshot telemetry)

Jye___
Posts: 3
Joined: Sun May 05, 2019 11:07 pm

[HELP] RMT single wire bidirectional communication (dshot telemetry)

Postby Jye___ » Sun May 05, 2019 11:30 pm

Hi Everyone,

First post here and its bit of a long one :)

I am looking to use RMT to transmit a 16 bit packet and then receive a 16 bit packet sent back on the same wire. If after reading the below if you have a suggestion for a better method please let me know.

For multicopters there is a flight controller (FC) to electronic speed controller (ESC) protocol called dshot (https://blck.mn/2016/11/dshot-the-new-kid-on-the-block/). Dshot sends a 16 bit packet as defined below for communicating speed and now it can request a packet be sent back with telemetry data e.g. temperature, voltage, rpm, etc (https://github.com/betaflight/betaflight/pull/7264 and https://github.com/betaflight/betafligh ... d_Spec.txt)

Bit length (total timing period) is 1.67 microseconds (T0H + T0L or T1H + T1L).
For a bit to be 0, the pulse width is 625 nanoseconds (T0H – time the pulse is high for a bit value of ZERO)
For a bit to be 1, the pulse width is 1250 nanoseconds (T1H – time the pulse is high for a bit value of ONE)

Previous post I found on the topic (https://www.esp32.com/viewtopic.php?f=1 ... ilit=dshot) but is now old and not dealing with telemetry.

I am able to send dshot packets to the ESC to control the speed (https://github.com/JyeSmith/dshot-esc-t ... tester.ino) but am now looking for suggestion on what would be the best method of receiving telemetry packets sent back???

End goal is to be able to control the speed and read voltage+erpm telemetry. This will allow me to make a KV tester for hand wound motors :)

Thanks for looking

linuxfpv
Posts: 7
Joined: Sun Jan 13, 2019 12:17 pm

Re: [HELP] RMT single wire bidirectional communication (dshot telemetry)

Postby linuxfpv » Thu May 23, 2019 9:13 pm

Hi, so u r talking of the new bidirectional DSHOT? In this case, did u flash the latest BLHeli Version?
With the old BLHeli Version, the TelemetryData is sent over a serial connection.
Maybe we can work together on the bidirectional DSHOT. Because the ESP32 has too few UART's :

Best Regards
Linus

User avatar
citoyx
Posts: 8
Joined: Sat Sep 28, 2019 10:14 am

Re: [HELP] RMT single wire bidirectional communication (dshot telemetry)

Postby citoyx » Mon Jun 29, 2020 11:55 am

Any progress to have rmt dual way communication ?

User avatar
citoyx
Posts: 8
Joined: Sat Sep 28, 2019 10:14 am

Re: [HELP] RMT single wire bidirectional communication (dshot telemetry)

Postby citoyx » Fri Oct 02, 2020 9:21 pm

Would it be possible to attach two rmt channels to on signal gpio so that one is configured for sending and the other one is configured for receiving.

As dshot600 telemetry is very simple : each packet received by ESC with the last bit to 1, requires a telemetry packet answer from the esc on the same wire.

So something like ->
- write dshot packet into channel0 ram
- send packet via rmt using channel0
- end of transmission trigger an interruption to swith to listening to answer on same gpio using rmt channel1 with data accessible in the ram memory channel1 space.
- trigger an interruption at end of listening to clear the memory of channel1 and loop to first step

What do you think ?

For quadcopter usually there are 4esc associated to 4 brushless motors.
therefore with 8rmt channels, it's possible to control and monitor thoses four esc.

My missing point from studying esp-idf code, is to find how channel are associated to gpio pins. And if it's possible to have 2 channels associated to one gpio pins in receiving/transmiting mode

Who is online

Users browsing this forum: Google [Bot] and 14 guests