Hi
I’m struggling to make any sense of the Barometric Pressure sensor BMP085. I am able to communicate with it, so I think the wiring is correct.
The calculations are done in excel, but are not making any sense. I read the calibration data as sad in the manual. But I'm certainly doing something wrong.
I use Picaxe 28x2
- Reads the calibration data from chip as the manual says:
CALIBRATION DATA:
ac1 9012
ac2 64499
ac3 51028
ac4 34195
ac5 24444
ac6 22856
b1 5498
b2 53
mb 32768
mc 54461
md 2432
UT=31534
CALCULATIONS IN EXECEL:
I use the formula in the manual.
x1=(UT-AC6)*AC5/2^15
x2=MC*2^11/(x1+MD)
b5=x1+x2
T=(B5+8)/2^4
This gives me a temperature of 1188deg???
I have not tried the pressure formula yet, since the temperature is wrong.
- Do I read the calibration data wrong?
- Can I use the reading UT direct into the formula? I don’t really understand the UT=MSB<<8 + LSB in the manual.
- I see that the manual uses some negative values on the calibration data. How do I get negative numbers? The Picaxe is unable to show minus.
- Does it have something to do with the oversampling?
Thanks
Ørjan
I’m struggling to make any sense of the Barometric Pressure sensor BMP085. I am able to communicate with it, so I think the wiring is correct.
The calculations are done in excel, but are not making any sense. I read the calibration data as sad in the manual. But I'm certainly doing something wrong.
I use Picaxe 28x2
- Reads the calibration data from chip as the manual says:
Code:
hi2csetup i2cmaster, %11101110, i2cslow_8, i2cbyte ; set up bmp085 i2c device
pause 2000
#terminal 9600
hi2cin $AA,(b3,b2) : sertxd("AA=",#w1,cr,lf)
hi2cin $AC,(b3,b2) : sertxd("AC=",#w1,cr,lf)
hi2cin $AE,(b3,b2) : sertxd("AE=",#w1,cr,lf)
hi2cin $B0,(b3,b2) : sertxd("B0=",#w1,cr,lf)
hi2cin $B2,(b3,b2) : sertxd("B2=",#w1,cr,lf)
hi2cin $B4,(b3,b2) : sertxd("B4=",#w1,cr,lf)
hi2cin $B6,(b3,b2) : sertxd("B6=",#w1,cr,lf)
hi2cin $B8,(b3,b2) : sertxd("B8=",#w1,cr,lf)
hi2cin $BA,(b3,b2) : sertxd("BA=",#w1,cr,lf)
hi2cin $BC,(b3,b2) : sertxd("BC=",#w1,cr,lf)
hi2cin $BE,(b3,b2) : sertxd("BE=",#w1,cr,lf)
pause 1000
readtemperature:
hi2cout $F4,($2E)
hi2cin $F6,(b3,b2)
sertxd("UT=",#w1,cr,lf)
pause 1000
end
ac1 9012
ac2 64499
ac3 51028
ac4 34195
ac5 24444
ac6 22856
b1 5498
b2 53
mb 32768
mc 54461
md 2432
UT=31534
CALCULATIONS IN EXECEL:
I use the formula in the manual.
x1=(UT-AC6)*AC5/2^15
x2=MC*2^11/(x1+MD)
b5=x1+x2
T=(B5+8)/2^4
This gives me a temperature of 1188deg???
I have not tried the pressure formula yet, since the temperature is wrong.
- Do I read the calibration data wrong?
- Can I use the reading UT direct into the formula? I don’t really understand the UT=MSB<<8 + LSB in the manual.
- I see that the manual uses some negative values on the calibration data. How do I get negative numbers? The Picaxe is unable to show minus.
- Does it have something to do with the oversampling?
Thanks
Ørjan