Hey folks,
like many of you I had issues with tilted horizon. Not finding the right answers and next to no technical background of the gimbal whatsoever on the internet I set to work. Here’s my story:
When my (used) P3P arrived, the gimbal protector was loose in the box and when I first started the Phantom up there was a major tilt, auto calibration only helped to a certain point and it was lost after every restart. The problem and the fix were quite easy and known to most people after a few minutes on Google: Opening the back cover of the roll axis and rotating the shaft using tape covered pliers to line up the flat perfectly and horizontally with the camera. This will also solve many “Gimbal motor overload” errors, just like the realignment of the yaw axis after an impact. The roll arm is connected to the motor via a magnetic lock. If you can’t turn the shaft without using a lot of force, try pulling the motor and the roll arm apart a little. After the adjustments make sure the lock sits nice and tight by pressing the two parts together. If you can now rotate the shaft against the roll arm without using a lot of force (this was the case for me and it kept misaligning during transport even with the gimbal protector) there is probably some grease from the bearing on the shaft inside the hole of the roll motor. Use rubbing alcohol to clean both parts of the locking assembly. The lock should be super tight now. If it isn’t you can still use glue, but I try to avoid that if possible.
Still, the main problem persisted: a tilted horizon, not constant (that could also easily be corrected for in the App, using C2 + Camera wheel or best by aligning the motor shaft correctly as described above) but changing, depending on the aircraft orientation.
Fixes that are commonly discussed and I have tried:
- Cold IMU-Calibration
- Gimbal calibration
- Compass Calibration
- Gimbal calibration
In that order with testing after the first gimbal calibration and the compass calibration. That didn’t change a thing, it even seemed a little worse after. I think that these things are at most part of the problem will rarely solve the problem alone. So I did some digging, reverse engineering and some tests and here’s what I found out:
There are exactly three sets of sensors that are used for gimbal positioning: The aircraft’s IMU including the compass, a gyro in the camera itself (camera gyro) and rotary positions sensors on the gimbal motor shafts (shaft sensors) which are potentiometers or in case of the yaw axis a magnetic rotary position sensor (Melexis MLX90316 BCG combined with a washer-shaped magnet on the motor shaft, next to the sensor, not above as it is supposed to be according to the datasheet). As for the gyro in the camera, I’m sure that it is one, however even after hours of searching I couldn’t find the product name of the sensor (see the image, if some knows the name please let me know).
I found that there are two control mechanisms for the gimbal which I will call a short-term one and a long-term one.
The short-term control corrects the camera orientation immediately to keep the camera pointed in the desired direction. The corresponding gyroscope is on the back of the camera sensor. TEST (well, a way to find out): If the aircraft or main gimbal control board are moved while tilt motor control board is not connected to the shaft and not being tilted, the short-term correction still occurs. If neither the potentiometer position nor the orientation of the board (theoretically a sensor on there is possible) are used, there must be a sensor in the camera board. A look inside proves that (see the images). Although the abbreviation MPU is generally used for “microprocessor unit” it is also used for “motion processing units” by InvenSense/TDK that are commonly used in these kinds of application. Also, the mounting with no components near it points in that direction which is probably done to avoid interference with other components.
The long-term control evaluates the orientation of the camera, determined only through the shaft sensors, relative to the aircraft IMU orientation. In this highly smoothed/dampened process the IMU orientation is regarded as a true value. From this, assuming the main gimbal control board, providing the connection to the aircraft via the silicone dampeners, is on average level, the corresponding correct positions of the axes (shaft sensors) are calculated. Deviations are corrected. This is probably done because the camera gyro is not super precise and stable over a long period of time. Assuming that it will drift over time makes it necessary to perform these corrections. TEST: If you tilt the main gimbal controller with the aircraft staying in place, you see the camera slowly tilt the same way. Bending the landing gear a little to turn the compass will make the camera slowly yaw in the same direction. Even moving a magnet about 30 cm away from the compass will only affect the camera yaw, not the roll or pitch.
Knowing the basics, the causes of problems based on the physical setup of the Phantom can be derived:
First, a small thing: Depending on how far up or down the roll (tilt) motor board is positioned, there can be a small gap between the flat of the motor shaft and the flat in the potentiometer. The center position of the camera is determined during startup using this potentiometer. If there is a slight misalignment due to the play in the potentiometer, the camera can be tilted. It can also cause slight tilting from one side to the other the entire time the gimbal is turned on. This can be easily fixed by placing a piece of scotch tape, that is cut to the correct size perfectly, on the flat of the shaft. The board itself is also loose but it shouldn’t move too much during normal operation as the ribbon cable on the side usually pulls it into one position.
The compass has generally no impact on the camera tilt angle as it is only responsible for yaw as I described above. However, those tests were done with a correct calibration and after the aircraft was started up. If the compass is somehow misaligned with the aircraft from the beginning, that can cause problems similar to the one I’ll describe next.
Let’s get to the bigger influences: The axes need to be physically aligned to be accurately parallel to the ones of the aircraft. If this is not the case it will cause false positioning of some or even all axes, with tilt being the most undesirable one. This comes from that long-term control I described. Let’s consider the tilt: Assuming the actual yaw angle of the gimbal was rotated to the right 90 degrees relative to the shaft sensor zero position and by that also to the aircraft’s IMU, rolling the aircraft left, say 30 degrees, will first be counteracted correctly by the short-term control pitching 30 degrees down. But then the aircraft knows that in its current position there should be a 30-degree roll and no pitch, so it will slowly force the camera to that position. The horizon is now 30 degrees tilted. Of course, the misalignment won’t be that big, so the tilt will be much smaller. I have conducted tests misaligning the yaw axis relative to the motor shaft and the effect can be seen very well. The influence if the yaw axis misalignment is the strongest, since the other two axes depend on it.
The extent of the tilting problem on a Phantom is therefore mainly directly proportional to the misalignment of the axes, especially the yaw axis. The quality of the alignment straight from the factory is statistically distributed so there are many people with very slight tilts, most of whom will never notice it, and there are people, like many of you reading these lines, who do notice it and might have a major tilt. Also, any hard impacts on the gimbal such as a crash or transportation without gimbal guard will enhance the problem.
The alignment: The roll axis alignment is already covered in the beginning of the post and should be done thoroughly. The yaw axis especially needs to be aligned very well. A first tell of that not being the case is the camera looking to the side and not straight forward. The yaw axis is held in place by a hex set screw that is sitting on the flat of the motor shaft. First you should make sure that this is actually the case and there is no misalignment by just loosening the set screw, moving the shaft relative to the yaw arm a little bit and retightening it. A quick way of making small adjustments is using thin wire and placing it between the screw and the shaft on one side of the screw. The set screw should be fastened as tight as it was before. I found that using copper wire doesn’t allow that because it gets deformed quickly. In that case it is advisable to use Loctite or a similar product on the screw to make sure it won’t come loose.
The automatic gimbal calibration only seems to have an effect on the tilt and only within a certain range. Smaller tilt misalignments can be corrected and actually seem to be saved permanently while large misalignments are lost after restart like it was the case for me initially. It won’t correct the yaw misalignment of gimbal and aircraft that I described above. If you adjust your roll you should definitely do a gimbal calibration afterwards. I would also recommend doing one after any realignments since it doesn’t seem to make anything worse and there can be some influences by one alignment to another one.
To Summarize:
The reason for a changing tilted horizon is a misalignment of the gimbals axes and the aircraft.
The Fix: Aligning all systems correctly, in this order:
IMU-Calibration: This is most likely not required, just check the sensor state on a level surface. If the x, y and z values of the gyroscope and acceleration are below approximately 0,03 the IMU should be just fine.
Compass-Calibration: Just do one.
Align the roll axis (aircraft off, of course).
Do a gimbal auto calibration, power off, power on, check the result.
If there is some camera tilting happening when you pitch the aircraft forwards or backwards and hold it in that position, align the yaw axis.
Do a gimbal auto calibration, power off, power on, check the result. Repeat if needed.
This post was obviously inspired by having problems with tilted horizon but it also wouldn’t have happened with the correct starting point which was this post:
Gimbal horizon roll problem [SOLVED BY NOT IMU CAL]
I have also posted most of this post over there.
I think it would be great for the community if someone could transfer the information from this post to the Phantom 4. I think the system on the P4 will be quite similar, but it should be tested first.
Best regards
Henrik
like many of you I had issues with tilted horizon. Not finding the right answers and next to no technical background of the gimbal whatsoever on the internet I set to work. Here’s my story:
When my (used) P3P arrived, the gimbal protector was loose in the box and when I first started the Phantom up there was a major tilt, auto calibration only helped to a certain point and it was lost after every restart. The problem and the fix were quite easy and known to most people after a few minutes on Google: Opening the back cover of the roll axis and rotating the shaft using tape covered pliers to line up the flat perfectly and horizontally with the camera. This will also solve many “Gimbal motor overload” errors, just like the realignment of the yaw axis after an impact. The roll arm is connected to the motor via a magnetic lock. If you can’t turn the shaft without using a lot of force, try pulling the motor and the roll arm apart a little. After the adjustments make sure the lock sits nice and tight by pressing the two parts together. If you can now rotate the shaft against the roll arm without using a lot of force (this was the case for me and it kept misaligning during transport even with the gimbal protector) there is probably some grease from the bearing on the shaft inside the hole of the roll motor. Use rubbing alcohol to clean both parts of the locking assembly. The lock should be super tight now. If it isn’t you can still use glue, but I try to avoid that if possible.
Still, the main problem persisted: a tilted horizon, not constant (that could also easily be corrected for in the App, using C2 + Camera wheel or best by aligning the motor shaft correctly as described above) but changing, depending on the aircraft orientation.
Fixes that are commonly discussed and I have tried:
- Cold IMU-Calibration
- Gimbal calibration
- Compass Calibration
- Gimbal calibration
In that order with testing after the first gimbal calibration and the compass calibration. That didn’t change a thing, it even seemed a little worse after. I think that these things are at most part of the problem will rarely solve the problem alone. So I did some digging, reverse engineering and some tests and here’s what I found out:
There are exactly three sets of sensors that are used for gimbal positioning: The aircraft’s IMU including the compass, a gyro in the camera itself (camera gyro) and rotary positions sensors on the gimbal motor shafts (shaft sensors) which are potentiometers or in case of the yaw axis a magnetic rotary position sensor (Melexis MLX90316 BCG combined with a washer-shaped magnet on the motor shaft, next to the sensor, not above as it is supposed to be according to the datasheet). As for the gyro in the camera, I’m sure that it is one, however even after hours of searching I couldn’t find the product name of the sensor (see the image, if some knows the name please let me know).
I found that there are two control mechanisms for the gimbal which I will call a short-term one and a long-term one.
The short-term control corrects the camera orientation immediately to keep the camera pointed in the desired direction. The corresponding gyroscope is on the back of the camera sensor. TEST (well, a way to find out): If the aircraft or main gimbal control board are moved while tilt motor control board is not connected to the shaft and not being tilted, the short-term correction still occurs. If neither the potentiometer position nor the orientation of the board (theoretically a sensor on there is possible) are used, there must be a sensor in the camera board. A look inside proves that (see the images). Although the abbreviation MPU is generally used for “microprocessor unit” it is also used for “motion processing units” by InvenSense/TDK that are commonly used in these kinds of application. Also, the mounting with no components near it points in that direction which is probably done to avoid interference with other components.
The long-term control evaluates the orientation of the camera, determined only through the shaft sensors, relative to the aircraft IMU orientation. In this highly smoothed/dampened process the IMU orientation is regarded as a true value. From this, assuming the main gimbal control board, providing the connection to the aircraft via the silicone dampeners, is on average level, the corresponding correct positions of the axes (shaft sensors) are calculated. Deviations are corrected. This is probably done because the camera gyro is not super precise and stable over a long period of time. Assuming that it will drift over time makes it necessary to perform these corrections. TEST: If you tilt the main gimbal controller with the aircraft staying in place, you see the camera slowly tilt the same way. Bending the landing gear a little to turn the compass will make the camera slowly yaw in the same direction. Even moving a magnet about 30 cm away from the compass will only affect the camera yaw, not the roll or pitch.
Knowing the basics, the causes of problems based on the physical setup of the Phantom can be derived:
First, a small thing: Depending on how far up or down the roll (tilt) motor board is positioned, there can be a small gap between the flat of the motor shaft and the flat in the potentiometer. The center position of the camera is determined during startup using this potentiometer. If there is a slight misalignment due to the play in the potentiometer, the camera can be tilted. It can also cause slight tilting from one side to the other the entire time the gimbal is turned on. This can be easily fixed by placing a piece of scotch tape, that is cut to the correct size perfectly, on the flat of the shaft. The board itself is also loose but it shouldn’t move too much during normal operation as the ribbon cable on the side usually pulls it into one position.
The compass has generally no impact on the camera tilt angle as it is only responsible for yaw as I described above. However, those tests were done with a correct calibration and after the aircraft was started up. If the compass is somehow misaligned with the aircraft from the beginning, that can cause problems similar to the one I’ll describe next.
Let’s get to the bigger influences: The axes need to be physically aligned to be accurately parallel to the ones of the aircraft. If this is not the case it will cause false positioning of some or even all axes, with tilt being the most undesirable one. This comes from that long-term control I described. Let’s consider the tilt: Assuming the actual yaw angle of the gimbal was rotated to the right 90 degrees relative to the shaft sensor zero position and by that also to the aircraft’s IMU, rolling the aircraft left, say 30 degrees, will first be counteracted correctly by the short-term control pitching 30 degrees down. But then the aircraft knows that in its current position there should be a 30-degree roll and no pitch, so it will slowly force the camera to that position. The horizon is now 30 degrees tilted. Of course, the misalignment won’t be that big, so the tilt will be much smaller. I have conducted tests misaligning the yaw axis relative to the motor shaft and the effect can be seen very well. The influence if the yaw axis misalignment is the strongest, since the other two axes depend on it.
The extent of the tilting problem on a Phantom is therefore mainly directly proportional to the misalignment of the axes, especially the yaw axis. The quality of the alignment straight from the factory is statistically distributed so there are many people with very slight tilts, most of whom will never notice it, and there are people, like many of you reading these lines, who do notice it and might have a major tilt. Also, any hard impacts on the gimbal such as a crash or transportation without gimbal guard will enhance the problem.
The alignment: The roll axis alignment is already covered in the beginning of the post and should be done thoroughly. The yaw axis especially needs to be aligned very well. A first tell of that not being the case is the camera looking to the side and not straight forward. The yaw axis is held in place by a hex set screw that is sitting on the flat of the motor shaft. First you should make sure that this is actually the case and there is no misalignment by just loosening the set screw, moving the shaft relative to the yaw arm a little bit and retightening it. A quick way of making small adjustments is using thin wire and placing it between the screw and the shaft on one side of the screw. The set screw should be fastened as tight as it was before. I found that using copper wire doesn’t allow that because it gets deformed quickly. In that case it is advisable to use Loctite or a similar product on the screw to make sure it won’t come loose.
The automatic gimbal calibration only seems to have an effect on the tilt and only within a certain range. Smaller tilt misalignments can be corrected and actually seem to be saved permanently while large misalignments are lost after restart like it was the case for me initially. It won’t correct the yaw misalignment of gimbal and aircraft that I described above. If you adjust your roll you should definitely do a gimbal calibration afterwards. I would also recommend doing one after any realignments since it doesn’t seem to make anything worse and there can be some influences by one alignment to another one.
To Summarize:
The reason for a changing tilted horizon is a misalignment of the gimbals axes and the aircraft.
The Fix: Aligning all systems correctly, in this order:
IMU-Calibration: This is most likely not required, just check the sensor state on a level surface. If the x, y and z values of the gyroscope and acceleration are below approximately 0,03 the IMU should be just fine.
Compass-Calibration: Just do one.
Align the roll axis (aircraft off, of course).
Do a gimbal auto calibration, power off, power on, check the result.
If there is some camera tilting happening when you pitch the aircraft forwards or backwards and hold it in that position, align the yaw axis.
Do a gimbal auto calibration, power off, power on, check the result. Repeat if needed.
This post was obviously inspired by having problems with tilted horizon but it also wouldn’t have happened with the correct starting point which was this post:
Gimbal horizon roll problem [SOLVED BY NOT IMU CAL]
I have also posted most of this post over there.
I think it would be great for the community if someone could transfer the information from this post to the Phantom 4. I think the system on the P4 will be quite similar, but it should be tested first.
Best regards
Henrik