Skip to main content

ЁЯМб️ Interfacing BMP180 Pressure & Temperature Sensor with Raspberry Pi 3

ЁЯФ╣ Overview

The BMP180 is a sensor that measures atmospheric pressure and temperature. It is commonly used in weather stations, altitude measurement, and IoT projects. In this tutorial, we will interface the BMP180 sensor with Raspberry Pi 3 and display the readings.


ЁЯЫа️ Components Required

✔️ Raspberry Pi 3
✔️ BMP180 Sensor
✔️ Breadboard & Jumper Wires


ЁЯФМ Circuit Diagram

The BMP180 communicates with the Raspberry Pi using the I2C protocol.

ЁЯФЧ BMP180 to Raspberry Pi Connections   

BMP180 PinConnection
VCC3.3V (Raspberry Pi)
GNDGND
SDAGPIO 2 (I2C SDA)
SCLGPIO 3 (I2C SCL)

ЁЯУЬ Python Code to Read BMP180 Sensor

Save the following Python script as bmp180_sensor.py and run it on Raspberry Pi.

python
import smbus import time # BMP180 Default Address BMP180_ADDR = 0x77 # Open I2C bus bus = smbus.SMBus(1) def read_temperature(): bus.write_byte_data(BMP180_ADDR, 0xF4, 0x2E) time.sleep(0.005) temp_msb = bus.read_byte_data(BMP180_ADDR, 0xF6) temp_lsb = bus.read_byte_data(BMP180_ADDR, 0xF7) temp = ((temp_msb << 8) + temp_lsb) / 340.0 + 36.53 return round(temp, 2) try: while True: temperature = read_temperature() print("Temperature:", temperature, "°C") time.sleep(2) except KeyboardInterrupt: print("\nProgram stopped.")

ЁЯТб How It Works

  1. The BMP180 sensor uses the I2C protocol to communicate with the Raspberry Pi.
  2. The Python script sends commands to the sensor and reads the temperature values.
  3. The sensor returns the temperature data, which is displayed on the screen.

ЁЯОп Applications

✅ Weather stations
✅ Altitude measurement
✅ IoT-based climate monitoring


ЁЯУЭ рдорд░ाрдаीрдд рд╕рдордЬाрд╡рдгी (Marathi Explanation)

ЁЯФ╣ рдкрд░िрдЪрдп

BMP180 рд╕ेрди्рд╕рд░ рд╣ा рд╣рд╡ाрдоाрдиाрдЪा рджाрдм (Pressure) рдЖрдгि рддाрдкрдоाрди (Temperature) рдоोрдЬрдг्рдпाрд╕ाрдаी рд╡ाрдкрд░рд▓ा рдЬाрддो. рдпाрдЪा рдЙрдкрдпोрдЧ рд╣рд╡ाрдоाрди рдХेंрдж्рд░े, IoT рдк्рд░рдХрд▓्рдк рдЖрдгि рдЙंрдЪी рдоोрдЬрдг्рдпाрд╕ाрдаी рдХेрд▓ा рдЬाрддो.


ЁЯЫа️ рдЖрд╡рд╢्рдпрдХ рдШрдЯрдХ

✔️ рд░ाрд╕्рдкрдмेрд░ी рдкाрдп рей
✔️ BMP180 рд╕ेрди्рд╕рд░
✔️ рдм्рд░ेрдбрдмोрд░्рдб рдЖрдгि рдЬрдо्рдкрд░ рд╡ाрдпрд░


ЁЯФМ рд╕рд░्рдХिрдЯ рдХрдиेрдХ्рд╢рди

BMP180 рд╕ेрди्рд╕рд░ I2C рдк्рд░ोрдЯोрдХॉрд▓ рд╡ाрдкрд░рддो.

BMP180 рдкिрдирд░ाрд╕्рдкрдмेрд░ी рдкाрдп рдХрдиेрдХ्рд╢рди
VCC3.3V
GNDGND
SDAGPIO 2 (I2C SDA)
SCLGPIO 3 (I2C SCL)

ЁЯУЬ рдкाрдпрдеॉрди рдХोрдб

рд╣ा рдХोрдб bmp180_sensor.py рдиाрд╡ाрдиे рд╕ेрд╡्рд╣ рдХрд░ा рдЖрдгि рдЪाрд▓рд╡ा.

python
import smbus import time BMP180_ADDR = 0x77 bus = smbus.SMBus(1) def read_temperature(): bus.write_byte_data(BMP180_ADDR, 0xF4, 0x2E) time.sleep(0.005) temp_msb = bus.read_byte_data(BMP180_ADDR, 0xF6) temp_lsb = bus.read_byte_data(BMP180_ADDR, 0xF7) temp = ((temp_msb << 8) + temp_lsb) / 340.0 + 36.53 return round(temp, 2) try: while True: temperature = read_temperature() print("рддाрдкрдоाрди:", temperature, "°C") time.sleep(2) except KeyboardInterrupt: print("\nрдк्рд░ोрдЧ्рд░ॅрдо рдеांрдмрд▓ा.")

ЁЯТб рд╣े рдХрд╕े рдХाрд░्рдп рдХрд░рддे?

  1. BMP180 рд╕ेрди्рд╕рд░ I2C рдк्рд░ोрдЯोрдХॉрд▓ рд╡ाрдкрд░ूрди рд░ाрд╕्рдкрдмेрд░ी рдкाрдпрд╢ी рд╕ंрд╡ाрдж рд╕ाрдзрддो.
  2. рдкाрдпрдеॉрди рдХोрдб рд╕ेрди्рд╕рд░рд▓ा рдХрдоांрдб рдкाрдард╡рддो рдЖрдгि рддाрдкрдоाрди рд╡ाрдЪрддो.
  3. рд╕ेрди्рд╕рд░ рдбेрдЯा рд╕्рдХ्рд░ीрдирд╡рд░ рдк्рд░рджрд░्рд╢िрдд рдХрд░рддो.

ЁЯОп рдЙрдкрдпोрдЧ

✅ рд╣рд╡ाрдоाрди рдХेंрдж्рд░े
✅ рдЙंрдЪी рдоोрдЬрдгी (Altitude Measurement)
✅ IoT-рдЖрдзाрд░िрдд рддाрдкрдоाрди рдиिрд░ीрдХ्рд╖рдг


Comments

Popular posts from this blog

IOT : GARDEN WATER SPRINKLER SYSTEM

IoT projects have gained immense popularity due to their ability to leverage the power of interconnected devices and data to create innovative solutions across various domains. IoT projects involve integrating sensors, actuators, and communication technologies to enable the seamless exchange of data between physical devices and the internet. These projects range from simple DIY experiments to complex industrial applications, each offering unique opportunities to transform our lives and improve efficiency. Whether it's creating a smart home automation system, monitoring environmental conditions, optimizing energy usage, or developing intelligent transportation systems, applications of IoT open up a world of possibilities for innovation and connectivity. By harnessing the potential of IoT, we can build intelligent and interconnected systems that revolutionize industries, enhance daily life, and pave the way for a more efficient and sustainable future. In this project we will be using...

POWER BI - THE ARCHITECTURE

Power BI Architecture: A Comprehensive Guide to Building Effective Data Analytics Solutions     Understanding Power BI Architecture: Power BI's architecture comprises four main components, each playing a pivotal role in the data analytics process: Data Sources:   Power BI connects to a wide range of data sources, including databases, cloud services, Excel files, web services, and more. This versatility enables organizations to consolidate their data from various systems into a single dashboard. Data Transformation:   Once the data is sourced, it undergoes transformation and cleaning processes to make it suitable for analysis. Power BI's Power Query Editor provides a user-friendly interface to manipulate, filter, and shape data according to specific requirements. Data Model:   The heart of Power BI's architecture lies in its data model, whic...

TOUCH PLATE BASED DOOR BELL

Title:  Touch plate based door bell  Circuit:  Components: IC 555 Resistors: 1 M, 100k, 330 ohms Transistor: BC547  PN2222A Capacitor: 10n 1 Copper plate : as touch plate. A 6v battery An LED / Ic UM66 Description: This is the simple circuit for touch plate based security system. In this project what basically done is, circuit detects stray voltages produced by mains voltage and electrostatic built  up in the room.If sufficient static voltage is detected by the plate then chip will charge up. Transistor BC 547 or PN2222A is used basically to increase the sensitivity.In place of led just connect IC um 66(melody IC). Applications: In homes, of course. This can be specially used in places like hospitals, when patients need to call doctor by himself.