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.
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.