Digital pressure sensor Driver

Discussions and support about ChibiOS/EX, the External Peripherals Abstraction Layer.
User avatar
RoccoMarco
Posts: 596
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 72 times
Been thanked: 53 times
Contact:

Re: Digital pressure sensor Driver

Postby RoccoMarco » Mon Jun 06, 2016 10:24 pm

:mrgreen: We will update readme as soon as EX reach a equilibrium point! Thanks for the notice.
Ciao,
RM

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Location: Minsk, Belarus
Been thanked: 7 times

Re: Digital pressure sensor Driver

Postby barthess » Wed Jun 08, 2016 6:28 pm

Hi there.
1) I see problem in thermometer and barometer API.
I do not know barometers and thermometers with settable
sensitivity. They have resolution instead.
2) All sensors return just MSG_OK/MSG_RESET. What
about returning error mask/number? Or additional API
call like getLastError(sensor *ptr)?

User avatar
RoccoMarco
Posts: 596
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 72 times
Been thanked: 53 times
Contact:

Re: Digital pressure sensor Driver

Postby RoccoMarco » Thu Jun 09, 2016 8:22 am

Hi barthess,
thanks for this precious feedback. I am working on a restyle of the current implementations. We are far from the definitive version and the idea is to improve driver until we have something suitable for most common uses.

Note that bias and sensitivity are two abstract concept related to a linear correction according to formula

Sens * Data + Bias = Cooked

Whereas Data is a 1xn vector, Sens is a nxn matrix and Bias is a 1xn vector. Since cross sensitivity values are almost 0 in our model we are considering Sensitivity like a nx1 vector.

By the way:
Senza titolo-1.jpg


The second point... My bad! I have to improve the whole error management. Thanks for notice me.

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Location: Minsk, Belarus
Been thanked: 7 times

Re: Digital pressure sensor Driver

Postby barthess » Fri Jun 10, 2016 7:06 pm

Hm... ok, let it be abstract characteristic. But BMP085 for example has
settable (via API?) resolution and hardwired sensitivity. Also
RoccoMarco wrote:Sens * Data + Bias = Cooked

formula is incorrect for pressure calculation. Any way, I have
no ideas about common abstract interface for all kind of
MEMS sensors. I have try hard to create such interface
and best achieved conception you can found here https://github.com/barthess/u2/tree/mas ... rc/sensors
I still think it is ugly but have no better ideas.

User avatar
RoccoMarco
Posts: 596
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 72 times
Been thanked: 53 times
Contact:

Re: Digital pressure sensor Driver

Postby RoccoMarco » Fri Jun 10, 2016 8:28 pm

Thanks a lot barthess,
i will take a look to compensation methods for barometers. Do you have further reading to suggest me?

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Location: Minsk, Belarus
Been thanked: 7 times

Re: Digital pressure sensor Driver

Postby barthess » Fri Jun 10, 2016 9:42 pm

RoccoMarco wrote:i will take a look to compensation methods for barometers.

All that compensation magic goes from IC's datasheet.
RoccoMarco wrote:Do you have further reading to suggest me?

No. That is all I have. All future way is full of your trials and errors in
context of current projects. There is no spoon silver bullet.

User avatar
RoccoMarco
Posts: 596
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 72 times
Been thanked: 53 times
Contact:

Re: Digital pressure sensor Driver

Postby RoccoMarco » Fri Jun 10, 2016 9:45 pm

Thanks. We will improve it.

User avatar
tfAteba
Posts: 510
Joined: Fri Oct 16, 2015 11:03 pm
Location: Chartres, France
Has thanked: 75 times
Been thanked: 44 times

Re: Digital pressure sensor Driver

Postby tfAteba » Fri Jun 10, 2016 10:06 pm

Hi all,

For me I think it is very difficult to make a generic driver to fit to all existing sensors. Some time it will be necessary to customize or modify an existing driver for some people.

But It is interresting to propose a driver that cover a larger number of sensor.

regards,

Theo.

User avatar
Giovanni
Site Admin
Posts: 11083
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 367 times
Been thanked: 306 times
Contact:

Re: Digital pressure sensor Driver

Postby Giovanni » Fri Jun 10, 2016 10:24 pm

It does not have to cover all features, it has to cover common features. Specific features can be covered with configuration or custom functions. Configuration is the preferred way of course.

Giovanni

User avatar
tfAteba
Posts: 510
Joined: Fri Oct 16, 2015 11:03 pm
Location: Chartres, France
Has thanked: 75 times
Been thanked: 44 times

Re: Digital pressure sensor Driver

Postby tfAteba » Fri Jun 10, 2016 11:09 pm

That sounds good for me :mrgreen:

Theo


Return to “ChibiOS/EX”

Who is online

Users browsing this forum: No registered users and 1 guest