

The Adafruit DPS310 Precision Barometric Pressure and Altitude Sensor is a high-accuracy environmental sensor designed to measure barometric pressure and altitude. It is based on the DPS310 sensor from Infineon, which features a capacitive pressure sensor and a high-resolution ADC for precise measurements. This sensor is ideal for applications such as weather monitoring, altitude tracking, and environmental data logging. Its compact size and I2C/SPI communication interfaces make it easy to integrate into a wide range of projects.








The following table outlines the key technical details of the Adafruit DPS310 sensor:
| Parameter | Value |
|---|---|
| Operating Voltage | 1.7V to 3.6V |
| Logic Level Compatibility | 3.3V and 5V (via onboard regulator) |
| Pressure Measurement Range | 300 hPa to 1200 hPa |
| Pressure Resolution | 0.002 hPa |
| Altitude Resolution | ±0.5 meters |
| Operating Temperature Range | -40°C to +85°C |
| Communication Interfaces | I2C, SPI |
| I2C Address (Default) | 0x77 |
| Dimensions | 16mm x 16mm x 2mm |
The Adafruit DPS310 sensor breakout board has the following pin layout:
| Pin | Name | Description |
|---|---|---|
| 1 | VIN | Power input (3.3V or 5V). Powers the onboard voltage regulator. |
| 2 | GND | Ground connection. |
| 3 | SCL | I2C clock line. Connect to the SCL pin of your microcontroller. |
| 4 | SDA | I2C data line. Connect to the SDA pin of your microcontroller. |
| 5 | CS | Chip Select for SPI communication. Leave unconnected for I2C mode. |
| 6 | SDO | SPI Data Out (MISO). Leave unconnected for I2C mode. |
| 7 | SDI | SPI Data In (MOSI). Leave unconnected for I2C mode. |
| 8 | INT | Interrupt pin. Can be used for event-driven applications. |
The Adafruit DPS310 sensor is compatible with the Arduino platform. To get started:
#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 the DPS310 sensor
if (!dps310.begin_I2C()) {
Serial.println("Failed to find DPS310 sensor! Check wiring.");
while (1); // Halt execution if sensor is not found
}
Serial.println("DPS310 sensor initialized successfully.");
}
void loop() {
// Read pressure in hPa
float pressure = dps310.readPressure();
// Read altitude in meters
float altitude = dps310.readAltitude();
// Print the readings to the Serial Monitor
Serial.print("Pressure: ");
Serial.print(pressure);
Serial.println(" hPa");
Serial.print("Altitude: ");
Serial.print(altitude);
Serial.println(" meters");
delay(1000); // Wait 1 second before the next reading
}
Sensor Not Detected:
Incorrect Readings:
Communication Errors:
Q: Can the DPS310 measure temperature?
A: Yes, the DPS310 includes an integrated temperature sensor for compensation purposes. You can also read the temperature data directly.
Q: How accurate is the altitude measurement?
A: The altitude resolution is ±0.5 meters, but accuracy depends on the stability of the pressure readings and environmental conditions.
Q: Can I use the DPS310 with a 5V microcontroller?
A: Yes, the onboard voltage regulator and level shifters allow the sensor to work with 5V logic.
Q: What is the maximum I2C clock speed supported?
A: The DPS310 supports I2C clock speeds up to 400 kHz (Fast Mode).
By following this documentation, you can effectively integrate the Adafruit DPS310 Precision Barometric Pressure and Altitude Sensor into your projects for accurate environmental data measurements.