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 #3879

Merged
merged 5 commits into from
Oct 20, 2018
Merged

DSHOT #3879

merged 5 commits into from
Oct 20, 2018

Conversation

digitalentity
Copy link
Member

Blocked by #3833

@stronnag
Copy link
Collaborator

Just for kicks (quiet here), I built this for MATEKF405, OPTIONS=USE_DHSOT set the protocol to DSHOT_600 (the ESCs support it) and tether tested it. Appears to work (motors run, response to inputs etc).

# get motor_pwm_protocol
motor_pwm_protocol = DSHOT600
Allowed values: STANDARD, ONESHOT125, ONESHOT42, MULTISHOT, BRUSHED, DSHOT150, DSHOT300, DSHOT600, DSHOT1200

Should it ??? Should I be so impressed ?

btw --- this a tricopter, another well known firmware had a lot of problems with DSHOT and servos (which is one reason why my non-navigation mini-tri flys iNav).

@digitalentity
Copy link
Member Author

@stronnag so DSHOT works on your precious Tri? Congratulations to all of us then! And many thanks for testing.

@stronnag
Copy link
Collaborator

This is small, less precious tri. But for me it's the definitive DSHOT test based on βF experience (which had a lot of problems with servos). Impressed, I'll try and fly it tomorrow.

@digitalentity
Copy link
Member Author

@stronnag you know I'm most of the time in for backwards compatibility, that's why DSHOT will only be enabled for the targets where it would be able to coexist with servos.

Code still needs a lot of improvements - currently throttle mapping to DSHOT values is rather hacky, the whole mixer should be refactored to do it properly.

But still - I'm so much happy that it worked for you. I don't have any DSHOT-capable ESCs yet (a few on the way) so your's test is actually the first test with real ESCs 😄

@TwoToneEddy
Copy link

A friend of mine has just tested this on the omnibusf4v3 target and it looks good. I just added the USE_DSHOT to the target file but this results in only being able to use dshot from the cli, is this correct? Does the configurator need updating?

@digitalentity
Copy link
Member Author

digitalentity commented Sep 30, 2018 via email

@TwoToneEddy
Copy link

Just a note, the guy who tested dshot had the motors spinning fine, hence my initial conclusion that it looks good but after flying he found the wing he was using started rolling out of control. Not sure if it's related, feel bad as he's destroyed his goblin! Could be something else that caused it. Once it's fixed I'll see if he can get a black box log. Has anyone actually flown with this branch yet?

@stronnag
Copy link
Collaborator

stronnag commented Sep 30, 2018

I flew this on my small (semi-precious) tricopter today.

  • MATEK F405
  • Speedix 25A blheli-s ESCs
  • DSHOT600

Flew just fine, no problems at all. Identical performance to the same machine on MULTISHOT :)

This branch plus the janitorial "add string.h for memset" PR #3894

@teckel12
Copy link
Contributor

Identical performance to the same machine on MULTISHOT :)

"Identical"? How can that be? It's digital! It must be better! 😄

@stronnag
Copy link
Collaborator

Identical performance to the same machine on MULTISHOT :)

"Identical"? How can that be? It's digital! It must be better! 

Identical within the limits of my flying ability. It's not a high bar. I'm sure the experts will correct the heretical errors of my ways. OK, I was being deliberately provocative ... but I can't tell any difference.

@teckel12
Copy link
Contributor

I think technically, MULTISHOT is faster than DSHOT600 more than 50% of the time, but it's digital, so the math must be wrong.

@digitalentity
Copy link
Member Author

I think practically. Quad takes >10ms to even start responding to roll/pitch command (that's measured on a live quad). Microseconds of ESC command delay are way beyond measurement error here. The only benefit is zero distortion of ESC command, but it comes at a price of higher requirements to wiring quality.

I would like to see received PER (packet error rate) calculated by ESC firmware and reported via telemetry. This way DSHOT reliability would be measurable.

@teckel12
Copy link
Contributor

In any case... I do have a quad with ESCs that support DSHOT which I will also test. I'll do everything in my power to contain my enthusiasm. I hope it will be more successful than when I tested Oneshot 125 and one ESC stuck the motor at 100%. BTW, a quad doesn't like it when one motor goes from 30% to sticking at 100%. It was spectacular from 100 feet, spun the battery clean off.

@TwoToneEddy
Copy link

I didn't add the string.h to pwm_output.c. What are the implications of that? It built fine.

@stronnag
Copy link
Collaborator

stronnag commented Oct 1, 2018

Just compiler warnings, I expect.

@TwoToneEddy
Copy link

My friend who test dshot also said "Just tested it, it works no problem. The accuracy of low throttle on my nano goblin is much improved as it is on quads with dshot." That was before it went into a strange infinite roll

@teckel12
Copy link
Contributor

teckel12 commented Oct 1, 2018

@TwoToneEddy Are you saying the INAV build with DSHOT enabled caused an infinite roll? If so, that's exactly what happened to me when testing Oneshot 125 (motor stuck at 100%).

@TwoToneEddy
Copy link

TwoToneEddy commented Oct 1, 2018

@teckel12 I'm not sure as i didn't do the tests personally, it was a friend of mine but from what they tell me yes. It's strange though as the motor (on a wing) responded fine in the motors tab which sounds like the protocol was working fine.

Apparently the flight controller is also dead now (no lights). Perhaps the flight controller was on the way out? Don't know

@stronnag
Copy link
Collaborator

stronnag commented Oct 1, 2018

I'm a bit less convinced about this new timer / dma stuff. I flew 'cecil the deadcat', Omnibus F3 with MULTISHOT on it today. On the second lipo, blackbox gave up 1.5 min in to a 6.5 min flight which ended in a violent roll of death from 15m up, effectively writing off the machine. Frame broken beyond even the epoxy doctor's best magic, one motor and three props destroyed. Still, this is the first aircraft I've totalled in nearly three years of extreme iNav testing, c'est la vie. RIP cecil, you really are a dead cat now.

@digitalentity
Copy link
Member Author

@stronnag SD-card based? Unplugged SD-card in-flight might have resulted in an FC freeze - known issue, no fix at the moment 😞

@stronnag
Copy link
Collaborator

stronnag commented Oct 1, 2018

yes, it was SDcard based. Sh*t happens, I know that better than most.

@digitalentity
Copy link
Member Author

Yep, that SD-card issue definitely needs fixing. SD-card reliability is the main reason I prefer dataflash FCs

@stronnag
Copy link
Collaborator

stronnag commented Oct 1, 2018

Indeed, I really liked the QVF4 .... apart from the 2Mb flash.

@giacomo892
Copy link
Collaborator

@stronnag just for the record, which sdcard were you using? see #3824 . I've also had some runaways this summer while logging was enabled.

@stronnag
Copy link
Collaborator

stronnag commented Oct 1, 2018

It was a Transcend Ultimate (can't read the writing on it any more) that I've been using since we got SD logging.

Anyway, as I've recently become addicted to self built foamie parkjets, the remaining motors /ESCs will not be lacking a new home.

@Redshifft
Copy link

Unplugged SD-card in-flight might have resulted in an FC freeze - known issue, no fix at the moment 😞

Wow, that's a few steps up from very serious given the reliability of SDcards :(

@OlivierC-FR
Copy link
Contributor

OlivierC-FR commented Oct 19, 2018

Flew DSHOT (300) yesterday, was perfect, no issue, no desync.
5" quad, Matek F405-CTR, ESC are Racerstar RS30A Lite running last BLHeli_S version.

@digitalentity
Copy link
Member Author

Ok, I think this is save to merge. Further improvements would be done in separate PRs

@digitalentity digitalentity merged commit db73881 into development Oct 20, 2018
@digitalentity digitalentity deleted the de_dshot branch October 20, 2018 07:06
@Hanni1312
Copy link

Quick question, is d-shot telemetry included in this?

@teckel12
Copy link
Contributor

@Hanni1312 No, just communicating to the ESCs via the DSHOT protocol, not telemetry.

@bigdaddy5414
Copy link

bigdaddy5414 commented Dec 3, 2018

I compiled 2.1 development last night to get my OSD working which it does no problem on my OMNIBUSF7NXT. I just tried to enable DSHOT from here and the FC stops connecting to USB, just comes up as a malfunctioning USB device and I don't get the motor arming beeps. And yes the 4in1 esc is blheli32, dshot is fine under betaflight.

# get motor_pwm_protocol motor_pwm_protocol = STANDARD Allowed values: STANDARD, ONESHOT125, ONESHOT42, MULTISHOT, BRUSHED, DSHOT150, DSHOT300, DSHOT600, DSHOT1200

set motor_pwm_protocol = DSHOT1200 seems to break it, don't know if I am missing something.

@silenec
Copy link

silenec commented Mar 26, 2019

Is there any way to adjust the idle (dshot_idle_value) like in Betaflight? My motor spins too fast at minimum throttle. edit: ok digitalIdleOffsetValue in mixer.c did the trick.

@owengrey
Copy link

Hi All,
How can I enable DSHOT150 on my omnibusF7 V2. I have been using dshot150 with betaflight and cleanflight with no issue. I have a little 5" quad (robocat) which flies like on rails but I have a much larger hex camera ship so I use little robocat for reccying the area before I fly my filming quad. Anyhow,
I see in the gui dshot150 but that doesnt stay selected and have tried to use set motor_pwm_protocol = DSHOT150 in cli but again it doesnt stay set. I guess its been disabled in my inav (latest) version for omnibusf7v2. I dont mind being another test pilot for dshot. How do I go about enabling it for my FC?
I will have a go at most things so any advice will be most appreciated.

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.