Professional Documents
Culture Documents
Abstract:
This is a system in which the door is closed or opens automatically. This is based on movement sensor. When somebody reaches the door, the sensor senses this and automatically opens the door. The door is closed when no person is in its proximity. However, if a person wishes to go through the door and due to some reason they stop at the middle of the door, then closing the door in such a situation is dangerous and causes accident. Hence we have considered this and accordingly we have taken action so as to not to close the door in this case. We have used a micro controller to accomplish the task. We have assembled and tested the system and found to be working to our satisfaction.
TABLE OF CONTENT
ABSTRACT 1. INTRODUCTION 2. DESIGN PROCEDURE 2.1 POWER SUPPLY 2.1.1 TRANSFORMER 2.1.2 RECTIFIER 2.1.3 SMOOTHING 2.1.4 REGULATOR 2.2 CURRENT LIMITING RESISTOR FOR LED 3. CIRCUIT DESCRIPTION 3.1 HARDWARE 3.2 SOFTWARE TOOLS 3.3 MOTOR CONTROL 4. MAJOR COMPONENTS INFORMATION 4.1 AVR MICROCONTROLLER 4.1.1 I/O PORT 4.1.2 AVR MICRO BLOCK DIAGRAM 4.1.3 AVR MICROCONTROLLER INTERNAL ARCHITECTURE 4.1.4 PIN DESCRIPTION 4.2 TRANSISTOR AS A SWITCH 4.3 555 INTEGRATED CIRCUIT TIMER 4.4 TSOP 1738 IR RECEIVER
1. INTRODUCTION
Technology has provided us with lots and lots of luxury and comfort. Many an areas are enjoying the benefits offered by the innovations in technology. We wish to focus our attention to one of the area which is common for both domestic and industrial. The area is Security Doors. Doors are common for both the commercial establishment and residences. The traditional method is either we keep the doors open or close them, manually. When then doors are open the entire time, one problem what we encounter is lot of dust is received. So We keep the doors closed an d open them only when someone wants to get in. In the second method the problem is one has to stay all the time at the door to open it whenever someone arrives or departs. We have designed electronics for an automatic door. This door senses the presence of the person in its proximity and opens them automatically. Once the person passes through the door they are closed automatically. During the passing time if the person stands in the middle of the door, the doors won't be closed, they are kept open. They will wait for the person to move out, either way, and then only they are closed. This way we can prevent the accidental closure of the doors. This project offers us the challenges involved in designing an electronic system. During the process we will learn several aspects in design, development and testing skills.
MOTORS
230V AC
RECTIFIER
REGULATOR
SENSOR CIRCUIT
The block diagram for Automatic Door system is as shown in the above diagram.
The mains voltage is stepped down, rectified and a regulated 5V DC is achieved. The 5V DC is required as supply for the on board electronic components.
The sensor senses the movement of the visitors and based on this information the control circuit activates the doors. Whenever a person approaches the door, the doors are opened automatically; they are closed once the person passes through the door. The sensors act smartly; they don't close the doors if a person stands in the middle of the doors, thus preventing accidental closure of the doors
2. DESIGN PROCEDURE
Our design circuit consists of a power supply, a transistor, a relay, resistors, capacitors and LEDS. In this design section we will go step by step on how different components are used in our system, how they perform, their features. For any electronic device we require power supply in it, which is very essential requirement for any circuit. Here we are using a 5V regulated dc supply in our circuit. To obtain 5V dc supply procedure is as following.
A brief description: Transformer - steps down high voltage AC mains to low voltage AC. Rectifier - converts AC to DC, but the DC output is varying. Smoothing - smooth the DC from varying greatly to a small rippl e. Regulator - eliminates ripple by setting DC output to a fixed voltage.
voltage mains supply, and a small number of turns on its secondary (output) coil to give a low output voltage. Turns ratio == VP = primary (input) voltage; Vs = secondary (output) voltage Np = number of turns on primary coil Ns = number of turns on secondary coil
The low voltage AC output is suitable for lamps, heaters and special AC motors. It is not suitable for electronic circuits unless they include a rectifier and a smoothing capacitor.
2.1.2 Rectifier
There are several ways of connecting diodes to make a rectifier to convert AC to DC. The bridge rectifier is the most important and it produces full-wave varying DC. A full-wave rectifier can also be made from just two diodes if a centre tap transformer is used, but this method is rarely used now that diodes are cheaper. A single diode can be used as a rectifier but it only uses the positive (+) parts of the AC wave to produce half-wave varying DC.
Bridge rectifier:
A bridge rectifier can be made using four individual diodes, but it is also available in special packages containing the four diodes required. It is called a full wave rectifier because it uses the entire AC wave (both positive and negative sections). 1.4V is used up in the bridge rectifier because each diode uses 0.7V when conducting and there are always two diodes conducting, as shown in the diagram below. Bridge rectifiers are rated by the maximum current they can pass and the maximum reverse voltage they can withstand (this must be at least three times the supply RMS voltage so the rectifier can withstand the peak voltages). Please see the Diodes page for more details, including pictures of bridge rectifiers.
10
2.1.3 Smoothing
Smoothing is performed by a large value electrolytic capacitor connected acr oss the DC supply to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The diagram shows the unsmoothed varying DC (dotted line) and the smoothed DC (solid line). The capacitor charges quickly near the peak of the varying DC, and then discharges as it supplies current to the output. Smoothing is not perfect due to the capacitor voltage falling a little as it discharges, giving a small ripple voltage. For many circuits a ripple which is 10% of the supply voltage is satisfactory and the equation below gives the required value for the smoothing capacitor. A larger capacitor will give fewer ripples. The capacitor value must be doubled when smoothing half -wave DC.
Charging and Discharging of Capacitor From figure 4, we can observe that when waveform is rising it is getting charged and when it is decaying it will discharge.
11
2.1.4 Regulator
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable output voltages. They are also rated by the maximum current they can pass. Negative voltage regulators are available, mainly for use in dual supplies. Most regulators include some automatic protection from excessive current ('overload protection') and overheating ('thermal protection'). Many of the fixed voltage regulator ICs has 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right.
From the above figure, we can see that regulator consists of three terminals , one is input, second is output and third one is grounde d
12
The supply voltage is 5 volts. The current that we want to flow through the LED is 5mA. Assume that the forward voltage drop will be 1.5 V. BY KVL, the voltage drop across the resistor must be 5 -1.5=3V. By Ohm's Law, this voltage drop equals iR
13
Therefore: 5- 1.5 = R*5mA Rearranging terms gives: R = (5- 1.5)/5mA R = 3.5/5m = 0.7 K = 700 . So, if we select R value as 700 , then the current flowing through the LED is limited to 5 m
14
3. CIRCUIT DESCRIPTION
The following Hardware and software is used in this system. Detailed explanation of these components follows in the later sections.
3.1 Hardware
1) Micro Controller 2) Movement Sensor 3) Power Supply 5V 4) IR Sensor 5) Motor
15
Circuit Operation:
Some of the components in this system require DC5V for their operation, for example the movement sensor. Hence we have designed a 5V regulator. The major power source for us is mains 230V ac. For the regulator design we need a lower ac voltage.
We have used a transformer to accomplish this task. The transformer stepped down the 230v ac to an acceptable level. This stepped down ac voltage was converted to DC with the help of a bridge rectifier. The output of the regulator is DC. However this DC has some ac contents in it. This ac content is called as ripples. With the help of a smoothing capacitor these ripples are removed. Now we have a DC voltage.
However this DC voltage is not a regulated DC. Means this voltage is not constant. This gets varied depending on the load and the mains supply voltage. We have used a regulator IC which provides us constant DC with constant current. The DC voltage is 5V with a current of 1A. The major circuit element is the movement sensor. The output of this sensor changes whenever it detects some movement with-in its proximity. The output of the sensor is given as input to the control circuit. The other sensing element is IR sensor. In normal case the transmitted IR is received back through the door. This is active when it receives interruption. The control circuit consists of a micro controller, AVR ATmega8. This Micro receives the information from the movement sensor Based on the information the micro sends output to open or close the door. The micro also receives information from IR sensor. If the IR sensor is active the doors are kept open.
The output of the micro is given to a motor driver. This driver controls the operation of the motor. It will make the motor to turn in either forward direction or reverse direction.
16
3. We cannot connect motors to micro controller directly, as most of the time the motors requires voltage higher than +5V, and usually motors demands high current than what the micro controller pins are capable of. So then how can we control the voltages? Well we can use some switching elements between the micro controller and the motor. This requires 4 switches. This is illustrated in the following diagram
It is a circuit which allows motor rotation in both directions. From the four terminals we can control a DC motor direction and speed. The above circuit can be realized with the help of simple transistors or power transistors or MOSFETs, depending on the motor req uirement. Upon investigation, luckily, we have found that all these arrangements are available in an IC. We preferred to use a readymade IC if one available for the reason that we understand the readymade IC works better than the discrete versions.
One such IC which can do this task is L293D. This is dual motor driver IC, what it means is that we can drive two motors with a single IC. However for our purpose we are not using two motors hence we will make use of one channel and leave the other channel unconnected.
18
The truth table for one channel is shown in the follow ing table. The other channel is identical.
CASE #
ENABLE 1
INPUT 1
INPUT 2
OUTPUT 1
OUTPUT 2
LOW
LOW
LOW
HIGH IMPEDANCE
HIGH IMPEDANCE
LOW
LOW
HIGH
HIGH IMPEDANCE
HIGH OMPEDANCE
LOW
HIGH
LOW
HIGH IMPEDANCE
HIGH IMPEDANCE
LOW
HIGH
HIGH
HIGH IMPEDANCE
HIGH IMPEDANCE
HIGH
LOW
LOW
LOW
LOW
HIGH
LOW
HIGH
LOW
HIGH
HIGH
HIGH
LOW
HIGH
LOW
19
From the above table it is clear that the output is dependent on the enable. The output is available only when the enable pin is made high. When the enable pin is low the outputs are in high impedance state. Now, say, we wish to run the motor in the forward direction. The connections to the motor are, the positive terminal of the motor is con nected to output1 while the negative terminal is connected to the output2. To make the motor run in the forward direction, what all we need to do is make the input configuration as shown in the above table, case#7. Similarly, to run the motor in the reverse direction we need to provide input to the IC as per case
20
In this section we present detailed information on the major components that we have used in our system.
21
Pin Diagram
22
In AVR microcontroller there are three I \O ports named B, C & D. The port B & D has 8 pins or bits and the port C has 7 pins. All the bits of any these said ports, we can use as both I\O port. In this above said system we'll use port D as input and port B as output. This is shown in the circuit diagram.
23
24
25
GND:
Ground.
Port C (PC5...PC0)
Port C is a 7-bit bi-directional I/O port with internal pull -up resistors (selected for each bit). The Port C output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port C pins are tri -stated when a reset condition becomes active, even if the clock is not running.
PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this pin for longer than the minimum pulse length will generate a Reset, even if the clock is not running. Shorter pulses are not guaranteed to generate a Reset.
26
Port D (PD7...PD0)
Port D is an 8-bit bi-directional I/O port with internal pull -up resistors (selected for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri -stated when a reset condition becomes active, even if the clock is not running. Port D also serves the functions of various special features of the ATmega8..
RESET
Reset input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if the clock is not running. Shorter pulses are not guaranteed to generate a reset.
AVCC
AVCC is the supply voltage pin for the A/D Converter, Port C (3...0 ), and ADC (7...6). It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. Note that Port C (5...4) use digital supply voltage, VCC.
AREF
AREF is the analog refere nce pin for the A/D Converter.
27
PORTxn} = 0b01) or output low ({DDxn, PORTxn} = 0b10) must occur. Normally, the pull-up enabled state is fully acceptable, as a high-impeding environment will not notice the difference between a strong high driver
OSCILLATOR CONNECTIONS:
Note:
28
We have used NPN transistor in our system. It is configured as a switch. How the transistor is configured as a switch is here by explained. The operation of npn Transistor consists three regions namely emitter, base and collector. Emitter and base constitute of EBJ and base and collector consists of CBJ.
EBJ
CBJ
Reverse
Forward
Reverse Forward
Transistor as a switch can be achieved with common -emitter circuit as shown below
Common-emitter circuit
29
As we told earlier that we are using a transmitter receiver pair in our design, so 555 timer IC along with Infra red LED which is going to transmit signal to receiver TSOP 1738. This TSOP 1738 receive frequency of 38 KHz square wave pulse which is generated by 555 timers IC.
In this section, we discuss the most popular 555 IC timer and its application to implement multivibrators. The 555 Timer IC is an integrated circuit (chip) implementing a variety of timer and multivibrator applications. The IC was designed by Hans R. Camenzind in 1970 and brought to market in 1971 by Signe tics (later acquired by Philips). It has been claimed that the 555 gets its name from the three 5 k resistors used in typical early implementations, but Hanz Camenzind has stated that the number was arbitrary. The part is still in wide use, thanks to its ease of use, low price and good stability.
30
1. 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.
2. A stable mode: Free running mode: the 555 can operate as an oscillator. Uses include LED and lamp flashers, pulse generation, logic clocks, tone generation, security alarms, pulse position modulation, etc.
31
3. 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
32
This IC consists of two comparators that drive the set(S) and reset(R) terminals of a flip flop. The Q output is available as the overall output. Q' drives the discharge transistor. The reference voltage of comparator 1 is fixed at (2/3) V+ and that of comparator 2 is fixed at (1/3) V+.A potential divider between V+ and GND is used for providing the reference voltages.
Pin2 (Trigger): This pin is the input to the lower comparator and is used to set the
latch which cause the output to go high. This is the beginning of the timing sequence in monostable operation .
Pin3 (output): The output Q is responsible for the overall output and Q' is for
transistor switch. The state of the output pin always reflects the inverse of the logic state of the latch. The trigger input is momentarily taken from a higher to lower level. This cause the latch to be set and the output to go high. The output can be returned to a low state by causing the threshold to go from a lower to a higher level which resets the latch
33
Pin4 (reset): This pin is always used to reset the latch and output to a low state. The reset pin will force the output to go low, no matter w hat state the other inputs to the flip-flop are in. When not used, it is recommended that the reset input be tied to V+ to avoid any possibility of false triggering. Pin5 (control voltage): This pin allows direct access to the (2\3) V+ voltagedivider point, the reference level for upper comparator. Pin6 (threshold): This pin is one input to the upper comparator and is used
to reset the latch, which causes output to go low.
Pin7 (discharge): This pin is connected to the open collector of an n -p-n transistor, the emitter of which goes to the ground, so that when the transistor is ON, pin7 is effectively shorted to ground. Usually the timing capacitor is connected between pin7 and ground and is discharged when transistors turns ON. Pin8 (V+): This pin is positive supply voltage terminal of the 555 timer IC. The
supply voltage operating range is between +5 V an d +15 V. Now we talk about the internal functionality of 555 timers IC. As we can see pin 7 is directly connected with a transistor, the output Q is connected with an output buffer amplifier, the working principle of RS latch, these things we are going t o discuss in further sections:-
(i) One of the outputs of latch i.e. Q is connected to an output driver. We use an output buffer amplifier. This is because for strengthen of output coming from latch. The output coming from latch is weak in nature. So, for getting strengthened output buffer amplifier is used. (ii) As far concern to our application, the output Q' drives the discharge transistor
and controls its ON and OFF cycles. Pin 7 (discharge) is connected to the open collector of an n-p-n transistor, the emitter of which goes to the ground, so that when transistor is turned ON, pin 7 is effectively shorted the ground. In this section we discuss about the operation of transistor as switch . To operate transistor as a switch, we utilize the cutoff and saturation modes of operation
n
p Base
n collector
Emitter
Collector(c)
34
NPN Transistor
From the above figure, we see that npn Transistor consists three regions namely emitter, base and collector. Emitter and base constitute of EBJ and base and collector consists of CBJ.
Common-emitter circuit
From the above figure, for V (AC input voltage) less than about 0.5 V, the transistor will be cut off. So, IIB= 0, IC= 0 and VC=VCC. Hence, node C will be disconnected
35
from the ground and switch is in the open position. To turn the transistor ON, we have to increase V above than 0.5 V. In fact, for appreciable current to I flow, VB should be about 0.7 V and V I should be higher (VI > VBE)
Where, =Common-emitter current gainVCE (voltage between collector and emitter) = 0.2 V (in saturation mode) At which point the transistor leaves the active region, enters the saturation region. That is called edge saturation and the satisfying condition is VC> VB - 0.4 V. Hence, in this way transistor can work as a switch. It is OFF in cutoff mode and ON in saturation mode. It is ON (low resistance to ground) when the o utput is low and OFF (high resistance to ground) when the output is high. The transistor switch is used to clamp the appropriate node of timing network to ground.
(iii) The output of comparator 1 & 2 are the two inputs of RS latch. In this section we will discuss about the working principle of RS latch.
RS latch diagram
36
Truth table: S 0 0
1
R 0 1 0 1
Qn+1 Qn 0 1 X
Above truth table shows that whenever set input is at high th e output will be at high and whenever reset input is at high the output will be at low.
37
f=
Where, f denotes frequency in Hertz. High time of duty cycle is: Low time of duty cycle is: High = (ln2). (R1+ 2R2). C Low = (ln2). R2. C
Here, we are taking the values of R1, R2 and C are R1 = 220, R2 = 1.8K, C = 10nF and Duty cycle= (R1+ R2) \ R1+2 R2
It means that there should be difference between R1 and R2 and duty cycle doesn't depend upon value of capacitor. By applying these values, we are getting frequency approximately equal to 38 KHz and duty cycle is coming equal to 53 % and that is meeting to our requirement. ..
38
Details:
Receives modulated infrared signal and converts into electrical signal.
Features:
Photo detector and preamplifier circuit in the same casing. Receives and amplifies the infrared signal without any external component. 5 V output 38 kHz integrated oscillator. High sensitivity. High level of immunity to ambient light. Improved shielding against electrical field interference. TTL and CMOS compatibility.
Applications:
Technical specification:
Supply: 5 V Power consumption: 0.4 to 1.0 mA Angle of detection: 90 Dimensions of the casing (mm): 12.5 x 10 x Thickness 5.8 As concern to our design we are using three TSOP 1738 infrared receiver whereas three 555 timer IC with infrared sensor working as transmitter. Now it is clear that why we are getting 38 kHz frequency output from 555 timer IC. This is the reason we are using TSOP 1738 infrared receiver.
39
If IR LED (receiver) detects any hurdle in between of its line of sight communication then voltage across its output get low. If IR LED (receiver) does not detect any hurdle in the way of its line of sight communication then voltage across it remains high.
40
MOTION SENSOR
MOTION SENSOSOR
41
Applications:
PIR sensors are used in many applications. They are used on television sets and television accessory devices, such as VCRs and DVD players, to detect infrared light coming from a television remote. PIR sensors are also used as motion detectors at most public doorways in grocery stores, hospitals, and libraries. PIR sensors can also be used for military purposes such as laser range finding, night vision, and heat-seeking missiles.
Advantages:
PIR sensors have several important advantages. They detect infrared light from several feet/yards away, depending on how the device is calibrated. PIR sensors are generally compact and can be fitted into virtually any electronic device. Also, they do not need an external power source because they generate electricity as they absorb infrared light. The unit is passive and it is not possible for intruders to locate their place of installation. They consume less power than IR or radar based systems. They are not affected by light and thus can work well both in day and night. Some of the high-end detectors are provided with precision optics that can detect narrow areas accurately. The detectors work coherently with the cameras, which limits the number of cameras being used in a particular area. The small designs of detectors can be autifully blend in confined spaces.
Disadvantages:
Although PIR sensors can be advantageous, they also have several disadvantages. PIR sensors can only receive infrared light and cannot emit it like other types of infrared sensors. They can be expensi ve to purchase, install, and calibrate as well. The passive infrared rays from the PIR detector cannot pass through doors, windows or walls within the rooms. The rays emanating from the motion sensors cannot curve around in the corners. So, when you place the PIR detector in a room
42
that has an open door, the motion sensor cannot detect intrusions when the door is closed. Apart from that, a single PIR motion detecting camera cannot cover every square inch of space in your room. Moreover someone who moves rapidly or slow can fool these detectors at times. The PIR detector is more ideal for installing in places that are prone to more intrusions and invasion of burglars or other types of intruders. Presently, manufacturers are concentrating in combining the technologies and features to offer good and reliable detectors to the areas that require high-end security. In addition to combining video and detectors in one place, you can also find detectors that offer wireless transmission for distances up to 1000 feet. Motion sensors are integral part of home automation and security systems motion sensor lighting is also widely used to switch off lights when not needed and light up a passage or rooms when there is a need. Turning off the lights in such circumstances can save substantial amounts of energy. In lighting practice occupancy sensors are sometime also called "presence sensors" or "vacancy sensors". Today wireless motion sensors, microwave motion sensor and infrared motion sensor alarms are gaining huge popularity. There are many types of motion sensors from the simplest infrared detectors to the most sophisticated laser beams. These sensors serve mainly one purpose that is to detect the presence of some motion or some 'body' in the area it operates. This 'sensing' can be of something that happens at a specific location or one that occurs within a larger area. The field of view of the sensor must be carefully selected/ adjusted so that it responds only to motion in the space served by the controlled lighting.
For example: an occupancy sensor controlling lights in an office should not detect motion in the corridor outside the office. Sensors and their placement are never perfect, therefore most systems incorporate a delay time before switching. This delay time is often user-selectable, but a typical default value is 15 minutes. This means that the sensor must detect no motion for the entire delay time before the lights are switched. Most systems switch lights off at the end of the delay time, but more sophisticated systems with dimming technology reduce lighting slowly to a minimum level. If lights are off and an occupant re-enters a space, most current systems switch lights back on when motion is detected.
However, systems designed to switch lights off automatically with no occupancy, and that require the occupant to switch lights on when they re -enter are gaining in popularity due to their potential for increased energy savings. These savings accrue because in a space with access to daylight the occupant may decide on their return that they no longer require supplemental electric light.
43
44
5. TESTING PROCESS
In this section we will check our all components so far used. We will also discuss about it working conditions, problems faced across its testing.
1. TRANSFORMER:
Here, AC mains 230V step down transformer is used. Hence, no. of turns in primary coil is more than in secondary coil. Since, it is step down transformer, so, it will reduce the voltage. Since, we cannot apply ideal transformer in practical uses. So, according to variations in input voltage, output voltage is calculated further.
2. RECTIFIER:
Here, full wave bridge rectifier is used to convert AC to DC because four diodes are spent to make full wave bridge rectifier where two conduct on the positive half cycle, and the other two conduct on the negative half cycle. Hence, this said rectifier is used instead of half wave bridge rectifier.
45
1N4001 features:
In our design we require voltage of 5V and current of 500mA, so from the following datasheet we can see that 4001 is giving us 50V as reverse voltage and rest are giving higher voltage which is not required, and also giving us sufficient current(1 amp) required by u S
Features of 1N4001
Low forward voltage drop High surge (sudden increment) current capability
3. CAPACITOR:
For this design an electrolytic capacitor of value 470F (calculated) is applied. This capacitor is applied for the smoothing purpose. We can use more than one capacitor but that is optional and based on our requirement
4. REGULATOR:
Voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level. Now from the given datasheet we can see that we are obtaining 5V and current of 500mA from this regulator. This (LM 7805) is most common voltage regulator that is still used in embedded designs. :-
LM78XX Series:
3-Terminal 1A positive voltage regulators
Features:
1. Output current up to 1A 2. Output voltages of 5,6,8,9,10,12,15,18,24 3. Thermal overload protection 4. Short circuit protection 5. Output transistor safe operating area protection 6. Output voltage tolerance =
46
47
6. CONCLUSION
We have spent time on investigating about various sensors to determine which one suits for our application. We have used movement sensor for detecting the movement of visitor, as it is best suited for our application. We have used IR sensor for accident preventi on purpose. A well regulated power supply was designed. This power supply produces 5V with 1 A current. A motor driver IC was used to drive the motor. The motor is controlled bidirectional. We have gained the design techniques. We have developed testing skills. We practiced the art of soldering. Finally, we thank the college and the university for providing us an excellent opportunity to transform our theoretical knowledge in to practical application We have gained the confidence to handle similar project s in the future.
48
7. CODING
SS#include<util /delay.h> Int main ( ) { DDRB =0X03; DDRC =0XFF; While (1) { It (((PINB& 0X01)!!((PINB& 0X02) ==0))); { Port=0x01 ; } If (ports==0X05) { IF ((portB&0X04) ==0) { Port=0X00; If ((PINB&0X01) ==0)!!((PINB&0X02) ==port=0X05; } } } Else { Port=0X02; If ((port ==0X02)) { If ((PINB& 0X08) ==0); { Port=0X00; Else port=0X02; } } } }
49
8. REFERENCE
1. www.google.com 2. www.wikipedia.com
Datasheet we referred: 1. Fairchild semiconductor/1N4001 -1N4007 general purpose rectifiers 2. Fairchild semiconductor/LM78XX 3 -terminal 1A positive voltage regulator 3. Atmel/AVRATMega8 datasheet Books we referred: 1. Analog Electronics, L.K Maheshwari, M.M.S Anand, Prentice -Hall of India pvt. Ltd., Third edition 2. Microelectronic Circuits, Sedra/Smith, Oxford University press, Fifth edition.
50