Voice Command Door Lock

Voice Command Door Lock © GPL3+

How to Lock and unlock your door with voice command

  • 526 views
  • 0 comments
  • 2 respects

Components and supplies

A000066 iso both
Arduino UNO & Genuino UNO
×1
11026 02
Jumper wires (generic)
×2
Car door lock actuator
×1
Relay (generic)
×4
BD139 Transistor
×1
2.2k Resistor
×2

Necessary tools and machines

Hy gluegun
Hot glue gun (generic)
09507 01
Soldering iron (generic)

Apps and online services

Arduino Voice controller

About this project

In this project I made voice command door lock which we can control with voice. when we speak "door lock" door automatically locked and when we speak "door unlock" door automatically unlocked. For this purpose we install android App in mobile phone "Arduino voice controller". Open it and and connect with HC-05 Bluetooth module.

Code

Voice Door lockArduino
String voice;

#define lockPin 12
#define unlockPin 11
void setup() 
{                                            // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(lockPin, OUTPUT);
  pinMode(unlockPin, OUTPUT);
 
}
void loop() {
 
  while (Serial.available())   //Check if there is an available byte to read
  {                            
  delay(10);                   //Delay added to make thing stable
  char c = Serial.read();      //Conduct a serial read
  voice += c;                  //Shorthand for voice = voice + c
  } 

  if (voice.length() > 0) {
    Serial.println(voice);
  if(voice == "door lock")//                             
     {
   
     digitalWrite(lockPin,HIGH);
     delay(3000);
     digitalWrite(lockPin,LOW);
    
     }  
  else if(voice == "door unlock")//                              
     {
    
    digitalWrite(unlockPin,HIGH);
     delay(3000);
     digitalWrite(unlockPin,LOW);
     }
 voice="";                                                       //Reset the variable after initiating
  }}

Schematics

Door Lock
Door lock  rntrfurpkg

Comments

Similar projects you might like

Smart Lock Door with Voice Activation Using Arduino Uno

Project showcase by bangkitwahyu

  • 3,666 views
  • 2 comments
  • 20 respects

Arduino Keyless Door Lock System with Keypad and LCD

Project tutorial by DIY Hacking

  • 47,057 views
  • 19 comments
  • 74 respects

Control LED Using Your Voice Command

by Team IoTBoys

  • 35,333 views
  • 4 comments
  • 32 respects

Arduino and Android Based Password Protected Door Lock

Project tutorial by Md. Khairul Alam

  • 19,555 views
  • 7 comments
  • 60 respects

Keypad Door Lock with Changeable Code

Project tutorial by SurtrTech

  • 17,143 views
  • 9 comments
  • 45 respects
Add projectSign up / Login