The device is a rough prototype of what will eventually become a self balance robot, this is the second part of the hole thing (read accelerometer and control a motor to self balance). The first part with only the gyro can be found here.
On this instructable we will measure the angle using both gyro and accelerometer, and using a technique to merge both sensor to get a smooth signal. The technique is called "complementary filter".


Step 1: What we gonna need:

Some part can be replace, and some modification at the code have to be made to fit your hardware.
On this project we will use:
- Breadboard
- Microcontroller, I used the Arduinoboard
- Wire
- Jumper Wires
- Gyroscope XV-8100
- Nunchuck Wii (for the accelerometer)
- Nunchuck Wii adapter for Arduino
<p>Hello, First of all great work and thank you very much for sharing the knowledge. </p><p>I need to know a couple of things.</p><p>1. Are the angle measurements accurate. Does a 45 degree change show 45 degrees approxiamtely.</p><p>2. Up to what value of angle the device measure ? Is it capable of handling more than 90 degree angles</p>
<p>I made an equivalent tool in python that print real time data from ADXL345 accelerometer.</p><p><a href="https://github.com/mba7/SerialPort-RealTime-Data-Plotter" rel="nofollow">https://github.com/mba7/SerialPort-RealTime-Data-P...</a></p><p>may be it will be helpful for someone</p>
<p>is this possible to use only accelerometer for angle measurement.</p>
<p>It is possible to use only the accelerometer but the result may not to be so good.</p><p>It is recommended use both sensors.</p>
Nunchuck controller are use for what?? How can I use this, to combine with my pyranometer tracker?
Nunchuck controller has an internal integrated accelerometer.<br><br>You can use it for a variety of things, depend what are you doing or your need.
Desculpe-me, &eacute; que estou construindo um bicoptero e estou com um problema no equlibrio de todo o sistema, estudando seu codigo: angle_for_instructable.pde<br>N&atilde;o vi nenhuma linha para a execu&ccedil;&atilde;o dos motores que vc usou no seu rob&ocirc;.<br>estes comandos est&atilde;o em um outro arquivo a parte?<br>Obrigado pela aten&ccedil;&atilde;o.
The code link does not link to a .rar but to a .tmp file. Is the code link available somewhere else? <br> <br>Thanks, <br> <br>Jim
i need to build a human body sensor using an accelerometer and a gyroscope........and i am gonna use labVIEW as software for analysis.....can you please help me with the microcontroller part........should i go with lpc2138???<br><br>thanks
Is there any information about how that formula is derived, because I hate using things i dont fully understand
Read this instructable first, there is a plenty of information.<br><br>http://www.instructables.com/id/Accelerometer-Gyro-Tutorial/<br><br>Any doubt feel free to ask.
I mean the one to calculate the angle using accelerometers.
Sorry If i bother you but where can I buy the gyroscope device you used in your realization?
I bought this gyro at eBay. But is no longer available.
Thanks for the explanation. I&nbsp;was waiting for someone to do this.
Thanks, I'll need this for my next project.<br /> <br /> Justin<br />
Nice, xD<br />
When I try to download the .rar, all I get is a .tmp file. I have tried 3 different browsers, how does this work?
Try just renaming from .tmp to .rar

About This Instructable


58 favorites


More by otaviousp: CNC G-Code Interpreter using Processing How to connect Arduino and RFID Angle measurement using gyro, accelerometer and Arduino
Add instructable to: