Is my bmp180 dead?

Hi everyone, I have a bmp180 that i got from adafruit, ://www.adafruit.com/products/1603

and i had connected the 3vo to positive and the 5v to gnd. There wasnt any smoke or visual damage either. i was wondering if anyone would know if this would fry it. so far i was able to get only eeprom calibration data off of it but i get no updated measurement values. its stuck at 128C and 29.49inhg.

I know the temp is off because my skin isnt boiling off and i know the pressure isnt right because i have a barometric pressure sensor on my phone to give me pressure read out, and it said 30.12. If i really killed it, i think the eeprom somehow survived but the sensor element it self is gone, because that would explain how i got calibration data but no sensor data.

Ill have my code below if you want to make sure i have the i2c right. Im not that good with i2c and i wouldve used a library from adafruit but, i only have one atmega and its A5 pin (My luck…) is dead. Im running this code using the SoftI2CMasterlibrary and a attiny85. The only code copied was the calculations stuff. Everything else to read and right to the eeprom had to be “hand made”. Mostly because the Wire library doesnt work on the attinys.

Ill try commenting the code the best that i can, but the calculation stuff was copied so no comments because im to confused to understand :frowning: i just know it works because its just copied from the datasheet.

Also sorry if im in the wrong part of the forum, it has to do with my sensor and code but mostly the state of the sensor. If im in the wrong part please tell me :slight_smile:

Code (sorry in advanced for length and lack of organization)

#include <SoftwareSerial.h>
#include <SoftI2CMaster.h>
const int TxPin = 0;
SoftwareSerial lcd = SoftwareSerial(255, TxPin);

int Wadd = 0b1110111;
int Radd = 0b1110111;


boolean startingUp = true;
int ac1;
int ac2; 
int ac3; 
unsigned int ac4;
unsigned int ac5;
unsigned int ac6;
int b1; 
int b2;
int mb;
int mc;
int md;
long b5; 
//define variables for pressure and temperature calculation
long x1,x2;
//define variables for pressure calculation
long x3,b3,b6,p;
unsigned long b4,b7;
//define variables for temperature and pressure reading

short temperature;
long pressure;
const unsigned char OSS = 0;  // Oversampling Setting
/* blz 12 Datasheet
OSS=0 ultra Low Power Setting, 1 sample, 4.5 ms 3uA
OSS=1 Standard Power Setting, 2 samples, 7.5 ms 5uA
OSS=2 High Resolution,              4 samples, 13.5 ms 7uA
OSS=3 Ultra High Resolution,    2 samples, 25.5 ms 12uA
*/





 
void setup()
{
  lcd.begin(9600);
    pinMode(TxPin, OUTPUT);
  digitalWrite(TxPin, HIGH);
  
  delay(1000);
  
  lcd.write(12);
  
  i2c_init();
  
  for(int i = 0; i < 5; i++){
  lcd.write(17);
  delay(10);  
}
  
  //Read initalizing data;
  lcd.print("Reading BMP180  Calibration Data");
  delay(1000);
  lcd.write(12);
  ac1 = bmp180ReadInt(0xAA);
  ac2 = bmp180ReadInt(0xAC);
  ac3 = bmp180ReadInt(0xAE);
  ac4 = bmp180ReadInt(0xB0);
  ac5 = bmp180ReadInt(0xB2);
  ac6 = bmp180ReadInt(0xB4);
  b1 = bmp180ReadInt(0xB6);
  b2 = bmp180ReadInt(0xB8);
  mb = bmp180ReadInt(0xBA);
  mc = bmp180ReadInt(0xBC);
  md = bmp180ReadInt(0xBE);
  delay(2000);
  lcd.write(12);
  lcd.print("Done!");
  delay(1000);
  startingUp = false;
  
  
  
}
 
void loop()
{
  
  temperature = ReadUncompTemp();
  
 
 pressure = ReadUncompPress();
 
  temperature = bmp180CorrectTemperature(ReadUncompTemp());
 
 pressure = bmp180CorrectPressure(ReadUncompPress());
  
 lcd.write(12);      //
 lcd.print(pressure * .000295); converting Pa to inhg and display
 lcd.print("           "); //lcd readout 
 lcd.print(temperature);//display temp
 delay(1000);   //
 
 
  
}


unsigned long ReadUncompPress(){
 
  unsigned char msb, lsb, xlsb;
  unsigned long up = 0;


i2c_start(Wadd | I2C_WRITE);
i2c_write(0xF4);
i2c_write(0x34 + (OSS<<6)); //set over-sampling rate
i2c_stop();

delay(5 + (5*OSS)); //wait for a measurement

i2c_start(Wadd | I2C_WRITE);
i2c_write(0xF6); //ask for the register where pressure data is stored
i2c_stop();

i2c_start(Wadd | I2C_READ); //request data
msb = i2c_read(true);
lsb = i2c_read(true); //read all data
xlsb = i2c_read(true);
i2c_stop();

up = (((unsigned long) msb << 16) | ((unsigned long) lsb << 8) | (unsigned long) xlsb) >> (8-OSS); //combine all bytes

 return up;




  
}

double bmp180CorrectPressure(unsigned long up)
{ 
  b6 = b5 - 4000;
  // Calculate B3
  x1 = (b2 * (b6 * b6)>>12)>>11;
  x2 = (ac2 * b6)>>11;
  x3 = x1 + x2;
  b3 = (((((long)ac1)*4 + x3)<<OSS) + 2)>>2;
  
  // Calculate B4
  x1 = (ac3 * b6)>>13;
  x2 = (b1 * ((b6 * b6)>>12))>>16;
  x3 = ((x1 + x2) + 2)>>2;
  b4 = (ac4 * (unsigned long)(x3 + 32768))>>15;
  
  b7 = ((unsigned long)(up - b3) * (50000>>OSS));
  if (b7 < 0x80000000)
    p = (b7<<1)/b4;
  else
  p = (b7/b4)<<1;   
  x1 = (p>>8) * (p>>8);
  x1 = (x1 * 3038)>>16;
  x2 = (-7357 * p)>>16;
  p += (x1 + x2 + 3791)>>4;
  
  return p;
}



int bmp180ReadInt(unsigned char Address){ //read the value from the requested register address

  //delay(200);
  lcd.write(12); //serial lcd stuff
  unsigned char msb, lsb;
  i2c_start(Wadd | I2C_WRITE); //start write communicating on i2c with the bmp180
  i2c_write(Address); //tell the sensor to look in the requested registry
  i2c_rep_start(Radd | I2C_READ);//start read communicating on i2c with the bmp180
  msb = i2c_read(true); //read the incoming data and the parameter is: true = send NAK, false = dont send NAK
  lsb = i2c_read(true);
  i2c_stop(); // stop talking
  
  if(startingUp)lcd.print(msb<<8 | lsb); //debug stuff

return (int) msb<<8 | lsb; //combine the lsb and msb

delay(100); //for stability

}

unsigned int ReadUncompTemp(){ //Read the Current uncalibrated temperature
  
  unsigned int ut;
 
  i2c_start(Wadd | I2C_WRITE); //start communicating on i2c with the bmp180
  i2c_write(0xF4); //write 0xE2 to register 0xF4
  i2c_write(0xE2);
  i2c_stop();
  
  delay(5); //must wait atleast 4.5ms for temp measurment
  
  ut = bmp180ReadInt(0xF6); //Read the values
  
  return ut;
  
  
}




double bmp180CorrectTemperature(unsigned int ut) //Correct the temperature using calibration data
{
  x1 = (((long)ut - (long)ac6)*(long)ac5) >> 15;
  x2 = ((long)mc << 11)/(x1 + md);  
  b5 = x1 + x2; 
  return (((b5 + 8)>>4));  
}

So far ive spent about 13-16 hours worth on this and im out of ideas.

You have too many unknown things. The reverse voltage could have damaged the voltage regulator on the BMP180 module and/or the BMP180 as well. If the I2C was connected, also the Arduino could be damaged. Maybe even the voltage regulator on the Arduino board was damaged. I don't know if the code with the SoftI2C is okay for the BMP180. There is a TinyWire for the ATtiny85, and it should be compatible with the normal Wire library, but I have not used TinyWire myself. https://github.com/adafruit/TinyWireM

You have to fall back to something that is working. I think the only option is to buy a new sensor and a new Arduino board. Do you have an other I2C sensor or I2C device ? Perhaps you can try TinyWireM with the ATmega85. If that is working, then you can test the BMP180 that way and conclude it is broken and buy a new BMP180 after all.

Sorry for the lack of info. I'm using a standalone attiny85. I had managed to get a gyro working in the past with this library.

Also I have tested the that the voltage regulator was ok with a multimeter 3rd, is 3v. The i2c was connected but the attiny doesn't have built in i2c so I don't think that's damaged.

There's no regulator on the attiny side because it's a isp. And being supplied through usb.

I had tried the tinywire library before but it just gives me solid number and locks my program up.

I still think that the best option is to buy an Arduino and a sensor. That should work. I don't know an other way to get out of this. An ATmega orATtiny chip can be damaged for only a part. You already mentioned a chip with a dead A5, such things are possible. I might seem to work, but something inside the chip is damaged.