

The DPS310 is a digital barometric pressure sensor that provides high-precision measurements of atmospheric pressure and temperature. It is designed for low-power operation and features a small form factor, making it ideal for portable and battery-powered devices. The DPS310 is commonly used in applications such as weather monitoring, altitude measurement, and environmental sensing. Its high accuracy and digital interface make it a versatile choice for a wide range of projects.








The DPS310 has 8 pins, as described in the table below:
| Pin | Name | Description |
|---|---|---|
| 1 | GND | Ground |
| 2 | VDD | Supply voltage (1.7 V to 3.6 V) |
| 3 | SCL | I²C clock line / SPI clock input |
| 4 | SDA | I²C data line / SPI data input/output |
| 5 | CSB | Chip select for SPI (active low) / I²C address bit |
| 6 | PS | Protocol select: High = I²C, Low = SPI |
| 7 | INT | Interrupt output (optional) |
| 8 | GND | Ground |
Below is an example of how to use the DPS310 with an Arduino UNO via I²C:
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_DPS310.h>
// Create an instance of the DPS310 sensor
Adafruit_DPS310 dps310;
void setup() {
Serial.begin(9600);
while (!Serial); // Wait for Serial Monitor to open
// Initialize I²C communication
if (!dps310.begin_I2C()) {
Serial.println("Failed to find DPS310 sensor!");
while (1); // Halt execution if sensor is not found
}
Serial.println("DPS310 sensor initialized.");
}
void loop() {
// Read pressure in hPa
float pressure = dps310.readPressure();
// Read temperature in °C
float temperature = dps310.readTemperature();
// Print the readings to the Serial Monitor
Serial.print("Pressure: ");
Serial.print(pressure);
Serial.println(" hPa");
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
delay(1000); // Wait 1 second before the next reading
}
Sensor Not Detected:
Inaccurate Readings:
I²C Communication Errors:
Q: Can the DPS310 measure altitude directly?
A: The DPS310 provides pressure readings, which can be converted to altitude using the barometric formula. Many libraries include this functionality.
Q: What is the maximum I²C clock speed supported?
A: The DPS310 supports I²C clock speeds up to 3.4 MHz.
Q: Can the DPS310 operate in high-humidity environments?
A: While the DPS310 is robust, prolonged exposure to high humidity may affect its performance. Consider using a protective enclosure in such environments.