bharatdeepracebansalayush341bakhil7261trishachatterjee270
Created August 29, 2020

Touchless Elevator Buttons

A Touchless Elevator Panel that can be made without any AI knowledge.

Touchless Elevator Buttons

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
IR Proximity Sensor Module
×2
Capacitive Proximity Sensor, Adjustable
Capacitive Proximity Sensor, Adjustable
×2

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Solder Flux, Soldering
Solder Flux, Soldering

Story

Read more

Custom parts and enclosures

Touchless Elevator Buttons

Touchless buttons work by the combination of two sensors :
1. Capacitive Proximity Sensor
2. IR Proximity Sensor
The Capacitive Proximity Sensor gets activated when any Metal or Non-Metal placed 2cm from the Sensor plate. As soon as the Capacitive Proximity Sensor gets activated it sends a signal to the Arduino Nano which then turns on the IR Proximity Sensor. Assuming that a fingertip has been inserted into the hole, the IR Proximity Sensor detects an obstruction and sends a signal to Arduino which in turn sends a signal to the main elevator panel informing it which button has been pressed. If no fingertip has been inserted it the IR proximity sensor does not detect any obstruction and hence ignores the signal sent by the Capacitive Proximity Sensor.

Schematics

Touchless Elevator Buttons

The IR Sensor is placed above the Ring Hole and Capacitive Proximity Sensor serves as the Touchless Button (Please refer to CAD Model for better understanding ). When a finger is put inside the hole and kept for 1 sec the Capacitive Proximity Sensor gets activated by sensing a material (Skin) and then IR Sensor detects an obstruction i.e. the finger as a result of which the button gets activated. The ring hole ensures that the button gets activated only when a finger is inserted into the hole and not by any other material.

Code

Elevator_Touchless.ino

C/C++
The code is dependent on information from two sensors. Capacitive proximity sensor values are first taken and then checked if any object is present at a distance of 2cm. If the value received is LOW that means nothing is present however if the value present is HIGH, the program enters the first IF statement where the value of IR Proximity Sensor is taken 5 times in 0.8 seconds using a for loop ( the fingertip has to be kept inside the hole for 0.8 seconds to activate button ). The value is taken 5 times to ensure that someone is purposefully activating that button using a finger. In between if the value becomes HIGH, the loop breaks. After the last IR Proximity Sensor value is taken and it turns out to be LOW program enters another if statement where using the Serial Interface a signal is sent to the main elevator panel about which button is being pressed in our case 1 or 2.
#define IRSensorPinUP 12
#define IRSensorPinDOWN 11
#define CapacitiveSensorUP 10
#define CapacitiveSensorDOWN 9
int IRSens_PinUPstate = 0;
int IRSens_PinDOWNstate = 0;
int CapSens_PinUPstate = 0;
int CapSens_PinDOWNstate = 0;
int val_UP,val_DOWN;
void setup() {
  Serial.begin(9600);
  pinMode(IRSensorPinUP, INPUT);
  pinMode(IRSensorPinDOWN, INPUT);
  pinMode(CapacitiveSensorUP, INPUT);
  pinMode(CapacitiveSensorDOWN, INPUT);
}

void loop() {
  CapSens_PinUPstate = digitalRead(CapacitiveSensorUP);             //Reading Values of Capacitive Proximity Sensors     
  CapSens_PinDOWNstate = digitalRead(CapacitiveSensorDOWN);         //Reading Values of Capacitive Proximity Sensors
  if(CapSens_PinUPstate == HIGH) {                                  // For UP Button, program enters if statement if CPS UP is HIGH i.e. something is present at 2cm distance 
    for(val_UP=0;val_UP<=4;val_UP++) {                              // for loop checks value of IR Sensor 5 times in 0.8 secs and confirms if something is present inside the hole i.e. fingertip                                
       IRSens_PinUPstate = digitalRead(IRSensorPinUP);              
       delay(160);                                                  // 800 milliseconds divide 5 is 160 milliseconds
       if(IRSens_PinUPstate == HIGH) {                              // in case the obstruction or fingertip is removed before loop finishes program comes out of loop
        break;
       }
    }                                                                                                                  
    if(IRSens_PinUPstate == LOW) {                                  // after 0.8 secs if anything (Fingertip) is present value of IR UP is LOW and program enters nested if statement 
      Serial.write(1);                                              // Sends 1 to main elevator panel by Serial Interface
    }
  }
  if(CapSens_PinDOWNstate == HIGH) {                                // For DOWN Button, program enters if statement if CPS DOWN is HIGH i.e. something is present at 2cm distance                          
     for(val_DOWN=0;val_DOWN<=4;val_DOWN++) {                       // for loop checks value of IR Sensor 5 times in 0.8 secs and confirms if something is present inside the hole i.e. fingertip
       IRSens_PinDOWNstate = digitalRead(IRSensorPinDOWN);
       delay(160);                                                  // 800 milliseconds divide 5 is 160 milliseconds
       if(IRSens_PinDOWNstate == HIGH) {                            // in case the obstruction or fingertip is removed before loop finishes program comes out of loop
        break;
       }                                                           
     }
    if(IRSens_PinDOWNstate == LOW) {                                // after 0.8 secs if anything (Fingertip) is present value of IR DOWN is LOW and program enters nested if statement
      Serial.write(2);                                              // Sends 1 to main elevator panel by Serial Interface
      }                                                       
    }
  }                                                                 // End of Code

Credits

bharatdeeprace

bharatdeeprace

2 projects • 0 followers
bansalayush341

bansalayush341

1 project • 1 follower
bakhil7261

bakhil7261

1 project • 1 follower
trishachatterjee270

trishachatterjee270

0 projects • 1 follower

Comments