Handheld Self-stabilizing Camera Platform Using Atmega1284

1. Introduction

Sound Bite

We created a handheld self-stabilizing camera platform using two high-torque servo motors, a gyroscope, an accelerometer, and a wooden frame.

Brief Summary

As avid outdoor enthusiasts, we often find ourselves taking action shots of our adventures, only to discover a very shaky and nauseating video of our endeavors at the end of the day. So, for our project, we decided to create a handheld self-stabilizing camera platform. The device will keep a camera in a steady neutral position even if the user is not holding the device steadily while in motion.
Handheld Self-stabilizing Camera Platform Using Atmega1284
The device consists of a gyroscope and an accelerometer mounted on a platform. Allowing the device to accurately determine the pitch and roll of the platform. This platform is connected to two servo motors. One motor controls the pitch of the platform while the other motor controls the roll. Once the sensors detect a disturbance in the position of the platform, it sends the data to a microcontroller, which then controls the motors to counteract the disturbance and keep the platform in the level position.

2 High Level Design

Rationale for Project Idea

Our project idea was to create a handheld camera stabilizer (a gimbal) so that a user can take steady action shots. For example, instead of having a video bounce from side to side as a user walks while shooting a video, a handheld stabilizing platform will allow a user to take a smoother video while the user is in motion. This will help prevent having those shaky and nauseating videos we all too often find ourselves with after recording one of our many adventures.

Hardware Overview,Tradeoffs, and Operation

As soon as we began working on the hardware design, we had to consider design tradeoffs. In particular, the first issue we discovered was that in order to take into account very minute vibrations, we would probably need piezoelectric motors for precise changes. However, the costs of such motors would put our project well above the $100 threshold. In addition, as we drew up plans for a handheld design, we also realized that we had limited hardware and limited experience in creating such a sensitive and precise device. So, we decided to focus on creating a device that stabilizes a camera from larger scale changes in position.

Figure

As seen in Figure 1, at the core of our design are two servo motors, a main board containing an ATMega1284p microcontroller, a three-axis accelerometer (ADXL345), and a three-axis gyroscope (ITG-3200).? The microcontroller board is attached to an L-shaped wooden frame that allows the user different ways to hold the apparatus.? On the other side of the wooden frame is a battery pack.? The servo motor attached to the main L-shaped wooden frame (component #2 in Figure 1) controls the roll of the platform.? Its shaft is directly screwed into a wooden support frame, which supports the second servo motor (component #3 in Figure 1) that controls the pitch of the platform.? The shaft of the second servo motor is connected to a metal bracket supporting the actual platform that contains the test camera, three-axis accelerometer, and three-axis gyroscope.

Handheld Self-stabilizing Camera Platform Using Atmega1284 Schemetic

When the device is switched on, the platform is initialized to the neutral position (level to the ground).? Using specific algorithms described later in the software section. The microcontroller detects any changes to the pitch and roll of the platform based on the outputs of both the accelerometer and gyroscope.? Upon detection of a disturbance, the microcontroller adjusts two separate PWM (pulse-width modulation) outputs that control the servo motors, which bring the platform back to the neutral position.

Background Math and Software Tradeoffs

For the platform to quickly respond to any disturbances, a TRT kernel is used to run several functions.? The main functions compute the position of the platform and output an appropriate PWM signal to the servo motors to adjust the position of the platform accordingly.
In particular, we use the input data from the gyroscope and accelerometer to determine the pitch and roll of the platform.? The gyroscope outputs degrees per second, so we calculate the current tilt angles by integrating the gyroscope data over time.? The accelerometer outputs acceleration in gs in three dimensions.? The exact calculations for translating the raw data from the sensors are described in the Software Section.?? With the acceleration values from the sensors, we can then calculate the tilt angles as follows:

To combine both the accelerometer and gyroscope readings, a second order complimentary filter was used.?? In the simplest form, the complimentary filter is as follows:

The math for the second order complimentary data is more complicated and is described further in the Software Section.
To obtain more precise measurements from the sensors, we sample multiple readings and average their values.? However, the more samples we average, the slower our device operates, especially since the data from the gyroscope are long integers.? So, every time we compute the position of the platform, we sample 2 readings from the gyroscope and 4 readings from the accelerometer.? These calculations are computed fast enough to allow the motors to respond frequently enough to produce smooth transitions.

Parts List:

Part

Vendor

Cost

Mega1284

Provided by class

$5

Gyroscope (ITG-3200)

Ebay

$12.95

Accelerometer (ADXL345)

SparkFun

$19.95

Wood and Hardware Mounts

Lowes

$20

2 x Servo Motors

SparkFun

2 x $12.95

Batteries and Battery Pack

Found in home and class

$5

Total

$88.80

For more detail: Handheld Self-stabilizing Camera Platform Using Atmega1284


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top