Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Adafruit LPS35HW: Examples, Pinouts, and Specs

Image of Adafruit LPS35HWDesign with Adafruit LPS35HW in Cirkit Designer

Introduction

The Adafruit LPS35HW is a state-of-the-art pressure sensor module capable of measuring barometric pressure and ambient temperature with high precision. This compact sensor is ideal for a wide range of applications, including weather stations, altitude measurements for drones, indoor navigation, and fitness trackers. Its low power consumption and support for both I2C and SPI communication interfaces make it versatile for use in embedded systems, particularly those that require long battery life.

Explore Projects Built with Adafruit LPS35HW

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Battery-Powered Smart Light with Proximity Sensor and OLED Display using Adafruit QT Py RP2040: A project utilizing Adafruit LPS35HW in a practical application
Battery-Powered Smart Light with Proximity Sensor and OLED Display using Adafruit QT Py RP2040

This circuit is a portable, battery-powered system featuring an Adafruit QT Py RP2040 microcontroller that interfaces with an OLED display, a proximity sensor, an accelerometer, and an RGB LED strip. The system is powered by a lithium-ion battery with a step-up boost converter to provide 5V for the LED strip, and it includes a toggle switch for power control. The microcontroller communicates with the sensors and display via I2C.

Open Project in Cirkit Designer

Technical Specifications

Key Features

Pin Configuration and Descriptions

Pin Number Name Description
1 VDD Power supply (1.7V to 3.6V)
2 GND Ground reference for the power supply
3 SDA I2C Data Line / SPI Serial Data Out (SDO)
4 SCL I2C Clock Line / SPI Serial Clock (SCK)
5 SA0 I2C Address Selection / SPI Serial Data In (SDI)
6 CS SPI Chip Select (active low)

Usage Instructions

Integration into a Circuit

  1. Power Supply: Connect the VDD pin to a 1.7V to 3.6V power source and the GND pin to the ground of your circuit.
  2. Communication Interface:
    • For I2C, connect SDA to your microcontroller's SDA line and SCL to the SCL line.
    • For SPI, connect SDO, SDI, and SCK to the corresponding SPI pins on your microcontroller and CS to a digital pin designated for chip select.
  3. Address Selection: For I2C, the SA0 pin can be connected to either VDD or GND to select between two possible I2C addresses.

Best Practices

Example Code for Arduino UNO

Below is an example code snippet for interfacing the Adafruit LPS35HW with an Arduino UNO using the I2C communication protocol.

#include <Wire.h>
#include <Adafruit_LPS35HW.h>

Adafruit_LPS35HW lps = Adafruit_LPS35HW();

void setup() {
  Serial.begin(9600);
  // Wait for serial monitor to open
  while (!Serial) { delay(10); }

  Serial.println("LPS35HW Test");

  if (!lps.begin_I2C()) { // Initialize over I2C
    Serial.println("Failed to find LPS35HW chip");
    while (1) { delay(10); }
  }
  Serial.println("LPS35HW Found!");
}

void loop() {
  Serial.print("Pressure: ");
  Serial.print(lps.readPressure());
  Serial.println(" hPa");

  Serial.print("Temperature: ");
  Serial.print(lps.readTemperature());
  Serial.println(" C");

  delay(500);
}

Ensure you have installed the Adafruit_LPS35HW library before uploading this code to your Arduino UNO.

Troubleshooting and FAQs

Common Issues

FAQs

Q: Can the LPS35HW be used outdoors? A: Yes, but it should be protected from direct exposure to water and extreme environmental conditions.

Q: What is the default I2C address? A: The default I2C address is 0x5C when SA0 is connected to GND, and 0x5D when connected to VDD.

Q: How can I calibrate the sensor? A: Calibration procedures are detailed in the sensor's datasheet and typically involve taking readings at known pressure and temperature points.

For further assistance, consult the Adafruit LPS35HW datasheet and the Adafruit support forums.