Page 4 of 4

Re: bmp180 reading of values

Posted: 26 Oct 2016 12:01
by p0lyg0n1
Hello,
I can provide the first "draft" version of Wire and BMP180 libraries.
You can get it from my dropbox: https://www.dropbox.com/s/5gq0hzz1dd67v ... 0.zip?dl=0
Here you will find:
  • updated Wire.cpp/Wire.h
  • updated BMP180 library (in folder ZUNO_BMP180)
  • python script (bmp_math_test.py) to test math of BMP180 (it reads RAW data from Z-Uno and make all math operations on your PC). Works with BMP180Dumper sketch (look in ZUNO_BMP180/examples)

To update library you have to replace Wire.cpp/Wire.h in
<your zuno package folder>/hardware/zw8051/2.0.6/cores

To update BMP180library replace ZUNO_BMP180 folder in
<your zuno package folder>/hardware/zw8051/2.0.6/libraries

I have the first results:
  • Fixed issues with ack/nack and "false" stop sequence in wire library.
  • Fixed some numerical issues in math operations in BM180 library. Now it gives the same results with with the same algorithm written in python (see bmp_math_test.py).
Some notes:
  • At this moment we use original fixed-point algorithm from Bosch datasheet.
  • Arduino library uses alternative floating point realisation from here http://wmrx00.sourceforge.net/Arduino/BMP085-Calcs.pdf. We can use this instead of fixed-point code, but it will produce a lot of code compared with fix-point variant. Float point operations is a pain for 8051 architecture. I try to compare the values calculated these methods but I didn't finished my script yet.
I try to place this code here for your tests. We will update libraries in the next release, but I think It will be in November. So, you can find something else here before release and I hope it speeds up development.

Re: bmp180 reading of values

Posted: 27 Oct 2016 08:41
by A.Harrenberg
Hi p0lyg0n1,
thank you very much. I will try to test it on the weekend but I am currently a little busy and I also have some hw-problems with my system right now, but I think it is a broken sensor as it is the same on the 2nd Z-Uno...

For me fixed-point code is good, there is a lot of overhead with floating point just to get a better accuracy of maybe 0.x hpa... I havent checked for a longer period, but currently I am within +/- 2 hpa compared to an official weather station 7 km away. But I am using the (indoor) temperature of the BMP180 to correct the pressure, which is not correct. When I test it the next time I will use the outdoor temperature and compare then again to the official values.

So, thanks for your work and fixpoint is ok! ,-)

Regards,
Andreas.