Today I installed a voltage sensor on my Hexacopter and tested is successfully with my 3DR telemetry. Shortly after the telemetry wouldn't connect. After much troubleshooting and verifying that the 3DR radio's could communicate with each other I unplugged everything and just put in the USB cable to my APM2. I still can't connect or upload new firmware through the mission planner, any ideas?
Maybe something got shorted out?
Could be but the hexacopter functions so that would seem odd to be a short.
So I went and flew my hexacopter and it worked fine, does anyone know if it could have a short and still fly fine or can I rule a short out now?
Something else I have noticed now is that when I try upload the firmware the rx/tx lights on the board flash and then it just gives the message 'Can't detect your apm version please check your cabling'.
Is there a way I can flash the board without the MP?
Is there a way I can flash the board without the MP?
First, you need to look at this as a system. It's based on Arduino. While we throw around the name Arduino, you need to know what it is and means. Arduino is actually 3 things, an open platform of hardware (Primarily 8 bit microprocessors from Atmel and the Atmega series in general), but it's also the Integrated Development Environment (IDE) which is the text based programming environment basically working with a "C" like langauge, and finally, the part that answers your question, a bootloader. Understand that pretty much all Arduino processors communicate via a serial connection. The trick here, is that just like your PC, you need a BIOS (Basic Input Output System) to make that serial connection even active to talk to the outside world. In order to flash the bootloader if the chip is blank or say you corrupted the flash on the porcessor and thus even the basic BIOS (AKA bootloader) is not working, you must use an AVR programmer plugged into the ICSP (In Circuit Serial Programming) 6 pin header. You then flash a bootloader from the Arduino IDE software tool, and then, all future flashes can occur ocross the serial connection. What you need to keep in mind is I said serial and you are plugging to the computer using USB. We use several different kinds of USB to serial converter, one is FTDI, the other is the Arduino driver and another special Arduino Processor programmed to act the same like FTDI, just using a different driver.
So to recap, the reason likely why you cannot load is that you either corrupted the bootloader or there is a communication error. The only way to fix the bootloader is to flash via the ICSP and you must have an AVR programmer to do that. The next option that we hope it is is that the program on the APM only presents the bootloader interface allowing you to flash for a very short preiod of time right after the APM is booted or powered on. The physicial reset button also causes the processor to reboot. So the trick here is to maybe hit reset a few seconds before attempting to flash the APM via mission planner. The last option is that your driver that emulates the serial port across the USB, and/or, it's physical connection is not working. The problem here is that on APM 1, it's a FTDI chip on the IMU shield, on APM 2.0/2.5, the same chip acting as the PPM encoder is the usb to serial converter. Many guys have killed that chip buy supplying the APM with more than 5 volts.
So, lets look at the facts:
You changed some wiring, added a sensor- could have either caused a short or more than 5 volts to the APM (don't think this is it since you can fly)
You have 3DR radios and are also trying to connect via USB. It's known they both talk on the same serial port to the microcontroller and thus, you cannot have both working at the same time. There is an auto switch that is supposed to make USB the priority, but also, there is a physical port (UART0 rather than auto UART 0/2) that is directly hardwired to the micro. So if you are using that hardwired port (UART 0 on the long edge of the board) for the radios, then USB will not work as long as that radio is plugged in becausing it's conflicting with the USB to serial conversion (technically the serial side).
when I try upload the firmware the rx/tx lights on the board flash
This tells me at least the USB to serial is trying to work.
I would unplug the radios first and see if that solves the USB connect. The next item is to remove the new voltage sensor and then try.
I doubt at this point you damaged the PPM since you said you can fly.
Absolute last is to reprogramm the bootloader on the mega 2560.
Sorry for the long post, but being that you asked the "how" I tried to be completely clear. Once you learn the fundmentals of Arduino and have an AVR programmer handy, you will never ask "how can I get it working again" ever. You will know the steps: flash the bootloader via ICSP and AVR programmer, attempt to connect via serial and flash the running firmware via the normal application (mission planner in this case, Arduino IDE in others). If that fails, then start troubleshooting the USB to serial connection (hardware specific to the platform you are touching). This works for all Arduino based projects even including the ESCs(Atmel based),minim OSD, and tons of other parts you may add to the system. Once you know this and see an atmel chip on anything, you then know that you can hack it, repair it no matter what unless it's just plain burned up. All you need is Arduino IDE and an AVR programmer to "fix" the bootloader. The key here is that it is, pretty much always, a layered system. You have the physical USB to serial connection, you then have a bootloader that is in the firmware but in a reserved section, next is your actual running application firmware you can flash and change as long as the phsycial serial connection and the bootloader are working. It's easy enough to reflash the bootloader, and kind of start the chip fresh as long as you have an AVR programmer handy. Otherwise you could be on the long road of troubeshooting the entire USB to serial connection (OS driver, physical connection and plugs, actual conversion chip, any wiring between that chip and the actual micro you are trying to program). Thus it's real easy to see why I might say just flash the bootloader(which might take less than 5 minutes), as a first check since the long list of USB to serial takes longer to troublshoot. In your case though, I hope it's just the radios conflicting with the USB.
I have unplugged everything from the board to avoid anything effecting it. I have tried your suggestion of reseting and trying to load firmware but that doesn't seem to do it. I think I have tried what I can so I will look a bit more into getting a AVR programmer to flash it.
Thanks for all the information.
I think I saw some info on using the JTAG interface over at diydronesafety.com
If you're up for doing it yourself this info should help. Otherwise, if you know someone handy with a soldering iron and a bit of microcontroller experience they should be able to do it without too many problems.
I have the same issue... is there a guarantee or a return back policy for the board so that they can fix it and send it back.
Colin, did you ever sort this out? One of my boards is suddenly doing the same thing. It flies a quad fine but USB, telemetry and even connecting through the CLI are all non-responsive.