Finally completed the 3dr mod on my 9x. Seems to link up instantly - no more waiting for mission planner to download parameters or the awkwardness of forwarding the mav data back out over bluetooth!
More details, as requested:
The stock 9x has the Throttle Cut and Aileron switches connected to a UART on the Atmega. These need to be re-routed to free up the UART for telemetry purposes. There are several posts out there on how to do it - this was the cleanest (from https://code.google.com/p/open9x/downloads/detail?name=9x_modifications_EN.pdf):
Since I have a smartieparts 9x programmer, I didn't have to worry about the connections going to the header on the left - just the two connections that are circled in red.I reused the resistors that came off the pads (Thanks to Rod for his fine soldering skills). Note that the connections are made from the bottom most resistor pads up to the resistors then they cross over and attach to the two free pads on the right. Keep in mind that once this mode is made, firmware is required that knows about the new locations.
After that, I installed the smartieparts programmer according to their installation instructions:
http://www.smartieparts.com/shop/index.php?main_page=page&id=9
With that in place, the extra UART is now availible on the TelemeterEZ port (two pin header, top row, left):
The 3dr air module conveniently runs at 5v, so I grabbed 5v and ground off the back PCB (you can just barely see the connections in the 2nd photo from the top above). 5v is in the middle, ground on either side of it.
When installing, I connected power and ground to the 3dr module first (red and black wires on the cable that came with it). Fired up mission planner and when through the radio setup to load the correct settings into the module. Then I unplugged the usb radio for the PC (to make sure it didn't interfere) and powered up my quad - data stated flowing to the module in the 9x. This made it easy to identify which way to hook up the RX/TX lines to the TelemetryEZ port on the 9x Programmer board using my DSO Quad pocket scope.
Next time I open up the 9x, I'll grab photos of the actual connections. The OpenTx developers are currently working on adding Mavlink support - I was a little impatient and rolled my own, but I do intend on getting my code to them so they can merge all the best ideas.
I should also add that I'm not 100% sure the radio module won't draw too much power... it probably makes sense to at least add a cap between the power and ground connections to help the regulator out.
Comments
I didn't put a back channel in my mavlink code - it just receives messages from the copter, but I'm sure it wouldn't take much to have it send mavlink commands out to bypass the 2.4Ghz RC channels.
This may sound crazy, and tell me if it is.... In Australia 433mhz is illegal, but 915mhz can go up to 2watts.
And I believe that via a notebook & 915mhz telemetry you can use a PC joystick to fly via APM . . . . .
So joining the dots, could we get better range on FPV runs by using 915mhz at 100mw as opposed to 2.4ghz at 60mw ???? Just bypass the 2.4ghz transmitter on the back all together???
This would be an awesome advance on the range and penetration abilities for us.
You might want to email the OpenTx developers about that - I'm not sure if it's integrated with Companion9x or not. This guy can point you in the right direction: https://code.google.com/u/bsongis/
My Linux box is not working ATM, so can you please build me a MAVlink version?
Ah, thanks. I already had a look at your patch. Would prefer official build.
Thanks for yer help :)
I believe the "ARDUPILOT" build option enables a text style telemetry input. I'm guessing it predates the mavlink we now have. The official development is enabled with the "MAVLINK" build option, but I haven't tried it since I was working on mine in parallel with the official development. My code is available as a patch at a dropbox link in one of the previous comments above if you're interested.
Whats the status on MAVLink integration in OpenTX at the moment? Will the "ardupilot" option work? There seems to be mavlink support overhauling in the latest OpenTX, will this be enabled via "ardupilot" build option?
My next mod to TH9x is here! Thanks for details, I will add plugs to exchange with Xbee or 3DR TM set. Nice work.
Keep up the great work. I wish I had the programming skills.