Skip to main content
Max Gallup

Max Gallup

Founding Member, Ex-Hardware Lead and Ex-Project Administrator

I2C

The I2C is a protocol that allows electric devices to send messages to each other over a bus. But what is a bus anyway? Similar to USB (Universal Serial Bus), I2C uses 2 data wires to communicate with other devices and these data wires are electrically shared between all devices. The data lines are analogous to a bus that drives all of its passengers at once, anyone on the bus can see the data being transferred. In the diagram below we can see a central device connected to peripheral devices with two data lines. In this case specifically, there is also a "pull-up" resistor that keeps the lines high. The central device is the Debix since it is the one to initiate a data transfer with any one of the connected sensors. Each sensor is globally addressable by a hard-coded address. Below is an overview of the devices that come with a Rover and their corresponding I2C-addresses:

I2C Block Diagram

Connected Devices

On a standard Rover there will be a number of I2C devices already plugged in (via the carrier-board). The following is an overview of which devices are connected to which i2c-device on the Debix (of which there are two):

I2C-device 3

Device NameDescriptionAddress
PCA9685This device controls up to 16 PWM channels using I2C, which is used by the actuator to send servo and motor commands.0x40
ADS1100Senses the battery input voltage and reports via the battery service. Note this device is mapped into the kernel and can be read out via the file system, which is why we see a "UU" in the i2cdetect command.0x48

We decided to keep the "essentials" on a separate device, which is why device 3 has the PCA which connects to the motors as well as the voltage sensor to measure the battery. This minimizes the risk of a either the battery being undercharged or the Rover moving out of control, since there are no further sensors connected on that bus to cause problems. For everything else we have have device 5:

I2C-device 5

Device NameDescriptionAddress
SSD1306The display mounted towards the front of the rover controlled by the display service.0x3c
URM09Ultrasonic sensor that measures distance from the front of the rover, implemented by the distance service.0x11
ADS1100A second analog to digital converter currently mapped to potentiometers.0x49
BNO055Inertial measurement unit providing acceleration and velocity data around each axis.0x28
MCP23008Provides an interface to expand general purpose input/output pins0x21

Two view which devices are currently plugged into the Debix use the i2cdetect -y 3 command to view all sensors connected to device 3. For example, we have the following output:

An overview of the connected I2C devices using i2c-detect