Measuring Air Pressure Changes From Temperature in a Sealed System Using ESP32 Sensors
by The Debunker in Circuits > Arduino
106 Views, 1 Favorites, 0 Comments
Measuring Air Pressure Changes From Temperature in a Sealed System Using ESP32 Sensors
This project demonstrates how temperature directly affects air pressure using real sensor data inside a sealed environment.
Using an ESP32, a high precision MS5611 pressure sensor, and a BME280 environmental sensor, I built a system that measures temperature, humidity, and pressure in real time. The sensors are placed inside a sealed mason jar to isolate a fixed amount of air.
By heating and cooling the jar, we can observe how air pressure increases with temperature and decreases when cooled. The system includes a two minute stabilization delay to ensure accurate baseline measurements before each test.
This project highlights the relationship between temperature and pressure using real world data and provides a clear, visual demonstration of gas behavior in a controlled environment.
Supplies
Electronics
- ESP32 development board
- GY-63 MS5611-01BA03 (high precision pressure sensor)
- BME280 sensor (temperature, humidity, pressure)
- Breadboard
- Jumper wires
- Extermal USB Battery Pack
Other
- Mason jar with lid (airtight seal)
- Ice
- Heat source (room heat or gentle external warming)
- Optional: camera for recording results
- Computer with Arduino IDE
- USB cable for ESP32
- 3D printed base https://makerworld.com/en/models/2595647-esp32-breadboard-project-base-mount#profileId-2864313
Build the Sensor System
Build the Sensor System
- Connect ESP32 and sensors using I2C wiring
- Mount everything on your breadboard
- Optional: use your 3D printed base for stability
📸 Include:
- Top-down wiring photo
- Close-up of sensors
ESP32 PinConnections
3.3V to VCC (both sensors)
GND to GND (both sensors)
GPIO 21 to SDA
GPIO 22 to SCL
Upload the Code
- Install required libraries:
- Adafruit BME280
- Adafruit GFX
- Adafruit ST7789
- Upload the provided sketch
- Open Serial Monitor to confirm readings
📸 Include:
- Serial output screenshot
- LCD screen powered on
Baseline Stabilization
When powered on:
- The system waits 2 minutes
- This allows:
- Sealing the jar
- Temperature equalization
- Stable baseline capture
📌 This is CRITICAL for accuracy and judges will like this.
Seal the System
- Place the electronics inside the mason jar
- Seal the lid tightly during countdown
- Avoid touching the glass during baseline
📸 Include:
- Jar sealed with sensors inside
Heating Experiment
- Apply gentle heat externally
- Observe:
- Temperature increases
- Pressure increases
Example Results (use your real numbers)
- +12°F temperature
- +700 Pa pressure increase
📸 Include:
- Before vs after readings
- Graph if possible
Cooling Experiment
- Reset system
- Add ice around the jar
Observe:
- Temperature drops
- Pressure drops significantly
Example Results
- -5°F temperature
- -2800 Pa pressure drop
📸 Include:
- Ice setup
- Display readings
Results & Analysis (VERY IMPORTANT)
This experiment shows:
- Air is made of moving molecules
- Heating increases molecular motion
- Faster molecules = more collisions = higher pressure
- Cooling reduces motion = lower pressure
Why the sealed jar matters:
- Keeps air volume constant
- Prevents pressure equalization with surroundings
- Makes changes measurable
Real-world connection:
- Weather systems
- Atmospheric pressure changes
- Thermodynamics
Improvements & Future Work
- Add SD card logging
- Graph results in Excel
- Add external temperature sensor
- Compare sealed vs open air system