Usage of new generation technologies is becoming an important requirement in these days. These technologies can be used in the security of building or home to reduce human efforts, personal safety and protect building structure.
Many researchers have proposed various methods of security systems  . Each of these systems has its own advantages and disadvantages . One of the important security systems in building is door access control. Most doors are controlled manually, especially by security personal that employed by the organization, through the use of handles and locks with key to operate the locks. Examples are banks, hotels, motels and so on; some are controlled by switches while others are controlled by the biometric techniques. These techniques are to enable automatic verification of identification by computer assessment of one or more behavioral and/or physiological characteristics of a person. Recently, biometric methods used for personal authentication utilize such features as face recognition, voice recognition, hand shape, finger print, and iris patterns of an individual   .
Current access control systems for automatic door control require a sensor able to detect a moving object or a pedestrian crossing the gate. This approach does not take into account the trajectory of pedestrians, and therefore cannot estimate movements. As an example, if a pedestrian crosses the area in front of the door but does not want to cross the gate, the control access board detects his/her presence and anyway opens the door. In this case, the system is not efficient, since it leads to a waste of energy in terms of electricity, air conditioning, or heating and decrease the system lifetime with unnecessary open/close actions.
The door access control is a physical security that ensures the security of a building or home by means limiting access to building or home to specific car. These system control on the opening/closing of the door by receiving a decoded signal from a car, process it by a microcontroller if the code was authorized by the microcontroller then the door open. Waiting until the car entre and then close it.
The main remote control technology used in the home is infrared. The signal between IR LED and PIR (Passive Infra-Red) is infrared pulses, which are invisible to the human eye. The sender sends out a pulse of infrared light when a car closed from a specific door. The infrared light pulses represent a binary code that corresponds to a certain command, such as (power on). The receiver passes the code to a microcontroller, which decodes it and carries out the command.
Using Bluetooth Wireless Technology (BWT) is not just for transfer of data and files only. In recent years, automation is one of the applications of Bluetooth technology. BWT enabled devices operate in 2.4-gigahertz (GHz), that use a technique called frequency hopping to minimize eavesdropping and interference from other networks. With frequency hopping, the data is divided into small pieces called packets. The transmitter and receiver exchange a data packet at one frequency, and then they hop to another frequency to exchange another packet. They repeat this process until all the data is transmitted.BWT devices randomly hop between frequencies up to 1600 times per second. This gives BWT networks a high immunity to interference from other 2.4-GHz devices .
With these qualifications of IR and Bluetooth; we offer a door automation system and car identification based on IR and Bluetooth.
2.1. System Overview
The block diagram of this work is detailed in Figure 1. System can be activated by either using IR Sender/Receiver, Bluetooth through an application by the mobile phone or directly by pressing button on the board. By whatever way the doors are opened, the system automatically turns on the lights and the last stays on even after the door close for further 20 seconds. On another hand, closing the door can be done by IR Sender/
Figure 1. The block diagram of an automatic door.
Receiver, Bluetooth device or directly pressing the close button on the board. If no one of previous action is executed, the door is closed automatically after 40 seconds. Neither of the above closing methods can turn off the light. The light is also turned on by making any motion in the garage by PIR sensor. The light will turn off automatically after 60 second from any last order.
2.2. Electronic Lock System
The design of an electronic lock system used for opening and closing of the gate system is shown in Figure 2. The electronic lock system comprises of power supply unit, sensing unit, control unit and door unit (it contains relay and driver circuit). The electronic lock our system shown in Figure 3 and Figure 4.
1. Power Supply Unit
The microcontroller board and the driver board for the motors are supplied with 12 DC volts. The sensing unit is supplied by 5 DC volts through the microcontroller board. The relay is supplied by a 5 regulator volt directly from the main power supply.
2. Sensing Unit
The sensing unit consists of Bluetooth HC-06, IR receiver, PIR “Pyroelectric infrared” and IR obstacle avoidance.
a) Bluetooth HC-06 Sensor
The HC-06 module shown in Figure 4. An application on the mobile phone is used to control this sensor by searching Bluetooth name “HC 06”, then connecting with by entering the password “1234”. When pressing on “ON” the Bluetooth sends characters’ bytes in the form of “1” for opening the door, and when pressing on “OFF” sends characters’ bytes in the form of ‘0’ for closing the door.
b) IR receiver “KSM-603LM2M-2” Sensor
The IR Receiver receives two unsigned 32 bit long integer from the remote control, one of them is used for opening the door and the other for closing it.
c) PIR “Pyroelectric infrared” Sensor
The PIR sensor shown in Figure 4, used to detect movement by human or non-human
Figure 2. The Block diagram of an electronic lock.
Figure 3. IR sender and IR avoidance.
Figure 4. Receiving and control circuit.
in the garage. When this sensor detects any movement in the garage it will automatically open the light, and then turn off after 60 second from any last order. Also when an obstacle is situated in front of the door it turns on the lights.
d) IR obstacle avoidance Sensor
This sensor is mounted at the border of the left side of the front door shown in Figure 4, used to prevent closing the door while the car in the middle of the door entrance.
3. Control Unit
The microcontroller is programmed using the Integrated Development Environment (IDE). The control unit gets the input from the sensing unit, decodes them and then takes the following steps:
• Control the gate opening and closing.
• Generate the timing signal for the system.
• Decode signal that sensed by sensing unit.
• Activate the buzzer and light.
Opening the door by whatever the way; resets a timer system within the Arduino board, and this timer increases with each 500 milliseconds until its counter reaches 40 s where a signal is passed to close the door if not closed manually .Once the counter reaches 60s another order passes to turn off the lights. When closing the door manually,
Figure 5. The control unit schematic.
it only takes 20s second to turn off the lights. There is no way to turn off the lights manually. By pressing any one of the two buttons can interrupt any function in the board and do specific function which is either opening or closing the doors.
Through all the steps of the control system, a buzzer signal is used for debugging and for notification, at different length, the buzzer can tell you whether the doors are open, closed, you gave a wrong order, or the doors are closed and waiting for the lights to turn off. There is no buzzer signal when an obstacle is situated between the doors or when the time after the last signal is passed 60 seconds.
4. Door Unit
a) DS2Y-S-DC5V Relay
When PIR shown in Figure 4, detect a motion, it sends a signal to the transistor, transistor sends a signal to the relay, it activates the electromagnet, generating a magnetic field that attracts a contact and activate the lights. When the power is switched off, a spring pulls the contact back up to its original position, switching the lights off again.
b) L298n dual DC motor driver
When signal come from Arduino to open the door ,the current will flow in the motor from one pole to another, but when the signal come from Arduino instruct the door to close again, L298n dual DC motor driver will change the flow of current in opposite direction. The L298n dual DC motor driver is shown in Figure 4.
c) LRF-300 DC motor:
It has Low noise level, Long life time, Small fire, Smooth operation, Easy and convenient for installation. Used to open the door when receive a signal from IR sender or Bluetooth, and also for close it by operating in the reverse direction.LRF-300 DC motors located on the each side of the door, each one of them opens the door, that belong to separately from each other, as it shown in Figure 6 below.
Figure 6. LRF-300 DC motor location.
2.3. Software Lock System
The Arduino is the main processing unit that executes the program developed by IDE. When a car that has ID come in the front of the door that open either by IR sender or Bluetooth, if IR receiver used, then IR LED in a car send a (car ID) signal to IR receiver, the Arduino processed the ID if it is authorized the door open. If an application in mobile phone used to open the door, Arduino also processed the incoming ID from Bluetooth if it is authorized the door open.
In the two way of opening the door, a timer count to 40s and close the door , but if the car was in middle of the two doors, then the door do not close until the car moved away from the middle. Also buzzer and light turn on into 60 s.
If the emergency case happen and the user want to enter/exit immediately, the user pressed on the open/close button an interrupt happen and the door open/close. The flowchart in Figure 7 below describes how the software lock.
3. Results and Discussion
The door successfully opens automatically when the correct car ID was captured from
Figure 7. Software flowchart.
IR LED or Bluetooth, also closed automatically after 40 s or by Bluetooth device or pressing the close button. The prototype of this project is shown in Figure 8 below.
Figure 9 shown below describes Bluetooth error percentage that we obtained from trying to open the door several times to see the response. This error obtain when we out of the coverage distance, or when other wireless equipment operate on the 2.4 GHz frequency may that cause interference.
The Bluetooth HC-06 module can response to the signal up to 10m with any angle direction that mean there is no limitation in using Bluetooth in whatever direction.
But with the IR receiver there is limitation in the direction of the car. The best response was found when the car was in the front of the door. Figure 10 shows the relationship between distance and angle direction.
Figure 11 explains that IR does not response in a distance more than 5 m, in 5m the only response we have in a point to point position with IR. The closer distance to IR, more angle direction.
Figure 8. The prototype of project.
Figure 9. Histogram of Bluetooth error percentage.
Figure 10. Relationship between distance and angle direction.
Figure 11. Relationship between distance and angle direction.
This limitation in distance has an important security implication: in the event of a pursuit by criminals the owner’s car can open the door while still moving towards it and then close the gate immediately after gaining entry from a close button.
The system described in this project has been constructed to operate a small door depend on car identification. The systems successfully operate by using infrared ray and Bluetooth wireless technology. Arduino Leonardo was the main control unit that controlled on the opening/closing door depends on the received signal from sensing unit. The prototype constructed in order to demonstrate the workability of the design. It can be modified to form part of an electronic toll collection and other entry or pass through systems that require much car identifications. A bigger door can still be operated with the control system described but the driver circuitry must use components that can handle more power required to drive the door.
 Osadciw, L., Varshney, P. and Veeramachaneni, K. (2002) Improving Personal Identification Accuracy Using Multi Sensor Fusion for Building Access Control Application. In: Proceedings the Fifth International Conference for Information Fusion, 1176-1183.