In previous UAV projects we have use the existing on-board sensors stabilise an on-board camera.  To avoid re-inventing the wheel for each UAV, I have been working on a ‘drop in solution’.  Here is a sort of work in progress.


I have put together this open-source demo using off-the-shelf components to stabilise a camera in 3 DOF (pitch, roll and yaw).  The key components are: an x-IMU, a ServoCity 3 DOF gimbal and a Pololu USB servo controller.  The system currently needs a Laptop to set the gimbal angles according to the output of the x-IMU.

The larger R/C servos (pan and roll) are rather slow which means the camera does lag behind; however, this is the only reason for the lag.  The x-IMU update rate is 256 Hz (4ms latency).



An alternative gimbal constructed from faster, smaller servos would achieve a faster responding, lightweight system more applicable for use on a UAVs.

We plan to release a firmware update for the x-IMU that will handle all servo control on-board the x-IMU (via the auxiliary port).  This would mean that anyone could create a fully (pitch, roll, yaw) stabilised camera using just 3 R/C servos and an x-IMU.

I would like to hear what other UAV engineers and hobbyist make of all this so please comment and discuss.


For more information, links and source code for the above demo, see:

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • I love your rig, i think an amazing add-on would be the replacement of the x-IMU with an iphone or ipad. If you were also streaming the feed to the device, one person could pilot the aircraft and another one would operate the camera simply by moving the iphone or ipad.
  • One more question...

    It looks like the x-IMU board is out of stock at their website. Would the ArduIMU+ V2 (Flat) found on diydrones be a similar functioning unit? Also, how much is the x-IMU in USD & is there US distributer?



  • This is definitely something I would be interested in looking at more closely. I am an aerial photographer/videographer and actually have the servo city mount you demonstrate with. I fly traditional pod and boom helicopters and am just getting into the computer based systems with IMU boards and multiple rotors.

    My questions are:

    1) would something like this be able to be incorporated to my cyclic on my helicopter to effectively work as a 3 axis stabilizer to keep the helicopter level during flight/hovering - as well as stabilize the camera mount simultaneously?

    2) if I added GPS would this controller be able to hook up to my collective pitch servo & cyclic for position hold?




  • can you tell the height of this gimbal ? and the gimbal with pan servo ?




  • This is a neat demo. I think the concept of being able to directly hook up the servos to the imu is a great idea because you basically create a plug and play system for those that can handle hardware but don't want to jump into the control electronics. I think you might run into issues if this system were installed in an airplane however. The Gs pulled when the airplane banks might end up causing the camera to point not where you want it to. Simple test, hold the imu extended from your body and spin in a circle and see if the camera points where you think it should. The IMU, GPS, airspeed data, and a magnetometer all help an autopilot to create an attitude estimation through the kalman filter. Tougher to do with just the imu in airplanes...might work as is in quads that are more or less just hovering though.
  • I see that you have quite some lag on the geared servo drives, You need 20 degree/sec gyros and magnetic encoder servos from Hitec.running without gear train in feedback mode. As camera movement above 20 Deg./Sec is of no use, this is a good solution. Also the best place for the imu is on the camera base plate.
This reply was deleted.


Santiago Perez liked Santiago Perez's profile