Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
1,815 Views

I2C device not found with Arduino breakout kit - (SparkFun MS5803-14BA)

Jump to solution

This is my first time building a project using I2C as well as using the Edison. I'm trying to get signal from the SparkFun MS5803 pressure sensor board. I first made an attempt with their demo code and noticed that no data was showing up in the serial monitor.

The breakout is connected as follows:

MS5803 Edison breakout board

GND GND

PWR (3.3V) 3.3V

SDA SDA

SCL SCL

I've tried pins 2/3 (per the sparkfun hookup guide) and 4/5 (from what I've seen on the forum) for SDA/SCL and still had no output.

I then used the following code to scan for any I2C signals:

# include void setup(){ Wire.begin(); Serial.begin(9600); Serial.println("\nI2C Scanner");} void loop(){ byte error, address; int nDevices; Serial.println("Scanning..."); nDevices = 0; for(address = 1; address < 127; address++ ) { // The i2c_scanner uses the return value of // the Write.endTransmisstion to see if // a device did acknowledge to the address. Wire.beginTransmission(address); error = Wire.endTransmission(); if (error == 0) { Serial.print("I2C device found at address 0x"); if (address<16)</td> Serial.print("0"); Serial.print(address,HEX); Serial.println(" !"); nDevices++; } else if (error==4) { Serial.print("Unknow error at address 0x"); if (address<16)</td> Serial.print("0"); Serial.println(address,HEX); } } if (nDevices == 0) Serial.println("No I2C devices found\n"); else Serial.println("done\n"); delay(5000); // wait 5 seconds for next scan}

No I2C devices are found. I double checked the make sure that I was using the Edison-specific Arduino IDE as well.

To make sure that the sensor is actually functional, I tested the board with an Arduino Leonardo and the code above detects the device...

I've seen some posts mentioning that the SDA and SCL pins may need pull-up resistors, but the sparkfun breakout board already includes these. Has anyone been able to connect any similar I2C devices using the Arduino IDE? I appreciate any help that you can provide.

1 Solution
Pedro_M_Intel
Employee
172 Views

Hello nitewing117,

I can see in https://www.sparkfun.com/products/12909 SparkFun Pressure Sensor Breakout - MS5803-14BA that the sensor operates at a voltage range of 1.8v to 3.6v. Did you make sure to change the Edison's voltage reference to 3.3v, in case you haven't, this might be what's causing you trouble. In fact this could have even damaged the sensor.

I know that you are powering your board with 3.3v, nevertheless you have to change the voltage reference of the whole board, otherwise SDA and SCL will send 5v signals. To learn how to set the board's voltage reference to 3.3v go to http://www.intel.com/support/edison/sb/CS-035374.htm Jumper Headers.

Also, as you mentioned, when working with https://learn.sparkfun.com/tutorials/i2c/i2c-at-the-hardware-level I2C, always remember to use https://en.wikipedia.org/wiki/Pull-up_resistor pull-up resistors, otherwise things might not work properly. I mentioned this because I could not find any confirmation in https://www.sparkfun.com/products/12909 SparkFun Pressure Sensor Breakout - MS5803-14BA that the sensor includes pull-up resistors. I might be wrong, but as I mentioned I just couldn't find it.

Try these suggestions out and let us know.

Peter.

View solution in original post

3 Replies
Pedro_M_Intel
Employee
173 Views

Hello nitewing117,

I can see in https://www.sparkfun.com/products/12909 SparkFun Pressure Sensor Breakout - MS5803-14BA that the sensor operates at a voltage range of 1.8v to 3.6v. Did you make sure to change the Edison's voltage reference to 3.3v, in case you haven't, this might be what's causing you trouble. In fact this could have even damaged the sensor.

I know that you are powering your board with 3.3v, nevertheless you have to change the voltage reference of the whole board, otherwise SDA and SCL will send 5v signals. To learn how to set the board's voltage reference to 3.3v go to http://www.intel.com/support/edison/sb/CS-035374.htm Jumper Headers.

Also, as you mentioned, when working with https://learn.sparkfun.com/tutorials/i2c/i2c-at-the-hardware-level I2C, always remember to use https://en.wikipedia.org/wiki/Pull-up_resistor pull-up resistors, otherwise things might not work properly. I mentioned this because I could not find any confirmation in https://www.sparkfun.com/products/12909 SparkFun Pressure Sensor Breakout - MS5803-14BA that the sensor includes pull-up resistors. I might be wrong, but as I mentioned I just couldn't find it.

Try these suggestions out and let us know.

Peter.

View solution in original post

KMill10
Valued Contributor II
172 Views

Just to backup what Peter is saying.

Pull up resistors are essential with I2C since the SDA and SCL signals are only ever driven LOW, never high.

Without the pull up resistors your signal can never go high. Use something like 4.7 KOhm, tied to VCC if using the highest speeds you might even want to drop that to about 2K.

If you have access to an oscilloscope or logic analyzer then hook it up to the SCL and SDA signals and see if you are getting anything at all.

idata
Community Manager
172 Views

Hi Peter,

I noticed there is a 2.2k pull-up resistor in the https://cdn.sparkfun.com/datasheets/Sensors/Weather/MS5803-14BA_Breakout_v10.pdf SparkFun schematic. I hope I'm reading that correctly.

Thanks for the info about the jumper. I got lucky and it seems like the sensor is still functional - I hooked it back up to the Leonardo and ran the demo code and I'm getting proper and consistent readings for degrees C and F.

Back to the Edison, I swapped the jumper to the 3.3v and hooked the sensor back up. With the i2c_scanner code, I still get a "no device found" message. However, I decided to upload the MS5803-14BA demo sketch and I see data in the serial monitor that matches what I saw when the sensor was hooked to the Leonardo. Unfortunately, I intermittently receive a -500 C reading (all other output fields seem fine...) so it looks like I have a bit more trouble shooting to do.

Reply