Anyone used the Bosch BMP085 I2C baro sensor yet ?
Hi all,
If anyones used this new digital barometric sensor yet I'd love to see the PBP code to get calibrated readings out of it. I'm doing an open source project for R/C telemetry and using this sensor with a PIC16F819 is one of the first steps for me...
http://www.bosch-sensortec.com/conte...5-DS000-05.pdf
It's not just a simple I2C device (or I wouldn't be asking). It contains calibration data that must be referenced against an internal temperature sensor every time you calculate pressure (or altitude in this case). The math is a little more complex than I'm used too.
Anyway. I thought I'd ask here, might save me many migraines :-)
Thanks,
Martin
Watch out for light effects
The FuturLec prices are excellent but I fear the HP03D will give highly variable results depending on incident light intensity. All silicon strain gauges are light sensitive. The HP01 and HP02 ones, coated in black, will be OK. The Intersema MS554x are light dependent even though they have opaque white 'silicone snot' covering the strain gauge element to reduce, but not eliminate, this effect.
Another trap with all these sensors is that distorting the ceramic substrate will bring out very large pressure and temperature offsets. In my experience, proper SMD reflow oven soldering does not stress the subsrtate anywhere like as much as hand soldering where the thermal stresses build up as each pin is soldered individually. I have found mounting the chip upside down and hand soldering fine 0.010 inch or 0.25 mm wire wrap wires keeps a batch tracking very well. You will not see the stress effects if you only make one or two units but if you build a batch of 100+ the difference unit to unit can be very frustrating.
The Hope HP03 has a cute feature of an on-board oscillator. I use the CCP registers of a PIC to provide the 32768 Hz MClk to the Intersema snsor but sometimes I would rather use a watch crystal direct on the pressure sensor instead of tying up a CCPWM port.
Lastly, most of the pressure sensor application notes specify a large tantalum cap across the supply. 47 uF in the case of the Intersema. The leakage current of this cap exceeds the sleep current of the sensor so don't forget that when you calculate your battery life.
HTH
BrianT
1 Attachment(s)
Barking at the hardest tree ?
No the title is right....
I've just done some reading at Melabs about Longs in the recent versions of PBP and how they work with 18F series PIC's. I now think I may be doing sensor this the hard way with trying to use a 12F or 16F PIC.
A broad question: If the math involved in using this sensor only uses Longs and no floating point, can I use a 18FXXXX PIC to crunch the signed math, or is there a likely newbie Longs trap to fall into ?
I'd copy/paste the data sheets equations here to show you, but it's copy/paste protected. I'll attach it as a file.
It's only the last conversion from pressure to altitude that seems to use a float, and I can worry about that when I get that far (I hope). Page 12 is the guts of it.
LONGs with the Bosch sensor
I have read the Bosch datasheet which is very similar to the Intersema MS5540 family. With the exception of absolute altitude, LONGs and a PIC18F part will handle those formulae easily.
The mathematical gymnastics of handling the Bosch 19 bit variables with 16 bit PBP will consume much code space thus ruling out the 12F series. You will get it into a 16F part on code space grounds but you will have to invent your own way to extend WORD variables up to 19 bits. Why bother?
The 18F series costs hardly any more, at least at hobby volumes, so cut your losses and go for a PIC18F part and take advantage of LONGs. This will automatically take care of negative temperatures which your altimeter will certainly need.
Absolute Altitude needs LOG functions to handle the power 1/5.255 so avoid that by using a lookup table which you can make as accurate as you want by adjusting the size of the table and the interpolation method.
HTH
BrianT
oss = over sampling setting
Looks to me the number of places you left or right shift is related to how many samples you take per reading. try and get hold of the C code and see if you can nut it out. In my Intersema code, I do the averaging by a simple sum of n readings divided by n at the end. Again, LONGs take the pain out of needing to know if the sum of 8 samples overflowed a 16 bit variable.
I have failed to find a copy of their C source code on the net. Seems you have to genuflect for one of their distributors to get it.
HTH
BrianT
Help to program BMP085 in assembler
Hi... I'm new in this forum and I need your help about how to manage data from BMP085 in assembler... I need test it in a PIC16f84...