Security System


Security system can also be termed as proper access controll in the field of Information technology. Access control is the selective restriction of access to a place or other resources. The act of accessing may mean consuming, entering, or using. Permission to access a resource is called authorization.

Locks and login credentials are two analogous mechanisms of access control. When a credential is presented to a reader, the reader sends the credential’s information, usually a number, to a control panel, a highly reliable processor. The control panel compares the credential's number to an access control list, grants or denies the presented request, and sends a transaction log to a database. When access is denied based on the access control list, the door remains locked. If there is a match between the credential and the access control list, the control panel operates a relay that in turn unlocks the door. The control panel also ignores a door open signal to prevent an alarm. Often the reader provides feedback, such as a flashing red LED for an access denied and a flashing green LED for an access granted.

There are three types (factors) of authenticating information:

  • something the user knows, e.g. a password, pass-phrase or PIN
  • something the user has, such as smart card or a key fob
  • something the user is, such as fingerprint, verified by biometric measurement

Passwords are a common means of verifying a user's identity before access is given to information systems. In addition, a fourth factor of authentication is now recognized: someone you know, whereby another person who knows you can provide a human element of authentication in situations where systems have been set up to allow for such scenarios. For example, a user may have their password, but have forgotten their smart card.

An access control point, which can be a door, turnstile, parking gate, elevator, or other physical barrier, where granting access can be electronically controlled. Typically, the access point is a door. An electronic access control door can contain several elements. At its most basic, there is a stand-alone electric lock. The lock is unlocked by an operator with a switch. To automate this, operator intervention is replaced by a reader. The reader could be a keypad where a code is entered, it could be card reader, or it could be a biometric reader. Readers do not usually make an access decision, but send a card number to an access control panel that verifies the number against an access list. To monitor the door position a magnetic door switch can be used. In concept, the door switch is not unlike those on refrigerators or car doors. 



Before, we proceed, i highly recommend you to read detailed information about IR sensor module which we created, 8051 microcontroller intro & programming environment setup and Motor driving circuit.

As, we know that these projects are very large and can have various output devices to be controlled or automated, in that case, we should always choose any platform which is very low in cost. This will prevent you to go overbudget. Next, we will now take a small task related to the security system project. Obviously! we will be making very complex system at last, but my main aim is to make things easier to you, not flash your eyes with complex things at once.

So, our task we will be "To open/close the door of a room on getting a right password else trigger the buzzer". For this, currently we are not using RF IDs/readers, expensive microcontrollers like arm cortex8 and so on with linux, instead we are using 8051 architecture microcontroller development board, so that you can learn with less budget. For the sensing or input part, we will use IR sensor module created by us in last article. and for output, we will use a DC motor connected to a ULN IC. Note that, we are not using L293D here.

Now for further information i want you to see my youtube video embedded here. In this video, i have explained the working of this project.

I hope that, you have clear understanding about the circuit through this video. I have not given a seperate circuit diagram to you people because i want you to understand the working and not just see and make circuits. But after this video, you could still not figure out how to make circuit on this board or at your custom board then for that, i have made a small PDF file for all the steps you should follow, while making this circuit. you can download this file from hereWith this, you can also download the codes of 8051 microcontroller interfacing and specially the code for this project on this git link. 

A bit code explaination

Below given code snippet of this project.

Here, you can see the logicial part of this program, where sw, signal, place, entered and number variable represents ok-switch, place of input numeric password, password digits and calculated password respectively. you can see that after checking unlock condition and ok switch pressed condition, we inititialized the place variable and with that waited for switch to come up (released by user).  After button s released, then signal led is blinked off. With this, whole code is caluculated with digits which we recieved earlier by some other functions. Then password is compared with any variable. In this image, i have just checked the last digit that is 4. But in production, you will check all digits, in short whole number formed. 

In that also, you will choose a variable which will get password from file storage on restart of system. Here, this might seem very unprofessional code (and yes it is) but for learning phase, it doesnot matter. later, i will tell you about much higher level microcontroller and good programming techniques)

Obviously, i cant explain you whole code line by line. Its so long, but i have already divided this project into smaller modules. You can find articles about them in Learning sections. Atleast, you must read about 7-Segment Display and Matrix keypad. And also, i if you dont know how to compile and then burn the hex file into your microcontroller, then follow this tutorial.

I hope this article helped you. Please feel free to comment below or contact me, for any query. :)