ENT600 · Concept model v3 · low-cost build

Haze Tracker Pintar Station

Size 32 × 19 × 12 cm Brain ESP32 Power 5 V USB-C adapter Parts ≈ RM 245
1 grid square = 2 cm
Phone beside it for scale
Drag to rotate · scroll or pinch to zoom · tap a label

Simulate air quality (IPU)

152
0–50 Baik 51–100 Sederhana 101–200 Tidak sihat 201–300 Sangat 300+ Bahaya

Try the functions

14 masks loaded. Masks are only given when IPU is above 100.

How to build the mask dispenser

A stack of masks sits on a rubber wheel. When someone presses AMBIL, the wheel turns for under a second and rolls the bottom mask out through a slot. A gate lets only one mask pass at a time. You need no 3D printer, only a saw, a drill and a glue gun. Build it as its own small module and test it on the table before it goes into the case.

Side section through the middle of the dispenser, all sizes in mm. The front of the station is on the right. The bottom mask (orange outline) is the one the wheel moves. The dashed outline shows where it ends up.

Build steps

  1. Cut the parts in the cut list. For the wheel slot in the base plate, drill two 12 mm holes 18 mm apart and saw out the wood between them. That gives a 12 × 30 mm slot, centred left to right, 40 mm from the front edge.
  2. Glue the hopper. Hot-glue the two side walls and the back wall onto the base plate, square to it. Leave the front open for now.
  3. Fit the gate. Glue the clear gate between the side walls at the front so its bottom edge is 8 mm above the base. Bolt the adjustable strip to the inside of the gate with two M3 bolts through its slotted holes. Set the strip 5 mm above the base.
  4. Test the gap by hand. Put two masks in and push the bottom one forward with a finger. One should slide under the strip and the other should stay behind. If both come out, lower the strip. If none come out, raise it.
  5. Mount the wheel and servo. Push the wheel onto the FS90R shaft. Glue the servo to the 30 × 30 × 11 mm block so the wheel sits under the slot with its top 1 mm above the base. Pack it with card if it sits too low.
  6. Add the spacers under the four corners of the base plate. The module now stands 29 mm above the box floor, with the servo block under it.
  7. Wire it to the ESP32. Servo signal (orange) to GPIO 18, red to 5 V from the USB-C supply, brown to GND. AMBIL button to GPIO 27 and GND. The code turns on the pin's internal pull-up.
  8. Load and tune. Lay 14 to 18 masks flat, put the weight block on top and press AMBIL. Change the 800 ms run time until each mask sticks out about 3 cm onto the lip.
  9. Install. Cut a 195 × 8 mm slot in the front panel, 28 mm up from its bottom edge, so it lines up with the base plate. Slide the module in against the panel and glue the 25 mm lip under the slot on the outside.

Use individually wrapped masks. The plastic sachets slide over each other easily but grip the rubber wheel, so you get one at a time and they stay clean. If the wheel slips, stretch a strip of bicycle inner tube over it.

Cut list

PartMaterialSize (mm)Qty
Base plate12 × 30 slot for the wheel6 mm plywood196 × 1221
Spacer blocksScrap wood20 × 20 × 234
Hopper side walls3 mm acrylic or plywood118 × 652
Hopper back wall3 mm acrylic or plywood190 × 651
Gateclear, so you can see the stock3 mm clear acrylic190 × 571
Adjustable striptwo 4 × 12 slotted holes3 mm acrylic188 × 151
Weight blockabout 80 g12 mm plywood170 × 901
Servo blockScrap wood30 × 30 × 111
Lip outside the slot6 mm plywood195 × 251

ESP32 code for the dispenser

#include <ESP32Servo.h>
Servo feed;                 // FS90R: 90 = stop, 180 = full speed forward
const int FEED_PIN = 18, AMBIL_PIN = 27;
int ipu = 0;                // set from the PMS5003 reading elsewhere
int stock = 14;
unsigned long lastDrop = 0;

void setup() {
  feed.attach(FEED_PIN);
  feed.write(90);
  pinMode(AMBIL_PIN, INPUT_PULLUP);
}

void loop() {
  bool pressed = digitalRead(AMBIL_PIN) == LOW;
  bool cooled  = millis() - lastDrop > 30000;   // 1 mask per 30 s
  if (pressed && ipu > 100 && stock > 0 && cooled) {
    feed.write(180);        // roll the bottom mask out
    delay(800);             // tune until it sticks out ~3 cm
    feed.write(90);         // if it creeps, try 88 to 92
    stock--;
    lastDrop = millis();
  }
}

Parts and cost

Prices are rough Shopee Malaysia figures, so check before you buy. The PM2.5 sensor is the one part not to cheap out on, because the IPU depends on it. Everything else has a cheaper version that does the same job.

Buy list

PartFor≈ RM
PMS5003 PM2.5 sensor + cableIPU70
3.5" SPI TFT, 480 × 320 (ILI9488)Screen40
ESP32 DevKit (WROOM-32)Brain22
5 V 2 A USB-C wall adapterPower10
FS90R 360° servo + wheelMask15
AHT20 temperature + humiditySuhu6
30 mm red buttonEmergency5
WS2812B strip, 10 LEDsLED5
16 mm green buttonMask2
Plywood, 3 mm acrylic, varnish, screwsCase40
Wires, switch, USB-C port, louvred capMisc15
50 wrapped 3-ply masksMask15
Total≈ 245

What was cut from v2, and why

v2 partNowSaves ≈ RM
Raspberry Pi 5ESP32Does everything the box needs, runs on a phone charger and serves the same /api/v1 JSON to the app.300
5" HDMI LCD3.5" SPI TFTBig enough for the IPU number at arm's length.90
4 × 18650 pack, 6 V solar panel, CN3791 charger5 V USB-C wall adapterThe station stays near a socket. Without a battery, a solar panel could not run it at night or in cloud.70
BME280AHT20Pressure is not used for IPU. The app already treats it as optional.15
IR flame sensor + MQ-2 smokeSoftware alertA flame sensor only sees a fire about 1 m away, and the MQ-2 heater draws 0.8 W. The alert now comes from NASA FIRMS hotspots upwind plus a sudden PM2.5 jump.10
LED beacon + night lightOne LED barSame signals, one strip to wire.10
v2 was about RM 750≈ 500

Already have a Raspberry Pi 5? Keep it for the demo. It fits in the same place, but swap the adapter for the official 5 V 5 A Pi supply.

Ideas to improve it further (no extra parts)

  • Stock alert: the ESP32 already counts masks. Send an ntfy push saying "refill station" when fewer than 5 are left, and show the count in the app.
  • Fair use: masks only when IPU is above 100, and one every 30 seconds, so nobody can empty it in one go. The sketch above already does this.
  • Calibration: the app's Trends screen compares the PMS5003 with the nearest DOE station. Save the a·x + b correction on the ESP32 so the box shows the corrected IPU even offline.
  • Power cuts: save the mask count and the calibration to the ESP32's flash, so a power cut or an unplugged cable does not reset them.
  • Longer sensor life: run the PMS5003 for 30 s every 5 minutes instead of all the time. Its fan and laser last much longer, and the readings are still fresh enough for IPU.
  • Humidity fix: low-cost PM sensors read too high when the air is very humid. Use the AHT20 reading to correct PM2.5 when humidity is above 75 %.

This is a concept model for a desk-sized build. The sizes are realistic but not final. Power: the station has no battery. It runs from a 5 V 2 A USB-C adapter plugged into the port on the left side, so place it near a socket under a roof or awning. The ESP32, screen, PM sensor and servo together draw under 1 A at 5 V.