Image of eBits Academy airquality illustration

Introduction to ESP32 – Air Quality Monitoring Station Series, Part 4

  • January 16, 2025
  • |
  • Teofil Corad

 

Lesson Objective
In this lesson, we introduce the ESP32 microcontroller, the central component of your IoT air quality monitor. By the end, you will understand what ESP32 is, why it is ideal for IoT projects and how it works within this project.

 

List of Required Components:

 

 

What Is a Microcontroller?
Think of a microcontroller as a small computer designed to perform one specific task. It is like having a personal assistant who is really good at one thing—controlling temperature, operating a robot or making sure your washing machine runs on time.

A microcontroller has everything it needs built in, including:

  • Processor: The brain that thinks.
  • Memory: The brain’s notebook for short- and long-term storage.
  • Input/Output Ports: Hands and eyes for interacting with the world—such as sensors or motors.

What Is a Microprocessor?
A microprocessor also acts as a brain, but it is much more powerful and needs help from other parts to work. It is what you find in your computer or smartphone (e.g. Raspberry Pi).

An Example to Make It Even Clearer:
Imagine you have a factory:

  • A microcontroller is like a specialised machine that performs just one task all day, such as sorting packages by size.
  • A microprocessor is like the factory manager who oversees several machines, communicates with the office, handles logistics and ensures everything runs smoothly throughout the factory.

What Is ESP32?
ESP32 is a powerful microcontroller designed specifically for IoT applications. In IoT projects like this one, having a microcontroller that can handle both connectivity and data processing in one device is essential.

Key Features of ESP32:

  • Built-in WiFi and Bluetooth: Combines a CPU with integrated WiFi and Bluetooth, making it highly versatile for projects requiring connectivity.
  • Dual-Core Processor: Ensures efficient processing of several tasks at the same time.
  • Low Power Consumption: Ideal for battery-powered devices and energy-efficient systems.
  • Broad Compatibility: Supports popular programming environments such as Arduino IDE and MicroPython.

How ESP32 Fits into Our Project
In our air quality monitoring station, ESP32 will:

  1. Collect Sensor Data: Gather temperature and humidity data from the AHT10 sensor.
  2. Display Data Locally: Send data to the TFT screen for real-time monitoring.
  3. Serve Data Remotely: Act as a web server that makes data available over WiFi on any device connected to the same network.

This combination of data collection, processing and connectivity is at the heart of IoT functionality.

ESP32 Pinout Overview
To use ESP32 effectively in this project, you need a basic understanding of its pin layout:

  • GPIO Pins (General Purpose Input/Output): Allow ESP32 to interact with sensors and other components such as the TFT screen.
  • Power Pins: The ESP32 chip and its GPIO use 3.3V. Connect 5V only to the board’s designated power input if its documentation permits it, never directly to GPIO. Power external sensors at the voltage required by their documentation.
  • Communication Pins: Include serial communication interfaces (e.g. I2C and SPI) used to communicate with sensors and displays.

In the coming lessons, we will explore how to connect these pins correctly to the AHT10 sensor and TFT screen.

What Happens Next?
Now that you understand ESP32 and its role in the project, the next lesson will cover the AHT10 temperature and humidity sensor, how it works and how we connect it to ESP32.

Key Points

  • ESP32 is a powerful, WiFi-enabled microcontroller that is perfect for IoT projects, offering both connectivity and processing power.
  • It acts as the central hub in our air quality monitoring station, handling sensor data both locally and remotely.
  • Understanding ESP32’s capabilities and pinout is essential for connecting hardware components correctly.

In the next lesson, we will explore the AHT10 sensor in greater depth and learn how it collects temperature and humidity data for our IoT station.

Leave a comment

Please note, comments need to be approved before they are published.