
Guessing tyre pressure is a gamble. Within just ‘6 hours’, you can complete this medium-complexity project under ₹3200: a battery-powered ESP32 compressor that inflates to your target PSI, switches itself off, streams live pressure to a dashboard, and even tracks its GPS location.
Tired of guessing tyre pressure? Over-inflation can damage tyres and balls, while under-inflation reduces performance and compromises safety. This project is a smart portable air compressor that measures pressure in real time, runs until your target pressure is reached, and then shuts itself off automatically.
The system is built around an ESP32 microcontroller, which handles power management, motor control, pressure monitoring, GPS communication, and the user interface. A single rechargeable 12V battery feeds two paths: one supplies the 12V DC compressor motor through a metal-oxide-semiconductor field-effect transistor (MOSFET) switching module, while the other passes through a DC-DC buck converter to give a regulated 5V for the ESP32, pressure sensor, and GPS module.
In operation, the pressure sensor sends the ESP32 an analogue voltage proportional to the measured pressure. When the reading falls below the preset lower limit, the ESP32 switches the MOSFET on to run the compressor; at the upper limit, it switches it off, and the loop repeats to hold the required pressure. Meanwhile, the GPS module supplies location data for tracking, and a web dashboard shows live pressure graphs, recorded data, pressure settings, and device status. Fig. 1 shows the author’s prototype, while Fig. 2 presents the project’s block diagram.


| Bill of Materials | ||||
| Reference | Component | Value/Type | Quantity | Price (`) |
| SENS1 | Pressure sensor | MPXH6115A (analogue output) or similar | 1 | 2000 |
| MCU1 | ESP32 board | NodeMCU-32S | 1 | 400 |
| GPS1 | GPS module | u-blox NEO-6M/7M | 1 | 400 |
| M1 | Mini air compressor motor | 12V DC | 1 | Miscellaneous 400 |
| BT1 | Battery | 12V DC, rechargeable | 1 | |
| U1 | DC-DC buck converter | LM2596 module, set to 5V | 1 | |
| S1 | Switch | SPST, 2-pin | 1 | |
| U2 | MOSFET trigger switch module | 15A, 400W drive module | 1 | |
| Total | 3200 | |||
What will you learn?
- How to measure air pressure in real-time and use it to control a compressor automatically.
- How to interface an analogue pressure sensor with the ESP32.
- How to manage power between the battery, motor, and control circuits.
- How to build a web application that displays live pressure graphs, records data, and sets the pressure limit.
- How GPS location data is obtained, and how the automatic cut-off logic works to prevent over- and under-inflation.
How it works
Fig. 3 shows the circuit diagram. It is built around an ESP32 NodeMCU, an MPXH6115A pressure sensor, a NEO-6M GPS module, an LM2596 buck converter (U1), and a MOSFET switching module (U2) that controls the 12V compressor.
The ESP32, running at up to 240MHz, provides the digital, serial, and analogue interfaces. The 12V supply powers the compressor through U2, while U1 provides the regulated 5V for the ESP32 and other low-voltage parts. SPST switch S1 is the main power switch for the control circuit.
The MPXH6115A gives an analogue voltage proportional to pressure. Its output (Vout, pin 4) goes to GPIO32 (ADC) of the ESP32, which monitors it continuously. The pressure limits are set in the program. When the pressure falls below the lower value, the ESP32 drives GPIO18 to switch on the MOSFET and start the compressor. When the pressure reaches the upper limit, it switches the MOSFET off.
The NEO-6M sends latitude, longitude, altitude, and time to the ESP32 over universal asynchronous receiver-transmitter (UART). Its TXD and RXD pins connect to GPIO16 (RX2) and GPIO17 (TX2), respectively. GPS coordinates and pressure data can be viewed on the serial monitor for monitoring and data logging, and the location can also be used to enable or disable the compressor in a predefined area.
In short, the ESP32 provides automatic pressure-based control while the GPS module adds location monitoring. Because the MOSFET module switches a high-current load, it, the wiring and the power supply must be rated for both the running and startup current of the compressor. A suitable suppression device should also be placed across the motor to minimise voltage transients during switching.
EFY note. Check that the sensor’s pressure range covers your target value (this part is specified for roughly 15-115 kPa absolute); for higher pressures such as 35 PSI, use a sensor with a suitable range.
The software/code





