Building an Elev-8 Quadcopter Controlled With An Ardupilot Mega Autopilot
GlassKNees
Posts: 181
I started a thread in the Multicopter forum, but decided to start this thread and put in all the details as as well a report progress. So here goes:
After building an Elev-8 quadcopter, I decided I wanted to do more with it than just fly around. I wanted some of the more advanced features that other multicopters offer. One day, while perusing some YouTube videos I watched a Flite Test video where Josh & Josh talked about the Ardupilot Mega, and afterwards I was hooked.
Initially, I had the notion that I could simply swap out flight controllers - unplug the Hoverfly board and connect up an APM module, but I soon learned that this is impossible. Both devices assume different motor configurations. The Hoverfly firmware assumes this configuration:
While the APM code expects this:
So, using an APM would require building a new aircraft. I chose to build another Elev-8 since I was already familiar with the construction and I had spare parts that I can use on either aircraft. So I ordered another kit and began construction. It didn't take long before I discovered another problem - the pins on the Hoverfly board are located on the edge while the pins on the APM are on top:
Routing the ESC BEC wires was a problem as they weren't long enough. I solved this problem by getting extensions.
The next thing I discovered was that there are at least two kinds of APM modules: 2.5 and 2.6. I bought a 2.5 module as it was cheaper. But I learned that the difference between the two is that 2.5 has an onboard magnetometer (compass), but it is subject to interference from the high ESC electrical currents causing some control problems such as "toilet bowling" in RTL mode. So APM 2.6 came out in which they removed the magnetometer; you have to mount it externally. You can mount an external compass to the 2.5 module, but you first must disable the onboard compass by opening the case to get to the circuit board and cutting a trace. This is when I learned that there are a lot of APM "clones" out there, made by different companies, mainly in China. Mine was slightly different and I could not reliably determine which trace to cut, so I ended up buying a APM 2.6 module so I wouldn't have to worry about onboard compasses...
One of the nice features of APM is the Mission Planner application that you can install on a laptop. With Mission Planner, you can download firmware, configure the APM and radios, select different flight modes, and create/upload missions and have your aircraft them autonomously. But this requires a 2-way telemetry link between the aircraft and your computer. This is done simply enough with a pair of radios - one connects to your computer via a USB port and the other plugs directly into the APM. But you have to load some firmware on the two radios and to do that, you need an FTDI USB to RS232 Download Arduino Module. The one I had was defective and I had to order a new one - I'm currently waiting for it to arrive.
Here is my Elev-8 all wired up:
The GPS/magnetometer are inside the white dome, the telemetry transceiver is the little green circuit board on the left with the antenna pointing down - the board has a clear plastic sheath for protection. I'm using a Spektrum 6 channel receiver mounted to the right of the APM. Power comes from an APM power module that I spliced into the power distribution harness.
Right now, the project is on hold. I powered up the APM, but could not get it to arm. I order to troubleshoot the problem, I have to connect to Mission Planner, which requires the telemetry link to my laptop, and I'm waiting for the USB/serial adapter in order to upload the firmware on the airside radio. As soon as I get the telemetry link working I'll report on my progress with getting the APM to arm.
After building an Elev-8 quadcopter, I decided I wanted to do more with it than just fly around. I wanted some of the more advanced features that other multicopters offer. One day, while perusing some YouTube videos I watched a Flite Test video where Josh & Josh talked about the Ardupilot Mega, and afterwards I was hooked.
Initially, I had the notion that I could simply swap out flight controllers - unplug the Hoverfly board and connect up an APM module, but I soon learned that this is impossible. Both devices assume different motor configurations. The Hoverfly firmware assumes this configuration:
While the APM code expects this:
So, using an APM would require building a new aircraft. I chose to build another Elev-8 since I was already familiar with the construction and I had spare parts that I can use on either aircraft. So I ordered another kit and began construction. It didn't take long before I discovered another problem - the pins on the Hoverfly board are located on the edge while the pins on the APM are on top:
Routing the ESC BEC wires was a problem as they weren't long enough. I solved this problem by getting extensions.
The next thing I discovered was that there are at least two kinds of APM modules: 2.5 and 2.6. I bought a 2.5 module as it was cheaper. But I learned that the difference between the two is that 2.5 has an onboard magnetometer (compass), but it is subject to interference from the high ESC electrical currents causing some control problems such as "toilet bowling" in RTL mode. So APM 2.6 came out in which they removed the magnetometer; you have to mount it externally. You can mount an external compass to the 2.5 module, but you first must disable the onboard compass by opening the case to get to the circuit board and cutting a trace. This is when I learned that there are a lot of APM "clones" out there, made by different companies, mainly in China. Mine was slightly different and I could not reliably determine which trace to cut, so I ended up buying a APM 2.6 module so I wouldn't have to worry about onboard compasses...
One of the nice features of APM is the Mission Planner application that you can install on a laptop. With Mission Planner, you can download firmware, configure the APM and radios, select different flight modes, and create/upload missions and have your aircraft them autonomously. But this requires a 2-way telemetry link between the aircraft and your computer. This is done simply enough with a pair of radios - one connects to your computer via a USB port and the other plugs directly into the APM. But you have to load some firmware on the two radios and to do that, you need an FTDI USB to RS232 Download Arduino Module. The one I had was defective and I had to order a new one - I'm currently waiting for it to arrive.
Here is my Elev-8 all wired up:
The GPS/magnetometer are inside the white dome, the telemetry transceiver is the little green circuit board on the left with the antenna pointing down - the board has a clear plastic sheath for protection. I'm using a Spektrum 6 channel receiver mounted to the right of the APM. Power comes from an APM power module that I spliced into the power distribution harness.
Right now, the project is on hold. I powered up the APM, but could not get it to arm. I order to troubleshoot the problem, I have to connect to Mission Planner, which requires the telemetry link to my laptop, and I'm waiting for the USB/serial adapter in order to upload the firmware on the airside radio. As soon as I get the telemetry link working I'll report on my progress with getting the APM to arm.
Comments
I am hoping that the new flight controller coming out from Parallax will be able to communicate with Mission Planner. At my school, we participate in an autonomous UAV competition and I would like to enter in my ELEV-8 with Parallax's open-source flight controller. This would require Mission Planner support, however, so I am eager to see that as a feature.
Good luck with the troubleshooting!
But I'll be leaving on vacation on Friday for two weeks, so you may not hear from me for awhile. I hope to post a video of my maiden flight!
Brian
After returning from vacation, I was able to successfully establish a telemetry link between my Elev-8 and a laptop running Mission Planner. I found a Motor Test function which is handy - it allows you to spin each motor, one at a time, to verify correct spin direction. I tried it out and found two motors would not spin. After some troubleshooting, I found a bad solder joint, which I fixed. But I could not get the #2 motor to spin
I went through a long and tedious troubleshooting procedure, taking apart the aircraft, plugging the motor into a spare ESC and connecting the BEC into the throttle channel of a spare receiver. The motor would spin when I commanded it via the transmitter. In this fashion, I was able to confirm good wiring connections from the motor all the way to the APM, but the motor test still failed.
I was about ready to give up and abandon the project when I tried one more experiment: I plugged my spare ESC into the aircraft's poser distribution harness and plugged the motor into the ESC's three leads. The test passed! So, I'm guessing there's something funky going on with the ESC on the aircraft that the APM doesn't like. At any rate, I swapped ESC's carefully put the aircraft back together and reran the motor test - it passed.
Still, the APM won't arm. Then I realized that I hadn't done the ESC calibration, so I did that - it was successful - all four motors spun with I advanced the throttle. But I still can't get the APM to arm.
I will continue tomorrow - try to see if I can isolate the problem using Mission Planner. I feel that I'm really close!
Cool beans! That is good news.
At this point, I'm inclined to believe that I have some sort of set-up problem. I've searched for similar problems and read posts concerning magnetometer interference from the high ESC currents.... I clearly have some more work to do...
Meanwhile, my other Elev-8 is awaiting new booms - I discovered, during repairs from a crash, that several booms are bent, so I've ordered replacements. They should arrive by Friday, so by this weekend, at least I should be able to fly my other aircraft with the stock Hoverfly Open controller. But I hope I can resolve my APM teething issues by then as well...
Have you joined the APM forum? All you do is post your log file there and you'll have a bunch of help, send me your username if you'd like. There are different logging options, start here.
Good luck with it. I will consider an Elev-8 when the new flight controller is ready
Meanwhile, my other Elev-8 is awaiting new booms - I discovered, during repairs from a crash, that several booms are bent, so I've ordered replacements.
If you care to share, I would appreciate some information on your crash - but I don't want to hijack this thread, so I've started a new one here.
There really was no crash per se - the craft just tipped nose first, scrapping the front propellers on the pavement - no damage other than slight scuffing on the ends of the props.
I need to take a look at the log files to see if there is any meaningful information. I do plan to improve vibration dampening before I attempt to fly.
I have also checked the esc connections into the Pam..
Any ideas on whether or not to cut those wires or leave them?
While I have not built the Elev-8 I have done some programming with the Propeller chip.
The best flight mode to use with APM is Stabilize mode. This is like flying by hand with no GPS or Altimeter to get in the way. It's also the Goto Mode to use when things go side ways as they will. The next mode to use is Altitude Hold and then later Loiter or Position Hold.
APM is very sensitive about vibrations and usually effects altitude in a very positive fashion.
The number one thing I like about APM is the flight log. It tells me just what you did and what it did. But with APM you need to turn up logging otherwise you will miss a lot of sensor data that is needed for debugging a new build. 830 is just to basic of a logging level.
Mike
1. Did you leave the receiver - APM wires alone (did not cut the power, ground wires)?
2. Have you had any problems losing telemetry? I wanted to gather some log information yesterday, but all of a sudden I cannot establish the link. The little green LEDs go solid when I power up the aircraft, but when I attempt to connect to M.P. it times out and says it detected no heartbeat...
I replaced the wires going from the receiver to the APM - all have power/ground leads intact. I removed BEC extension wires and connect the ESC BECs directly to the APM. I changed the flight modes to Stabilize, Alt Hold and RTL - trying to start out in Stabilize mode.
My telemetry problem went away - don't know what the problem was - may it just needed a rest???
Anyway, Powered up okay, arm okay. But #1 motor fails to spin at all - all three others seem fine. Went through lengthy debug. I could get #1 to go but then #3 stopped working. The gremlin goes back and forth between #1 and #3.
I disassembled the aircraft and spread the booms/electronics on the floor. I had to fix a solder connection on one of the wires going from the ESC to the #1 motor - but fix didn't solve the problem.
When I calibrate the ESC's all four motors spin. Ditto for running the Motor Test in Mission Planner. Only when I arm and throttle up in Stabilize mode does #1 refuse to work. Swapping booms eliminated wiring problems in the #1 boom as the problem remain with the boom connected in #1 position. I've tries swapping ESCs - no joy. Then, all of a sudden I #1 will start working but then #3 refuses to spin. Go through the same exercise - the problem jumps back and forth between #1 and #3.
So, I'm putting the aircraft back together. I plan to re-flash the firmware, reconfigure the APM, re-calibrate the ESC's and see what happens. If the problem persists, then I will consider replacing the APM module - possibly buy one from 3DR - at least I'll have some confidence that it has been tested and works as opposed to buying some clone from China.
One modification I did make however, was to shorten the leads that go from the APM power module to my power distribution harness. Adding the P.M. added so much wiring between the chassis plates that it was a real Smile shoot trying to get them together without binding some wires. Here's a link to the picture:
https://2014foundfamiliesatlostpines.shutterfly.com/71
So, I'm putting the aircraft back together. I plan to re-flash the firmware, reconfigure the APM, re-calibrate the ESC's and see what happens. If the problem persists, then I will consider replacing the APM module - possibly buy one from 3DR - at least I'll have some confidence that it has been tested and works as opposed to buying some clone from China.
One modification I did make however, was to shorten the leads that go from the APM power module to my power distribution harness. Adding the P.M. added so much wiring between the chassis plates that it was a real Smile shoot trying to get them together without binding some wires. Here's a link to the picture:
https://2014foundfamiliesatlostpines.shutterfly.com/71
Unfortunately, the shutterfly account is private.
Here is a top of of the aircraft:
Finally, here's a side view showing the vibration dampeners:
Initially, only one motor would spin (slowly), then two others started spinning - they slowly increased rpm but #1 motor refused to move at all. I throttled down and back up - the three motors reacted right away to my commands - no gradual spin up...
I switched from Stabilize to Alt Hold and no difference - #1 motor refused to come to life. Then I switched to RTL, and all four motors spun rapidly - I'm guessing that since it hasn't deviated from it's initial point, it was simply trying to climb to its hover altitude (I think the default is 100 ft, but I'll have to check). At any rate, I was happy to see all four spinning! But when I switched back to Stabilize, #1 quit again.
I'm convinced I have a faulty APM at this point.
When you arm the copter all the motors should slowly spin at the same rate because there is a minimum throttle PWM that is output to the motors. If that is not set correctly they do not spin. It is based on how the flight controller sees itself. If you pick the copter up on one side the motors should spin to compensate for that movement.
I also did not see where you calibrated the transmitter.
Again need to see the logs from the test.
Mike
Mike
Couple of comments - I reloaded the firmware and did the accel, compass, radio calibrations. Couldn't get the aircraft to arm and then I forgot to re-calibrate the ESCs. After calibration, all four motors were spinning but when I throttled up to take-off, the aircraft pitched nose first. I power cycled the aircraft and could not arm it.
If you can discern anything meaningful from the logs I would appreciate anything you can tell me. Meanwhile, I will try to learn how to interpret them myself.
Brian
I really need the log off the copter. They are numbered from 1 to 500 and end with the .bin extension.
Mike
Brian
But I had an accident with my other Elev-8 quad - hit a stationary object and damaged the #4 motor and it's mount - also but a slight bend in the boom. I ordered replacement parts - the motor and mount arrived but I'm waiting on the boom.
In the meantime, I pulled a boom/motor assy from the APM ship and put it on my Hoverfly aircraft. I can still go ahead and install the firmware, do the configurations (accel, compass, radio, etc.) and wait until the boom arrives. But I can at least test to see if I can get all four motors running in Stabilize mode.
I'll report on what happens...
Brian