Daily Devices-Hand Dryer

I started with idea of washing machine having three aspects to it, water level, rinse & dry. But it was too complex to incorporate all the aspects in one. The next attempt was crane, but finally I built up a hand dryer.


A hand dryer is built with an IR sensor but I have used an ultrasonic sensor to trace the distance.  When a person is not within the vicinity, the hand dryer is in ‘Switch Off’ mode. A red led on the Hand Dryer indicates that. When you come near, the green led glows & the steady fan starts rotating. The voltage output of the green led & fan are connected to each other, which makes both of them work at the same time.

Circuit Diagram:





Click here to see the video


#define trigPin 13
#define echoPin 12
#define led 11
#define led2 10

void setup() {
Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(led, OUTPUT);
pinMode(led2, OUTPUT);

void loop() {
long duration, distance;
digitalWrite(trigPin, LOW); // Added this line
delayMicroseconds(2); // Added this line
digitalWrite(trigPin, HIGH);
// delayMicroseconds(1000); – Removed this line
delayMicroseconds(10); // Added this line
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;
if (distance < 15) { // This is where the LED On/Off happens
digitalWrite(led,HIGH); // When the Red condition is met, the Green LED should turn off
else {
if (distance >= 200 || distance <= 0){
Serial.println(“Out of range”);
else {
Serial.println(” cm”);