Web-Server based IoT Door Lock System

This device is an IoT based door lock that can be controlled through the cloud from anywhere around the world on android as well as ios

IntermediateFull instructions providedOver 1 day1,472
Web-Server based IoT Door Lock System

Things used in this project

Hardware components

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
solenoid lock
×1
1 channel relay
×1

Software apps and online services

Blynk
Blynk

Story

Read more

Schematics

IoT door lock basic circuit

Connect it and upload the code given to the microcontroller usinfg Arduino IDE

Code

smart door lock code

C/C++
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "";//authtokeninside""
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "DOORLOCK";
char pass[] = "DOORLOCK123";
int relayInput = 4;
BLYNK_WRITE(V1) {
if (param.asInt()==1){
digitalWrite(relayInput, HIGH); // turn relay on
digitalWrite(14, HIGH); //led yellow on pin 5
digitalWrite(12, LOW); //led red off pin 6
}
else{
digitalWrite(relayInput, LOW); // turn relay off
digitalWrite(12, HIGH); //led red on
digitalWrite(14, LOW); //led yellow off
}
delay(300);
}
void setup() {
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
pinMode(relayInput, OUTPUT); // initialize pin as OUTPUT
pinMode(12,OUTPUT);
pinMode(14,OUTPUT);
}
void loop()
{
Blynk.run(); // You can inject your own code or combine it with other sketches.
}

Credits

Lalith Adhithya

Lalith Adhithya

4 projects • 4 followers
Tharrun Kumar NT

Tharrun Kumar NT

7 projects • 5 followers
Skilled in programming micro controllers and developing IoT applications using open-source cloud platforms.A Self-made IoT Dev since 2020.
Saran Raj

Saran Raj

5 projects • 7 followers
Rohin Ramesh

Rohin Ramesh

5 projects • 4 followers

Comments