Introduction: RASPBERRY PI PASSWORD DOOR LOCK

About: Hi, I am bharat .

 hello after almost one year i am writing this instructable in this instructable i am going to make a raspberry pi password door lock..using raspberry pi,PHP and html.you can unlock and lock the door from any device with web browser and WiFi.

Step 1: Part List

(1) raspberry pi zero w {any raspberry pi will work with wifi}

        (2) relay switch module {not used in this project because i dont have a solenoid lock}

        (3) solenoid lock {i am using led in place of lock and its for representation purpose}

        (4) breadboard for testing purpose

Step 2: Important

you need to install a web server with php also you need to install libgpiod library on pi, you can also use wiring pi in place of libgpiod.. i am using dietpi os on my pi zero and these installation is very easy on this os.for detail instruction watch my raspberry pi dice video on my channel.

Step 3: Frontend

front end is just one html file called index.html with some buttons and field

Step 4: Backend

 backend is a php file called pdl.php with predefined password and username .. if it is matched then it will issue unlock shell script command....and if password or username does not matched then it will show you access denied...the last line is for lock command.....


Step 5: The Shell Script

create a shell script named unlock.sh with following command 

                            gpioset gpiochip0 25=1;

                            sleep 10;

                            gpioset gpiochip0 25=0;


         and make it executable with "sudo chmod 755 unlock.sh" AND put it under usr/lib/cgi-bin folder

Step 6: Final

 open a web browser in same network and type raspberry pis ip address and you will see the web page 


MY TWITTER @bharatmohanty_

MY YOUTUBE youtube.com/bharatmohanty

Raspberry Pi Contest

Participated in the
Raspberry Pi Contest