• Home
  • IOT
  • Articles
  • IoT (Internet of Things) project of Temperature, Pressure, and Altitude measurement using Pressure sensor BMP180 and Arduino device

IoT (Internet of Things) project of Temperature, Pressure, and Altitude measurement using Pressure sensor BMP180 and Arduino device

Last updated on May 30 2022
Kritika Singh

Table of Contents

IoT (Internet of Things) project of Temperature, Pressure, and Altitude measurement using Pressure sensor BMP180 and Arduino device

In this project, we are getting to build a temperature, pressure, and altitude measuring instrument. during this project, we’ll use air pressure sensor model BM 180 to detect temperature, air pressure , and altitude, Arduino device, and 16 X 4 characters LCD to display the calculated temperature, pressure, and altitude.

Hardware requirements

1. Arduino UNO board
2. USB cable connector for Arduino device
3. Pressure Sensor BMP180
4. 16 X 4 Character LCD Display
5. Project Board
6. Jumper wires (male to female, male to male)

Software requirement

1. Arduino software IDE
The working rule of Pressure Sensor BMP180
The pressure sensor BMP180 consists of a piezo-resistive sensor, an analog and digital converter, control unit with E2PROM and a serial I2C interface. It delivers the contributed values of temperature, air pressure , and altitude. The microcontroller of the sensor device sends the beginning sequence to live temperature, pressure, and altitude. The values of temperature, pressure, and altitude are read over 16 X 4 characters LCD.
The calculated temperature, pressure, and altitude are measured in ℃ (degree celsius), hPa (hector Pascal) and feet respectively. during this case, the speed of measuring temperature, air pressure and altitude is once per second.
The altitude and pressure are inversely proportional to every other. When the altitude increases, pressure goes down and when altitude decreases it results in a rise in air pressure .

iot 23
iot

Write an Arduino program to live temperature, pressure, and altitude using pressure sensor BMP180, Arduino and character LCD.

1. #include 
2. LiquidCrystal lcd(13, 12, 11, 10, 9, 8);//RS,EN,D4,D5,D6,D7 
3. #include 
4. #include 
5. //create an SFE_BMP180 object, here called "pressure": 
6. SFE_BMP180 pressure; 
7. #define ALTITUDE 222.0 // altitude of Delhi in meters 
8. void setup(){ 
9. Serial.begin(9600); 
10. Serial.println("BMP180 Measurements"); 
11. lcd.begin(20, 4); 
12. lcd.setCursor(0, 0); 
13. lcd.print("BMP180 Measurements"); 
14. lcd.setCursor(0, 1); 
15. lcd.print(" 1. Temperature"); 
16. lcd.setCursor(0, 2); 
17. lcd.print(" 2. Pressure"); 
18. lcd.setCursor(0, 3); 
19. lcd.print(" 3. Altitude"); 
20. delay (5000); 
21. lcd.clear();//clear display 
22. // initialize the sensor (it is vital to urge calibration values stored on the device). 
23. if (pressure.begin()) 
24. Serial.println("BMP180 init success"); 
25. else{ 
26. // oops, something went wrong, this is often usually a connection problem, 
27. // see the comments at the highest of this sketch for the right connections. 
28. Serial.println("BMP180 init fail\n\n"); 
29. while(1); // pause forever. 
30. } 
31. } 
32. void loop(){ 
33. char status; 
34. double T,P,p0,a; 
35. // loop here getting pressure readings every 10 seconds. 
36. // if you would like sea-level-compensated pressure, as utilized in weather reports, 
37. // you would like to seek out dinamically altitude of place. 
38. // here, we are using constant called ALTITUDE during this sketch: 
39. Serial.println(); 
40. Serial.print("provided altitude: "); 
41. lcd.setCursor(0, 0); 
42. lcd.print("Altitude: "); 
43. Serial.print(ALTITUDE,0); 
44. Serial.print(" meters, "); 
45. Serial.print(ALTITUDE*3.28084,0); 
46. lcd.print(ALTITUDE*3.28084,0); 
47. Serial.println(" feet"); 
48. lcd.print(" ft"); 
49. // start a temperature measurement: 
50. // if request is successful, the amount of ms to attend is returned. 
51. // if request is unsuccessful, 0 is returned. 
52. status = pressure.startTemperature(); 
53. if (status != 0){ 
54. // await the measurement to complete: 
55. delay(status); 
56. // retrieve the finished temperature measurement: 
57. // note that the measurement is stored within the variable T. 
58. // function returns 1 if successful, 0 if failure. 
59. status = pressure.getTemperature(T); 
60. if (status != 0){ 
61. // Print out the measurement: 
62. Serial.print("temperature: "); 
63. Serial.print(T,2); 
64. Serial.print(" deg C, "); 
65. Serial.print((9.0/5.0)*T+32.0,2); 
66. Serial.println(" deg F"); 
67. lcd.setCursor(0, 1); 
68. lcd.print("Temperature: "); 
69. lcd.print(T,2); 
70. lcd.print(" C "); 
71. // start a pressure measurement: 
72. // the parameter is that the oversampling setting, from 0 to three (highest res, longest wait). 
73. // if request is successful, the amount of ms to attend is returned. 
74. // if request is unsuccessful, 0 is returned. 
75. status = pressure.startPressure(3); 
76. if (status != 0){ 
77. // await the measurement to complete: 
78. delay(status); 
79. // Retrieve the finished pressure measurement: 
80. // Note that the measurement is stored within the variable P. 
81. // Note also that the function requires the previous temperature measurement (T). 
82. // (If temperature is stable, you'll do one temperature measurement for variety of pressure measurements.) 
83. // Function returns 1 if successful, 0 if failure. 
84. status = pressure.getPressure(P,T); 
85. if (status != 0){ 
86. // print out the measurement: 
87. Serial.print("absolute pressure: "); 
88. Serial.print(P,2); 
89. Serial.print(" mb, "); 
90. Serial.print(P*0.0295333727,2); 
91. Serial.println(" inHg"); 
92. lcd.setCursor(0, 2); 
93. lcd.print("Abs. Pr.: "); 
94. lcd.print(P*0.0295333727,2); 
95. lcd.print(" inHg"); 
96. // The pressure sensor returns absolute pressure, which varies with altitude. 
97. // to get rid of the consequences of altitude, use the ocean level function and your current altitude. 
98. // This number is usually utilized in weather reports. 
99. // Parameters: P = absolute pressure in mb, ALTITUDE = current altitude in m. 
100. // Result: p0 = sea-level compensated pressure in mb 
101. p0 = pressure.sealevel(P,ALTITUDE); // we are at 222 meters (Delhi) 
102. Serial.print("relative (sea-level) pressure: "); 
103. Serial.print(p0,2); 
104. Serial.print(" mb, "); 
105. Serial.print(p0*0.0295333727,2); 
106. Serial.println(" inHg"); 
107. lcd.setCursor(0, 3); 
108. lcd.print("Rel. Pr.: "); 
109. lcd.print(p0*0.0295333727,2); 
110. lcd.print(" inHg"); 
111. // On the opposite hand, if you would like to work out your altitude from the pressure reading, 
112. // use the altitude function along side a baseline pressure (sea-level or other). 
113. // Parameters: P = absolute pressure in mb, p0 = baseline pressure in mb. 
114. // Result: a = altitude in m. 
115. a = pressure.altitude(P,p0); 
116. Serial.print("computed altitude: "); 
117. Serial.print(a,0); 
118. Serial.print(" meters, "); 
119. Serial.print(a*3.28084,0); 
120. Serial.println(" feet"); 
121. } 
122. else 
123. Serial.println("error retrieving pressure measurement\n"); 
124. } 
125. else 
126. Serial.println("error starting pressure measurement\n"); 
127. } 
128. else 
129. Serial.println("error retrieving temperature measurement\n"); 
130. } 
131. else 
132. Serial.println("error starting temperature measurement\n"); 
133. delay(5000); // Pause for five seconds. 
134. }

Download the SFE_BMP180-master.zip file from https://github.com/LowPowerLab/SFE_BMP180
Add the SFE_BMP180-master zip file before compiling the above code otherwise, it generates a mistake SFE_BMP180.h: No such file or directory.
To add the zip file click Sketch > Include Library > Add .ZIP Library… and add your downloaded SFE_BMP180-master zip.

iot 24
iot
iot 25
iot

Compile and upload your code into the Arduino device.
Now, connect your all devices accordingly. Digital circuit of Arduino, BMP180, and 16 X 4 characters LED is given below:

iot 26
iot

Result

iot 27
iot

So, this brings us to the end of blog. This Tecklearn ‘IoT(Internet of Things) project of Temperature , Pressure , and Altitude measurement using Pressure sensor BMP180 and Arduino device’ blog helps you with commonly asked questions if you are looking out for a job in Internet of Things (IoT). If you wish to learn IoT and build a career in Internet of Things (IoT) domain, then check out our interactive, Internet of Things (IoT) Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

IoT (Internet of Things) Training

Internet of Things (IoT) Training

About the Course

Internet of Things or IoT, as it is widely known, simply put, is a network of devices which can communicate with each other with regards to sending, receiving and analyzing data. Tecklearn’s IoT Training as an online training platform delivers you the best in the industry IoT knowledge by certified and experienced trainers to master IoT. Interactive sessions include two real-time projects to provide in-depth understanding of advanced IoT concepts that covers IoT methods and technologies, application deployment, network and communication protocols and integrations, security measures and real-time data management on the internet. You will learn IoT introduction, significance, building your own IoT devices, sensors, IoT communication and security. This training will help you be a part of the IoT revolution underway around the globe.

Why Should you take IoT (Internet of Things) Training?

• The average salary for an IoT Engineer is $163,514 per year in the United States. (Indeed.com)
• Many industries such as Eddie Stobart Transport and Logistics Company, the Amazon, Dell, Aviva, German Auto Manufacturer Daimler, the John Deere Company and Walt Disney Land are all utilizing the Internet of Things technology to monitor various activities and advance their existing systems.
• Gartner Says 5.8 Billion Enterprise and Automotive IoT Endpoints Will Be in Use in 2020

What you will Learn in this Course?

Introduction to Internet of Things
• What is IoT, how does it work
• IoT vs IIoT
• Business Cases of IIoT
• Industry 4.0
• Properties of IoT device
• IoT Ecosystem
• IoT Decision Framework
• IoT Solution Architecture Models
• How IoT is Transforming Businesses
• Major IoT Boards in Market
IoT Communication Protocols
• Types of wireless communication
• Major wireless Short-range communication devices and properties
• Comparison of these devices (Bluetooth, WIFI, ZigBee, 6LoWPAN)
• Major wireless Long-range communication devices and properties, Comparison of these devices (Cellular IoT, LPWAN)
IoT Architecture
• The IoT Stack Architecture and the various components and layers
• The app, the data processing and platform
• IoT OS like Contiki, FreeRTOS and mbe
• The edge and the connected thing or device
IoT Sensors and Device Platforms
• Introduction to IoT Sensors and the role they play in getting the IoT systems work efficiently
• Micro-electromechanical systems revolutionizing IoT sensors
• Use Case of Water Quality Monitoring
• Use Case: Sericulture
• Difference between microcontroller and microprocessor
• IoT Device Platforms – Arduino, Raspberry Pi etc
• Smartphone Centric Architecture
• IoT Application Layer protocols
• Hands On
Arduino Platform and Arduino Interfacing
• Arduino physical board, libraries and the Integrated Development Environment
• Arduino Shields various operations such as heat and light sensing, GPS, UI display
• Programming Arduino using C language
• Controlling external devices using pins on the Arduino board
• The Arduino Interface
• Reading inputs from various sources and providing an output
• Working with sensors for sensing and controlling the physical world
• Deploying various types of sensors and connecting it to the Arduino
• Constant conversion between analog and digital signals for information exchange between the physical and digital domains
• Hands On
Raspberry Pi Platform and Raspberry Pi Interfacing
• Introduction to Raspberry Pi
• Set up of Raspberry Pi environment
• Coding for the Raspberry Pi using Python
• Deploying Python-based Integrated Development Environment
• Interfacing the Raspberry Pi with the physical world
• Introducing the various input and output devices
• Raspberry Pi expansion boards for building complex hardware setup
• Real-time demo of Raspberry Pi interfacing
• Hands On
Arduino Uno Wifi and IoTivity
• Iotivity
• Iotivity Architecture
• Hands On
Netduino Platform and Netduino Interfacing
• Introduction to Netduino Platform
• Setting up the Netduino environment
• Coding for the Netduino
• Interfacing the Netduino with the physical world
• Introducing the various input and output devices
• Real-time demo of Netduino interfacing
• Hands On
IoT for Arduino, NodeMCU and Netduino
• Control LED light using Netduino board
• NodeMCU
• Blynk
Project: Building WSN with MQTT, Raspberry Pi & Arduino
Got a question for us? Please mention it in the comments section and we will get back to you.

 

 

0 responses on "IoT (Internet of Things) project of Temperature, Pressure, and Altitude measurement using Pressure sensor BMP180 and Arduino device"

Leave a Message

Your email address will not be published. Required fields are marked *