Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dshot telemetry #7264

Merged
merged 2 commits into from
Jan 7, 2019
Merged

Dshot telemetry #7264

merged 2 commits into from
Jan 7, 2019

Conversation

joelucid
Copy link
Contributor

@joelucid joelucid commented Dec 21, 2018

This is a first version of dshot_telemetry which reads rpm telemetry from blheli32 escs on the dshot signal line after each dshot command. As a result the FC will be fully aware of the real time rpm of all motors, which opens up many new improvements like better filtering and motor control.

The feature does not support burst DMA and is not implemented on the HAL drivers. It's guarded by USE_DSHOT_TELEMETRY which needs to be set to enable it. If the firmware does support it the cli option dshot_telemetry needs to be set on to activate it.

The feature requires a custom blheli32 firmware which isn't yet released. This firmware implements a couple of new dshot commands which are used to manage the feature. I'm currently trying to get in touch with Felix of KISS to ensure compatibility with KISS ESCs now and going forward.

Clearly this isn't yet ready for integration, but I wanted to get the ball rolling so we can ensure safe delivery into 4.0. I would appreciate any help from devs more familiar with the driver internals to double check what I've done here.

Copy link
Contributor

@ledvinap ledvinap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some random notes, I have to look into this later ...

@mikeller
Copy link
Member

@joelucid: This does look interesting. Good work!

A couple of remarks:

  • can you supply a document specifying the proposed DShot telemetry protocol - this makes it easier to discuss the protocol itself, which is the important part of this to get right first time around;
  • what are your plans re getting this supported by ESCs, and how far along are you in the process of discussing this with ESC firmware maintainers / getting buy in from them?
  • this will have to be made run time configurable to work with universal targets - there will probably be boards for which there is no useable configuration not using ...N timers, and as such not supporting this.

@joelucid
Copy link
Contributor Author

joelucid commented Dec 22, 2018

@mikeller, here's the preliminary spec:

Digital_Cmd_Spec.txt

Commands 32-35 and 42-47 have been added in the context of this feature. I currently use commands 32 and 35.

I've closely worked with Steffen Skaug, the author of blheli, blheli_s and blheli32, in designing this feature. We have both tested this (Dshot 300, Dshot 600, Dshot 1200 and Proshot 1000) on four different ESCs and three flight controllers. Steffen will be ready with a release of blheli32 when we are.

I've reached out to Felix @ KISS, but have not heard back, yet. I believe once we have support from blheli32 and KISS we can consider the feature well supported in the ESC community.

Important to adoption will be the availability of killer features using dshot telemetry. I plan to make available a new gyro/dterm filter soon (it's not xmas yet 😄), which will have such significant latency and noise suppression advantages over our current filters that it might be considered such a killer feature.

An interesting question is Blheli_s. While the current blheli32 implementation uses DMA it's conceivable that this could be implemented using interrupts on those ESCs. Steffen has no current plans of addressing the Blheli_s installed base though. But given the open source nature of Blheli_s anybody can try to add this.

The feature is run time configurable: set dshot_telemetry=on/off enables or disables it. Good point regarding the N channel motor signals. N channels cannot be used as input for timer capture and are thus not supported. I was able to fix this for the NOX board by simply using a different timer on the same pin, but clearly there may be boards where this will not work.

@mikeller
Copy link
Member

Thanks @joelucid.

A couple of points regarding the specification:

  • I think this will need to be brought into a more detailed form - the current form leaves much open to assumptions;
  • am I right to assume that 42 to 47 are 'request telemetry value' commands? Not sure if we want to use this, or use the telemetry bit that is already baked into the protocol - sending out commands in place of motor updates isn't very elegant, which is why the telemetry bit was added in the first place;
  • not sure if there is value in super low latency telemetry for temperature, voltage, current, consumption, these should be dropped from this protocol, even more so to avoid having these changes use up most of the remaining Dshot command space;
  • not sure if there is value in adding facilities for 'ERPM' and 'ERPM period' telemetry - these seem to be redundant, and using up command space for both seems to be unnecessary;
  • after these things have been addressed, I can't see any problem with Betaflight adopting these extensions.

What does @ronlix think of this suggestion?

I guess the solution for configurations with N timers on motor pins will be to force dshot_telemetry off during config validation.

Only discovered this now, but how much effort is required to make this work with burst DMA? I think this will be a crucial part of getting this into Betaflight. Burst DMA has become a vital part of most newer flight controller designs, in terms of allowing designs that do not have DMA conflicts, and will become even more important when we look into using DMA to read gyro values.

@ronlix
Copy link
Contributor

ronlix commented Dec 22, 2018

Hi,

Wouldnt it be simpler to rise the telemetry Baud to 1 or 2 MHz and add a dshot rpm request command?
You would need 4 loops to get all rpms, but you can send more then one dshot Signal each Loop if its not too fast. And on 32k there will be mostly no noticable Change in the rpms between 4 loops.

Or use dshot commands to give the escs ids to have Them answer delayed (based on the ids) so you can get all rpms with one request.

I think making the Signal Line bidirectional will make it much less robust.

Regards

Felix

@mikeller
Copy link
Member

mikeller commented Dec 22, 2018

@ronlix:

Wouldnt it be simpler to rise the telemetry Baud to 1 or 2 MHz and add a dshot rpm request command?
You would need 4 loops to get all rpms, but you can send more then one dshot Signal each Loop if its not too fast. And on 32k there will be mostly no noticable Change in the rpms between 4 loops.

That's a valid point. You could probably even do this based on the 'telemetry request' bit in the Dshot frame, and define a 'fast RPM telemetry' mode where the ESC sent a short RPM only telemetry frame for every request, and a full telemetry frame at a fixed time interval.

This would also get us around the current limitations on N channel motor timers and burst DMA - going back to the nightmarish situation we had with DMA conflicts before the advent of burst DMA isn't an option in my opinion.

@joelucid
Copy link
Contributor Author

@mikeller,

yes 42-47 are request telemetry value commands. Given the bandwidth constraints of the dshot line we can't use the telemetry bit with the same semantics as the traditional esc telemetry because we can't send more than one value back. Certainly not everything as is done in response to the telemetry bit. Secondly the telemetry bit is already used for requesting traditional esc telemetry.

We considered adding additional bits to the dshot frame to request motor signal line telemetry. However erpm is likely the only item one wants to retrieve in real time and adding overhead to each frame for telemetry requests that happen only rarely did not seem like a good trade-off.

These dshot telemetry request commands give the FC flexibility not only in how often a given telemetry type is retrieved, but also when. For example one may issue them when the current dshot motor value has not changed much.

The only one implemented in BF for now with this PR is erpm telemetry which I consider by far the most significant for us. That said I do think the other telemetry items can be useful to avoid the extra wiring of serial telemetry. We could flag these extra commands as experimental.

The thought behind ERPM period telemetry was to enable low powered ESCs to report a value that can be converted on the FC to ERPM. This could be essential in enabling blheli_s to support this feature. On the other hand we didn't want to force 4 divisions on the FC with blheli32 escs to support low powered FCs (like SilverWare).

Burst dma should be doable once the response timing is strictly defined. That's needed since captured values are collected at update of the timer which may occur before the esc has started responding.

@ronlix
Copy link
Contributor

ronlix commented Dec 22, 2018

The Basic Idea on the extra telemetry line was to Not need a bidirectional Line on throttle Line.

To have fresh rpm telemety Data Something Like mikeller Said would work fine..
Change the telemetry Type once with a dshot command to get for Example 1mhz Baud and let the escs send rpms only on a dshot tlm Bit. And then maybe every 20 requests a full tlm frame.

This would Work with all FCS and would make no extra dma Stress on both sides

@joelucid
Copy link
Contributor Author

@ronlix:

Wouldnt it be simpler to rise the tekemetry Baud to 1 or 2 MHz and add a dshot rpm request command?
You would need 4 loops to get all rpms, but you can send more then one dshot Signal each Loop if its not too fast. And on 32k there will be mostly no noticable Change in the rpms between 4 loops.

Yeah, that'd be another way to do it if the serial esc telemetry line is wired and can support that speed. Might cause compatibility problems due to filtering assuming the old baud rate though.

@ronlix
Copy link
Contributor

ronlix commented Dec 22, 2018

I tested 1mhz for some time. Workes flawless :)

@joelucid
Copy link
Contributor Author

I tested 1mhz for some time. Workes flawless :)

I tested bidirectional dshot - also flawless ;)

@joelucid
Copy link
Contributor Author

But seriously: what's your concern about a bidirectional throttle line? It makes it so simple: already wired on all escs, no extra pins required on the FC which might not be there on 20mm boards etc.

@mikeller
Copy link
Member

mikeller commented Dec 22, 2018

@joelucid:

The only one implemented in BF for now with this PR is erpm telemetry which I consider by far the most significant for us.

Agreed there - considering all of the other telemetry data isn't really useful for flight performance enhancements, does not need super low latency, and is widely supported with 'back channel telemetry', I would even go as far as to say that real time ERPM feedback is the only thing we actually need in this way.

This simplification will also make it possible to remove the need for the telemetry request commands (42 - 47), and have the ESC send a telemetry frame back after every received frame - there is no downside to this, and the data point will always be ERPM.

That said I do think the other telemetry items can be useful to avoid the extra wiring of serial telemetry. We could flag these extra commands as experimental.

Assigning most of the remaining Dshot command space on 'experimental' features sounds like a bad idea - this will probably make it impossible to add non-experimental features in the future because there are no more Dshot commands available.

The thought behind ERPM period telemetry was to enable low powered ESCs to report a value that can be converted on the FC to ERPM. This could be essential in enabling blheli_s to support this feature. On the other hand we didn't want to force 4 divisions on the FC with blheli32 escs to support low powered FCs (like SilverWare).

Ok. I see this point. But I think there is a logical mistake in there - being able to choose which one of ERPM / ERPM period to use does not enable the flight controller to determine which one will be supported by the ESCs it is communicating with, and once it knows what the ESC sends it can use that without having to configure it on the ESC. I think one of the following approaches would be better:

  • use the MSB in the ERPM frame to encode if the value is ERPM or ERPM period. The frame size seems to be big enough to support this, and for an ESC capable of calculating ERPM, doing so all of the time isn't an issue;
  • if this isn't an option, have the ESC send an 'info frame' containing this information instead of the ERPM value when disarmed - sending ERPM when disarmed doesn't make much sense anyway.

@joelucid
Copy link
Contributor Author

Agreed there - considering all of the other telemetry data isn't really useful for flight performance enhancements, does not need super low latency, and is widely supported with 'back channel telemetry', I would even go as far as to say that real time ERPM feedback is the only thing we actually need in this way.

I'm cautious anticipating what will be needed in the future, but this is what we need to start, yes.

Assigning most of the remaining Dshot command space on 'experimental' features sounds like a bad idea - this will probably lead make it impossible to add non-experimental features in the future because there are no more Dshot commands available.

I'm pretty excited about using the motor signal line bidirectionally in general. Just makes the wiring so easy and doesn't require another uart on the FC. Can also potentially support older escs that don't yet have the backchannel. But I understand the concern of dshot command space pollution. We can certainly start with erpm only and figure out more scalable approaches to bidirectional comms if/as we actually start developing additional telemetry needs.

Ok. I see this point. But I think there is a logical mistake in there - being able to choose which one of ERPM / ERPM period to use does not enable the flight controller to determine which one will be supported by the ESCs it is communicating with, and once it knows what the ESC sends it can use that without having to configure it on the ESC.

Good point. We envisioned this to be configured on the FC but auto-config would be nicer. I'd hate to lose one of the 12 bits though (crc also used on telemetry). Info frame when disarmed would be a useful approach, I agree.

@ronlix
Copy link
Contributor

ronlix commented Dec 22, 2018

But seriously: what's your concern about a bidirectional throttle line? It makes it so simple: already wired on all escs, no extra pins required on the FC which might not be there on 20mm boards etc.

with unidirection you can add simple signal amplifier and or different filters. also you dont have to swich between transmitter and receiver settings (GPIO, Timer and DMA)

im not sure what steffen is feeling here, but on ESC's you have time critical events that you need to take care of as soon as possible.. the sooner the better (the more efficient and smooth it can run the motor) adding time critical events makes this worse..

one thought, it is not much more work to emulate serial logic with the timers and DMA's, then doing Dshot. if its needed to go to a bidirectional communication, i think this would be a good way as it will "only" add more work for the FC's which have the bigger MCUs anyway ;)
on the ESC side it would then be possible to use a HW serial which will speed up things here..
also the serials have HW oversampling and HW half duplex which shoud do well.

i dont know how good the results of your new gyro filter that includes RPMs are, and if it would be worth the work ;) but maybe it is...

@mikeller
Copy link
Member

@joelucid:

I'm cautious anticipating what will be needed in the future, but this is what we need to start, yes.

Agreed there - we might find that there are other data points on the ESC that can be used to improve the flight performance when sent back to the flight controller with low latency - but we don't know yet what they are, but most likely they are not the current high latency telemetry data points.
For now we can get away with adding this in a 'stupid simple' way by just adding support for continuosly sending / receiving ERPM, without allocating any new Dshot commands, or by allocating 'continuos ERPM on' / 'low latency telemetry off' if we want to be forward looking, and I think this is what we should be doing for now.

I'm pretty excited about using the motor signal line bidirectionally in general. > Just makes the wiring so easy and doesn't require another uart on the FC. Can also potentially support older escs that don't yet have the backchannel. But I understand the concern of dshot command space pollution. We can certainly start with erpm only and figure out more scalable approaches to bidirectional comms if/as we actually start developing additional telemetry needs.

I don't quite follow there - 2 wire per ESC vs. 3, or 5 wires for a 4-in-one vs. 6. Does not seem a huge improvement in the big picture. As for ESCs without a telemetry pad, 'dedicated line' telemetry was always seen as something of an 'extra feature' that is nice to have, but does not provide much value beyond that, so users who don't want this will buy ESCs / flight controllers without telemetry pads. Low latency ERPM is different there, as this has the promise to add significant value in terms of flight performance, beyond just 'getting the data', so 'not interested in it' isn't really a thing.
But beyond that, my concern with adding support for full telemetry on the motor pin is more that it tries to add something to Dshot that the protocol wasn't designed for, and incurs a significant penalty in terms of complexity.
If we really want to go this way, we should have another go at it and try to come up with an improved design that doesn't try to coerce Dshot commands into something they were not designed for.
(Just as a quick idea, how about extending the length of the Dshot telemetry frame to include a 'telemetry value id' (or split every value into 2 frames), and then have the ESC stream back the values at appropriate intervals?)

Good point. We envisioned this to be configured on the FC but auto-config would be nicer. I'd hate to lose one of the 12 bits though (crc also used on telemetry). Info frame when disarmed would be a useful approach, I agree.

Yeah, on second thought 'can calculate ERPM' is a constant for any given ESC, so having the flight controller detect this once on startup is the right thing to do. Making it configurable on the ESC doesn't make sense - if the ESC is fast enough to calculate it it should - any computation that can be farmed out from the flight controller will free up CPU time for other things.

@joelucid
Copy link
Contributor Author

i dont know how good the results of your new gyro filter that includes RPMs are, and if it would be worth the work ;) but maybe it is...

Well decide for yourself - this is an image of gyro, roll pids and motor traces using very narrow (q=5) notch filters on the first three motor harmonics, no other filtering on gyro and a 150hz lpf on the dterm. Total software latency of the dterm might be 2.7ms, on gyro maybe 0.5ms. Yet the traces are completely clean.

rpm_filter

@joelucid
Copy link
Contributor Author

joelucid commented Dec 22, 2018

@mikeller:

For now we can get away with adding this in a 'stupid simple' way by just adding support for continuosly sending / receiving ERPM, without allocating any new Dshot commands, or by allocating 'continuos ERPM on' / 'low latency telemetry off' if we want to be forward looking, and I think this is what we should be doing for now.

I do think we should have the two commands that we use now so that the esc only sends when it has been asked to. So "continuous rpm telemetry on" and "continuous rpm telemetry off".

I don't want to go much further discussing telemetry for other items over dshot. Live telemetry for flight control relevant esc data has the potential to revolutionize quads - see image above. That's why I wanted it. Let's push the frontiers of flight control, not get slowed down by providing convenience telemetry features.

@ronlix
Copy link
Contributor

ronlix commented Dec 22, 2018

Well, the throttle signals have a Higher priority then any Feedback.
Thats why i think its saver to keep Them seperated.

But If you go that way now, please define what Bits in which Order should be sent. So i can add it to the kiss ESC Code.

If we find better ways later Things can be changed :)

@joelucid
Copy link
Contributor Author

But If you go that way now, please define what Bits in which Order should be sent. So i can add it to the kiss ESC Code.
If we find better ways later Things can be changed :)

Thanks Felix!

I think we'll be using commands 32 and 34 from this spec, to switch online rpm reporting on and off. Looks like we've tabled any additional telemetry for now since it's already provided on the serial telemetry line and in order to keep this simple.
Digital_Cmd_Spec.txt

Responses are sent as normal dshot frame included CRC. The lsb scale for the values is in the spec.

I fully agree - we can change this if we find problems. What I find most exciting for now is to get a sense for what we can do with rpm telemetry on the FC. I'm already using it for more effective filtering (#7271). But there are a lot of other ideas, like running pids for motor rpm on the FC to improve motor response.

@mikeller
Copy link
Member

@joelucid:

I do think we should have the two commands that we use now so that the esc only sends when it has been asked to. So "continuous rpm telemetry on" and "continuous rpm telemetry off".

I fully agree - we can change this if we find problems.

I disagree there - one core part of this change is an amendment of the Dshot protocol. As it is, this has deep implications on users of the protocol, and maintainers of software implementing it - if this is changed after being published, it will leave users of the pre-change version in a lurch to find firmware for their hardware that supports the change, and maintainers of firmware in a struggle to maintain support for legacy and new versions. For these reasons, the protocol design should get utmost care to be done right the first time round.

So, I think what we should do now is to reduce the proposed protocol changes to what is actually needed, and leave options open for future extensions, which will come at a time when we have learned more on how this works out in practice:

32 DIGITAL_CMD_SIGNAL_LINE_TELEMETRY_DISABLE                  // Need 6x, no wait required. Needs to be followed by a 12 DIGITAL_CMD_SAVE_SETTINGS to persist / come into effect.
33 DIGITAL_CMD_SIGNAL_LINE_CONTINUOUS_ERPM_TELEMETRY          // Need 6x, no wait required. Needs to be followed by a 12 DIGITAL_CMD_SAVE_SETTINGS to persist / come into effect.

@sskaug, @ronlix: What are your thoughts on this.

(Addition of making this a permanent change instead of a temporary one is based on the fact that the use case for this does not contain any cases of temporary change, plus the fact that this will save the bacon in case individual ESCs reset due to brown out or other problems.)

While we are talking Dshot protocol, what are your thoughts on scraping

30 Audio_Stream mode on/Off		      // Currently not implemented
31 Silent Mode on/Off			      // Currently not implemented

These don't seem to be used, and using a single Dshot command for on/off isn't feasible, as there is no payload to encode on/off.

@joelucid
Copy link
Contributor Author

joelucid commented Dec 22, 2018

@mikeller you misread my message. I said exactly what you repeated now. My openness to change was in regard to using the signal lines for telemetry. If that does cause the issues Felix worries about we can make changes. I said we want just the two commands.

I wonder though - are we talking about the same protocol? Which has four commands to switch on LED’s? The command crowding angst seems to be a new phenomenon.

@mikeller
Copy link
Member

@joelucid: Ok, I did misread then - you were not very specific about what would be changed later. ;-)
So we are agreed on using commands 30 and 31, and 12 to save the configuration change?

The LED control commands were unilaterally added by BLHeli_32, and then accepted by Betaflight, which probably was not a good move in hindsight. But they go a long way towards showing that the command space in Dshot is very limited, and does not allow for powerful commands with parameters, and as such has to be used wisely.

@joelucid
Copy link
Contributor Author

@mikeller I don’t think its a good idea to make this setting persistent since it would mean that after a FC change or reconfiguration the ESCs might end up sending telemetry against a line actively driven by the FC.

As I said two commands: one to switch rpm telemetry on, one to switch it off for the existing session.

@mikeller
Copy link
Member

@joelucid:

I don’t think its a good idea to make this setting persistent since it would mean that after a FC change or reconfiguration the ESCs might end up sending telemetry against a line actively driven by the FC.

Valid point, accepted.

This will then probably require adding of detection / graceful handling of situations where some or all of the ESCs stop sending ERPM telemetry back in mid-flight.

Then how about this:

32 DIGITAL_CMD_SIGNAL_LINE_TELEMETRY_DISABLE                  // Need 6x, no wait required.
33 DIGITAL_CMD_SIGNAL_LINE_CONTINUOUS_ERPM_TELEMETRY          // Need 6x, no wait required.

@joelucid
Copy link
Contributor Author

@mikeller yeah that’s how these commands were designed from the beginning and that’s how I still think they make the most sense.

Hopefully we can move on to the more meaty discussions of what to do with rpm telemetry soon.

@mikeller
Copy link
Member

@joelucid: Happy to do so - from the perspective of having to maintain the code going forward, protocols, and their implications for backwards compatibility, are the 'meaty' part that will make our lives easy or hard in years to come.

@joelucid
Copy link
Contributor Author

@mikeller, my professional experience is to allow flexibility in apis and protocols in beta but nail them down once released. In the early phases it’s often more important to explore the core issues than fixing the protocols. But YMMV.

@mikeller
Copy link
Member

@joelucid: Fair enough. I assumed that this was targeting inclusion in the upcoming 4.0 release. Considering the expected turnaround time for getting protocol changes released to beta testers by BLHeli_32 and KISS (and potentially BLHeli_S), if you feel that we need a longer beta period then we should schedule this for inclusion in 4.1.

@joelucid
Copy link
Contributor Author

joelucid commented Jan 3, 2019

@mikeller, Rebased and sqashed

@joelucid
Copy link
Contributor Author

joelucid commented Jan 5, 2019

A test version of blheli32 is now available: https://www.rcgroups.com/forums/showpost.php?p=40842949&postcount=3112

@mikeller mikeller merged commit 00e0248 into betaflight:master Jan 7, 2019
@jflyper
Copy link
Contributor

jflyper commented Jan 21, 2019

@ronlix @sskaug Cc: @joelucid

@jflyper as soon as i find time, i will have a look how fast the rpm can be sent over the tlm wire. I think bauds like 1 or 2m should work eaven on base clock frequencys that dont fit well, as the uarts are quite tolerant with oversampling and such.

I'm still looking at RPM telemetry over serial telemetry link. @ronlix Did you evaluate the max speed of the tlm wire?

@ronlix
Copy link
Contributor

ronlix commented Jan 21, 2019

Hi,

in my tests im at 2mhz ATM. it seems to work relaiable eaven with only the internal pullups (4x ESC 1xFC)
im just abaut to test some methods, including a onewire protocol where the FC requests RPM over the TLM wire as this would work independent of the used throttle signal type.

will let you know if i got something good :) and if you have ideas, im open.

@TonyBazz
Copy link
Contributor

Can i chime in??

Looking at your code, the only validation you do on the incoming frames is the CRC. The CRC is only 4 bits, which means erroneous data will still get through.

I think you should also be validating incoming frames using the frame length. You know what the expected frame, bit or nibble lengths are going to be.. so reject anything that falls outside the above thresholds.

Otherwise, If we extend Proshot we can utilise another nibble (or two) of data and generate a 8 or 12bit CRC.

@rauar
Copy link

rauar commented Jan 18, 2020

@joelucid @ronlix As this pull request had been merged a while ago and there was a lot of discussion about the pro/cons... what is the current state with KISS/FETtec escs ? I tried to enable bidirectional dshot for a FETtec 4in1 but all motors won't be recognized anymore (no tones for motors). Using single telemetry wire and ESC_SENSOR works.

Just asking because I'd like to enable RPM filter (which does not seem to be available for setups with dedicated telemetry wire(s)).

@N4V1G4T0R
Copy link

Some time has passed, 4.2. is out. Any word from the KISS/FETtech team about bidir dshot? Once got used to RPM filtering, you don't want to miss it.

I switched the 4in1 esc for experimental use, xrotor 40a mini 4in1 with a fettech 4in1 (i just love the slow starting up of the motors), but noise (Dshot300) is horrible compared to bidir dshot.

@rauar
Copy link

rauar commented Oct 20, 2020

RPM filtering is available since quite some time and does bring great benefits. Sad that KISS/Fettec escs silently became irrelevant in this whole discussion (which I think initially made great progress). Is there any chance to kind of reactivate this discussion with @joelucid @ronlix @mikeller ?

As far as I understood (or not) RPM filtering is based on embedded eRPM information on the signal line (correct?). What would it mean implementation-wise to have eRPM via Onewire/telemetry channel as a second option available (effectively chosen by the pilot aka the person who wired the FC to the ESCs) ?

@mikeller
Copy link
Member

@rauar: All for helping KISS/Fettec with the implementation of Dshot RPM feedback.

Using ESC telemetry for RPM feedback was looked into, but with the very slow update rate of ~20 Hz this is not feasible in a way that will actually improve flight performance.

@ronlix
Copy link
Contributor

ronlix commented Oct 21, 2020

Hi,

as said before some time, the way for fettec ESCs to get the telemetry / eRPM feedback fast enough will be onewire. AFAIK there are ppl having working BF versions, they are just not complete for now. so there should be coming something soon :)

regards

Felix

@mikeller
Copy link
Member

Hi @ronlix. Not sure what makes you think that the ~20 Hz update frequency per ESC that ESC telemetry allows will be fast enough - our tests have clearly shown that this is way too slow for this to work.

If you are planning to change the ESC telemetry protocol, please make sure you get an agreement with @sskaug before you propose the change, so that the changeover can be done in a coordinated fashion that includes BLHeli_32.

@ronlix
Copy link
Contributor

ronlix commented Oct 21, 2020

Hi @mikeller
we have "fettec onewire" working on the KISS FC / FETtec ESC since almost two years now. its no dshot at all. its all signals and telemetry going through one halfduplex serial wire with 2000000baud. its a complete different thing. it allows 8 khz update rate with 11bit motor signals (10bit for one rotation direction) on 4 ESCs. with getting one 16bit telemetry value of each of the ESCs every loop. the telemetry type can be choosen with every throtte signal. so you can request 1000 loops only the RPM and then in between the other values like current, consumption and so on.
so in short:

1x signal wire (one HW uart half duplex pin.. mostly TX)
1x GND wire
for all 4 ESCs

the only down side is that the ESCs dont get their throttle command absolutly at the same time, as it is a chain of bytes that carrys the signal values. but we are talking abaut a couple of µs ;)

regards

Felix

@mikeller
Copy link
Member

mikeller commented Oct 21, 2020

@ronlix: Not sure of the value of wasting valuable flash space for adding yet another proprietary protocol. I think it is better if we stay with the established and widely used Dshot for now and use the flash space to add features that actually give users something they don't already have. Feel free to add support for Dshot RPM feedback to your ESCs to bring their performance up to par with other ESCs when running Betaflight.

@ronlix
Copy link
Contributor

ronlix commented Oct 21, 2020

hi, @mikeller

well its as proprietary as Dshot is / was ;) we gave out all source since some time... and will put some documented examples on github soon.
it takes like 1k or less didnt looked for now, but you get at last 4 free GPIOs and the same amout of DMAs and such.. as you just need one UART pin which is used for Dshot TLM atm.

regards

felix

@mikeller
Copy link
Member

@ronlix: It is not as simple as that - if we add this, there will be at least two more proprietary ESC protocols that are out there with users that will ask for them to be added, with potentially more to come, as each manufacturer will want to add their own - adding proprietary protocols whenever a manufacturer comes up with one is really not the way that this should be going.

@haslinghuis
Copy link
Member

Matek is still working on serialshot. Are there any statistics about which protocols are being used?

@mikeller
Copy link
Member

@haslinghuis: Dshot is in the lead, but still ~15% of users using an analogue protocol (last 30 days):

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.