A fan that speeds up when your pulse rises and slows when you calm down.
Built and tested by Shahan Fathima K · Industrial Robotics Institute

A fan that responds to how you feel. A pulse sensor on your finger gives a signal that rises with heart activity; the ESP8266 turns it into a PWM speed for the fan through an L298N motor driver. When you are stressed or warm the fan speeds up, and when you are calm it slows down.
| Component | Qty |
|---|---|
| ESP8266 NodeMCU | 1 |
| Pulse Sensor | 1 |
| L298N Motor Driver Module | 1 |
| DC Fan / Motor | 1 |
| Jumper Wires | As needed |
| External 5V/12V Power Supply | 1 |
| From | Connect to |
|---|---|
| Pulse sensor VCC | 3.3V |
| Pulse sensor GND | GND |
| Pulse sensor SIGNAL | A0 |
| L298N IN1 | D1 |
| L298N IN2 | D2 |
| L298N ENA (PWM) | D3 |
| L298N VCC | External 5V/12V |
| L298N GND | GND (common with ESP8266) |
| DC fan | L298N OUT1 & OUT2 |
Complete, tested Arduino C++ code for this project. Copy it into Arduino IDE and upload it to the ESP8266 NodeMCU.
#define pulsePin A0
#define in1 D1
#define in2 D2
#define enA D3
int pulseValue = 0;
void setup()
{
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(enA, OUTPUT);
digitalWrite(in1, HIGH); // fixed direction
digitalWrite(in2, LOW);
analogWriteRange(255); // PWM range 0-255
}
void loop()
{
pulseValue = analogRead(pulsePin);
int speed = map(pulseValue, 0, 1023, 0, 255);
analogWrite(enA, speed);
delay(200);
}A fan that responds to how you feel. A pulse sensor on your finger gives a signal that rises with heart activity; the ESP8266 turns it into a PWM speed for the fan through an L298N motor driver.
You need: ESP8266 NodeMCU (1), Pulse Sensor (1), L298N Motor Driver Module (1), DC Fan / Motor (1), Jumper Wires, External 5V/12V 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-060). Message IRI on WhatsApp at +91 86060 82634 for the kit price and delivery details.