I decided to do some electronics and software testing before finishing building the second leg of my DARwIn-OP robot.

I wired my ODROID-XU with the GY-80 10DOF module using the I2C bus on the LCD connector (CON15) and a PCA9306 to adjust communication voltages.

ODROID-XU I2C Test Setup
ODROID-XU I2C Test Setup

The following is the connection diagram tested:

I2C Test Diagram
I2C Test Diagram

This 10DOF can be powered from 2V to 5.5V (VCC_IN). Its sensors are internally powered at 3.3V, but according to this documentation its I2C interface is rated at VCC_IN, so the PCA9306 has to translate from ODROID-XU’s 1.8V to VCC_IN (and not to 3.3v).

This 10DOF has 4 I2C devices in the following addresses:

  • 0x1E: 3-axis compass (HMC5883L chip)
  • 0x69: 3-axis gyroscope (L3G4200D chip)
  • 0x53: 3-axis accelerometer (ADXL345 chip)
  • 0x77: pressure and temperature sensors (BMP085 chip)

With this small C program, the accelerometer chip can be query in order to detect it and verify the setup. I am currently testing Ubuntu Server 14.04 off the shelf on the ODROID-XU, which includes the GCC compiler by default.

Now that I have I2C communication running, I followed the chips documentations and some googled examples in order to write some draft C++ classes to read the 10DOF sensors. They are available in this Code Section in the SourceForge repository for cloning the DARwIn-OP Robot.

I could successfully test the 10DOF powering it (and the PCA9306) with 3.3V and 5V, but at 3.3V they draw 0.024A (or 0.079W) and at 5V they draw 0.085A (or 0.425W). So in my final DARwIn-OP design I will most probably include a 3.3V regulator to lower consumption.

2 thoughts on “ODROID-XU I2C Testing

  1. This is probably the first post showing XU4 connecting Gyro with Level shifter on i2C in details. Thanks form bringing the site back.

Leave a Reply

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