6 position mode switch for APM - Around $16 total

 My last blog post on this subject was incomplete. Now I have photos I actually built and tested it. 

step1.jpg?width=200

step2.jpg?width=200

step3.jpg?width=200

step4.jpg?width=200

step5.jpg?width=200

step6.jpg?width=200

6positionknob6.gif?width=551

 

6positionknob5.gif?width=551

After reading a recent blog I have decided I REALLY need to get out there and fly this year. I spend far too much time in front of my computer... So thanks to Max Levine's wonderful blog, http://diydrones.com/profiles/blogs/ardupilotcopter-mega-6 I've decided to go ahead and modify my Turnigy 9X to add a 6-position switch. This is going to be more or less a mini-build log as all I've done so far is order the parts....and they're all available from a single supplier, so save money on shipping!!!

 

cck_b.jpg?width=80srrn_l.jpg643_MFR.jpg

Again, props to Max Levine for his original blog on this topic.

 

Parts ordered (the resistor values came from an experiment with a Turnigy 9X and potentiometer):

 

(1) X ALPS 6-position switch = $7.06/ea or (1) X ALPS 6-position switch = $9.40/ea

(1) X 6mm knob = $0.59/ea

 

7 resistor solution:

(1) X 1.3K ohm resistor - $0.11/ea

(5) X 1.5K ohm resistors = $0.11/ea = $0.55

(1) X 1.0K ohm resistor = $0.15/ea

 

5 resistor solution:

(1) X 2.8K ohm resistor = $0.15/ea

(3) X 1.5K ohm resistors = $0.11/ea = $0.33

(1) X 2.5K ohm resistor = $0.15/ea

 

Step1.jpg?width=400

Step2.jpg?width=400Step3.jpg?width=400Step4.jpg?width=400Step5.jpg?width=400Step6.jpg?width=400

 

EDIT Sorry to keep changing the resistor values on you, but I'm trying to get as close as possible to the middle of the band for everyone. AR Projects read a min and max of 1085 and 1921, where I read a min and max of 1047 and 1878.

 

Current Cost (not including shipping all ordered from Mouser.com) = $8.46

Shipping is "estimated" at $6.40 so I'm in for $14.86 so far.

 

For those that don't want the hassle, you can buy a 6 position switch pre-made from one of our fellow DIYdroners - AR Projects - http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=120731012907&fromMakeTrack=true&ssPageName=VIP:watchlink:top:en

 

UPDATE 6/11/2011

I didn't wait for Mouser to get the switch in stock, so I ended up spending $9.40 including shipping to get the switch from eBay. If you can wait, the original price of $8.46 plus shipping still stands. If not, you're looking at $3.40 for the knob plus $6.00 shipping and $1.40 for the resistors and knob plus Mouser charged me $5.20 in shipping. Total cost with shipping was $16. If I could have waited I would have saved about $2.00 on the total cost.

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=140481713934&ssPageName=STRK:MEWNX:IT

 

These are the target and actual PWM values achieved using 7 resistors. (6) 1.5K and (1) 768 ohms

 

Pos 0: <= 1230 = 1165 Target - 1175 Actual
Pos 1: 1230 - 1360 = 1295 Target - 1300 Actual
Pos 2: 1361 - 1490 = 1426 Target - 1431 Actual
Pos 3: 1491 - 1620 = 1556 Target - 1555 Actual
Pos 4: 1621 - 1750 = 1686 Target - 1684 Actual
Pos 5: >= 1750 = 1815 Target - 1811 Actual

 

That's about as perfect as it can get.

 

ADDITIONAL NOTES:

A few things worth mentioning during the "build."

 

1) Before you try to solder the wires going to the switch, take a pair of large cutters and trim off the bump on the switch. If you look at the top of the switch, you'll see a keyed piece of metal that would be used to keep the knob from rotating, if the plastic housing was designed for it. If you try to clip it after the fact, you may run the risk of breaking off a resistor like I did.

 

2) Take an x-acto knife and ream out the hole a little bit. The threads on the switch won't go through otherwise.

 

3) The radio case will be a bit tight to get back together in the corner where you installed your switch. I forced mine ever so slightly....but I could have done a better job cutting the metal tab off my swtich.

 

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • works it with a SPEKTRUM DX7?

  • Take my reply with a grain of salt, I just started all of this last week....

    >>How long does the APM wait before “engaging” a mode?

    It appears to have a slight delay when switching modes. I've only used Stabilize, Alt Hold, Land so far. Weather has been windy here and my neighbor has a HUGE garage. So he's let me use that space for testing. No GPS lock but I can fly around and get the basics.

    One of my problem's is:   looking down to change the switch = fly into wall!  ROFL!

    Mike

  • Hi,

     

     

    Is there a priority which you should use for the modes? How long does the APM wait before “engaging” a mode? i.e. if my switch was Stab -> Alt-Hold -> Auto - > RTL and I went from stab through to TRL, would it for a split second start a mission as it passed Auto or is there a second delay to allow for transition?

     

    I want to do the same mod to my Spektrum DX8 :)

  • Just got finished installing the 6 Position Switch. Tuned the Transmitter and set the Flight Modes in MP based on the YouTube video. Alt Hold works great!     This is pretty cool stuff!

  • Thanks very much!

  • no your not done... that switches (one from ebay) resistors are for turnigy v2 firmware not er9x or any of its variants.... here is a https://www.youtube.com/watch?v=n5DpXPVTGzE&feature=fvsr youtube video of someone explaining step by step how to get the switch working in conjunction with er9x firmware

    Good luck and enjoy

  • Good morning,

    I have a question:  Once I install the 6 position switch into my Turnigy 9x, and I 'done'?  In other words do I need to program anything else in the tx radio?

    So i am just starting this multicopter adventure, received my arduquad yesterday, and flashed my Turnigy 9x with the ER9x-ARDUPILOT  firmware with a SmartieParts board. Purchased the 6 position switch from ebay. It is all ready for me to install.

    Thanks,

    Mike

  • Yusuf, "control_modes.pde" is in your "ArduPilotMega" folder.

  • Thanks but it's like i can't find the file "control_modes.pde" and i know my exact pwm at each mode bcos i already tested it.

    I can see u wrote DEFAULT FOR ARDUCOPTER but i'm using an  ARDUPLANE.

    I'm sorry if i'm not looking at the proper place, anticipating your response, thanks...

  • Hey Yusuf, first you have to measure how much pwm are you getting at each position. You can make that in CLI mode under tests, then, if you don't want to play with different resitor values, you can have a look at the file control_modes.pde and to the following lines :

    static byte readSwitch(void){  int pulsewidth = g.rc_5.radio_in;   // default for Arducopter

     if (pulsewidth > 1230 && pulsewidth <= 1360)  return 1;  if (pulsewidth > 1360 && pulsewidth <= 1490)  return 2;  if (pulsewidth > 1490 && pulsewidth <= 1620)  return 3;  if (pulsewidth > 1620 && pulsewidth <= 1749)  return 4; // Software Manual  if (pulsewidth >= 1750)       return 5; // Hardware Manual  return 0; }

     

    make sure you have a correct pwm reading before editing the file. Hope this helped.

This reply was deleted.