Reverse Engineering the I2C Protocol of the Mikrokopter Platform

We bought a Miktokopter Okto XL for our laboratory. I chose the Mikrokopter project because I had in mind, that a few years ago everything was developed in a community driven open source way. Unfortunately, it turned out that things changed and that the source code of recent versions of the Mikrokopter software is closed source, they only provide precompiled firmware images. Shame on you! A short look at older versions of the code probably reveals the reasons why the chose to close the code…

Anyway, our plan is to replace the FlightCtrl by our own Linux-driven Hardware while we want to keep the Brushless controllers. So we had to reverse engineer the I²C protocol of the Brushless Controllers (BL-Ctrl V3). Developer information available on the Mikrokopter Wiki was not very helpful.

This is a short overview of the I²C protocol of the Oktokopter XL V3: We made a capture of the communication FlightCtrl <> BL-Ctrl.

  • Speed: max. 200kHz
  • Addresses: 0x52-0x62
  • Write: Either one Byte (0-255) or two Bytes (0-2048) denote the speed of the motor
  • Read: On read, a controller returns six Byte:
    • 1: Current in 100mA steps
    • 2: Status (see table below)
    • 3: Temperature in degrees Celsius
    • 4: Raw RPM value (some correction factor needed??)
    • 5: Unused / Reserved / Voltage for BL_CTRL V3
    • 6: Voltage in 100mV steps

Possible status values that we observed:

  • 255: running
  • 248: not running but ready

There are more possible status values but we did not observe them yet.

After Digging a bit deeper, we found out, that it is not possible to directly jump from 0 RPM to maximum RPM. Speed has to increase ‘slowly’ in smaller steps. Furthermore, the motor settings must consequently be transmitted, even if they do not change. If a controller doesn’t receive I²C signals any longer, it automatically stops motors after ~500ms.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.