The bike won’t "start" until the helmet is on, and a buzzer nags until it is.
Built and tested by Shahan Fathima K · Industrial Robotics Institute

A road-safety system that checks the rider is wearing a helmet. An IR sensor inside the helmet detects when it is worn. Only then does the ESP8266 switch on the LED or relay that stands in for the bike’s ignition; without the helmet, the ignition stays off and the buzzer sounds.
| Component | Qty |
|---|---|
| ESP8266 NodeMCU | 1 |
| IR Sensor Module | 1 |
| Buzzer | 1 |
| LED or Relay Module | 1 |
| Jumper Wires | As needed |
| Power Supply | 1 |
| From | Connect to |
|---|---|
| IR sensor VCC | 3.3V |
| IR sensor GND | GND |
| IR sensor OUT | D1 |
| LED / Relay IN | D2 |
| Relay VCC / GND | 5V (VIN) / GND |
| Buzzer + | D3 |
| Buzzer − | GND |
Complete, tested Arduino C++ code for this project. Copy it into Arduino IDE and upload it to the ESP8266 NodeMCU.
#define sensorPin D1
#define ledPin D2
#define buzzer D3
void setup()
{
pinMode(sensorPin, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(buzzer, OUTPUT);
}
void loop()
{
int helmetStatus = digitalRead(sensorPin);
if (helmetStatus == HIGH) // helmet worn
{
digitalWrite(ledPin, HIGH); // ignition allowed
digitalWrite(buzzer, LOW);
}
else // helmet not worn
{
digitalWrite(ledPin, LOW);
digitalWrite(buzzer, HIGH);
}
delay(200);
}A road-safety system that checks the rider is wearing a helmet. An IR sensor inside the helmet detects when it is worn.
You need: ESP8266 NodeMCU (1), IR Sensor Module (1), Buzzer (1), LED or Relay Module (1), Jumper Wires, Power Supply (1). Software: Arduino IDE.
Yes. It is rated beginner and takes about 1–2 hours to build, using the ESP8266 NodeMCU. The guide on this page explains every connection and step.
The complete, tested Arduino C++ code is free on this page. Copy it into Arduino IDE and upload it to the board.
Yes. IRI sells a kit with the parts for this project (PRJ-052). Message IRI on WhatsApp at +91 86060 82634 for the kit price and delivery details.