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

  • @ Eric, i was able to get my 6 position switch but it is jumping Mode 3 which is due to difference in PWM, so pls how and where do i get to alter the PWM range like you did in details please, thanks

  • For anyone using these value resistors and/or the purchased switch from ebay, and anything /other/ than stock turnigy9x firmware, i made a short little video on how to use a curve to mix the right values out of it, if using er9x firmware.  This can also work for any other radio that has the ability to mix a curve into a pot for a mix, so no need for tampering with values, just buy, install, tune, here's the video, its a bit long but it goes into the process pretty clearly.  Basically set pot on mix first, then set endpoints to APM values, then tune curve middle points to get right values.

    https://www.youtube.com/watch?v=n5DpXPVTGzE

  • Who are you asking? Me? Yes, stock firmware.

  • if you don't want to adapt the pwm of your transmitter to the APM code, you can adapt the code to your hardware. That s what I did, as I already had some resistors, I end up with different pwm from expected ones.

    So in the file control_modes.pde, I replaced the old function "static byte readSwitch" by the following one:

    static byte readSwitch(void){
        uint16_t pulsewidth = APM_RC.InputCh(g.flight_mode_channel - 1);
        if (pulsewidth < 981)     return 0;
        if (pulsewidth < 1123)     return 1;
        if (pulsewidth < 1264)     return 2;
        if (pulsewidth < 1406)     return 3;    // Software Manual
        if (pulsewidth < 1557)     return 4;    // Hardware Manual
        return 5;
    }

  • Yes. And I bought a selector from a seller at ebay, then I replaced the resistors. A 3 position switch didn't work too, since the electronics on the main board is selecting middle pwm value when the switch is in center position (no contact beeing made). So I removed and unsoldered the pot from channel 6 and measured the resistence at "frontier" points (pass from one mode to another) and I adjusted the resistors accordingly, wich by the way were near the needed values but not accurate. :) I believe radios are not all the same.

  • Excellent.... I knew it would take some tweaking. Were you able to use a 10K variable pot to determine these values?

  • Hello,

    I finally have my mode switch working. I'm using a Futaba FT-T8UAP and I had to replace a variable control (channel 6 knob) since I couldn't get it to work in a 2 position switch, I guess it has something to do with the radio electronics. Using the variable control, I tweaked the resistors values a bit as follows : (red) -> 2.8k -> 1.5k -> 1.2k -> 1.2k -> 3.3k -> (black) ! Hope this helps someone in the same sittuation.

  • A 2 position switch is just that. You can't make a 2 position into a 3,4,5,6,etc position switch. You need to replace a 3 postition with the 6...and then it "might" work.

  • The radio doesn't care, it simply uses the varying resistances to control the pwm values of the channels. With a two-position switch it goes from full to minimum value. Rotary switches and three-position switches simply have more values, and variable knobs and sticks are able to give all of the values in between - the only difference with the last two is how the potentiometer is connected mechanically.

  • The switch I removed it's just a 2 position 1/0, however, I connected the wires to a pot, does the radio recognizes that switch as been only min/max and even with mid values only transmits mid or max ? I'm sorry but I'm a bit of a noob as radio concerns.

This reply was deleted.