Skip to the content
2 layers99.4 × 99.3 mmIoT2526 HK2, the printed circuit board in 3D

ESP32-based IoT environmental monitoring project semester 2 2025-2026 HCMUTE

Size
99.4 × 99.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
78
Nets
70
Pads
231
Tracks, vias
283, 437
Pours
8
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
18 May 2026
Updated
18 May 2026

Overview

IoT2526 HK2 is an open-source printed circuit board by Chethien1912, from the Chethien1912/IoT-Environmental-Monitoring-System repository on GitHub, published under the MIT licence. It is a 2-layer board of 99.4 × 99.3 mm with 78 parts on 70 nets, routed with 283 tracks and 437 vias.

It is built around the HLK-PM01, EL357N-G and AMS1117, with the SI2300, BAT54C and BZT52C5V1 among its other parts. Its parts include 21 resistors, 13 capacitors, 10 diodes, 7 ICs and 4 transistors. It belongs with the ESP32 boards of this library.

Main components

7

README

README.md

IoT Environmental Monitoring System

Hệ thống giám sát môi trường thời gian thực sử dụng ESP32, được thiết kế để đo và theo dõi các thông số nhiệt độ, độ ẩm, khí CO và khí NO2. Dự án kết hợp phần cứng nhúng, giao diện hiển thị tại thiết bị, backend lưu trữ dữ liệu và ứng dụng giám sát từ xa, phù hợp cho các mô hình phòng thí nghiệm, lớp học, nhà xưởng nhỏ hoặc khu vực cần cảnh báo chất lượng không khí cục bộ.

Thiết bị có thể hoạt động độc lập với màn hình cảm ứng tại chỗ, đồng thời đồng bộ dữ liệu lên backend khi có WiFi. Người dùng có thể quan sát thông số đo, thay đổi ngưỡng cảnh báo, chuyển chế độ điều khiển tự động/thủ công và theo dõi trạng thái relay, buzzer thông qua giao diện thiết bị hoặc ứng dụng.

Hình ảnh dự án

Mặt trước thiết bịGóc nhìn tổng thể
Mặt trước thiết bị IoTThiết bị IoT hoàn thiện với vỏ và cổng kết nối
Giao diện chế độ tự độngGiao diện chế độ thủ công
Màn hình thiết bị ở chế độ tự độngMàn hình thiết bị ở chế độ thủ công

Chức năng chính

  • Đo nhiệt độ và độ ẩm bằng cảm biến SHT31.
  • Đo nồng độ khí CO và NO2 qua ngõ ADC của ESP32.
  • Hiển thị dữ liệu trực tiếp trên màn hình TFT cảm ứng.
  • Quản lý thời gian bằng RTC DS3231 và có thể đồng bộ NTP khi kết nối mạng.
  • Điều khiển 3 relay và buzzer theo hai chế độ:
    • Auto: tự động bật/tắt relay dựa trên ngưỡng nhiệt độ, độ ẩm, CO và NO2.
    • Manual: người dùng bật/tắt relay trực tiếp trên màn hình hoặc từ ứng dụng.
  • Cho phép chỉnh ngưỡng cảnh báo ngay trên thiết bị.
  • Kết nối WiFi, gửi telemetry lên backend và nhận trạng thái điều khiển từ server.
  • Backend hỗ trợ REST API, MQTT, Socket.IO realtime, xác thực JWT và lưu dữ liệu bằng SQLite.
  • Ứng dụng Flutter dùng để đăng nhập, xem danh sách thiết bị, theo dõi chỉ số và quản lý điều khiển từ xa.
  • Có thiết kế PCB bằng KiCad và mô hình cơ khí bằng SolidWorks/STEP.

Kiến trúc hệ thống

text
ESP32 + cảm biến + relay + buzzer + TFT
        |
        | HTTP / WiFi
        v
Backend Fastify + SQLite + MQTT + Socket.IO
        |
        | REST API / realtime
        v
Ứng dụng Flutter giám sát và điều khiển

Firmware ESP32 được tổ chức theo các module riêng cho cảm biến, WiFi, RTC, relay, giao diện và bộ điều phối chính. AppController chạy nhiều task FreeRTOS để tách riêng cập nhật giao diện, đọc cảm biến, điều khiển relay và đồng bộ backend, giúp thiết bị phản hồi ổn định hơn khi vừa hiển thị vừa truyền dữ liệu.

Backend đóng vai trò trung gian lưu dữ liệu thiết bị, quản lý trạng thái điều khiển mong muốn, nhận telemetry từ ESP32 và phát cập nhật realtime cho ứng dụng. Frontend Flutter cung cấp giao diện đăng nhập, danh sách thiết bị, trang chi tiết thiết bị, biểu đồ/chỉ số đo và quản lý người dùng.

Cấu trúc thư mục

text
.
├── Code/
│   ├── backend/backend/          # Backend Fastify, SQLite, MQTT, Socket.IO
│   ├── firmware/IoT_ESP32_Local/ # Firmware ESP32 Arduino/C++
│   └── frontend/                 # Ứng dụng Flutter
├── PCB/                          # File thiết kế PCB KiCad, BOM và Gerber
├── Solidwork/                    # Mô hình cơ khí và file STEP
├── images/                       # Hình ảnh thiết bị và giao diện thực tế
├── LICENSE
└── README.md

Công nghệ sử dụng

  • Phần cứng: ESP32, SHT31, cảm biến khí CO/NO2, RTC DS3231, TFT cảm ứng, relay, buzzer.
  • Firmware: Arduino/C++, FreeRTOS task, HTTPClient, WiFi, giao diện cảm ứng.
  • Backend: Node.js, Fastify, SQLite (better-sqlite3), JWT, MQTT.js, Socket.IO.
  • Frontend: Flutter, Material 3, REST API.
  • Thiết kế phần cứng: KiCad, SolidWorks.

Chạy backend

bash
cd Code/backend/backend
npm install
npm run seed
npm run dev

Backend mặc định chạy tại:

text
http://localhost:3000

Tài khoản mặc định sau khi seed:

text
Username: admin
Password: Admin@123

Firmware ESP32

Firmware nằm tại:

text
Code/firmware/IoT_ESP32_Local

Mở file IoT_ESP32_Local.ino bằng Arduino IDE hoặc môi trường tương thích ESP32, cài các thư viện cần thiết cho màn hình TFT, cảm ứng, WiFi và cảm biến, sau đó nạp chương trình vào ESP32. Khi thiết bị khởi động, hệ thống sẽ đọc cảm biến định kỳ, cập nhật màn hình, xử lý điều khiển relay/buzzer và đồng bộ dữ liệu với backend nếu đã cấu hình WiFi và Backend URL.

Ứng dụng Flutter

Ứng dụng nằm tại:

text
Code/frontend

Chạy ứng dụng:

bash
cd Code/frontend
flutter pub get
flutter run

Ứng dụng dùng API backend để đăng nhập, lấy danh sách thiết bị, xem dữ liệu realtime và gửi lệnh điều khiển.

Ghi chú

  • Cấu hình backend có thể tham khảo trong Code/backend/backend/.env.example.
  • File thiết kế PCB, BOM và Gerber nằm trong thư mục PCB.
  • Mô hình cơ khí của thiết bị nằm trong thư mục Solidwork.
  • Thiết bị có thể hoạt động cục bộ trên màn hình cảm ứng ngay cả khi chưa kết nối backend, nhưng cần WiFi và Backend URL để đồng bộ dữ liệu từ xa.

Parts

78
QtyValueFootprintReferences
1010KIVS_FOOTPRINTS:R_0603R4, R5, R6, R7, R8, R9, R12, R18, R20, R21
5100nFIVS_FOOTPRINTS:C_0603C2, C6, C7, C8, C9
510K/0603/1%IVS_FOOTPRINTS:R_0603R1, R2, R3, R10, R11
51uFIVS_FOOTPRINTS:C_0603C1, C3, C4, C5, C11
4LEDIVS_FOOTPRINTS:LED_0603_1608MetricD1, D2, D3, D8
4SI2300Package_TO_SOT_SMD:SOT-23Q1, Q2, Q3, Q4
31N4007Diode_SMD:D_SOD-123FD4, D5, D6
3EL357N-GMY_FOOTPRINT:OPTO_EL357N-GU1, U2, U3
3G5NBRelay_THT:Relay_SPST_Omron_G5NBK1, K2, K3
24.7KIVS_FOOTPRINTS:R_0603R16, R17
1100IVS_FOOTPRINTS:R_0603R19
110mH/UU9.8IVS_FOOTPRINTS:ACFilterChoke-UU9.8L1
110uFIVS_FOOTPRINTS:C_0603C12
11KIVS_FOOTPRINTS:R_0603R14
11K/0603/1%IVS_FOOTPRINTS:R_0603R15
1220uFCapacitor_SMD:CP_Elec_8x10.5C13
1AMS1117IVS_FOOTPRINTS:SOT233U4
1BAT54CIVS_FOOTPRINTS:SOT23-3D9
1BZT52C5V1Diode_SMD:D_SOD-123D7
1BuzzerIVS_FOOTPRINTS:Buzzer-THT-12x9.5_RM7.6BZ1
1COConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ1
1CR1220IVS_FOOTPRINTS:BatteryHolder-SMD-CR1220BT1
1DEVKIT_V1_ESP32-WROOM-32MY_FOOTPRINT:MODULE_DEVKIT_V1_ESP32-WROOM-32U5
1FuseIVS_FOOTPRINTS:Fuse_Bourns_MF-RG300F1
1HLK-PM01Converter_ACDC:Converter_ACDC_Hi-Link_HLK-PMxxPS1
1LEDLED_SMD:LED_0603_1608MetricD10
1LOGOMY_FOOTPRINT:AIoT_LogoG***
1LOGOMY_FOOTPRINT:WarningG***
1LOGOMY_FOOTPRINT:HCMUTEG***
1NO2Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ2
1RTC_DS3231MPackage_SO:SOIC-16W_7.5x10.3mm_P1.27mmIC1
1R_VariableIVS_FOOTPRINTS:Varistor-RV-Disc-D12mm-W5.8mm-P7.5mmR13
1SHT31Connector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ3
1Screw_Terminal_01x05MY_FOOTPRINT:HB9500-5PJ4
1Tụ kẹo 100nF 275VIVS_FOOTPRINTS:C-Polyester-Rect-L16.5mm-W5.0mm-P15.00mm-MKTC10
1~MY_FOOTPRINT:TFT-ILI9341U6

The 70 most common of 78 parts.

Similar boards

  • 2 layers100 × 100 mmSmart air, the printed circuit board in 3D

    Smart air

    meeTeam05/smart-air

    Devices provision over BLE, publish telemetry/shadow over MQTT, and serve the app through a Cloudflare-fronted Fastify API. See Features below for the full breakdown.

    70 parts1MIT
  • 2 layers96 × 97.3 mmDO AN DKTD, the printed circuit board in 3D

    DO AN DKTD

    PHAP0610/ThaoRDBoard

    All file include and source in this: https://github.com/nguyentrungthao/STM32/tree/dev

    164 parts
  • 2 layers101.6 × 50.8 mmLight switch, the printed circuit board in 3D

    Light switch

    NguyenThanhHuy-debug/PCB_Real-Time-Power-Monitoring-System-Development-Light-Switch

    PCBReal-Time-Power-Monitoring-System-Development-Light-Switch — a software project built with modern tooling.

    142 parts2
  • 2 layers96 × 74.4 mmMonolith, the printed circuit board in 3D

    Monolith

    luftaquila/monolith

    DIY wireless real-time datalogging platform for Student Formula and Baja.

    138 parts45
  • 2 layers90 × 74 mmFsk energymeter, the printed circuit board in 3D

    Fsk energymeter

    luftaquila/fsk-energymeter

    E-Formula electric energy meter for Formula Student Korea

    92 parts13
  • 2 layers193.3 × 111.3 mmGATEWAY HARDWARE V1, the printed circuit board in 3D

    GATEWAY HARDWARE V1

    kori-thespirit/LoraGatewayDevelopment

    224 partsMIT
  • 6 layers300 × 245 mmAkd safe source gateway, the printed circuit board in 3D

    Akd safe source gateway

    zinedkahitaf-lang/AKD-SAFE-SourceControl

    Infrastructure-Based Active Engineering Safety Platform. Move the safety burden from the worker to the hazard. Engineering prototype - not a certified safety device.

    316 parts

Questions

How big is the IoT2526 HK2 PCB?

It measures 99.4 × 99.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the IoT2526 HK2 use?

78 parts, built around the HLK-PM01, EL357N-G, AMS1117 and SI2300. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the IoT2526 HK2 KiCad files?

From the Chethien1912/IoT-Environmental-Monitoring-System repository on GitHub, at the commit this page was made from: the board is PCB/IoT2526_HK2.kicad_pcb and its schematic PCB/IoT2526_HK2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the IoT2526 HK2 design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).