Iām making an experimental aircraft using the stock PX4 multicopter code. However, the ESCs Iām using are reversible, i.e. PWM 1500Āµs is stopped, 2000Āµs is full up and 1000Āµs is full reverse. In order to make this work, Iāve made a custom airframe and mixer; Iāve pasted the first motor output mixer below. PWM_DISARMED is set to 1500, and my throttle stick is sprung to centre. Iām not using any auto functions - only stabilise mode.
Now, my problem is, that about 60% of the time, when I arm, the motor output shoots to 1000Āµs for half a second or so, then back to 1500Āµs, where my stick is. This causes the motors to spin in full reverse momentarily upon arming. Very scary!
The logs didnāt show anything on OUT0_Out0, but I did discover that if I activate the kill switch, then arm, the motor waits until I deactivate the kill switch, then they spin up momentarily. and allows it to be captured by the logs.
Does anybody have any idea whatās going on? Any help would be much appreciated!
Iām curious what ESC you are using? Iāve been looking for a reversible ESC for a while and they are surprisingly few of them (other than the car ones with the extra wire). Sorry Iām not much help on the PWM glitchesā¦
3D ESCs are surprisingly few, until we realised somethingā¦ read onā¦
We started out using HobbyWing Xrotor Pro 4A 3D ESCs. The worked pretty well, however they have an annoying āsoft startā if you leave the throttle at neutral for a few seconds, so now we use Cobra S-class 80A HV ESCs with BLHeli installed.
Any ESC that supports BLHeli can be programmed to be reversible, even if it doesnāt say it in the description. Make sure you get the appropriate USB programmer, then load up BLHeli Suite, and set the direction to bi-directional. Boom, you have a reversible ESC
Good! Do you want to open an upstream issue (https://github.com/PX4/Firmware/issues), so we can discuss a general solution?
Do you require other changes?
Iām not sure but it can be related to a bug Iāve found Throttle spike on arming (is it a bug?) . In my case autopilot sent bigger PWM to ESCs a second after arming and then returned values to expected ones.
Just a suggestion of maybe point you to how itās handled in a different applicationā¦ Checkout Vertical Technologiesā DeltaQuad airframe setup. Reverse thrust is setup in a different PWM port.