Shop OBEX P1 Docs P2 Docs Learn Events
Building an Elev-8 Quadcopter Controlled With An Ardupilot Mega Autopilot — Parallax Forums

Building an Elev-8 Quadcopter Controlled With An Ardupilot Mega Autopilot

GlassKNeesGlassKNees Posts: 181
edited 2015-06-23 18:18 in Robotics
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:

Elev-8%20Hoverfly_zpspkpzrsla.png

While the APM code expects this:

APM%20Propeller%20Configuration_zpsnsu4dkz6.jpg

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:

Apm%20Autopilot_zpsmzyn9tyn.jpg

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:

Wired%20Up_zpsc2a8mawk.jpg

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.
«1

Comments

  • ValeTValeT Posts: 308
    edited 2015-06-22 13:29
    This is a very interesting project. Please keep us up to date on your progress!

    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!
  • GlassKNeesGlassKNees Posts: 181
    edited 2015-06-23 18:18
    I'm still waiting for the adapter so I can upload firmware into the airside telemetry radio. In the meantime, I've uploaded the firmware into the APM, gone through the mandatory H/W configuration, including the radio and flight modes. The GPS seems to be working, but I'm still not able to arm yet. As soon as I fix this, I should be ready to install the props and take it out for a maiden flight.

    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
  • Latest status:
    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!
  • Success! I discovered last night that I can arm... I have to move the throttle stick to the left, not right, as shown on YouTube videos. The motors spin as soon as I arm but that feature is controlled by a parameter that I can a change in Mission Planner... I hope to fly today or tomorrow
  • Success! I discovered last night that I can arm... I have to move the throttle stick to the left, not right, as shown on YouTube videos. The motors spin as soon as I arm but that feature is controlled by a parameter that I can a change in Mission Planner... I hope to fly today or tomorrow

    Cool beans! That is good news.
  • Well, the learning process continues.... I took my Elev-8 out to my driveway to see if I could lift off and hover - try out the controls, etc. but I've got problems. As I advance the throttle to the point that it was ready to lift off, it yawed counterclockwise; I tried to correct but it did not respond. As I advanced the throttle further, it pitched nose over. It didn't lift off, so the forward props hit the pavement - nothing broke.
    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...
  • It wasn't responding, so you increased the throttle haha. We'd get along great. I've been there, and congrats on not breaking props! You mentioned that you were unsure of the arming sequence, but it is very clear in the GCS. I recommend getting to know the GCS a little better :) It takes a lot of time, reading and scrolling.
    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 :) 





  • As I advance the throttle to the point that it was ready to lift off, it yawed counterclockwise; I tried to correct but it did not respond. As I advanced the throttle further, it pitched nose over. While I can't speak to any possible cause for this on the flight controller front, very similar symptoms are usually seen if the motor spin configuration is incorrect. It sounds like the mission planner had a tool you used to verify they were correct - but worth a mention.
    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.
  • GlassKNeesGlassKNees Posts: 181
    edited 2015-07-22 12:36
    I verified proper spin direction using both the Motor Test function in M.P. As well as when I started to advance the throttle. The aircraft was in Acro mode, so I'm not sure if possible current interference with the magnetometer was a factor. I'm wondering if not having enough vibration dampening might be a problem..

    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..
  • While a lack of vibration damping can degrade flight performance (causing oscillation, slow response time, and random jerks, among other things),  - I'm skeptical that it would cause as drastic movement as you describe, but never say never.
  • I'm just shooting in the dark here. Another thing I'm wondering about is whether or not I should have cut/removed the power/gnd wires going from the receiver channels to the APM. A guy in a YouTube video recommended cutting them save for one channel in order to supply power to the receiver. But I noticed another video produced by "Painless360" showed all three wired intact for all receiver channels.
    Any ideas on whether or not to cut those wires or leave them?
  • I have been flying APM or Pixhawk for over a year now with over 500 flights under the belt.
    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


  • Mike, I have two questions:
    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...
  • Latest efforts: one motor fails to spin...
    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.
  • GlassKNeesGlassKNees Posts: 181
    edited 2015-07-25 18:48
    I have convinced myself, base on all the troubleshooting I've done and the results I've observed, that my wiring is okay. All four motors pass the Motor Test in Mission Planner, and when I calibrate the ESCs all four motors spin fine on command from the transmitter. The only common link between motors #1 and #3 is the APM module itself. I suspect that either there is a problem with the firmware (not likely), some sort of configuration issue (more likely), or a hardware issue with the APM module itself. 
    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

  • PublisonPublison Posts: 12,366
    edited 2015-07-25 18:57
    I have convinced myself, base on all the troubleshooting I've done and the results I've observed, that my wiring is okay. All four motors pass the Motor Test in Mission Planner, and when I calibrate the ESCs all four motors spin fine on command from the transmitter. The only common link between motors #1 and #3 is the APM module itself. I suspect that either there is a problem with the firmware (not likely), some sort of configuration issue (more likely), or a hardware issue with the APM module itself. 
    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.
  • Oops, sorry about that. I'll try to upload elsewhere. I've finished putting it together - added additional vibration dampening and relocated the receiver to the left side in order to move the receiver channel wires away from the magnetometer/GPS antenna.
  • GlassKNeesGlassKNees Posts: 181
    edited 2015-07-25 20:50
    Here's a photo of the internal wiring - I shortened the leads of the APM Power Module where they connect to the power harness and I also shortened the leads of the harness itself.
    Internal%20Wiring_zpsmqzp8o7p.jpg

    Here is a top of of the aircraft:
    Put%20Back%20Together_zpsviozuqec.jpg

    Finally, here's a side view showing the vibration dampeners:
    Vibration%20Dampening_zpsdvg4fygx.jpg
  • I just completed reflashing the firmware and going through the calibrations including the ESCs. After power cycling the aircraft and establishing a telemetry link with Mission Planner, I armed and tried to throttle up the motors in Stabilize mode.
    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.
  • GlassKNeesGlassKNees Posts: 181
    edited 2015-07-27 01:11
    Here is a pic of my two machines - Hoverfly on the left and APM on the right. THe Hoverfly machine is flight worthy and the APM machine is awaiting a new APM module from DR3.
    Both%20Quads%207-26-2015_zpsivrbdphg.jpg
  • Going to need to see the logs from your test.  This will tell me what's going on.  It will also tell me what your setup looks like.
    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


  • There are a lot of files and I haven't been able to discern anything meaningful from them. So, I'm going to start over. I'm going to purge the existing logs, reload the firmware, go though the calibrations and document the settings and capture the logs and send them to you.
  • The logs on the copter have a .bin extension and will have a date/time if you have a GPS otherwise they will have a Linux date/time.  The can be download by picking the DataFlash Logs on the HUD screen of Mission Planner.  Pick the download dataflash logs via Mavlink.
    Mike
       
  • I drilled down into the Mission Planner folder and found a logs sub folder. I copied them from my other laptop - had a devil of a time getting the telemetry link to work but goty a connection. I've zipped the log folder (using Peazip) and attached them.
    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
  • The TLogs are only useful if you have mission planner attached to the copter when you fly.  IE you have a radio attached just for Mavlink data.
    I really need the log off the copter.  They are numbered from 1 to 500 and end with the .bin extension.


    Mike


  • Okay. I'll search for them... Thanks for your patience!
  • The flight logs are on the APM board and can be downloaded from the board by using a USB cable and connecting it to Mission Planner.
  • I'm downloading them now. Sorry for the delay - had some errands to do.... Will send them soon.
  • Here are the log files from the copter...
    Brian
  • I purchased an APM module from 3DR and it arrived this morning. Based on my experiences, I'm suspicious that the APM clone I bought is defective, and I want to eliminate that variable by trying one that I have confidence is working - at least 3DR has tested it...
    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
Sign In or Register to comment.