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.
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, where 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.
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.
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.
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.
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.
Provided by class
Wood and Hardware Mounts
2 x Servo Motors
2 x $12.95
Batteries and Battery Pack
Found in home and class
For more detail: Handheld Self-stabilizing Camera Platform Using Atmega1284
This free embedded project also found using:
- atmega 32 camera code
- avr camera
- camera with avr
- self stabilizing camera using athmega microcontroller
- self stabilizing tv camera
- Three axis gyro stabilized platform