digital code lock

Download Digital Code Lock

If you can't read please download the document

Upload: rayees-saeed

Post on 18-Dec-2014

91 views

Category:

Documents


4 download

TRANSCRIPT

ACKNOWLEDGEMENTFirstly, we would like thank our Dean who provided us with all the facilities and support to make this project successfully. We would like to express our deep gratitude to our project instructor Mr Chandrashekar Ramaiah for providing us with all the technical and theoretical support in completing our project. Also, we would like to express our sincere thanks to Mr.Dhiyab Al Amri who helped us in the implementation of the project. We would also like to thank all the members of E-Club who helped us with their valuable ideas in completing the project. Lastly, we would like to thank all the students and staff of Middle East college of Information Technology who helped us and co-operated with us during the course.

ABSTRACTThe project Electronic Code Lock System is an electronic security lock which consists of a 6 digit pass code. It uses the 555 timer in monostable mode. If all the correct 3 combinations of switches are pressed the lock opens and if any other switch is pressed the lock resets. This design could also be used to lock any other electronic device. In this circuit, the 3 correct combinations of keys connected in series are given to the input (pin 2) of the 555 timer, which generates an output and thus switching on the device or lock, and the other 3 switches connected in parallel are given to the reset pin (pin4) of the 555 timer which resets the device or lock to the initial state.

TABLE OF CONTENTS LIST OF FIGURES LIST OF TABLESTABLE 2.13 TABLE 3.310 TABLE 2.44

AIMS & OBJECTIVES

To clarify and fully understand the electronic code lock system and all associated components by designing an electronic code lock system. Achieve and improve team work characteristics as well as managing communication and managements. Moreover, to gain the awareness of dealing and handling of opinion conflictions. To learn about electronic hardware components and their function. Gain technical skills such as soldering, desoldering, testing and building electronic circuits. Improve troubleshooting and brainstorm skills by conducting group meetings to solve problems. Create a successful Electronic Code Lock System which can be used for any security system.

CHAPTER 1GENERAL OVERVIEW

INTRODUCTIONIn this chapter a general overview of the project is given, which includes the background details, scope and limitations of the project.

BACKGROUNDSecurity is one of the most important concerns in this modern world. Therefore, its implementation as well as development is a very wide sector. Code lock is a valuable example of this category since its very widely used in real life. With the background of capacitors, transistors, resistors and a detailed study on 555 timer, this project, THE ELECTRONIC CODE LOCK SYSTEM was designed and tested to ensure its efficiency and secure functioning. Several sources were used to implement the ideas and the desired requirements of this design. To add to that, a lot of benefits were gained from this project, which is very supportive to an engineer in real industrial life.

1.3 APPLICATIONSThe Electronic Code Lock has a variety of applications. Some of the applications are: Used as a keyless lock system It can be used as an electronic door lock. It can be used to switch on and off home appliances It can be employed in Cars to switch on and off the engine. Used for controlling various types of electrical or electronic

items

1.4 SCOPE OF STUDYThis project THE ELECTRONIC CODE LOCK SYSTEM has a wide scope of study which includes the following: Circuit design and structure Its working and function Definition and function of each component used Simulation and implementation Finding and discussion

LIMITATIONS

There are many limitations in our project. Some of them are stated below: Lack of in depth knowledge of different types of ICs limited us to expand our project. To open the code lock all the right keys must be pressed together. The right combination of keys can be pressed in any order.

CHAPTER 2COMPONENTS DESCRIPTION

2.1 INTRODUCTIONIn this chapter, each component used in this circuit is discussed in detail.

2.2 LIST OF COMPONENTSThe list of components used in this project is shown in the table below:

NAME OF COMPONENT Resistor Resistor Capacitor Capacitor Switches

Part number or Value

Quantity

100k 1M 1F 100nF Push switches

2 1 1 1 6

Transistor LED IC RELAY

NPN RED AND GREEN 555 TIMER SUNHOLD THU-1203 TABLE 2.1: LIST OF COMPONENTS

1 2 1 1

2.3 DESCRIPTION OF COMPONENTS

RESISTOR

Figure 2.2

Figure 2.3

Resistor is an electrical component that limits or regulates the flow of electrical current in an electronic circuit. A standard resistor is shown in figure2.2 and its symbol, used in circuits is shown in figure 2.3. Resistors are color coded the value of the resistance is determined by the color on it which is according to the table given below in table 2.4.

Color Black Brown Red Orange Yellow Green Blue

First-band Digit 0 1 2 3 4 5 6

Second-band Digit 0 1 2 3 4 5 6

Third-band Multiplier 100 = 1 101 = 10 102 = 100 103 = 1000 104 = 10000 105 = 100000 106 = 1000000

Fourth-band Tolerance 1% 2% 3% 4%

Violet Gray White Gold Silver None

7 8 9

7 8 9

107 = 10000000 108 = 100000000 109 = 1000000000

5% 10% 20% TABLE 2.4: The table below shows the color code and their associated value [5]

CAPACITOR

Figure 2.5

Figure 2.6

Capacitor is a passive electronic component that stores energy in the form of an electrostatic field. They are used with resistors in timing circuits because it takes time for a capacitor to fill with charge. They are used to smooth varying DC supplies by acting as a reservoir of charge. They are also used in filter circuits because capacitors easily pass AC (changing) signals but they block DC (constant) signals. Different types of capacitors are shown in figure 2.3 and its symbol used is shown above in figure 2.5.

TRANSISTOR

Figure 2.7

Figure 2.8

Transistor consists of three layers of a semiconductor material, each capable of carrying current. It is of two types depending on material used, they are NPN and PNP. Here, in this circuit we use NPN transistor. A picture of transistor is shown in figure 2.6 and the symbol of transistor is shown in figure 2.7.

555 TIMER

Figure 2.9

Figure 2.10

Here, figure 2.8 shows a 555 timer and figure 2.9 shows the internal circuit diagram of the 555 timer. A detailed working of 555 timer is given in Chapter 3.

LED (Light Emitting Diode)

Figure 2.11

Figure 2.12

LED or Light Emitting Diode is a transducer which converts electrical energy to light. LEDs are available in red, orange, amber, yellow, green, blue and white in which blue and white are more expensive. Figure 2.11 and figure 2.12 shows the picture of Led and its symbol respectively. The colour of an LED is determined by the semiconductor material, not by the colouring of the 'package' (the plastic body). LEDs of all colours are available in uncoloured packages which may be diffused (milky) or clear (often described as 'water clear'). The coloured packages are also available as diffused (the standard type) or transparent. Different coloured LEDs are shown in figure 2.13 below.

Figure 2.13:Types of LEDs

BATTERY

Figure 2.14

Figure 2.15

Battery is a D.C voltage supply given to the circuit. The above figure 2.9 shows a 9V battery which is used in this circuit and figure 2.10 shows the symbol of battery represented in circuits.

RELAY

Figure 2.16

Figure 2.17

Relay is an electrically operated switch for example a 9V battery circuit connected to the coil can switch a 230V AC mains circuit. Figure 2.11 shows a standard relay commonly used and figure 2.12 shows the symbol of Relay used in circuits [1] .

CHAPTER 3SYSTEM IMPLEMENTATION

3.1 INTRODUCTIONThis chapter explains the working of the circuit and a detailed working of the 555 timer.

3.2 CIRCUIT DIAGRAM

Figure 3.1: Circuit Diagram

3.3 WORKING OF THE CIRCUIT

Our circuit the Electronic Code Lock is security lock with a 6 digit pass code. The 555 timer in the circuit generates the desired output according to the given input, which biases the transistor and switches the device through a relay. In this circuit the correct combinations of switches are connected in series and given as an input to the 555 timer (to pin2), and all the other keys are connected in parallel and connected to the reset pad (pin4) of the 555 timer. Thus, only when all the correct combination of switches are pressed together, it forms a closed loop generating a trigger to input of the IC. Then the output is given to the base of transistor which biases the transistor and accordingly switches on or unlocks the appliances, through a relay. When any of the wrong switches is pressed it gives a trigger to the reset pin (pin 4) of the 555 timer which resets the circuit and switches off or locks the appliances through the relay. When an input (to pin 2) is given to the 555 timer the capacitor connected to the discharge pin of 555 timer starts charging until the voltage at threshold pin (pin 6) is 2/3 rd of the total voltage (Vcc). This time delay until which the voltage at pin 6 becomes 2/3 rd of Vcc is time until which the output will be shown or the time until which the lock is kept open. After this the capacitor starts discharging and the circuit resets or returns to the initial state. To know more about the working of 555 timer, a detailed working of 555 timer is given below.

3.4 555 TIMERThe 555 Timer IC is an integrated circuit (chip) implementing a variety of timer and multivibrator applications. The standard 555 package includes over 20 transistors, 2 diodes and 15 resistors on a silicon chip installed in an 8-pin mini dual-in-line package.The IC is available in either an 8-pin round TO3-style can or an 8-pin mini-DIP package. In either case, the pin connections are as follows:

Figure 3.2: Pin out diagram of 555 timer The connection of the pins is as follows: PIN No. 1 2 3 4 5 6 7 GND Ground, low level (0 V) TRIG A short pulse high-to-low on the trigger starts the timer(input) OUT During a timing interval, the output stays at +VCC RESET A timing interval can be interrupted by applying a reset pulse to low (0 V) CTRL Control voltage allows access to the internal voltage divider (2/3 VCC) THR The threshold at which the interval ends (it ends if the voltage at THR is at least 2/3 VCC) DIS Connected to a capacitor whose discharge time will influence the timing interval Connection

8

V+, VCC The positive supply voltage which must be between 3 and 15 V TABLE 3.3: List the function of each pin of 555 timer [3]

The figure3.2 below shows the functional block diagram of the 555 timer IC:

Figure 3.4: Functional block diagram of 555timer [2] The operation of the 555 timer revolves around the three resistors that form a voltage divider across the power supply, and the two comparators connected to this voltage divider. The IC is quiescent so long as the trigger input (pin 2) remains at +V CC and the threshold input (pin 6) is at ground. Assume the reset input (pin 4) is also at +VCC and therefore inactive, and that the control voltage input (pin 5) is unconnected. Under these conditions, the output (pin 3) is at ground and the discharge transistor (pin 7) is turned on, thus grounding whatever is connected to this pin. The three resistors in the voltage divider all have the same value (5K in the bipolar version of this IC), so the comparator reference voltages are 1/3 and 2/3 of the supply voltage, whatever that may be. The control voltage input at pin 5 can directly affect this relationship, although most of the time this pin is unused.

The internal flip-flop changes state when the trigger input at pin 2 is pulled down below +VCC/3. When this occurs, the output (pin 3) changes state to +VCC and the discharge transistor (pin 7) is turned off. The trigger input can now return to +V CC; it will not affect the state of the IC. However, if the threshold input (pin 6) is now raised above (2/3)+VCC, the output will return to ground and the discharge transistor will be turned on again. When the threshold input returns to ground, the IC will remain in this state, which was the original state when we started this analysis. The easiest way to allow the threshold voltage (pin 6) to gradually rise to (2/3)+VCC is to connect it to a capacitor being allowed to charge through a resistor. In this way we can adjust the R and C values for almost any time interval we might want. The 555 can operate in either monostable or astable mode, depending on the connections to and the arrangement of the external components. Thus, it can either produce a single pulse when triggered, or it can produce a continuous pulse train as long as it remains powered [4].

The 555 Timer has three operating modes: Monostable mode: In this mode, the 555 functions as a one-shot. Applications include timers, missing pulse detection, bounce free switches, touch switches, frequency divider, capacitance measurement, pulse-width modulation (PWM) etc Astable (free running mode): the 555 can operate as an oscillator. Its uses include LED and lamp flashers, pulse generation, logic clocks, tone generation, security alarms, pulse position modulation, etc. Bistable mode or Schmitt trigger: the 555 can operate as a flip-flop, if the DIS pin is not connected and no capacitor is used. Uses include bounce free latched switches, etc. In this circuit 555timer is working in monostable mode. The detailed description of 555timer in monostable mode is given below:

3.5 MONOSTABLE MODEGiven below is the 555 timer connected in monostable mode:

FIGURE 3.5:Circuit diagram of 555 Timer in Monostable Mode The relationships of the trigger signal, the voltage on C and the pulse width in monostable mode. In the monostable mode, the 555 timer acts as a one-shot pulse generator. The pulse begins when the 555 timer receives a trigger signal. The width of the pulse is determined by the time constant of an RC network, which consists of a capacitor (C) and a resistor (R). The pulse ends when the charge on the C equals 2/3 of the supply voltage. The pulse width can be lengthened or shortened to the need of the specific application by adjusting the values of R and C. The pulse width of time t, which is the time it takes to charge C to 2/3 of the supply voltage, is given by T = RC ln(3) =1.1RC Where t is in seconds, R is in ohms and C is in farads. Here, in this circuit the value of R is taken as 1M and C is taken as 1F. 1.1sec [3].

RESULTS & FINDINGS Pressing together all the correct combination of keys unlocks the lock or activates the device (since it is connected in series). Pressing any one incorrect key resets the lock or deactivates the circuit (since it is connected in parallel).

The time period of the 555 timer can be varied by adjusting the values of R and C in the circuit. Time period is given by the formula, T=1.1 RC.

Push switches are used to give continuous trigger such that the output remains constant and doesnt change in the time interval and resets only for an incorrect combination.

RECOMMENDATIONS The number of switches used in this circuit can be increased to make the device more secure. The circuit can be used with a multiplexer to switch different devices with the same code in different combinations. Increasing the time interval of the 555 timer and using push button switches will make the lock secure according to the use, by locking the unlocked device after the required time interval.

CONCLUSION

The door lock project was built successfully and safely for many reasons such as, all members of the team contributed equally their effort to produce a robust system. To add to that a proper plan was stated and hence, it was followed in a logical way. Moreover the resources and facilities required for this project were listed in advance and used properly to cover the tasks. Furthermore a proper testing was done to the system to confirm its efficiency. Finally this group project was a great opportunity to expand knowledge and skills in different fields of engineering such as planning and designing using alternative methods and facilities, learning implementation techniques, improving troubleshooting skills and skills of building electronic circuits.

REFRENCES

John Hewes 2010,Circuit symbols

,viewed

25

May

2010

Ken Bigelow 1996,The 555 Timer IC, viewed 22 May 2010

555TimerIC, last modified,

18

June

2010

V.K Puri 1997,Digital Electronics Circuits and Systems ,Tata McGraw Hill Publishing Company, New Delhi Color Code for Resistors , viewed on 4 June 2010

APPENDIXTESTING AND IMPLENTATION

Figure 4.1: Testing of the circuit Figure 4.2:testing of circuit

Figure 4.3: Testing of the circuit Ct o

Figure 4.4: Soldered project