My last blog post on this subject was incomplete. Now I have photos I actually built and tested it.
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!!!
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
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
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.
Comments
Have you tested the switch you removed? Was it a 3+ position switch or just 0/1? If it's just a toggle, that's all you'll get probably, all or nothing.
That's the weird thing... resistence seems to peak in middle, but as I turn the pot I don't have intermediate values, only max and min, this shouldn't happen with a pot, am I wrong ?
Isn't that the way it should work? At one extreme you get the min at the other you get the max? If that's not the case and you get min at 0, max at 5K and min again at 10K...then just use 5K as your total resistance.
Divide each resistor value in half... but you might need to tweak the first and last values.... actually you might need to tweak them all.
Anyone have made one switch like this for a Futaba T8UAPS or similar ? The pots on this radio don't seem to be linear, the resistence seems to increase to a peak and decreases ?! Using the 3 wires from channel 5 (I've unsoldered the switch), +, center, - , connected to a 10k pot, I get only the max and min pwm values when the pot reaches each extreme... any suggestion ?
well done this is the best solution.
The best advice I can give to try and figure all this out is to use a 10K pot to test. I put mine on a small breadboard. What I would do is adjust the pot to get the desired PWM (I had my receiver hooked up to my ArduPilot Mega, which was then hooked up to my GCS so I could read exact PWM values).
As got to the desired PWM value, I would remove the wiring for the radio and use a DMM to check the resistance value. This took me about 20 minutes to figure out what I was trying to accomplish and actually get some values.
It's also important to find out what the min and max values are for your radio. In my case, i read a max of 1878 and a min of 1047. That's a swing of 831. That will be important for the math that's coming next.
So let's say you're doing a 5 resistor solution (so your 0 position will be the min and your 5 position will be the max). We need to figure out what values need to be placed in each position.
So let's say you "peaked" at 10K and that gave you the max value. We know that the total resistance of the circuit is going to be 10K when added together. Contrary to previous reports, the system is completely linear and these calculations will work. So for these purposes, we'll use my 1047 min value. I want to reach 1295 for position 1.
So that's 1295 - 1047 = 248 / 831 (total swing from min to max) = 0.2984 * 10K = 2.9K for your first resistor
Next, I want to go from 1295 to 1426
So that's 1426 - 1295 = 131 / 831 = 0.157 * 10K = 1.57K
You can keep on going, but you'll find that the 3 resistors in the middle will all match.
Thanks Happy
I saw the first post that was similar to this, ordered the parts, and then the details from the posts were deleted and a link added to ebay.
Planning on removing a 3 pos switch in my Futaba 7ch guessing it will be similar, ordered a variaty of resistors ready for some trial and error should be able to dial it in though.
Nice Bolg Sir. Look good and very helpful.