DARwIn-OP Clone Peripherals

The original DARwIn-OP Robot uses an on-board 1.6 GHz Intel Atom Z530 computer and a CM-730 ARM controller board. This controller board includes a 3-axis gyro, a 3-axis accelerometer and a Dynamixel bus to interface with the robot’s servos.

I intend to use an alternative electronics based on a more powerful ARM computer plus several peripherals. For the main computer, my current choice is the ODROID-XU which is a quad Cortex-A15 1.6GHz CPU with 2GB RAM.

Instead of using a controller board, I’ll be using a USB2AX to interface the Dynamixel servos and I’ll use I2C components for the gyroscope and accelerometer.

ODROID-XU and peripherals

On the picture are shown the components that I already got and that I’ll be testing:

  • I2C 12 bit 4 channels ADC (ADS1015 chip)
  • I2C voltage-level translator (PCA9306 chip)
  • I2C 10DOF with 3-axis gyro, 3-axis accelerometer, 3-axis compass, temperature and pressure sensors (L3G4200D, ADXL345, HMC5883L, BMP085 chips)
  • Force sensing resistor (.1N to 100N)
  • ODROID USB IO Board with GPIO/PWM/SPI/UART/I2C/ADC interfaces
  • USB2AX Dynamixel interface

I’ll be using the native I2C interface I2C_0 that is available in the LCD connector (CON15) in the back of the ODROID-XU (the schematics are available through a customer email request to Hardkernel).

ODROID-XU LCD connector and cable
ODROID-XU LCD connector and cable

The LCD connector is an IPEX 40 pin with 0.5mm pitch. I got some a couple of cables from Ebay, but now I saw that Hardkernel (the maker of the ODROID) is also selling the cable. The pin configuration that I’ll be using for the I2C interface is:

  • 4 – 1.8V
  • 6 – SCL
  • 7 – SDA
  • 10 – GND

The ODROID-XU’s I2C interface is rated at 1.8V, so I’ll be using the PCA9306 to translate it to the rest of the I2C components which are rated at a higher voltage.

The DARwIn-OP requires a gyroscope and an accelerometer, but I am interested also in using the compass and the force sensors (through the AD converter) for a future version of the DARwIn-OP feet.

9 thoughts on “DARwIn-OP Clone Peripherals

  1. hi, I am a beginner of Darwin, and am going to participate in Robocup.
    Can darwin-op2 robot be fitted with electronic compass? It have no I2C….
    Could you please give me some advice, please:)

    1. Hi,

      Do you mean an original Darwin-OP2?
      You could use an USB port and connect an USB IO board expansion such as these to have an i2c port:


      I would check for one that has drivers available for your platform first.
      Then you can connect a i2c compass.

      I don’t know if the Darwin-OP2 has any internal USB connector available, it would not be very pretty to have a USB cable connected on the back an going back in. I don’t know the camera wiring, I understand it is USB, sou you could tap in with a hub.

  2. hi, your post like with my minithesis, i still confused to connecting accl+gyro value into framework, can you show your code modification in Darwin-OP framework? hahaha thanks for your help ^_^

    1. Hi,

      I haven’t done the code modification yet.

      But I did a review of the published framework (DARwIn-OP_ROBOTIS_v1.6.0.zip), these are the findings I did:

      From what I understood, the gyroscope and accelerometer are read in CM730.cpp in function CM730::BulkRead(), which is called from MotionManager::Process() in MotionManager.cpp.
      The BulkRead() function dumps a large table of current data from the CM730 which contains the gyroscope and accelerometer updated data besides other stuff.
      They are later used for example as:

      MotionStatus::FB_GYRO = m_CM730->m_BulkReadData[CM730::ID_CM].ReadWord(CM730::P_GYRO_Y_L) – m_FBGyroCenter;
      MotionStatus::RL_GYRO = m_CM730->m_BulkReadData[CM730::ID_CM].ReadWord(CM730::P_GYRO_X_L) – m_RLGyroCenter;
      MotionStatus::RL_ACCEL = m_CM730->m_BulkReadData[CM730::ID_CM].ReadWord(CM730::P_ACCEL_X_L);
      MotionStatus::FB_ACCEL = m_CM730->m_BulkReadData[CM730::ID_CM].ReadWord(CM730::P_ACCEL_Y_L);

      I remember these values can be calculated from the i2c gyroscope and accelerometer device by scaling and adding an offset, I read about the range used by CM730 but I don’t have the info at hand, it was in a CM730 specification document.

      So I think the best is to replace CM730::BulkRead() so it simulates the CM730 board and returns the information in the same format.

      1. I have tried modifying cm 730.cpp by adding a function to call the value of the gyro, when compile ‘/Linux/build’ no error, but when trying to compile ‘/Linux/project/demo’ will error appear like this

        /tmp/ccxrGH79.o: In function `Sensor::Sensor()’:
        libSensor.cpp:(.text+0x14): undefined reference to `wiringPiI2CSetup’
        libSensor.cpp:(.text+0x24): undefined reference to `wiringPiSetup’
        libSensor.cpp:(.text+0x68): undefined reference to `wiringPiI2CReadReg8′
        libSensor.cpp:(.text+0x80): undefined reference to `wiringPiI2CWriteReg16′
        /tmp/ccxrGH79.o: In function `Sensor::getGyroX()’:
        libSensor.cpp:(.text+0xbc): undefined reference to `wiringPiI2CReadReg8′
        /tmp/ccxrGH79.o: In function `Sensor::getGyroY()’:
        libSensor.cpp:(.text+0xf0): undefined reference to `wiringPiI2CReadReg8′
        /tmp/ccxrGH79.o: In function `Sensor::getGyroZ()’:
        libSensor.cpp:(.text+0x124): undefined reference to `wiringPiI2CReadReg8′
        /tmp/ccxrGH79.o: In function `Sensor::getAccelX()’:
        libSensor.cpp:(.text+0x158): undefined reference to `wiringPiI2CReadReg8′
        /tmp/ccxrGH79.o: In function `Sensor::getAccelY()’:
        libSensor.cpp:(.text+0x18c): undefined reference to `wiringPiI2CReadReg8′
        /tmp/ccxrGH79.o:libSensor.cpp:(.text+0x1c0): more undefined references to `wiringPiI2CReadReg8′ follow

        i ‘m get confused hahaha

        1. I see you are using the Wiring Pi library for Raspberry Pi. I haven’t use it.

          The compilation is okay, but the final linking is missing the Wiring Pi library.

          I think you need include the library in Linux/project/demo/Makefile, under the LFLAGS variable.

          Under Linux/build you are only compiling to “.o” objects, but not linking into an executable application, that is why it works, no need to locate the compiled library yet.

  3. hi llongeri, i have succeeded use gyro and accelero in raspberry, by adding method in CM-730.cpp and modification CM-730.h, then i calling the value in MotionManager.cpp. but idont know the original values of gyro+accelero in darwin-op, can yau tell me about values of gyro and accelero from CM-730? thanks

Leave a Reply

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