This is the SDP (Sensirion Differential Sensor) a series of digital differential pressure sensors suitable for high volume applications. This sensor measure the pressure of air and non-aggressive gases with advance accuracy and no offset drift. This series of sensors cover a pressure range up to ±5,00 Pa (±2 inch H2O / ±5 mbar) and deliver outstanding accuracy and also the bottom end of the measuring range.
The SDP sensor features a digital i2c / TWI (two wire interface, which make it easy to connect directly to your microcontroller, or microprocessor. The outstanding performance of these sensors is based on patented Sensirion’s CMOSense sensor technology, which combines the sensor element signal processing and digital calibration on a small CMOS chip. The differential pressure is measured by thermal sensor element using flow-through technology. This device is suitable for used in Medical/Clinical Devices, HVAC (Heating Ventilating Air Conditioning), Smart Energy, Gas Boilers, Gas Ovens, Pellet Stoves, Thermostats, Filter Monitor, Clean Room, Fume Hoods, Fuel Cells, VAC Control, Building Automations, Industrial and Automotive. For further readings please refer to the datasheet below.
Required Components
- Arduino IDE | Atmel Studio | STM32CubeMX | Energia
- Microcontroller – Arduino, NodeMCU, Teensy Board, TeensyDuino, ESP8266 12, 12E, ESP32, LinkItOne, ESP8266 NodeMCU, ESPDuino, ATMEGA328 16/12, ATMEGA32u4 16/8/ MHz, ESP8266, MSP430 ,ATMEGA250 16 MHz, ATSAM3x8E, ATSAM21D, ATTINY85 16/8 MHz, STM32 Nucleo, Discovery kits and Evaluation boards Note: The Diagram below is using NANO. (please refer to each MCU’s respective pin-outs & bus configurations)
- Sensirion Differential Sensor
- Capacitors (See below required values)
- Resistors (See below required values)
- Jumper Wire (Optional)
- Prototyping Board (Optional)
Wiring Guide
Source Code for Continuous Reading
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
//#include <Arduino.h> #include "SDP.h" #include "Wire.h" SDP_Controller SDP800; /* This code is tested on SDP810 but works on SDP31 (500Pa), SDP32 (125Pa), SDP800 - 500Pa, SDP800 - 125Pa SDP810 - 500Pa, SDP810 > 125Pa */ double DP, TMP; uint32_t prevMillis = 0; void setup(){ while(!Serial){ Serial.begin(115200); //If serial is available } Serial.println("14CORE | Digital Differential Pressure Sensor Test Code"); Serial.orintln("Initializing..........................................."); delay(4000); SDP_timer.begin(SDP_isr,250000); // 1000Hz Wire.begin(); SDP800.begin(); SDP800.getAddress(); SDP800.startContinuousMeasurement(SDP_TEMPCOMP_DIFFERENTIAL_PRESSURE, SDP_AVERAGING_TILL_READ); } void loop(){ //set to read at 100Hz if((millis() - prevMillis) > 10){ DP = SDP800.getDiffPressure(); TMP = SDP800.getTemperature(); // Serial.println(DP); Serial.println(TMP); } delay(1000) } |
Source Code for Interrupt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
//#include <Arduino.h> #include "SDP.h" #include "Wire.h" #define IRQ_PIN 2 SDP_Controller SDP800; /* This code is tested on SDP810 but works on SDP31 (500Pa), SDP32 (125Pa), SDP800 - 500Pa, SDP800 - 125Pa SDP810 - 500Pa, SDP810 > 125Pa */ double DP, TMP; bool senseFlags = false; void setup(){ while(!Serial){ Serial.begin(115200); } Serial.println("14CORE | Digital Differential Pressure Sensor Test Code"); Serial.println("Initializing..........................................."); delay(4000); pinMode(IRQ_PIN, INPUT_PULLUP); attachInterrupt(IRQ_PIN, sdpISR, FALLING); // Interrupt set to active when low Wire.begin(); SDP800.begin(); SDP800.getAddress(); SDP800.startContinuousMeasurement(SDP_TEMPCOMP_DIFFERENTIAL_PRESSURE, SDP_AVERAGING_TILL_READ); } void loop(){ if(senseFlags == true){ DP = SDP800.getDiffPressure(); TMP = SDP800.getTemperature(); senseFlags = false; Serial.println(DP); Serial.println(TMP); } } //function interrupt routine void sdpISR(void){ senseFlags = true; } |
Source Code for Triggered Reading
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
//#include <Arduino.h> #include "SDP.h" #include "Wire.h" SDP_Controller SDP800; float DPS, TMP; uint32_t prevMillis = 0; void setup(){ while(!Serial){ Serial.begin(115200); //If serial is available } Serial.orintln("Initializing..........................................."); delay(4000); Wire.begin(); SDP800.begin(); SDP800.startContinuousMeasurement(SDP_TEMPCOMP_DIFFERENTIAL_PRESSURE, SDP_AVERAGING_TILL_READ); } void loop(){ // reading at 100Hz if((millis() - prevMillis) > 10){ // Trigger measurement with differential pressure temperature compensation and without clock stretching DPS = SDP800.getDiffPressureTrigger(SDP_TEMPCOMP_DIFFERENTIAL_PRESSURE, SDP_CLKST_NONE); TMP = SDP800.getTemperature(); } } |
Downloads
- Download SDP (Differential Sensor) i2C Arduino Code Library
- Download SDP800 Datasheet
- Download SDP600 Datasheet
- Download SDP8XX STM32 Code Library Test Code
- Download SDP3XX STM32 Code Library Sample Code
- Download User Manual
- Download SDP Brochure
Raspberry pi Python code is available at https://github.com/JJSlabbert/Sensirion_SDP810
Hey, just letting you know there is a typo with one of the Serial.println codes. Also, it seems the SDP.h library doesn’t work
Ok, try this https://www.14core.com/wp-content/uploads/2018/11/SDP6x.zip library.
hey, I’ve just uploaded the SDP8xx library file in arduino V1.8.8 and compiled the code but i’m getting
ERROR : fatal error: cstdint: No such file or directory
please help me to solve it. Thank you
Hey,I’ve tried the above code for SDP8xx in Arduino IDE. The error was showing at included library, seems cstdint was not found in any directory, kindly help me to solve it. Thank you
hello, could you find a solution for it? I am also getting the same error. Thanks…
hello, could you find a solution for it? I am also getting the same error. Thanks…