Connecting the microsensor to your microcontroller, Accessing the microsensors via i2c – Eagle Tree Microsensor I2C Interface User Manual

Page 2

Advertising
background image

Copyright © 2009-2011 Eagle Tree Systems, LLC

http://www.eagletreesystems.com

6.

When the checkbox is checked, the sensor is placed in Third Party mode. Likewise, when
the checkbox is cleared, the sensor is reverted back to Eagle Tree mode. Note that the
data logged with Eagle Tree equipment will ONLY be correct if the sensor is placed
in Eagle Tree mode
.

7.

When the sensor is in Third Party mode, the sensor returns the computed value, in the
units programmed into the sensor by the user. In other words, if the airspeed sensor is
programmed to read MPH, the value returned is in MPH. See the sensor manual on
configuring the units (units cannot be configured via I2C).


Connecting the MicroSensor to your Microcontroller

The pinout of the MicroSensor’s 4 pin cable is as follows:

Red wire: Power (3V to 16V) (3V to 7V for High G G-Force Microsensor)

White wire: Ground

Yellow wire: SDA (3V to 5V)

Brown wire: SCL (3V to 5V)


Note that pull-ups are required on the SDA and SCL lines, and are not provided on the
MicroSensor. These must be added t o your PC board.

Accessing the Microsensors via I2C


For the airspeed sensor, the I2C address (SENSOR_ADDRESS in the pseudo code below) is
0xEA
For the altimeter V3 sensor, the I2C address (SENSOR_ADDRESS in the pseudo code below) is
0xE8
For the altimeter V4 sensor, the I2C address (SENSOR_ADDRESS in the pseudo code below) is
0xEC
For the GForce sensors, the I2C address (SENSOR_ADDRESS in the pseudo code below) is
0xA8

I2C access should work correctly between 100Khz up to 400Khz. It may be possible to access
the sensor at slower or higher speeds, however.

Here is the pseudo code for accessing the Airspeed and Altimeter sensors:

byte data[2];

signed short reading = 0xFFFF;


i2c_start();


// select sensor in write mode


if (!(i2c_write(SENSOR_ADDRESS | I2C_WRITE_BIT))) {


// send "read data" command to sensor

if (!i2c_write(0x07)) {

Advertising