Attiny85 camera stabilizer


This was designed as a proof of concept for our tiny lsm303 library. It is based on a Attiny85, 9g servos and our LSM303DLHC breakout board.

Although the accelerometer is not the best solution for a stabilizer due to the data noise induced by the vibration, for this proof of concept (and for some basic applications) it was enough.


Breadboard test

This is meant as a cost controlled stabilizer for a frontal mounted camera in our SUGV series the HOUND that we will be showing in future posts.

Material Used


We assume that you have basic knowledge of the arduino IDE and electronics

  1. Install Tiny LSM303 Library and all dependencies
  2. If not installed, install Arduino Core in the Attiny85 (good tutorial on how to do it)
  3. Upload the example sketch TinyStabilizer from the tiny LSM303 Library
  4. Connect the attiny and the LSM303DLHC as described in the wiring section
  5. Connect the Servos signal to the attiny if using different power supplies remember to have a common ground
  6. Power up servos and Attiny
  7. Move the breadboard to see the servos “compensate” the movement


Wiring diagram

Wiring diagram



The data itself from the accelerometer is very noisy, and don’t allow a smooth operation of the servos, so the best way to “clean” this data is to pass a low pass filter with a very low alpha (0.2 in this case)

The different outputs can be seen in the below graphic took with our DT Serial Chart , as you can see the “yellow” line has a much smoother curve in contrast with the raw data from the blue line.

Raw Data vs Filtered Data

We will soon make a post about how to get the data on the chart with our software.



Leave a Reply

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