Here it is what the Multiwii software configuration calls GY_80 or GY-80.
There is no brand, no model, no serial.
We know something just about single main components/chip:
UPDATED (2013-01-31): Before you start, maybe you want to checkout this post about [How to]New 10DOF 9-axis Attitude Indicator L3G4200D ADXL345 HMC5883L BMP085 Module This the same board with another shape and a different contacts configuration. It’s i2c as well.
- 1 L3G4200D: 3 axis gyro [DATASHEET],
- 1 ADXL345: 3 axis accelerometer [DATASHEET],
- 1BMP085: atmospheric pressure sensor (temp compens) [DATASHEET],
- 1 HMC5883L 3 axis digital compass [DATASHEET],
- Onboard LLC (works both at 3 and 5 volts).
Actually i’ve spent several hours trying to figure out how to use the I2C bus with this IMU that has at least 3 different i2c addresses to be managed.
There are 2 choices:
- Using the single components output (look at the image, pins on the right)
- Using I2C (just 4 wires, much more comfortable and desireable but, as you can see later, they need some added resistor).
Alternatively to method 2 there is also another method but i did not find any documentation about that so i preferred to leave it alone: on the back side of the IMU there are 2 components addressing jumpers to be soldered or cutted (three elements), i don’t really know what does what, so i prefer the second method as i think is much more elegant (informatically speaking), cleaner (less cable on the breadbord that is a good thing especially for people like me that have almost all jumpers wires of the same color 🙂 )
ADDED: the seller was so kind and sent me the schematics (see below for download).
So we will hook this imu to a couple of Arduino models. I have right here, for testing,
- 1 Arduino Uno Rev3,
- 1 Meduino (enanched 3/5v, switch onboard),
- 1 Arduino Nano V.3.
I would go with Arduino Nano V3 first as it has already a mini usb port (unlikely the meduino that needs a FTDI Breakout or, at least, another arduino board to be programmed, we will see how to do this later), and its dimensions are really flying-friendly unlikely the Uno rev3, with enough I/O available.
If you have previous than 3 verison of the Arduino Nano you will hook your imu like shown in the image following:
Arduino A12 -> gy-80 vcc
Arduino GND -> gy-80 GND
Arduino pins in yellow right between the ATM adn pins 2 and 3 respectively to SDA and SCL
i don’t know how to manage the internal pullups, but the ebay seller sent me the the schematics that i promptly add here GY-80-aka-10DOF SCHEMATICS.pdf
Instead, if like me, you have an Arduino pro mini v.3, you want to hook it like in the pic below.
This picture shows how i connected the GY-80 to the Arduino Nano V3
Arduino A4 -> GY-80 SDA (with pullup resistor on vcc)
Arduino A5 -> GY-80 SCL (with pullup resistor on vcc)
Arduino 5V -> GY-80 VCC
Arduino GND -> GY-80 GND
The GUI …
In these two images you can see values from the gui before and after using the two pullup resistors
Instead, if you want to use the enanched Meduino version, you just follow the steps required for the pro mini v3 and just remap SDA and SCL pins to the correct ones. Just remember: Meduino has no usb port, and it comes with an ATMEGA328P-AU. Also the Ardduino pro mini has a lot of leds that gives a pro fashioned blinking stuff, that are useful to impress girls 🙂 .
If instead you want to use an Arduino uno (even if it is not reccomended for flying things as it weights and it is 3 times larger than the mini) directions are quiet similar to the pro mini v3 except for the uno that has two dedicated pins for SDA and SCL (arduino nano v3 uses A4 and A5) located next to the reset button, the last two in the header pin, the lables are on the back side of the board (see image below)
So, if you are like me you will read this post after several hours of trying by yourself without success.
In fact when you will connect your imu to your arduino nano, you will open up multiwii configurator gui and you will see a lot of I2c Errors, and something (the gyro probably) not working. Also what seems to work, does not actually return usable data. So, something went wrong, or something is missing.
Something is missing and something is not how it is supposed to be.
Ok what is missing is the 2.2k pullup resistor (if still missing): you have to use one both SCL and SDA channel, connected on the other side to the vcc (see the picture above).
But something still isn’t going as it should. The Configurator gui still gives errors and gyro is still not working. After further researcher, digging to death, i found that there is a parameter about the address of the L3G4200D that possibly conflicts. So to fix this let’s modify the Multiwii source, the file called “sensors.ino” you can access it by the tabs on the top of the arduino gui right after opening multiwii.ino.
This address has to be changed from 0x69 to 0x68. Just like this
This will make the gyro works properly otherwise you will have a non-working gyro and messy values from other sensors.
Once done, save, upload to the board, open the multiwii configurator, choose the right serial port and press start to test the sensors. If all goes as expected the only concern of yours is about the IMU orientation, after fighting with the compass for a while 🙂 , if you soldered the header pins on the imu on the wrong side you’ll have to unsolder and fix or find out the imu orientation in the code of multiwii and change it… Probably i should have written this at the beginning of the post and not at the end, but grant me some fun at your expenses, and also you will learn, as i did: twicely think twice…
Comments are welcome!
Incoming search terms:
- gy-80 arduino (78)
- gy-80 arduino code (31)
- MultiwiiMWC Chinese10DOF(codenameGY-80)andArduinoNanoV 3:hookingandtesting|GiuseppeUrsoBlog (25)
- gy-80 schematic (24)
- gy-80 imu (17)
- gy80 (13)
- gy-80 and arduino (10)
- datasheet arduino nano (1)
- multiwii gui für raspberry (1)