APM/Pixhawk/Pixracer 6-pos switch for flight modes

Post Reply
stewwy
Posts: 36
Joined: Fri Oct 02, 2015 11:44 pm
Country: United Kingdom

APM/Pixhawk/Pixracer 6-pos switch for flight modes

Post by stewwy » Wed Feb 24, 2016 6:08 pm

The 6- Position switch is relatively easy to set up for cleanflight/betaflight as you can alter the mode ranges

Unfortunately to do the same with ardupilot software ( APM/Pixhawk/Pixracer) it is a bit more complicated.



The set-up for the switch sets up the switching points at roughly equal points on the scale 1000-2000 us.

The APM switch ranges are fixed (unlike CF/BF)and furthermore are not scaled evenly.This is from the Wiki:

"If you want to support 6 modes then the transmitter will need to emit PWM widths of around 1165, 1295, 1425, 1555, 1685, and 1815 milliseconds."

In addition you must use Channel 5

How It's done:


The standard calibration for the switch sets up the switching points at roughly equal points on the scale 1000-2000 us.

The APM switch ranges are fixed (unlike CF/BF)and furthermore are not scaled evenly.

Therefore the positions do not correspond.

I found the easiest way was to use a curve to shift the positions, the curve I used was

CV9 ( A 9 Point Curve )

-78
-56
-32
-22
-5
15
31
48
81

I calibrated the 6 pos switch as normal then applied the curve this gave me :

Position1 1108,
Position2 1306,
Position3 1431,
Position4 1585,
Position5 1708,
Position6 1911,

Close enough for Government work ;) I could have messed around with the curve to get it a bit closer. But it works and I'm lazy :D

Painless360 has a video on the 6-pos switch in a Taranis that uses a 6 position curve but the principle is the same, and it explains the problem a bit better.

Hope this helps


User avatar
MikeB
9x Developer
Posts: 16608
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: APM/Pixhawk/Pixracer 6-pos switch for flight modes

Post by MikeB » Wed Feb 24, 2016 6:59 pm

You might try simply setting the weight on channel 5 to 63%.
This gives output values of 1178, 1307, 1436, 1564, 1693 and 1822!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

stewwy
Posts: 36
Joined: Fri Oct 02, 2015 11:44 pm
Country: United Kingdom

Re: APM/Pixhawk/Pixracer 6-pos switch for flight modes

Post by stewwy » Thu Feb 25, 2016 6:05 pm

Well I always do tend to overcomplicate things ( it did work tho')lol

that's an evening messing with settings I won't get back !

I may just hate you :oops:


Post Reply

Return to “9Xtreme upgrade board”