User Tools

Site Tools


2019_i2c_sensors

This is an old revision of the document!


I2C Sensors for 2019 Deep Space Robot

The team picked out several sensors to enable robot code to respond to the environment. All turned out to have an I2C interface. Fortunately, the RoboRIO has two I2C controllers:

one on the base unit

and one on the MXP expansion connector and broken out by the NavX board.

Eastbots Standard 4-pin I2C: same as RoboRIO

Since the two rio native i2c connectors have the same pin order, we standardize on that, and adapt all sensors to that pinout. These connectors have 4 pins, in this order, on a 0.1“ header:

  • Ground
  • +3.3v Power
  • SCL
  • SDA

0.1” COTS cables like this are helpful for wiring:

Rev Color Sensor

http://www.revrobotics.com/rev-31-1537/

We're using two of these. Since they all have the Same I2C address, we can't connect both of them to the i2c host controller without special care. Fortunately, The RoboRIO has two controllers, so we connect one to each.

A short 4-wire cable is built to adapt from the JST connector on the Rev sensor to an 0.1“ female connector. This adaptor cable can plug directly into the RoboRIO for software development. It adapts the pinout to our (Rio) standard, which requires flipping SDA and SCL.

Adafruit VCNL4010 Proximity Sensor

https://www.adafruit.com/product/466 This sensor is useful for sensing distances to a target of about 10-150mm. It has 6 pins, which isn't a connector housing size that we normally stock. Besides, we want to adapt to somthing close to the standard pinout.

But this sensor recommends using +5v power supply for best output power from its LED light source. So, we chose this modified pinout using a 5-pin connector, to reduce the chances that 5v and 3.3v sensors can be mixed up accidently:

  • +5v
  • GND
  • no connection on pin 3
  • SCL
  • SDA

Note that the last 4 pins match up exactly with the standard 4 pin connector above, but there's the extra 5v power pin to the outside of the ground pin.

(TODO picture of cable schematic)

Adafruit VL53L0X Distance Sensor

I2C multi-sensor breakout panel

To connect three sensors, one of which requires oddball power, to one I2C port, we built a little breakout adaptor. It has 5 connectors:

  • one 4-pin header that is cabled to the RoboRIO
  • Two more 4-pin headers for Rev Color and VL53L0X sensors adapted to our standard pinout
  • one 5-pin header providing +5v power for a VCNL4010
  • one 3-pin DIO-pinout header that needs to be connected to +5v power from a DIO port

Ground, SCL, and SDA are simply wired together on all four headers. +3.3v power connects between the three 4-pin headers. The 5th pin on the 5-pin header goes to the center pin of the 3-pin power header.

TODO draw a proper schematic of this board.

In addition, there's a yellow LED that indicates presence of 3.3v power - proper connection to the 4-pin rio connector.

2019_i2c_sensors.1551328583.txt.gz · Last modified: 2019/02/27 23:36 by tell