1. Introduction
The BMP180 is a digital pressure sensor used to measure atmospheric pressure and temperature. It communicates using the I2C protocol, making it easy to interface with Raspberry Pi. It is widely used in weather monitoring systems.
2. Components
- Raspberry Pi
- BMP180 Sensor Module
- Breadboard
- Jumper Wires
3. Circuit and connections
| Raspberry Pi Pinout Diagram |
| BMP180 Sensor Module Pinout Diagram |
- VCC → 3.3V (Pin 1)
- GND → GND (Pin 6)
- SDA → GPIO2 (Pin 3)
- SCL → GPIO3 (Pin 5)
4. Detailed Step By Step Circuit working
- BMP180 measures atmospheric pressure
- Internal sensor converts pressure to digital data
- Data is sent via I2C communication
- Raspberry Pi reads data through SDA and SCL pins
- Pressure and temperature values are calculated
- Values are displayed on terminal
5. Libraries to be included
import smbus
import time
6. Code
import smbus
import time
import BMP085 # Library compatible with BMP180
bus = smbus.SMBus(1)
sensor = BMP085.BMP085()
while True:
temp = sensor.read_temperature()
pressure = sensor.read_pressure()
print("Temperature: {:.2f} C".format(temp))
print("Pressure: {:.2f} Pa".format(pressure))
time.sleep(1)
7. Detailed Step By Step Code working
- Import required libraries
- Initialize I2C communication
- Create sensor object
- Read temperature value
- Read pressure value
- Print values on screen
- Add delay for continuous reading
8. Tips
- Enable I2C in Raspberry Pi settings
- Use correct library for BMP180
- Ensure stable 3.3V supply
-
Check I2C address using
i2cdetect
9. Uses
- Weather stations
- Altitude measurement
- Drone applications
- Environmental monitoring
10. Conclusion
The BMP180 sensor is a reliable and accurate sensor for pressure and temperature measurement. It is ideal for IoT and weather-based projects using Raspberry Pi.