Could someone please tell me if this is possible?
Is there a way to connect my APM 2.5 to my android device (a samsung Galaxy phone or tablet) directly using some sort of USB cable? Basically I will be using my android device instead of my laptop that has Mission Planner installed.
I know it is possible to connect via bluetooth module. I will do that soon but for now I am more interested in hard wired connection. I want this to change some parameters at the field during testing. It takes too much time to fire up a laptop and do simple things through the Mission Planner.
So if I can use my android phone/tablet, things will get much faster for me.
Would you let me know please?
I'm not sure why you want to connect to the GPS port? Usually we connect to the telemetry ports for reading MAVLink.
That said, the GPS port is just another UART, used to communicate with the GPS. When connecting to these ports to read and write, connect only the Ground, Tx and Rx wires to your FTDI board, that way you won't have any problems with power as the Android device is not powering anything.
Both andropilot and droidplanner can use USB
Do you mean I can use the USB cable (with OTG cable most likely) and connect the APM directly to Android device with ONLY a cable?
I just want to make sure if my question is understood right. I am asking this because I never saw it referenced anywhere so far. No pictures or any documentation saying that this can be/was done.
I am NOT talking about establishing connection via 3DR telemetry radio and/or bluetooth module. Those are entirely different. I am strictly speaking of cable connection.
Alex, to be clear, you can connect directly to APM via USB (with OTG cable into your tablet) from DroidPlanner or AndroPilot.
You will run across a couple of issues though:
APM 2.5/2.6 are not supposed to be powered from both USB and power module at the same time. While I have done it without a problem in the past, you may fry something (see http://copter.ardupilot.com/wiki/common-apm25-and-26-overview/#Powe...).
The problem is, most Android devices can't supply enough current to power the APM properly on their own (OTG is max ~100mA I believe). It's usually on the verge of browning out, especially if there are things attached like telemetry radios, GPS etc. I've seen some strange telemetry behavior from my APM2.5 when powered via an OTG cable/Android device only.
The best way to go if you want direct USB connections is to use the telemetry port(s). Buy one of these tiny USB FTDI boards(https://www.sparkfun.com/products/9716), and connect to the telemetry port. Then connect it via USB to your phone. Just connect the telemetry Ground, Tx and Rx pins to the FTDI board. I found this solution to be by far the most reliable and there are no power issues to worry about.
James thank you for the explanation. Andre thanks to you as well.
@James, I used to power my APM via USB only during configuration with Mission Planner (much better knowing that my motors won't power on accidentally) but after the infamous blown 3.3v regulator issue (Remember the BAD Gyro Health message on HUD?!!!), I started using both. If you recall, several guys did countless tests to figure out why the 3.3v regulator is blowing on many boards causing a huge problem. And they came up with that hot plugging/unplugging items to APM while it is fed via USB power only is causing the 3.3v regulator to burn out. And they recommending the following:
1-NOT to hot plug or unplug anything while the APM is powered (especially if it is powered with USB only!..)
2-Using a 100uf ceramic capacitor to be connected to analog (A2) input to minimize the voltage spikes.
3-Using the flight battery in addition to USB power while connected to Mission Planner.
So after this I started using both the USB and the flight battery while connecting to Mission Planner.
I was planning on doing the same with the Android device connection: Using the USB and the flight battery at the same time.
Now that I read the link you provided, I am confused again and honestly don't know what it correct what is not since they keep changing things without properly updating all the manuals.
Connecting via the USB/OTG cable is my preferred method but if this is going to cause power problems, then I will consider using the bluetooth module and connect wirelessly through the telemetry port.
However my mind now went busy thinking if powering via both USB and a flight battery is really not good!!!!
Yes, it's a confusing issue, I don't know when that documentation was written.
Like I said, I have not had any problems so far, plugging in USB while the APM is powered by the flight battery, but I would hate to see you break something! However, if it works with your computer then it should be fine with a tablet/phone.
I mostly use PixHawk or VR Brain these days. The PixHawk USB has other problems with Android. Something about the Android driver I think - a lot of the time the PixHawk USB is just not recognised by the Android tablet but other times it works! The APM is more reliable.
In the end I went to the USB FTDI board solution as it works 100% of the time with both PixHawk and APM. I just leave it attached in the plane and the connect the USB when needed. The PixHawk has heaps of telemetry ports so it's not an issue. The APM 2.5 has two in addition to the USB, but you need to solder on some headers for port 2.
Thanks again for the quick reply James.
The main blown 3.3v regulator thread is here
The recommendations and the videos are at the top. I checked again to refresh my memory. They do recommend the 100uf ceramic capacitor mod. (which I already did) and not hot plugging/unplugging but they do NOT mention powering the APM via both the USB and flight pack. But it was discussed widely during the long thread somewhere. Maybe I came to that conclusion as another precaution. But now I will think about it again. If USB power only is enough then I will stop using the flight battery.
I also checked the USB FTDI board you posted. My whole idea to use direct USB connection was to avoid attaching something to the telemetry port. The bluetooth module could easily be used to connect to any android device otherwise. So in that case I will just go ahead and use the bluetooth option since I already have one on the way.
But one question about the USB FTDI board, what is the direct benefit of using it? If I use it, then do I not need to use the other micro USB input while connecting to Mission Planner?
So basically I will connect to APM through the telemetry port but using USB cable instead of wireless solution (as in telemetry radio) Correct?
If you have a Bluetooth board, that would probably be easier for what you want to do. I mainly use the usb Ftdi because I have another computer onboard my plane that uses the telemetry feed and this provides a very reliable connection.
I can also use it to connect to mission planner or an android device. The only thing I can't do with it is load firmware, only the main USB port allows that.
Hi guys! I'm dealing with a doubt related to the wiring of an android device to the pixhawk. i want to use my android device connected with otg cable + ftdi usb to serial cable + df13 connector operating at 5 volts directly to the gps port of the pixhawk while connected to the flight battery. is that not going to cause any trouble?
The only documentation i have found is:
Normal Operation Maximum Ratings
Under these conditions all power sources will be used in this order to power the system.
Power module input (4.1V to 5.7V) [refers to the voltage coming into Pixhawk from the power module]
Servo rail input (4.1V to 5.7V)
USB power input (4.1V to 5.7V)