Hardware OTP Lock

Once again I’m back to my studies. This time hope to bring much more projects. Let this be the starting one.

We are all familiar with the OTP system that’s now used in several online transaction. Well… this time me and my friends Jishnu and Vivek did a small project to implement this system for hardware locks as part of our academic work.

Any system needs a few assumption before designing. Since this one is related to security, we assumed that the system will lock automatically after 5 seconds, and is suitable to be used with push to lock systems. Thus the system has a unlock button, which the user will have to press to initiate the OTP generation. The user will receive the OTP as an sms to his mobile. He/she can then enter it using the key pad and once the OTPs(sent and the received) matches, the system unlocks and stays unlocked for 5 seconds. The demo model contains 3 indicator LEDs, Red, Yellow and Green. The Red LED is ON to indicate that the system is locked. Once user initiates a transaction and after OTP is sent, Yellow LED is lit to indicate that the system is awaiting user input for password. Once password is accepted Green LED is turned on for 5 sec to indicate that the system is unlocked. and after 5 seconds system comes back to the locked state.

The OTP is generated using the inbuilt random number generator function in C and converting it into a 4 digit number. The controller used for the system is PIC16F877A. The sms is sent using a GSM module(SIM900). The proteus simulation model for the system is as shown in the figure below.

Hardware OTP Lock : Startup/Lock State
Hardware OTP Lock : Startup/Lock State

 

Hardware OTP Lock : Wait for user input
Hardware OTP Lock : Wait for user input

 

Hardware OTP Lock : OTP mismatch
Hardware OTP Lock : OTP mismatch

 

Hardware OTP Lock : OTP Accepted case
Hardware OTP Lock : OTP Accepted case

 

The source code for the project is available here.

The project can be further modified by adding a user interface to change the mobile number, unlock time, password strength etc.

 

Advertisements

2 thoughts on “Hardware OTP Lock

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s