

The Adafruit DPS310 Precision Barometric Pressure and Altitude Sensor (Part ID: 4494) is a high-accuracy environmental sensor designed to measure barometric pressure and altitude. This sensor is based on the DPS310 chip, which uses capacitive sensing technology to deliver precise measurements. It is ideal for applications such as weather monitoring, altitude tracking, and environmental data logging.
With its small form factor and I2C/SPI communication interfaces, the DPS310 is easy to integrate into a variety of projects, including those using microcontrollers like the Arduino UNO or Raspberry Pi.








| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Pressure Measurement Range | 300 hPa to 1200 hPa |
| Altitude Measurement Range | -500m to 9000m |
| Pressure Resolution | 0.002 hPa |
| Altitude Resolution | 0.1m |
| Communication Interfaces | I2C (default), SPI |
| Operating Temperature Range | -40°C to +85°C |
| Current Consumption | ~1.7 µA (low-power mode), ~4 µA (standard) |
| Pin Name | Description |
|---|---|
| VIN | Power input (3.3V to 5V). Connect to the power supply of your microcontroller. |
| GND | Ground. Connect to the ground of your circuit. |
| SCL | I2C clock line. Connect to the SCL pin of your microcontroller. |
| SDA | I2C data line. Connect to the SDA pin of your microcontroller. |
| CS | Chip Select for SPI communication. Leave unconnected for I2C mode. |
| SDO | SPI data output. Leave unconnected for I2C mode. |
| INT | Interrupt pin. Can be used for event-driven applications. |
0x77. If there are address conflicts, consult the datasheet for address modification options.#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.");
}
void loop() {
// Read pressure in hPa
float pressure = dps310.readPressure();
// Read temperature in °C
float temperature = dps310.readTemperature();
// Calculate 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("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
Serial.print("Altitude: ");
Serial.print(altitude);
Serial.println(" m");
delay(1000); // Wait 1 second before the next reading
}
Sensor Not Detected:
0x77) is not conflicting with other devices on the bus.Incorrect Readings:
Library Errors:
Q: Can the DPS310 measure both pressure and altitude simultaneously?
A: Yes, the sensor can measure pressure and calculate altitude based on the pressure readings.
Q: What is the maximum altitude the sensor can measure?
A: The DPS310 can measure altitudes up to approximately 9000 meters.
Q: Can I use the DPS310 with a 3.3V-only microcontroller?
A: Yes, the sensor is compatible with both 3.3V and 5V systems.
This concludes the documentation for the Adafruit DPS310 Precision Barometric Pressure and Altitude Sensor.