# Barometer Module

Hi, I’m hoping someone here can offer some advice, I have the barometer module connected to a Spider and I’m getting some strange behaviour.

The code in my project is pretty much a cut and paste form the wiki page for the barometer, set interval (1s), register handler, start measurements.

Now here’s my problem, I start the app up and I get values as below:

Temperature: 19.89 degrees Celsius. Pressure: 1058.25 hPa.
Temperature: 13.25 degrees Celsius. Pressure: 967.13 hPa.
Temperature: 15.13 degrees Celsius. Pressure: 994.80 hPa.
Temperature: 54.01 degrees Celsius. Pressure: 1137.83 hPa.
Temperature: 6.06 degrees Celsius. Pressure: 1020.37 hPa.
Temperature: 21.77 degrees Celsius. Pressure: 978.04 hPa.
Temperature: 13.48 degrees Celsius. Pressure: 1111.47 hPa.

Then if I gently touch the the top of the packaging for the oscillator on the module, not the pins or anything else, for about a second and let go the values swich to

Temperature: 21.41 degrees Celsius. Pressure: 1017.68 hPa.
Temperature: 21.41 degrees Celsius. Pressure: 1017.71 hPa.
Temperature: 21.41 degrees Celsius. Pressure: 1017.71 hPa.
Temperature: 21.42 degrees Celsius. Pressure: 1017.67 hPa.
Temperature: 21.42 degrees Celsius. Pressure: 1017.80 hPa.
Temperature: 21.42 degrees Celsius. Pressure: 1017.76 hPa.
Temperature: 21.41 degrees Celsius. Pressure: 1017.71 hPa.

Anyone got any ideas? This is being powered via the USB DP from a laptop.

Cheers,

Stephen.

Just tried the same thing on a Hydra board with the same outcome.

i believe Eric (EriSans2000) mentioned this on another post…

you may want to take an average of 10 readings… to get the correct value…
i just added what you’ve posted (7 readings) and divided it by 7 and got 20.51 …so my guess that is somewhat the right value.

try it and let us know.

thanks.

While what you say is sound, I can’t believe this is correct!

Temperature: 24.25 degrees Celsius. Pressure: 1026.15 hPa.
Temperature: 13.28 degrees Celsius. Pressure: 1005.98 hPa.
Temperature: 27.25 degrees Celsius. Pressure: 1053.58 hPa.
Temperature: 8.42 degrees Celsius. Pressure: 915.45 hPa.a.
Temperature: 22.23 degrees Celsius. Pressure: 1054.66 hPa.
Temperature: 6.64 degrees Celsius. Pressure: 929.82 hPa.
Temperature: 38.31 degrees Celsius. Pressure: 1051.84 hPa.
Temperature: 26.12 degrees Celsius. Pressure: 934.33 hPa…
Temperature: 23.98 degrees Celsius. Pressure: 1071.16 hPa.
Temperature: 27.29 degrees Celsius. Pressure: 1147.52 hPa.
Temperature: 33.94 degrees Celsius. Pressure: 1035.70 hPa.
Temperature: 42.22 degrees Celsius. Pressure: 1016.03 hPa.
Temperature: 3.12 degrees Celsius. Pressure: 957.00 hPa.
Temperature: 13.17 degrees Celsius. Pressure: 959.26 hPa.
Temperature: 20.08 degrees Celsius. Pressure: 1117.80 hPa.
Temperature: 22.02 degrees Celsius. Pressure: 881.39 hPa.
Temperature: 37.79 degrees Celsius. Pressure: 1000.08 hPa.
Temperature: 8.18 degrees Celsius. Pressure: 1054.22 hPa.
Temperature: 11.76 degrees Celsius. Pressure: 1055.11 hPa.
Temperature: 23.19 degrees Celsius. Pressure: 1025.96 hPa.
Temperature: 30.92 degrees Celsius. Pressure: 1071.13 hPa.
Temperature: 13.73 degrees Celsius. Pressure: 967.95 hPa.
Temperature: 23.65 degrees Celsius. Pressure: 1075.65 hPa.
Temperature: 21.56 degrees Celsius. Pressure: 1037.94 hPa.
Temperature: 28.96 degrees Celsius. Pressure: 1048.69 hPa.
Temperature: 23.11 degrees Celsius. Pressure: 1153.29 hPa.
Temperature: 16.43 degrees Celsius. Pressure: 1032.98 hPa.
Temperature: -4.29 degrees Celsius. Pressure: 1008.48 hPa.
Temperature: 17.39 degrees Celsius. Pressure: 989.58 hPa.
Temperature: 45.61 degrees Celsius. Pressure: 1092.99 hPa.
Temperature: 25.70 degrees Celsius. Pressure: 1013.44 hPa.
Temperature: 12.83 degrees Celsius. Pressure: 970.75 hPa.
Temperature: 17.12 degrees Celsius. Pressure: 1001.36 hPa.
Temperature: 41.01 degrees Celsius. Pressure: 996.75 hPa.
Temperature: 19.53 degrees Celsius. Pressure: 1059.61 hPa.
Temperature: 19.43 degrees Celsius. Pressure: 1034.27 hPa.
Temperature: 13.05 degrees Celsius. Pressure: 1037.20 hPa.
Temperature: -4.23 degrees Celsius. Pressure: 921.54 hPa.
Temperature: 12.66 degrees Celsius. Pressure: 961.73 hPa.
Temperature: 23.08 degrees Celsius. Pressure: 1012.34 hPa.
Temperature: 24.33 degrees Celsius. Pressure: 1076.42 hPa.
Temperature: 21.64 degrees Celsius. Pressure: 1097.40 hPa.
Temperature: 17.77 degrees Celsius. Pressure: 1054.70 hPa.
Temperature: 7.72 degrees Celsius. Pressure: 962.73 hPa.
Temperature: 19.15 degrees Celsius. Pressure: 985.26 hPa.
Temperature: 25.50 degrees Celsius. Pressure: 1002.02 hPa.
Temperature: 22.37 degrees Celsius. Pressure: 1110.58 hPa.
Temperature: 34.19 degrees Celsius. Pressure: 1093.82 hPa.
Temperature: 45.61 degrees Celsius. Pressure: 1075.81 hPa.
Temperature: 50.03 degrees Celsius. Pressure: 1125.01 hPa.
Temperature: 9.73 degrees Celsius. Pressure: 1023.04 hPa.
Temperature: 22.03 degrees Celsius. Pressure: 1026.87 hPa.
Temperature: 5.01 degrees Celsius. Pressure: 928.20 hPa.
Temperature: 17.56 degrees Celsius. Pressure: 1053.84 hPa.
Temperature: 32.07 degrees Celsius. Pressure: 1160.76 hPa.
Temperature: 37.94 degrees Celsius. Pressure: 1070.31 hPa.
Temperature: 18.70 degrees Celsius. Pressure: 1042.44 hPa.
Temperature: 20.63 degrees Celsius. Pressure: 1069.14 hPa.
Temperature: 35.63 degrees Celsius. Pressure: 1079.46 hPa.

LOL that’s too much addition for me to try, please try it in code and let us know…

I would find it hard to believe that a running average would be as stable as what he gets after touching the sensor.

With a power on (no touching) reading the range is 881.39 to 1160.76; the temperature ranges as well are all over the place: -4.29 to 45.61.

After touches, the range is 1017.67 to 1017.80; temps are 21.41 or 21.42

No, I’m sorry, but there is no way the sensor values should swing that much!! I’d accept the average approach to get to 1dp of accuracy but, the swing is from -5 to +50degC, that’s unacceptable for what the HP03Ms data sheet describes as a ‘calibrated sensor module

Just for clarity I’ve put a video of what happens at http://www.grostech.com/tmp/siw/WP_20120717_181535Z.mpg

Once it’s working the values are spot on, but I need to find a way to get the correct values without having to physically touch the device after a restart.

@ mhectorgato: yep, I just want it stable when I turn it on. I’ve stuck a 10 second delay via a timer berfore I start reading the sensor, but that’s not changed anything. Also it’s perfectly stable when it’s restarted via the debugger or the reset switch (i.e. not power cycled)

Ahh in that case try this:

There’s also a view that you should tie the unused analog in inputs to GND to reduce noise in the ADC

Brett mentioned here :
http://www.tinyclr.com/forum/topic?id=7890

Sorry if I did not make this clear this is the Seeed Barometer module, it’s I2C from the sensor, there is no analog.

Here’s the datasheet http://www.hoperf.com/sensor/barometer_sensor/HP03M.htm

There still may be a grounding problem if you’re seeing swings like that (likely issues with not having a single point ground). What sort of working surface are you on? The module may be grounding out in some weird way that is preventing the USB ground from being used appropriately.

edit:
After looking at the back of my barometer module I can see that some of the vias are exposed (nor covered by the black conformal coating). Check for FOD. If it isn’t FOD or work surface related then I’d whip out a voltmeter and do some unpowered continuity/anti-continuity testing of the ground pins (for the module itself, and for the individual components). You might find a solder joint that needs a touch up because of a cold solder. Does a light tough of the module fix it, or is it a heavy touch?

Also, did you try a different socket to see if the problem goes away?

I think it might be a soldering issue. The fact you touch the oscillator and it works seems odd.

Carpet at the moment, fails even if held in the air. There is also the fact that once working, it’s rock steady

What version is your module, this is 1.1, all the vias are covered by the coating and no sign of damage.
It’s a very light touch, I only have to make contact, not push it hard or anything. I can knock it arround all I like after that and it keeps ticking.

Different socket, different main board Spider/Hydra, different cables.

Yep, I’m ready to write the module off as duff, I need to order some more stuff so I’ll get another.

It would be reassuring if one non-GHI poster would comment to the effect that the 1.1 module works for them

I have version 1.0. Hopefully they didn’t goof something up with a new design.

I just reflowed all the solder joints and have the same problem. Looks like a new module it is.

Same problem here: Highly variating sensor values, touching the top of the sensor leads to proper values. Could not say anything about the version number of my module but I will look it up and post it tomorrow!

Oh dear…

Wow! Has anyone try to check with seeed?

Not yet, just out of the euphorical first “experimental phase” with my modules

I think I will write them tomorrow due to my problems with GSM and barometer module, it seems that the modules from seeed still need to get some improvement…

You must have a bad module as one of my Seeed barometers has been posting pressure and temp every 10 seconds here https://cosm.com/feeds/63195 and has been working flawless for a couple of weeks now. I’ve had no problems with any of my other Seeed barometers either (lucky, maybe).

As to getting support from Seeed, good luck. While I really like some of their modules, support and new modules don’t seem to be happening at Seeed, which is too bad and something I’m having a hard time understanding given how well GHI Electronics seems to be doing in this space (granted support etc from GHI Electronics is the stuff that legends are made of, but still it must be time for some new modules from GHI as my credit card is feeling neglected).