Please select Into the mobile phone version | Continue to access the computer ver.
Gimbal horizon roll problem [SOLVED BY NOT IMU CAL]
Uploading and Loding Picture ...(0/1)
o(^-^)o
oleg.king2
New

Russia
Offline

Hi, DJI people and forum folks!

My friend gave P3 to me, with problem that it changes horizon level when moving forward or backward. P3 was fallen and broke a leg of gimbal, so my friend changed it in some local service. As I can see, new leg have quality that good enough. Everything except leveling problem works fine.

We have updated firmware to new, made IMU calibration or leveled surface, as well as gimbal calibration, I have double checked gimbal assembly, everything was fine.

Problem was not disappeared.
I see that:
1. Camera positioned slightly to left. It is not new leg issue because line of bevel edge and side of leg oriantated same way.
2.  If I tilt copter forward or backward, gimbal works as intended, but if I will hold that position, it will slightly tilt to left or right.  We made a video where you can see this effect:
http://www.youtube.com/watch?v=pkAqYlDm34U

Accelerometer values looks like good and changes like it should: mod = 1.00, sometimes 1.01, axis values also works fine, for example, when experimenting Y values was from 0.00 to 0.02 - nothing that can tell gimbal to tilt right or left.

Is this problem is well-known or not? How to solve this if yes?
Maybe I should do more calibrations or something like this?
In which cases gombal can decide to tilt camera slowly? Maybe this will help to guesss what is happening?


Can you do me advice what can I do to get it working?

Thank you in advance!

p.s. I have enough experience in electronics, some equipment like oscilloscope and soldering station and so on, so I can change some chips on boards if it will be needed or program firmware into MCUs or whatever I should do to get it working.

2016-3-17
Use props
oleg.king2
New

Russia
Offline

OK, with no answer from anybody, I have tested and tried a few things with Phantom 3. And I think I know how it works and how make right horizon level. At least, reading of this message will get you closer to right results when using Phantom 3. Sorry for my english, but I will try to describe what is going on there.

How it works
First (upper) leg connected to upper gimbal motor. On motor's axle we can find a little washer-shaped magnet, glued to it. Near this on PCB we can find MLX90316 rotary sensor, connected to CPU with SPI.
So, CPU gives commands to motor to rotate, see rotary sensor values and it is how it can know it is centered or not (or get upper leg position).
Sure, no one can place magnet exactly where it should be, in its exact position up to microns.
We cannot be sure that leg was made accurately enough to be absolutely in one direction with motor's axle, it gives to us another place of error.
I think DJI makes some calibration of gimbal main board and upper motor assembly, more or less accurately, but this calibration can be overwritten by unknown reason,  making camera not centered in real life (but gimbal will think it is centered).
So, if your camera points slightly to right or to left, you will have problem with this sensor and with horizon tilt too.

Why it is a problem
When gimbal tries to compensate copter movements, it sends command to motors. For example, if it sees that we tilted copter to its back, it sends command to motor to compensate this, i.e. to move camera down, so it will see on same direction as it was before tilting.

But what if we have leg not centered (in reality, not that gimbal thinks about this)?
Gimbal sees (by its accelerometer) that only axis X was changed, so it should compensate X axis only, changing position of one motor only. But as we have upper leg not centered, tilting copter, we moved camera not in one axis only, but in Y and Z too. Gimbal will try to compensate this by moving corresponding leg, and this will move camera in other coordinates too, but with other error values, because it has different place in this geometric system. So, our movement will be compensated by gimbal wrong way, and we will get tilted horizon (in reality, gimbal sees this change and tries to sloooowly compensate horizon level - in wrong way too).
.
What I did
To approve my thoughts that wrong horizontal centering rises roll problems, I descrewed upper leg a little, and then placed a piece of nail between motor's axle and one side of hex bolt. This made upper leg slightly rotated, and I got my camera looking forward with much less angle that is was before. I tested copter again, and horizon problem was almost disappeared!

I tested this again, increasing centering error (placing nail to other side), and horizon problem increased too!

You can make one of three things to correct your problem:
1. Center your camera manually by placing something (maybe a drill bit as it can be bought by calibrated thinkness?) between hex bold and motor axle. Be sure you placing it to one side of hex bolt only.
2. Center your camera by re-glueing washer magnet (not recommended, you will broke it. Do it only if you have spare magnet).
3. Ask DJI to finally add manual left-right compensation and respect it in gimbal calibration process, like it was done for roll compensation. I.e. we make camera to look straight forward by pressing +- buttons in DJI pilot app, then it will know that magnet centered position really is -1.3 degrees from real center of camera assembly, and will finally respect this. This will save many people from destroying everything around them, I think.

2016-3-20
Use props
mcphipps900
lvl.4

Offline

Very good investigation. This is one of the great things about forums like this.
Doesn't matter where you come from, people share their knowledge for better of all here.
Thanks.
2016-3-20
Use props
oleg.king2
New

Russia
Offline

Thank you for kind words.

Maybe. DJI people will comment this?
Will DJI make this modification to P3 firmware?
2016-3-22
Use props
fansdc5014de
lvl.1
Flight distance : 8235 ft
Spain
Offline

Many thanks for your explanation oleg, is interesting to know how the things work, with your information I investigate a little more about this magnetic sensor chip and I found that this have some bytes of eeprom memory inside for configuring the center point, so I think that in the factory they programing this chip, I discovered too, that exist a specific programer and software for doing it but is expensive about 1300$ only the programmer call Melexis Programming Unit PTC-04, maybe some people with more skills in programing can find a cheap way to do that but I didn´t found in the technicall description of tne chip how the programming process work.
But I agree with you the simple way to solve that is that DJI make some tool via sofware in order to correct this desviation easily.
2017-3-11
Use props
FlyingCircles
lvl.4
Flight distance : 76309 ft
United States
Offline

oleg.king2 Posted at 2016-3-20 03:45
OK, with no answer from anybody, I have tested and tried a few things with Phantom 3. And I think I know how it works and how make right horizon level. At least, reading of this message will get you closer to right results when using Phantom 3. Sorry for my english, but I will try to describe what is going on there.

How it works

Can you add pictures of how you placed nail/drill bit?
2017-3-13
Use props
FlyingCircles
lvl.4
Flight distance : 76309 ft
United States
Offline

Want to bump this post up to see if anyone has explored this fix
2017-7-17
Use props
fans602126b8
lvl.1
Flight distance : 62717 ft
Norway
Offline

I wondering......Have you tried "gimbal roll adjustment" in the DJI go app.....?
2017-7-18
Use props
HenrikX
lvl.1

Germany
Offline

  
Tilted Horizon – the technical background and profound solution

  
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 image). 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. Thank you very much, Oleg.

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
  
  

Camera board

Camera board
2018-5-30
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules