Pressure sensors are widely used in drones, weather stations, smartphones and more. It is important to know how this small piece of technology works.
We are going to be using the BPM180 sensor. The name of the module is GY-68. The small device can read, pressure, altitude, and temperature.
Let’s build a small device that uses BPM180 to read pressure and altitude and uses an I2C LCD display to show that information (You can as well choose to display it on the serial port).
Here are the components we need:
As usual, we need to do the connection before uploading the sketch into the board.
Because both the LCD and the pressure sensor use the I2C, we have to connect the pins SDA and SCL to the analog pins 4 and 5.
Some barometers have a Vin pin and some a 3V3 pin. If yours has a Vin, it should be connected to 5V and if it does have 3V3 it should be connected to 3.3V.
After connecting the component together, we need to upload the following code to the Arduino board. We need additional libraries, one of them is the Adafruit_BMP085.h. You should be wondering the reason why it says BMP085 while we are using the sensor BMP180. Do not worry, this library should work with this sensor as well.
If you don’t know how to add libraries, I will suggest you check this to learn how to add libraries to your sketches. This code will display pressure and altitude on the LCD. You can also display temperature if you have bigger LCD, on my one (16×2) there was no space for that. To display text in two lines we use setCursor() function.
Note, you can use this same setup to display temperature.
The code helps capture pressure and altitude from the pressure sensor and displays it on the LCD. It displays pressure in hPa and altitude in meter.
Hope this has somehow sparked an Arduino project idea in your mind. Now it is time to go and build something amazing!
You might also like:
- Arduino hx711 tutorial
- Arduino magnetic switch
- Best Arduino Kits
- gifts for engineering students
- gifts for engineers
- mpu6050 Arduino projects
- Current sensor Arduino
- Soil Moisture Sensor With Arduino
- Arduino Count up Timer Using the Nokia 5110 LCD
- Arduino Yun: Integrating or Juxtaposing Arduino with Linux
- Arduino Projects: Line Follower Robot
- Arduino RFID Project for Beginners
- Arduino MOSFET Project
- Which Arduino Should You Buy
- What Can You Do With Arduino Boards?
- Great Alternatives to the Arduino Microcontroller
- Arduino Projects: Color Sensor
- Arduino IDE Alternatives
- Arduino Mega vs. Uno
- Arduino Projects: Arduino LCD Display
- Read Arduino Rotary Encoders
- A Selection of the Best Arduino Simulators
- Arduino Projects: IR Receiver
- Arduino Light Sensor Project
- Arduino Projects: Arduino Decibel Meter
- Arduino Stopwatch Project
- Arduino Bluetooth RC Car Project
- Arduino Temperature Logger Project
- Arduino Projects: Arduino 7 Segment Display
- Arduino Projects: Clap ON Clap OFF Light
- Arduino Relay Project
- Install a Library Onto the Arduino IDE
- Arduino Projects: Rainfall Detector
- Arduino Projects: RGB LED Arduino
- Arduino Stepper Motor Project
- Arduino Projects: Arduino DC Motor Control
- The Top Affordable Arduino Robot Kit
- Arduino 3D Printed Case
- Arduino Projects: Asynchronous LEDs Blink
- Arduino Projects: Ultrasonic Distance Sensor
- Arduino Projects: LED – 4X4X4 LED Cube
- Arduino Car Projects: Build an Obstacle Avoiding Robot With Less Than $30
- Arduino Projects: Servo Potentiometer Control
- Arduino LED Project: Knight Rider
- Arduino Projects: PIR Motion Sensor
- The Difference between Arduino and Raspberry Pi
- Top 9 Books Every Engineer Should Read
- Top Used Sensors for Arduino
- First Hand on the Arduino Uno Board