EN CN
Converting a 2-axis gimbal to 3-axis - yaw heading drift and pitch/roll oscillation
  • I had a working 2-axis gimbal which I've converted to a 3-axis by swapping the old 2-axis controller for a new 3-axis controller and adding in a yaw motor. Both controllers are 8-bit, the new 3-axis controller is from GLB. SimpleBGC GUI is v2.40 b8.

    I was previously able to control the camera pitch angle via a control knob on my TX and I've now added the ability to control the yaw angle via another control knob. Both are set to angle mode rather than speed mode.

    But I can't quite get the yaw control to do what I want - i.e. to point forwards unless adjusted otherwise by the control knob. It will sort of do this but not quite. For example - if I have the camera pointing forwards and I yaw the hexacopter to which the gimbal is attached then the camera will follow the hexacopter so that it is pointing "forwards". There appears to be a very slight delay, almost a smoothing of the motion, but the camera does catch up within a second. If I make several gentle yawing motions of the hexacopter the camera will attempt to track it but eventually, when the hexacopter comes to a steady heading, the camera is no longer pointing "forward". It's almost as if it's lost track of the motion and errors have been introduced so that what it thinks is forward is now no longer the correct heading.

    I've also observed some behavior with the pitch and roll. If I adjust the pitch or roll of the hexacopter gently then the camera stays level. But if I introduce any yaw then that appears to trigger some oscillations.

    Question - if I want to control the yaw axis then do I need a 2nd IMU mounted on the frame? Would this improve the accuracy of the yaw tracking and also prevent oscillations being introduced in the pitch/roll axis? Accepting that I may need to adjust the PID values to get things perfect - but I had a very stable 2-axis configuration and just wondering what needs to be done to make a 3-axis configuration work as well.

    Thanks, Chris
  • Update after some more experimentation.

    The original post was written with Follow Yaw ticked.

    If I untick Follow Yaw then the camera stays pointing straight ahead regardless of the pitch, roll, yaw movement of the Hexacopter. There's a tiny bit of jitter that needs to be tuned out with some PID adjustments but otherwise it's stable.

    Unfortunately this is the opposite of what I want the gimbal to do on the Yaw axis. It would be fun to fly it around a subject and have the camera always pointing at it but my cables would soon get tangled up so this is not really an option. I can just about do a 180 degree rotation clockwise or counter clockwise before my cables start to get snagged.

    And what I really want is to be able to pan the camera slowly backward and forward while flying or set the camera to be pointing at right angles to the direction of flight - for example.

    The fact that it works in this setup implies that I don't actually need a 2nd IMU to maintain stability. So it has to be something to do with the configuration.

    I'll keep experimenting but any thoughts most welcome.

    Chris
  • Final update for today... If I disable the Yaw motor output on the Advanced tab and the secure the yaw arm with a rubber band to keep the camera pointing in the same direction as the hexacopter is pointing - then the pitch and roll are stabilised very well with no jitter whatsoever.

    So the only thing that is not working is the "Follow Yaw".

    Is this a known limitation of the 8-bit controller or am I missing something in the configuration and tuning of this particular configuration?

    Thanks, Chris
  • There is too many thinks going on, what is the problem? On thing at the time, so maybe I could help.
  • Sorry - OK, let me summarise/simplify.

    First a question - do I need a 2nd IMU mounted on the frame for a 3-axis gimbal to work well?

    I have successfully tested a 3-axis configuration with Follow Yaw unticked - so the camera points in the direction it was when the gimbal was powered up. There is a slight bit of jitter with sudden motion of the hexacopter but other than this it works well and I think this just needs some PID fine tuning.

    If I tick Follow Yaw then I notice 2 things.

    1. As the hexacopter changes direction the gimbal gradually forgets where the front of the hexacopter is and it ends up looking to one side rather than straight ahead.

    2. If I do anything other than very gentle movement the gimbal jitters around all over the place and will eventually come to rest with the camera pointing somewhere random.

    Would it help to see some screen shots of the settings and a short video of the behaviour?

    Thanks, Chris
  • It will work well with 1 IMU at least when handle is near level position. It is ok to tune the gimbal with 1 IMU, and I sometimes do this. Adding second IMU will add freedom to move he handle. and some other improvements. I always use the 2nd IMU below yaw.

    You need to get it working fist without any jitter before drying anything else. It could be basic setup failure (inverted/Poles, Gyro calibration) it could be gimbal mechanics. When the above mentioned are ok, PID tuning is pretty easy and out tuning works pretty well.

    Maybe the reason for bad follow performance is what is mentioned above. It could be also too weak motor, maybe broken motor or too fast follow speed. If you try to move the gimbal faster than the motor can handle it will skip steps and loose direction.

    Pictures of gimbal and shot video to the point would help to see what is the actual problem.

    Even perfectly working gimbal will eventually drift, but it sounds you have more serious problems.

    One solution to remove drifting is this, but it will work only if the gimbal is working good. http://www.rcgroups.com/forums/showthread.php?t=2243241
  • Thanks - I'll work on the tuning and think about how to mount the potentiometer.

    Presumably for this to work well the pot needs a low mechanical resistance when turning?

    Thanks, Chris
  • Just been reading some more into the thread you referenced above and spotted the discussion around using a hall effect sensor... which I'd been thinking about too... I'll investigate that.

    Chris
  • Garug - while I investigate how best to provide the yaw/frame reference to the controller I thought I would continue to fly the gimbal as a 2-axis one.

    I disabled the Yaw motor output in the GUI and pretty much "fixed" the yaw frame so that it was pointing forward. But I've noticed that when I now yaw the hexacopter the camera does a very slight roll.

    Is this because my "fix" of the yaw frame is not 100% or is there some part of the configuration which still thinks it should be adjusting the yaw?

    Thanks, Chris
  • Taken the Yaw motor off and fixed the Yaw frame in place 100% solid and it's still doing a very slight pitch and roll if you yaw the Hexacopter.

    Puzzling.
  • That is normal if it is on air. i.e. not only yaw but sideway accelerations also. See gyro trust on users manual.