linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gregor Boirie <gregor.boirie@parrot.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Denis Ciocca <denis.ciocca@st.com>,
	Giuseppe Barba <giuseppe.barba@st.com>
Subject: Re: [RFC PATCH v1 0/9] iio:st_sensors: fixes and lps22hb pressure sensor
Date: Thu, 28 Apr 2016 16:57:46 +0200	[thread overview]
Message-ID: <572224EA.2040303@parrot.com> (raw)
In-Reply-To: <CACRpkdY08X6O=OukhngMR_EKp-gsy=_H7dp1ifm9P7yFto4PLw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2882 bytes --]

On 04/28/2016 09:47 AM, Linus Walleij wrote:
> On Wed, Apr 27, 2016 at 3:08 PM, Gregor Boirie <gregor.boirie@parrot.com> wrote:
>
>> Many thanks for taking time to test this. ~95 kPa seems rather a small value
>> to me.
>>
>> For reference, it seems 950 hPa at sea level would be found under a...
>> hurricane !
>> (may vary with location)
>>
>> Does it match with your local weather forecast / report ?
> Hmmmm no :)
>
> Checking with local weather site it should be ~1006 hPa.
>
> Do you think the sensor is just badly calibrated?

Amongst significant error sources, we regularly struggle against:
* soldering (mechanical, overheat)
* pcb bending and vibrations
* bad device lots, bad storage (esd, wrong calibration, nearby mechanical vibration sources like ultra-sound...)
* electrical noise (power supply, ground...)
* light intensity if not protected by a cover
* temperature, air flow
* probably others we are not aware of yet

All comes with various effects in terms of constant offset, noise and drift. Some are destructive, some are not.
Welcome to world of MEMS :)

> I tested now with another sensor on the Snowball board.
> It gives (after scaling):
>
> 101.4
> 28.8
> 101.9
> 28.8
> 101.9
> 29.5
>
> This sensor seems more accurate wrt pressure.
> However here instead the temperature seems bananas,
> this is a Swedish office, we don't have ~30degrees here...
> And it's not the board is just turned on so I don't think it's
> that warm.
For pressure, LPS001WP may sample with typical absolute error up to 
+/-25 mBar and resolution of
one 16th mBar : not consistent with your first results of ~95 kPa, but 
should comply with pressure
sampling gain modified in patch 4.
No typical accuracy is given for temperature, and resolution is one 64th 
of degree Celsius. I suppose
temperature gain applied in patch 4 is also compliant with all your results.
As a reference for comparison, temperature accuracy for LPS22HB, which 
is much more precise, is +/-1.5
degree Celsius...

So I simply suggest your erroneous results are not induced by wrong 
software sampling gains, which was
my primary fear. No more no less. Maybe Denis may be of any help once he 
has some time to review the
whole patch series.

>   One sensor gives believeable pressure, the other
> gives believeable temperature...
>
> The data sheet says this sensor is calibrated for two
> pressure+temperature combinations at manufacturing.
> I wonder if there are "secret registers" in the device that
> can update the calibration...
As this device is deprecated I suppose we won't get much support from 
ST... Maybe Denis may help if
this really worth the pain :)
>
> Anyways, the measures are not totally off scale so
> I guess they are in the right ballpark. And these patches
> makes it work better for sure.
>
> Yours,
> Linus Walleij
I do greatly appreciate your feedback. Many thanks.
Regards,
greg

[-- Attachment #2: Type: text/html, Size: 4146 bytes --]

  reply	other threads:[~2016-04-28 14:57 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19  9:18 [RFC PATCH v1 0/9] iio:st_sensors: fixes and lps22hb pressure sensor Gregor Boirie
2016-04-19  9:18 ` [RFC PATCH v1 1/9] iio:st_pressure:initial lps22hb sensor support Gregor Boirie
2016-04-24  9:29   ` Jonathan Cameron
2016-05-01 19:28     ` Jonathan Cameron
2016-05-29 14:14       ` Jonathan Cameron
2016-04-19  9:18 ` [RFC PATCH v1 2/9] iio:st_pressure: fix sampling gains Gregor Boirie
2016-05-29 15:14   ` Jonathan Cameron
2016-05-30  8:17     ` Linus Walleij
2016-05-30 12:23       ` Jonathan Cameron
2016-04-19  9:18 ` [RFC PATCH v1 3/9] iio:st_pressure: lps22hb temperature support Gregor Boirie
2016-05-29 14:53   ` Jonathan Cameron
2016-04-19  9:18 ` [RFC PATCH v1 4/9] iio:st_sensors: align on storagebits boundaries Gregor Boirie
2016-04-24  9:35   ` Jonathan Cameron
2016-05-01 19:27     ` Jonathan Cameron
2016-05-02  8:19       ` Gregor Boirie
2016-05-14 17:54         ` Jonathan Cameron
2016-05-03 16:20   ` Crestez Dan Leonard
2016-04-19  9:18 ` [RFC PATCH v1 5/9] iio:st_pressure: align storagebits on power of 2 Gregor Boirie
2016-04-19  9:18 ` [RFC PATCH v1 6/9] iio:st_pressure: temperature triggered buffering Gregor Boirie
2016-04-24 10:58   ` Jonathan Cameron
2016-05-29 14:57     ` Jonathan Cameron
2016-04-19  9:18 ` [RFC PATCH v1 7/9] iio:st_sensors: unexport st_sensors_get_buffer_element Gregor Boirie
2016-05-29 14:59   ` Jonathan Cameron
2016-04-19  9:18 ` [RFC PATCH v1 8/9] iio:st_sensors: emulate SMBus block read if needed Gregor Boirie
2016-05-29 15:06   ` Jonathan Cameron
2016-04-19  9:18 ` [RFC PATCH v1 9/9] iio:st_sensors: fix power regulator usage Gregor Boirie
2016-04-24 11:01   ` Jonathan Cameron
2016-04-24 11:02     ` Jonathan Cameron
2016-05-29 15:10   ` Jonathan Cameron
2016-04-27 11:26 ` [RFC PATCH v1 0/9] iio:st_sensors: fixes and lps22hb pressure sensor Linus Walleij
2016-04-27 12:02   ` Linus Walleij
2016-04-27 13:08     ` Gregor Boirie
2016-04-28  7:47       ` Linus Walleij
2016-04-28 14:57         ` Gregor Boirie [this message]
2016-04-28 15:02         ` Gregor Boirie
2016-06-11 17:36 ` Jonathan Cameron
2016-06-15 10:58   ` Gregor Boirie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=572224EA.2040303@parrot.com \
    --to=gregor.boirie@parrot.com \
    --cc=denis.ciocca@st.com \
    --cc=giuseppe.barba@st.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).