ESP32 & ESP8266

Build a Buzzing Hazard-Alert Wearable With an ESP32 and Gas Sensor

Build a Buzzing Hazard-Alert Wearable With an ESP32 and Gas Sensor

Spend a Saturday turning a gas sensor and a coin vibration motor into a wearable that taps your wrist the moment the air turns dangerous. That is the weekend takeaway from a proof-of-concept patch out of North Carolina State University, where researchers packed a microcontroller, a battery, six environmental sensors, and a haptic actuator into something slightly smaller than a driver’s license.

What the researchers built

Instead of firing off a phone notification you might miss, the NC State patch vibrates directly against your skin. Each hazard gets its own tactile pattern, so a toxic-gas alert feels different from a heavy-metals-in-water warning without you ever glancing at a screen. Thin-film photovoltaic cells on the surface harvest sunlight while you wear it, stretching runtime to roughly 24 hours on a tiny battery. The team even textured tiny bumps under the motor so the buzz is genuinely hard to ignore in a noisy workshop. They reused the same trick for a robot e-skin, letting quadruped robots feel chemical hazards and reroute around them. The full write-up lives on Hackster, with more background from NC State News.

The parts reality for a home build

You will not clone the lab’s custom e-skin over a weekend, but a stripped-down version is very doable. Reach for an ESP32 (or a 3.3V ESP8266), an MQ-2 or MQ-135 gas sensor, a small coin vibration motor, a 2N2222 transistor to drive it, and a 3.7V LiPo cell. Wire the sensor’s analog output to GPIO 34, put a 220-ohm resistor on the transistor base, and add a flyback diode across the motor so the coil’s back-EMF does not cook your board. A mini breadboard handles the first pass before you solder onto protoboard.

Spend your Sunday on this

Flash a short sketch that reads the sensor every 500 ms and pulses the motor in different bursts depending on the value: one pattern for “elevated,” another for “get out now.” A basic MQ-2 module runs well under 200 pesos at circuit.rocks, and the vibration motor costs a few pesos more, so the whole rig lands cheaper than a fast-food lunch. Start with two hazard levels, get the two haptic patterns clearly distinct on your wrist, then add a second sensor once the first one reads reliably.

Frequently Asked Questions

How does the patch warn you without a screen or sound?

A haptic actuator vibrates against your skin using a distinct pattern for each hazard, so you can tell a toxic-gas alert from a heavy-metal warning by feel alone, even in a noisy room.

What parts do I need for a simplified home version?

An ESP32 or ESP8266, an MQ-2 or MQ-135 gas sensor, a coin vibration motor with a 2N2222 transistor and flyback diode, and a 3.7V LiPo. A basic MQ-2 module is under 200 pesos at circuit.rocks.

What will I learn if I build this?

You will practice reading an analog sensor on a GPIO pin, driving a motor through a transistor safely with a flyback diode, and turning raw sensor values into distinct haptic patterns in code. It is a compact intro to wearables, power budgeting, and sensor thresholds.

This article was inspired by reporting from Hackster. Find the parts and modules to build it at Circuitrocks.

// written by Ann Arandia

Ann Arandia covers community projects and maker events for the Circuitrocks blog. She writes about local workshops, kid-friendly electronics, and the Philippine maker scene — the people, the meet-ups, the projects that come out of them.