I added a gimbal, larger battery, FPV TX and LED lights to Gerry (my daughter’s name for the quad). But what happens when you add too many farkles to your quadcopter build?
When flying around on a perfectly calm day it was OK, but still lost altitude on runs and would occasionally stall and twitch. But anything more than a breeze and Gerry was all over the place and a constant assault of wind would actually cause it lose so much altitude that it would crash.
Why is this so?
This picture from the log tells an interesting story – at least it is interesting to me.
Red line is Throttle In (what I’m doing). Green line is Throttle Out (what the flight controller sends to the motors).
Blue line is altitude (graphed on the right). Time (min) can be seen across the top.
The flight controller has a value (THR_MID) that adjusts the throttle so that the middle on the controller provides enough power to hover. For example if the quad is heavy then it might take 60% of throttle to actually maintain a hover and this allows the user to still position the throttle in the mid point. These can be graphed showing the Throttle In (from the transmitter) and Throttle Out (how much power the flight controller is sending to the motors).
The problem is that if the THR_MID is way off then switching between modes that automatically adjust (Loiter, Pos. Hold, Alt. Hold) and ones that don’t (Stabilize) can cause a sudden change in the throttle being applied.
At the 1 minute mark on the graph we can see the throttle is between 40-60% in Pos Hold mode and the quad should be holding altitude. But on this day it was windy and we can see as the altitude goes up and down and the throttle is bouncing off the 100% mark. Clearly it is struggling to keep the quad at the right altitude.
Just before the 3 minute mark I switched to stabilize, the Throttle Out drops to the same value as Throttle In and the quad starts to fall…FAST!
I immediately give it full throttle but it’s not enough to stop it hitting the deck in what can best be described as a ‘hard landing’.
I tried again and the quad was really struggling to maintain altitude – you can see Throttle Out bouncing off 100% repeatedly. Despite the APM putting out near 100% the 5 min mark it continues to lose altitude and my desperate application of full throttle does nothing. It hits the deck again and I decide it’s time to go home.
If you were to place a ruler on the green throttle out line and draw a straight line that best fit the data; you will see that it has an upward slope. The reason for this is that the battery voltage is dropping as the battery runs down. Since motor speed is a function of voltage fewer volts = less lift. Basically the quad is under powered for the weight it is carrying.
I tried using a smaller battery to cut weight but it still lost altitude, was still twitchy (where it would periodically stop to correct itself) and near the end of battery life it started going up and down in a very odd fashion.
Frankly it felt possessed and I started to wonder about exorcism as a real option! I later figured out this was because it was starting to start the auto land because the battery was low, but then as it dropped the voltage would climb and back up it would go.
At home more googling and chatting with friends on Quadcopters (yes, I now consider many of these folks friends) and a possible solution emerged.
The PILOT_ACCEL_Z value is used to tell the APM how fast it can climb. By bringing this down from 250 cm/s to 50 cm/s it should mean that the APM flight controller won’t ask for more than the quad can give and that should stop it getting confused. I also properly calibrated the battery so that the auto land didn’t kick in too early, as it was consistently under reading the actual voltage by about 1v.
I took Gerry out for a fly and…what a difference! Smooooooth flying. None of the crazy jerkiness that it had before and almost no altitude loss. It did eventually start to lose altitude but it was now controllable and could be recognized for what is was – a battery that was getting low. Sure enough each time the altitude loss started to occur the low battery beeper would go off. I ran through three batteries and walked away with a smile on my face.
So, there we have it. I now have a quad that flies beautifully and is no longer possessed. With the smaller batteries flight times are short but the future plan is to upgrade the battery to a 4S (which can output up to 16.8v) which should mean the quad has enough power that I can start to increase the PILOT_ACCEL_Z rating to give it a little more zip.
*** Pro Tip ***
If you want to know what value THR_MID should be set to, fly in stability mode for a couple of minutes, land and then check the value being displayed in TRIM_THROTTLE. If it is over 700 you have a seriously underpowered copter. Under 300 and you are massively overpowered.
Adjusting your THR_MID value to the same as TRIM_THROTTLE will make transitions between manual and automatic (atl. hold, pos. hold etc.) modes much less troublesome.