Home        Store        Docs        Blog

Calibrating BAR30-Sensor-r1


(Frank Dorrance) #1

Just started working with the bar 30 sensor, with an arduino mega2560 r3 and a 4 channel IIc logic converter bi-directional module

loaded and ran calculation test sketch (ran fine) after some research used sda20 and scl21 pins for I2c Data and i2c clock. after running the sample code as shipped and getting readings that seemed off made small changes to ms5837 sample code to report in deg f and inches. program serial output:

Temperature: 51.10 deg F this is correct

Depth: 5.40 in on desk top not under water

Altitude: -357.12 ft above mean sea level appx 400ft above sea level

Pressure: 1026.20 mbar

is their a calibrate funtion


(Rusty) #2

Hi Frank,

Thanks for the post. This is a good question.

The Bar30 software is written to provide the depth based on standard atmospheric pressure. If your location has non-standard pressure, then the measurements will be off by a few inches.

Currently, there is no way to input a new atmospheric pressure. You can get around that by doing one of the following:

  • For depth, you can read the value in air, save that, and subtract it from all future measurements. In your case, you’d subtract 5.4 inches of depth from your measurement.
  • For altitude, you can do the same thing with a reference altitude as your starting point. Note that the atmospheric pressure conditions are constantly changing based on weather.
  • You can calculate the depth or altitude yourself and use the current atmospheric pressure measurement in the calculation.

I hope this helps. Please let me know if you have any questions!

-Rusty


(Frank Dorrance) #3

Thanks