project resulting from the hidden pandemic, by the MakersMA group. Released for use, provided that it assigns the copyright to the repository dententor.
library for reading differential pressure / gauge sensors from the manufacturer NXP. With pressure return in KPA, PSI, BAR, CMH2O quantities.
https://www.nxp.com/products/sensors/pressure-sensors:DRSNSPRSSR
- Call the library and create a Pressure object, containing at least the address of the analog port to which the sensor is located.
#include "Pressure.h"
Pressure Sensor(A0,MXP5010);Or with the help of a multimeter take the operating voltage from the microcontroller to calibrate the sensor:
#include "Pressure.h"
Pressure Sensor(A0, MXP5010, 4.85);- Insert the
Init ()function in the arduino setup
void setup(){
Sensor.Init();
}- Use
Get(MODEL,TYPE OF PRESSURE MEASUREMENT)to obtain the pressure value. Do this by entering two information 1- Sensor model and 2 - response magnitude.
void loop(){
float value = Sensor.Get(BAR);
}| MODELS | TYPE OF PRESSURE MEASUREMENT | OBS |
|---|---|---|
| MPX5010 👍 | KPA 👍 | Default |
| MPX5050 👍 | BAR 👍 | |
| MPX5700 👍 | PSI 👍 | |
| - | CMH2O 👍 |
legend:
👍 is runing,
👎 removed,
💻 in development- Leandro L. (library developer)
- Jessica Santos (mathematical modeler)
- Valdioleno (electronic validation)
- Rafael (insert TF of sensors)