i actually continue to have serious issues getting APM to work in e.g. Loiter.
Here, you can see a video with the usual behaviour: http://youtu.be/3HDaQzrht9w
Out of 20 times i tried, loiter worked two times. - In between one time it worked and the next one, i did nothing than to change the battery.
I always waited to have GPS lock, always lifted off in stabilize and then switched over to loiter. Also, i use Auto-Inclination and the latest software as of yesterday.
It's really frustrating to see APM not working as it should - it has cost me by now by far more money and time it would have to buy a WKM with 50 waypoints even.
I have also constructed a special copter due to it crashing so often to use crash bars - see picture below - these are only 1/4 of the aluminum bars which i have destroyed up to now and 1/2 of the props which i have shredded.
Is it really not possible to get this thing flying in loiter ?
If there is somebody here to help with this, i would highly appreciate it.
- If i need to pull logs or settings from the craft, i would be very happy to do so.
Can somebody please help with this one ?
Attached are the logs - the one where it crashed and also for comparison the logs with the only time it worked.
Can somebody please please help ?
I'm just going on a limb here, but maybe, just maybe it has nothing to do with code or settings and everything to do with your wiring, choice of components, all up weight, and the final kicker, your inputs at the radio control.
I say this because watching the video, it takes a lot to get it in the air, it's not dead stable and has the wobble long before you go into loiter, it drops like a rock when you switch modes (most likely your throttle stick input is not centered).
If the motors are at near full throttle to lift, then they have no headroom to stabilize. No amount of tuning can fix this. Just looking at the few moments before you switch modes tells me it is not flying with stability or headroom. Either the tuning is way off, or the common sense part is telling me the additions to the arms add intertia, coupled with the fact the motors cannot provide headroom thrust to counteract the forces at play. Again, no tuning can fix this, you are at the physical limits of the aircraft itself.
APM 2.0 has a great altimeter so no reason to drop in altitude other than input from the radio or the motors/props cannot create enough thrust to counter the overall weight. When in any of the modes the throttle stick must be dead center or else it either flies up or down.
When you slap the ground and then it either tries to correct or you provided inputs-all hell breaks loose again because the motors/props do not have enough headroom to stabilize.
I don't want to provide problems and no answers so here is my best guess.
#1 drop some weight and get rid of the arm extensions that actually cause more problems than they solve. You added weight and intertia-both bad for tuning the controller.
#2 Try the black 12x4.5 props. I know they aren't recommended for your combo but I had a similiar situation with a heavy battery and it worked even though it's not recommended. This should give you higher thrust and more headroom
#3Test altitude hold first, double check to make sure the throttle is centered at the TX.
I just used the software here to visualize the log files you posted. http://diydrones.com/forum/topics/new-software-for-visualizing-log-...
What is painfully obvious between the sucess and the fail logs is the amount of roll that happens when you switch to loiter. Right after you switch to loiter, there is huge roll/pitch changes in the log and you lost tons of altitude during those events which I expect, since the motors are trying to correct and if near max thrust is required to stay in the air-you have no headroom resulting in loss of altitude.
In the success file, there are not huge swings and thus some loss of altitude, but not enough to crash.
Again, my thoughts are you are too heavy, you added even more mass with the arm extensions and nothing short of bigger props and maybe bigger motors is going to help. Smaller battery is also an option, but you need a high C rating in order to maintain enough amperage to supply the motors.
Looking at your picture, you have tons of extra weight from stuff that is not necessary. I know you think you are protecting the craft, but that extra weight is actually causing the crash, because you have a lack of thrust headroom. And sorry, I could not see your stick inputs duing the log file so you may not have changed the throttle and had it centered, but that just further supports my theory you are too heavy.
Just a guess from the pic, you have the 880kv motors? I could not see what battery you are using and the frame is aluminum, but it seems you have lots of extra bracing. the foam and extra zipties add drag and weight. Again, I think it's a combination of your frame, the props , maybe a large battery, and the extra bracing, foam and arm extensions causing you even more problems.
Please post what props and battery, maybe all up weight and we can compare. FYI, I fly with a really old (6-7 year old) LiPo 11.1 3S3P pack that is very heavy. I had similiar problems and bigger props solved it, along with as much weight reduction as possible. I fly the latest 3DR quad and Hexa frames, both with APM 2.0, stock settings and firmware, and that heavy battery and it flies fine. My battery is only rated at 8C but since it's 6600mah that equates to 52.8 Amps max draw.
thanks for your answer.
I try to answer again chronologically:
You write it takes a lot to get in the air: In fact, the craft lifts off at 30% throttle - so this can not really be it.
With regards to the centering of the throttle, you may be right, i have to check this.
The motors are far away from full throttle at lift off, there is plenty of headroom.
Just for information: The craft has ~ 1400 W of power @ 1,3 kg.
On your points:
#1: I think for weigth reasons, the arm extensions are not an issue at all - for inertia it may be an issue - but again - as you can see from the attached logs, the craft was happily flying before in loiter twice (again out of 20 times only 2 times it worked).
#2: My props are 9x4.5 on 1100 kV engines at 4S. The props mentioned by you are not made for the rotational speed and will shatter.
#3: I can run again a test at alt-hold. As mentioned above, with regards to centering, you may be right. When i fly in alt-hold, i actually have to push the throttle up a bit for maintaining the altitude vs. the normal stabilize mode (again, it lifts off at 30% throttle).
On the next text block: Again, the engines have plenty of headroom ! - The craft is for sure not too heavy to my understanding.
Do you have any other ideas or can this all be caused by throttle stick centering only ?
I have just checked again now: My RC setup showed maximum and minimum bars in the setup - is there an additional setting which requires the throttle to be centered ? - As far as i am aware, it's just moving all sticks to the min and max during calibration ? - Is there a center setting to be used in addition ?
Is there a center setting to be used in addition ?
No, I'm just saying in the loiter flight mode, there is still some level of input from the RC system (not completely auto) but the function is slightly different thn normal throttle. Throttle dead center is neutral (AKA maintain altitude) slightly higher stick is continue to raise altitude and lower than center is lower altitude. Just trying to make sure you weren't interacting. Being that the log player didn't show me your control inputs, I assume you were not interacting but as caution I am explaining how it works and how that could have contributed.
What is obvious from the logs, you are unstable in normal flight. This compounds when you go into loiter because the machine cannot maintain altitude when the motors begin to raise and lower trying to stabilize. This is in the logs so other can verify and voice their opinion.
Here's what is different between your machine and mine:
I use 850 or 880KV motors. I have used 11x4.7 and 12x4.5 props no problem
I use 3 cell batteries 11.1 volts
I use stock values for all PIDS
I use a 3DR quad or hexa frames
Both machines APM 2.0 flies perfect
My opinion as to what is wrong
I think higher KV motors like your 1100kv don't work well (To high RPMs and not enough torque for rapid RPM changes required Also, not enough lift)
11x4.7 should work but I think is not right with the motors and the one thing I do know from experimentation is bigger props work better, period. The facts stand, I cannot use 10 inch props even though they are recommended for the 850kv motors. I never get enough lift but 12 inch props fly fine with no issues even though they are not recommended. Motors do not overheat as people might imply, it just flies as expected.
I'm not trying to say it cannot be something else but there is a reason 3DR and other use the lower KV motors and that's what seems to work very well stock. You combo is not flying well. I also explained the why it is not flying well, the PIDS or tuning and your combo of motors, battery and props contributes or even causes this instability. From the logs, once your quad begins to tip over, it drops altitude like a rock. After that, you are completely out of control. The only reason you had success in the 2 flights is you never got caught in the tipping that makes it drop from the sky. Again, In the video, you can see the rocking or proof the PIDS and your combo of motors battery and props do not react fast enough and thus the bob that occurs. I fear that if you lower the gain in the PID values, you will get rid of the bob or oscillation, but then it's mushy and not enough feedback, thus you may still crash. Going higher values in PIDS should make the bob far worse, maybe causing a flip outright.
Maybe someone else who runs high KV motors can give you their PID settings, but I still fear you just have the wrong motors in my mind.
To see the bob, play back the log file via the link I gave. There are two "sticks" to the left of the image of th quad that show roll . The vertical bar in the center shows altitude. On the bad file, you switch to loiter and right after, it attempts to roll hard left and drops altitude like a rock as a result. Before that, there where massive swings in stabilize mode that looked like they were not control inputs, but rather the instability that I spoke of. In the good file, there are still bobs, but never as bad as the crash file. Again, the sensors are working and the APM is trying to correct the yaw but cannot keep up. The only options you have are to lower the PIDs or try other motors.
Sorry, I'm just trying to give you pointers. I know you are frustrated and for somebody to tell you that you have the wrong parts is even worse, but I am trying to help.
More info on loiter and again, how the rc control still affects it.
It's related to altitude hold http://code.google.com/p/arducopter/wiki/AC2_AltHoldMode
Editing your PIDS
I think I am seeing quick bob, meaning you should adjust Stabilize Roll P.
i try to answer again in chronological order:
I have done three interactions duing the video:
First: In stabilize, raising the throttle until it lifts off. Second: Switching flight mode to loiter Third: Raising throttle after the thing drops until it does not drop further
I have got some bigger props here and could fit them - e.g. 11x5.5 APC or these here: http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=... (11x4.7) - so i could do this test, BUT:
As i said, i have had two flights which emptied entirely two batteries - so the thing IS basically flying, but just most of the time, some autopilot interaction causes the craft to lean to one side and then crash.
If you think i should change the engines, the issues is that i have got some 900 kV engines here, but they are so powerful that the ESC would not be able to cope..
Is it enough to change the props in your opinion ? - Again, i do not believe that this is an issue with the physical setup - as said, i have undertaken two flights out of twenty where it worked.
I am wondering why the thing actually thinks it needs to lean to one side rather than anything else.
Is it not in the way that the actual loiter position gets taken from the GPS and should be held as position in the moment you switch over to loiter ? - Why is my craft most of the times leaning to one side and not staying where it should ? - Again, as i said, it worked two times out of twenty - and there it was pretty accurate even. It's just that most of the time it does not and just leans to one side and flies off ?!?
Again, let's go over the differences between what you use and what use.
You built your own frame.
(Assumption here), you built your own design of Power Distribution Board
You use higher KV motors
You may not have proper isolation distance between your high current wires/power distro, and the APM magnetometer.
You use stock ESC firmware where I use SimonK
2 flights out of 20 is not success. I think the combination of all the differences adds up, causes the lean and eventual control loss. I can see it in the logs provided, you are far from stability. Unfortunately, what I cannot see is your control inputs to compare the reactions VS your inputs. It's might be in the logs, but the quick tool I found doesn't seem to show me this.
First is that high current wiring is known to throw off the magnetometer. EMI RFI noise is a second problem from 4 ESCs. It's entirely possible the combination of wiring routing not inside the aluminum arms, placement of the APM above your power distro and power wires near the APM can contribute to lean. EMI fields reduce strength squared by distance. This means that even a minor change in distance has a huge reduction in EMI interference with the APM. 1/4 to 1/2 inch might be all it takes.
Next, the combination of High KV motors makes it highly possible the PIDS are on the edge of oscillation. This coupled with magnetometer error are the motors draw higher current could be the magic combo that causes your crash.
In other words, you say it flies fine, but the logs are telling me you are deep into oscillation and it doesn't take much to push it over the edge. It's kind of like balancing a plate on a long pole. As long as the lean doesn't get too far, it's all OK and correctable. Once you lean to far, you must accelerate really fast to get it back into balance. Your combination of motors may be that limit and thus all it takes is too much lean and there is no going back to "balance".
If the GPS loiter tries to correct, and that input is at the right moment when there was already lean, coupled with the fact as the motors speed up, they draw more current making the magnetometer thinks additional yaw happened, then you get extreme correction, altitude loss and crash.
In other words, it may not just be one thing that is the magic bullet fix. You may have to follow all suggestions, move your wiring inside the arms, move your APM higher or Power distro lower, move all heavy power wires, tune your PIDS and replace the motors, and maybe even change your frame.
What is clear is the APM is trying to work. It's not broken and this is not a code problem. What is happening is your airframe and components cannot correct fast enough.
Sorry, I'm not trying to bust on you but most of the really hard to fix problems like yours, people strayed from the tried and true 3DR design. Using your OWN PDB, frame, and different motors seems to be more than enough combination to cause this type of problem. Because it's a system, and any one change affects other parts, the combination of differences you have built adds up to not flying.
Sorry you're having so many troubles.
I had a look at your logs and a couple of things are trouble. The problems with alt hold are caused because you have a slightly over powered quad. So when you're engaging alt hold, your "throttle cruise" (the throttle required to keep your quad level) is quite low. Low enough that in fact, your throttle is immediately below the dead-band that the alt hold routine uses. So when you engage alt hold unfortunately you need to immediately move your throttle to the middle position.
The other bad thing is your sonar. I think you should disable it and/or check out the wiring because it's giving quite bad results. Probably best to check it using the CLI menu (use the Arduino Serial Monitor or the MissionPlanner's Terminal screen, then type "test", "sonar" and make sure it changes as you change the distance to the nearest object in the sonar's field of measurement).
By the way, when things start going wrong like that...switch it back to stabilize mode and retake manual control. Whenever I'm trying something new, I'm always ready to switch back to stabilize mode the moment anything starts going wrong. I have a lot less crashes this way.
Hi Randy !
Thanks for your suggestions. - So i will fix the craft tonight, disable the sonar and immediately pull up the throttle after switching to loiter - if this all does not help, i may try the bigger prop's as suggested by Vernon - my guess is however that this makes the thrust and power provided even worse.
Is there actually a special height, when the sonar switches off and uses baro only ? - Is the sonar required for loiter or does it just (if it works) make loiter better for the last 3-4 m ?
I'll keep you posted on the results !
It rains today - so i will only be able to try tomorrow.
Hello Randy and Vernon !
Many thanks for your help.
Having tested the sonar with the terminal before, it seemed to work - but for some reason it did now when being in the air. - So afterall, i have disabled it - and tada - the thing was flying - not extremely stable, but it was flying.
So, i think the issue has mainly been caused by the Sonar not working. - Thanks again to Randy for the diagnostics - and also the hint to pull up the throttle to middle immediately after switching mode.
Actually, the thing went like a rocket when pulling the throttle up. - In ~ 3 seconds, it was able to gain 60m - this is ~ 72 km/h vertical (if i read the data right) - pretty awesome.
Unfortunately, my 2x3,5 minute flights ended with the craft almost completely destroyed.
At the end of the second flight, i was bringing the craft down in loiter and it started shaking left and right during sinking pretty heavily but catched itself again. When it touched the ground, i think one motor turned its orientation on the frame stick and this started to rotate the craft (yaw) at ~ 5 rotations per second (1500 degrees/s) - i think this was a bit much and it crashed heavily and destroyed all props, one motor, one arm, my xbee, the sonar cable and the lipo balancer cable + some more stuff - but in general, i think it works now !
So - i am thinking now whether it is worth to continue with this tryout quad or whether to actually finish my bigger and more powerful quad, which i started constructing.. - I'll think about it a bit more.
Videos are to follow tomorrow, as they are 650 MB each and i better upload them with a faster connection tomorrow.
A big thanks to all the people which tried to help - again, Randy hit the right thing in the end.
I learned a lot and will now happily continue with arducopter - next aim will likely going to be getting the thing more stable..
I'll post a link to the videos tomorrow - crash at the end is pretty spectacular.