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

add a documentation page for DShot #578

Merged
merged 8 commits into from
Oct 11, 2019
Merged

add a documentation page for DShot #578

merged 8 commits into from
Oct 11, 2019

Conversation

bkueng
Copy link
Member

@bkueng bkueng commented Sep 23, 2019

Docs for PX4/PX4-Autopilot#12854

I'm not sure if we should add something uder Basic Configuration as well. For example, I think reversing the motor direction is helpful to know about.

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

@bkueng Excellent. I've subedited and added some questions. Looks pretty cool.

I'm not sure if we should add something uder Basic Configuration as well. For example, I think reversing the motor direction is helpful to know about.

We don't have anything else on motors in basic configuration - you're basically suggesting we have a section on configuration to make sure that motors are spinning in the right direction?

I guess that is OK - what do you do if you got it wrong for PWM or UAVCAN motors?

Either way, even though you cover this in commands, probably good to add a few word in this doc under "Configuration"

@bkueng
Copy link
Member Author

bkueng commented Sep 24, 2019

Thanks for the updates and review.

We don't have anything else on motors in basic configuration - you're basically suggesting we have a section on configuration to make sure that motors are spinning in the right direction?

Yes, as testing the motor assignment and spin direction is one of the things you always have to do when setting up a vehicle. What you normally have to do is swapping 2 of the 3 motor wires, which means resoldering, if the motors are not attached via bullet connectors. Using dshot commands simplifies this.

@hamishwillee
Copy link
Collaborator

hamishwillee commented Sep 25, 2019

Yes, as testing the motor assignment and spin direction is one of the things you always have to do when setting up a vehicle. What you normally have to do is swapping 2 of the 3 motor wires, which means resoldering, if the motors are not attached via bullet connectors. Using dshot commands simplifies this.

Then I think it makes sense to do so. Perhaps as a separate PR (up to you). Do you want to take first stab at this?

I've made changes to address raised issues for your review.

en/peripherals/dshot.md Outdated Show resolved Hide resolved
Copy link
Member Author

@bkueng bkueng left a comment

Choose a reason for hiding this comment

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

Thanks for the update. There's more MAIN vs AUX confusion :)

> **Tip** On boards with an IO, DShot is only supported on the AUX pins.
> It is best to disable the IO via [SYS_USE_IO](../advanced_config/parameter_reference.md#SYS_USE_IO) and then connect the motors to the AUX pins instead of MAIN.
> **Note** DShot is only supported on FMU pins, which map to the AUX ports on boards that have both MAIN and AUX.
Setting `SYS_USE_IO=0` disables the IO board, and remaps the FMU pins to the MAIN port.
Copy link
Member Author

Choose a reason for hiding this comment

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

and remaps the FMU pins to the MAIN port

There is no physical remapping: the FMU pins still go to AUX (according to the board label). What is different is that the mixer for MAIN is loaded on the pins for AUX. That is why you have to replug your motors from MAIN to AUX.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@bkueng Bugger. Thought I understood this from http://dev.px4.io/master/en/hardware/reference_design.html#mainio-function-breakdown

So what I previously understood was that .... if you had a board with only an FMU this only had MAIN ports and this would be labelled MAIN. If you had a board with FMU (AUX) and IO (MAIN) and you set SYS_USE_IO=0 then the IO board is disabled and the ports labelled MAIN magically get remapped to whatever was on AUX.

But what I think you are now saying is that (please confirm):

  • FMU is always connected to AUX physical port. AUX is the "name" of the FMU port.
  • IO is always connected to MAIN physical port. Main is the "name" of the IO port.
  • On FMU-only system the FMU is connected to the AUX port (still) but it will load the MAIN mixer and will be screen printed with MAIN. The screen printing is what tells the user where they connect their wires.
  • On FMU and AUX board with SYS_USE_IO=1 we have FMU port AUX loaded with AUX mixer (screen printed AUX), IO port MAIN loaded with MAIN mixer (screen printed MAIN)
  • On FMU and AUX board after setting SYS_USE_IO=0 we have FMU port AUX loaded with MAIN mixer (screen printed AUX), IO port MAIN disabled (screen printed MAIN)

So basically a user has to connect to the ports screen printed AUX as though they were labelled MAIN. Correct?

I wonder if we could fix this by naming port and mixer separately. Is there another generic way to refer to FMU AUX port that conveys this is a bank or PWM outputs pins? Ie FMU PWM Port?

Copy link
Member Author

Choose a reason for hiding this comment

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

On FMU-only system the FMU is connected to the AUX port (still) but it will load the MAIN mixer and will be screen printed with MAIN. The screen printing is what tells the user where they connect their wires.

You can call it that way if you want to. But FMU-only boards simply don't have any notion of AUX.

The rest is all correct.

I wonder if we could fix this by naming port and mixer separately. Is there another generic way to refer to FMU AUX port that conveys this is a bank or PWM outputs pins? Ie FMU PWM Port?

Maybe just FMU Outputs/Port? If you add PWM in the name, it won't be correct for DShot.

en/peripherals/dshot.md Outdated Show resolved Hide resolved
@hamishwillee
Copy link
Collaborator

Hi @bkueng

OK, updated the sections on using the escs on AUX port again. This is only in the wiring section and I think is quite thorough. I didn't put in the config section, because they would already have done this work by the time they get to the config section.

I also created PX4/PX4-Devguide#871 to clarify what happens - but in this case it refers to the mixer being loaded.

Any idea when Dshot stuff can merged?

@bkueng
Copy link
Member Author

bkueng commented Sep 26, 2019

Looking good now.

Any idea when Dshot stuff can merged?

It's in a good state now, we need some more flight testing and enabling Pixhawk 2. I'm not sure if people want to add it to v1.10 though.

@hamishwillee
Copy link
Collaborator

Great. Feel free to merge it yourself when ready! Thanks for your patience on the clarifications.

@hamishwillee
Copy link
Collaborator

@bkueng Do you think it is worth adding a "Purchase" section that states "Any Dshot ESCs should work. We have tested on ... (and then add these ones PX4/PX4-Autopilot#12854 (comment)).

If so, is it worth mentioning specifically BLHeli32 ESC ?

@bkueng
Copy link
Member Author

bkueng commented Oct 1, 2019

I would only add such a list if we see people reporting issues on some ESC's. Otherwise I expect it to work everywhere. We should test on Kiss ESC's as well quickly to be sure, I'll check if I can find some.
The other important thing is that it's likely that we need 1kHz rate loop for some ESC's. But that is the default now, it's only different if someone would change IMU_GYRO_RATEMAX.

@bkueng
Copy link
Member Author

bkueng commented Oct 1, 2019

We should test on Kiss ESC's as well quickly to be sure, I'll check if I can find some.

Found some, thanks to @MaEtUgR, they work as well.

@hamishwillee
Copy link
Collaborator

Thanks. Let's leave this alone then, as you have suggested.

@bkueng bkueng merged commit 91cc0af into master Oct 11, 2019
@bkueng bkueng deleted the dshot branch October 11, 2019 06:15
@smpotter
Copy link

Digging up bones...

After remapping from main to auxiliary output for Dshot ESC. Did you lose rc commands to the motors? ie. No yaw, pitch or roll??? I have reached my witz end.

Pix2.1 xrotor 60 32bit Orange Cube.

I can arm without fail and I do have throttle. I also made a two channel gimbal as well as a bait release.

ARTF channels 1-4 and gimbal on 8-9 Release 10

@smpotter
Copy link

Ooops ps I see the sticks movement on the calibration screen in Mission Planner. I have attempted to move output mapping to no avail. Is this bumping heads with Dshot ESC motors output?

@hamishwillee
Copy link
Collaborator

@smpotter Generally the right place to ask this is on the PX4 discussion boards or slack. Bigger pool of people who might know the answer. You should note what version of PX4 you are using.

If you then find that the documentation is incorrect or incomplete we'd welcome an issue.

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

Successfully merging this pull request may close these issues.

None yet

3 participants