Rajagiri School of Engineering & Technology, Kakkanad ACKNOWLEDGMENT I thank God almighty for His bountiful mercy and graces showered on us during the period of project, without which nothing could have been possible. I thank the Principal and the Management for lending us a helping hand & providing us lab and other technical assistances. I would like to thank the Head of the Department, Prof. Madhava Panicker and Ex- Head of the Department, Prof. S. Ramkumar, who have been our sources of motivation and guidance at all times, especially throughout the period of project. I would like to thank our project guide, Mr. Joval P.G. who always stood by us during the course of the project and especially during the tougher times, motivating and guiding us in our project. I extend sincere gratitude to all the Faculty of RASET who have helped us in our project. I would also like to thank our Lab Assistant, Mr. Jince Mon. it would never have been possible to accomplish whatever we have, without his ever helping hands. 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Rajagiri School of Engineering & Technology, Kakkanad
ACKNOWLEDGMENT
I thank God almighty for His bountiful mercy and graces showered on us during the
period of project, without which nothing could have been possible. I thank the Principal
and the Management for lending us a helping hand & providing us lab and other technical
assistances. I would like to thank the Head of the Department, Prof. Madhava Panicker
and Ex-Head of the Department, Prof. S. Ramkumar, who have been our sources of
motivation and guidance at all times, especially throughout the period of project. I would
like to thank our project guide, Mr. Joval P.G. who always stood by us during the course
of the project and especially during the tougher times, motivating and guiding us in our
project. I extend sincere gratitude to all the Faculty of RASET who have helped us in our
project. I would also like to thank our Lab Assistant, Mr. Jince Mon. it would never have
been possible to accomplish whatever we have, without his ever helping hands.
1
Rajagiri School of Engineering & Technology, Kakkanad
INDEX INDEX
CHAPTE
R
No.
TITLEPage
No.
1. INTRODUCTION 3
2. TRANSMITTER/ RECEIVER DESIGN& DEVELOPMENT 6
3.MICRO CONTROLLER PROGRAMMING & LOGIC
DESIGN 16
4.MOTOR DRIVE MECHANISM AND HARDWARE
IMPLEMENTATION.22
5. CONCLUSION. 34
6. APPENDIX - A: MODULAR DIVISION OF WORK 37
7. APPENDIX – B: PROGRAM CODE 38
8. APPENDIX C: THE 8051 IDE 42
9. APPENDIX D: THE PCB DESIGN 44
2
Rajagiri School of Engineering & Technology, Kakkanad
CHAPTER – 1
I N T R O D U C T I O N
1.1) AIM ……………………..………………………………...Pg 4
1.2) CONCEPTUAL DESIGN-BLOCK SCHEMATIC
1.2.1) TRANSMITTING UNIT………………..……..Pg 4
1.2.2) RECEIVING UNIT….…………………………Pg 5
3
Rajagiri School of Engineering & Technology, Kakkanad
CHAPTER 1:
INTRODUCTION
1.1) Aim :
To develop a Personalized Automated Garage Door Opener, that uses key less entry to
one’s home’s garage, every time the owner initiates the remote.
The microcontroller unit (at the transmitter) services an interrupt service routine
when an interrupt (key press on remote) is being signaled. The microcontroller serially
outputs a specific code, preset in the microcontroller. The code that is been serially output
is then given as an input to the ASK transmitter module. The ASK transmitter module
now converts the digital output to an analog RF signal that is transmitted.
The ASK receiver module at the base station receives the ASK signal and the
decoded (digital) signal is input to the microcontroller at the receiver part. On being
interrupted by the serial input interrupt, the microcontroller services a routine that checks
whether the received code is an authorized (preset look up table) code. If the code is an
authorised code, then the motor is driven.
4
Rajagiri School of Engineering & Technology, Kakkanad
1.2) Conceptual Design-Block Schematic:
Trigger SignalMicro
Controller Unit I
RF Transmitter
A. S. K. Module I
Serial output
1.2.1) Transmitting Unit
1.2.2) Receiving Unit
Micro Controller
Unit II
A. S. K Module II
RF Receiver
Serial input
Motor Drive Unit
5
Rajagiri School of Engineering & Technology, Kakkanad
Rajagiri School of Engineering & Technology, Kakkanad
4.4) Gear Arrangement:
Examination itself reveals the transfer functions. The (right) driving gear with 20 teeth,
1 inch radius and 2 ounce-inches torque rotates counter clockwise at 200 RPM and exerts
a 2 ounce force on the driven gear with forty teeth for a ratio of 2:1.
If the teeth are of equal size to permit proper mesh, the driven gear must have 2 inch
radius. During one revolution of the driver, 20 teeth pass 20 teeth on the driven, resulting
in only one half a revolution clock wise, which means the driver must turn twice for the
driven to turn once. This produces 100 RPM or a 2:1 speed reduction.
Since the driver output force is at a radius of 1 inch:
F = T / R = 2 / 1 = 2 oz.
This same force is applied to the driven at a radius of 2 inches:
T = F x R = 2 x 2 = 4 oz-in.
Thus the torque ratio is 2:1 increase.
27
Rajagiri School of Engineering & Technology, Kakkanad
The basic rules of gear systems are:
RPM is divided by the gear ratio.
TORQUE is multiplied by the gear ratio.
POWER does not change during the transfer.
4.5) Interfacing the DC Motor With The Micro Controller:
The motor on/off control by the micro controller is done by the help of electro-
magnetic relays. (with driver/buffer IC provided to drive the relays, as per the
microcontroller program.)
The relay used is JRC-27F/ 005 H where the explanation to the corresponding parts of
the part number is as per given below:
A relay is usually an electromechanical device that is actuated by an electrical
current. The current flowing in one circuit causes the opening or closing of another
circuit. Relays are like remote control switches and are used in many applications
28
Rajagiri School of Engineering & Technology, Kakkanad
because of their relative simplicity, long life, and proven high reliability. Relays are used
in a wide variety of applications throughout industry, such as in telephone exchanges,
digital computers and automation systems. Highly sophisticated relays are utilized to
protect electric power systems against trouble and power blackouts as well as to regulate
and control the generation and distribution of power. In the home, relays are used in
refrigerators, washing machines and dishwashers, and heating and air-conditioning
controls. Although relays are generally associated with electrical circuitry, there are many
other types, such as pneumatic and hydraulic. Input may be electrical and output directly
mechanical, or vice versa. All relays contain a sensing unit, the electric coil, which is
powered by AC or DC current. When the applied current or voltage exceeds a threshold
value, the coil activates the armature, which operates either to close the open contacts or
to open the closed contacts. When a power is supplied to the coil, it generates a magnetic
force that actuates the switch mechanism. The magnetic force is, in effect, relaying the
action from one circuit to another. The first circuit is called the control circuit; the second
is called the load circuit.
4.6) Types o f Re lays & Contac t s :
There are two basic classifications of relays: Electromechanical and Solid State.
Electromechanical relays have moving parts, whereas solid-state relays have no moving
parts. Advantages of Electromechanical relays include lower cost, no heat sink is
required, multiple poles are available, and they can switch AC or DC with ease.
29
Rajagiri School of Engineering & Technology, Kakkanad
4.6.A.) Electromechanical Relays
General Purpose Relay: The general-purpose relay is rated by the
amount of current its switch contacts can handle. Most versions of the
general-purpose relay have one to eight poles and can be single or double
throw. These are found in computers, copy machines, and other consumer
electronic equipment and appliances. Power Relay: The power relay is
capable of handling larger power loads – 10-50 amperes or more. They are
usually single-pole or double-pole units. Contactor: A special type of high
power relay, it’s used mainly to control high voltages and currents in
industrial electrical applications. Because of these high power
requirements, contactors always have double-make contacts. Time-Delay
Relay: The contacts might not open or close until some time interval after
the coil has been energized. This is called delay-on-operate. Delay-on-
release means that the contacts will remain in their actuated position until
some interval after the power has been removed from the coil. A third
delay is called interval timing. Contacts revert to their alternate position at
a specific interval of time after the coil has been energized. The timing of
these actions may be a fixed parameter of the relay, or adjusted by a knob
on the relay itself, or remotely adjusted through an external circuit.
4.6.B.) Solid State Relays:
These active semiconductor devices use light instead of magnetism
to actuate a switch.
30
Rajagiri School of Engineering & Technology, Kakkanad
4.6.1) Contact Arrangements:
The arrangement of contacts on a relay includes a form factor and a number of
poles. Each form factor is explained below:
4.6.1.A) Form A is a contact that is Normally Open (NO), or “make” contact. It is
open when the coil is de-energized and closes when the coil is energized. Form A
contacts are useful in applications that must switch a single power source of high current
from a remote location. An example of this is a car horn, which cannot have a high
current applied directly to the steering wheel. A Form A relay can be used to switch the
high current to the horn. Form B is a contact that is Normally Closed (NC), or “break”
contact. It is closed in the de-energized position and opens when the coil is energized.
4.6.1.B) Form B contacts are useful in applications that require the circuit to remain
closed, and when the relay is activated, the circuit is shut off. An example of this is a
machine’s motor that needs to run at all times, but when the motor must be stopped, the
operator can do so by activating a Form B relay and breaking the circuit.
4.6.1.C) Form C is a combination of Form A and B arrangement, sharing the same
movable contact in the switching circuit. Form C contact are useful in applications that
require one circuit to remain open; when the relay is activated, the first circuit is shut off,
and another circuit is turned on. An example of this is on a piece of equipment that runs
continually; when the relay is activated, it stops that piece of equipment and opens a
second circuit to another piece of equipment.
4.6.1.D) Make-before-break Contact: a contact arrangement in which part of the
switching section is shared between both a Form A and a Form B contact. When the relay
operates or releases, the contact that closes the circuit operates before the contact that
opens the circuit releases. Thus both contact are closed momentarily at the same time.
The inverse of a Make-before break contact is a Break-before-make contact. Poles are the
number of separate switching circuits within the relay.
31
Rajagiri School of Engineering & Technology, Kakkanad
4.7) Driver IC Used For Driving The Relay:
The output of the micro controller being in the range of a few mA, the output as
such becomes in sufficient to drive the relay. Hence the output of the microcontroller has
to be buffered so as to make the relay work. The driver IC used is, ULN2003A. The
ULN2003 are high voltage, high current Darlington arrays each containing seven open
collector Darlington pairs with common emitters. Each channel rated at 500mA and can
withstand peak currents of 600mA.
This versatile device is useful for driving a wide range of loads including
solenoids, relays, LED displays filament lamps, thermal print heads and high power
buffers.
The ULN2003A are supplied in 16 pin plastic DIP packages with a copper lead
frame to reduce thermal resistance.
4.8) ISSUES ENCOUNTERED IN THIS MODULE OF THE PROJECT:
Initially the motor chosen was SMJ 404880A, a stepper motor, to open the garage
door. The motor was so chosen because of many factors which are that, the
number of steps could be well controlled, by controlling the stepping sequence
generated by the microcontroller, for the stepper motor drive. The stepper motor
was known to have a reasonably good torque, which was another reason. The easy
availability and our little know-how also contributed to our procurement of the
stepper motor.
The advantages and features, that were the selection criteria, never met the
required specifications.
o The torque offered was too less to lift even the gate of the pro-type garage.
o The current requirement was very high, which the driver IC (L293D)
couldn’t source, which resulted in heating up of the driver IC as well as
the motor.
32
Rajagiri School of Engineering & Technology, Kakkanad
o The poor torque characteristics, called for addition of gears to the stepper
motor shaft, which was not viable, taking into consideration the cost as
well as the time frame.
o The usage of the stepper motor would imply that a separate supply be
designed for the operating voltage (12V) and the microcontroller. (5V).
The above said disadvantages were overcome by using the geared dc motor of
Sanko Electrical Co., Ltd. The motor is rated at 12V offering 150 rpm. The
current drawn were in the range of 100 mA.
Another issue, was the heating up of the driver IC (already mentioned above).
Substituting L293D with ULN2003A solved the issue. The substitution with
ULN2003A made way for another issue, which was insufficient torque, due to the
poor output characteristics. The new issue was finally resolved by using
electromagnetic relays for controlling the On/Off of the motor, so that the current
required could easily be sourced.
33
Rajagiri School of Engineering & Technology, Kakkanad
CHAPTER – 5
CONCLUSION
5.1) CONCLUSION………………………………………………..Pg. 35
5.2) FAILURE MODE EVALUATION…………………………...Pg. 35
5.3) SCOPE FOR FURTHER DEVELOPMENT………………….Pg. 36
5.4) BIBLIOGRAPHY……………………………………………..Pg. 36
34
Rajagiri School of Engineering & Technology, Kakkanad
CHAPTER - 5
CONCLUSION
The Mini Project was completed within constraints of time, availability of
resources and the scope of the subjects covered in the curriculum till the present
semester. A proto type model was made and the working of the Personalized Automatic
Garage Door Opener was implemented on it.
5.2) FAILURE MODE EVALUATION
ISSUE 1 : Stepper motor not catering to the required torque and getting excessively
heated up.
The issue was diagnosed as the incapacity of the driver IC to source the
required current.
Solution: Replaced ULN2003 with a higher capacity driver, L293D
ISSUE 2: Stepper motor not providing the required torque.
Solution: DC motor was tested for torque and selected.
ISSUE 3: RF transmission not performing faithful transmission/reception of the
microcontroller generated code.
The error was diagnosed as high noise and unwanted pick up. The
experimental study revealed that the RF module transmitted and received
pulses moreover faithfully. Hence the initial idea of transmitting the code has
been modified as transmitting a particular sequence of pulses, characteristic to
each transmitter and detecting the received pulses and checking them with the
value stored in the look up table of the receiver micro controller.
35
Rajagiri School of Engineering & Technology, Kakkanad
5.3) SCOPE FOR FURTHER DEVELOPMENT:
1. The mini project can be implemented on a real garage door,
provided a better communication module is devised, with better
range and noise rejection.
2. The project may be extended to a Digital Image Processing project
where the number plate is sensed and checked for authentication,
thereby reducing the noise & errors, as no RF Communication is
involved.
5.4) BIBLIOGRAPHY:
1. The 8051 Microcontroller and embedded Systems
Muhammed Ali Mazidi
Janice Gillispie Mazidi
2. The 8051 Microcontroller Architecture, Programming &
Application
Kenneth J. Ayala
3. Data & Computers Communications
William Stallings
4. Electric Machines
BL Theraja
5. The World Wide Web.
36
Rajagiri School of Engineering & Technology, Kakkanad
APPENDIX – A
Modular Division of Work
Module I:
Transmitter/ receiver design, development and
integration.
Module II:
Microcontroller programming, logic
Development and general circuitry.
Module III:
Motor drive mechanism and hardware
implementation.
Team Member Module Allocated
1) Francis Scaria Module III (Chapter – 4))
2) George Teddy K. C. Module I (Chapter – 2)
3) Renjit Kurian Module II (Chapter – 3)
37
Rajagiri School of Engineering & Technology, Kakkanad
APPENDIX – B: PROGRAM CODE
THE TRANSMITTER MICROCONTROLLER CODE:
ORG 0000H
SJMP MAIN
ORG 0003H
JMP ISR2
ORG 0030H
MAIN:
MOV 55H,#01H
MOV IE,#91H
MOV 40H,#0AH
MOV 41H,#0BH
MOV 42H,#0CH
MOV 43H,#0DH
MOV 44H,#0EH
MOV 45H,#0FH
MOV 46H,#1AH
MOV 47H,#1BH
MOV 48H,#1CH
MOV 49H,#1DH
MOV R0,#40H
SETB TCON.0
THERE: JMP THERE
ISR2: MOV SCON,#40H
MOV TMOD,#20H
MOV TH1,#0FDH
SETB TR1
MOV A,@R0
38
Rajagiri School of Engineering & Technology, Kakkanad
MOV SBUF,A
HERE:JNB TI HERE
CLR P1.4
CLR TI
INC R0
CJNE R0,#4AH,EXT
MOV R0,#40H
EXT: RETI
THE RECEIVER MICROCONTROLLER CODE:
ORG 0000H
SJMP MAIN
ORG 0003H
AJMP FORWARD
ORG 0023H
SJMP ISR
ORG 0040H
MAIN: MOV P1,#00H
MOV 60H,#0AAH
MOV 40H,#0AH
MOV 41H,#0BH
MOV 42H,#0CH
MOV 43H,#0DH
MOV 44H,#0EH
MOV 45H,#0FH
MOV 46H,#1AH
MOV 47H,#1BH
MOV 48H,#1CH
MOV 49H,#1DH
39
Rajagiri School of Engineering & Technology, Kakkanad
MOV IE,#91H
MOV SCON,#50H
MOV TMOD,#20H
MOV TH1,#0FDH
SETB TR1
TH: JMP TH
ISR: MOV IE,#00H
HERE: JNB RI HERE
CLR RI
MOV A,SBUF
MOV 50H,A
MOV R2,#0BH
MOV R0,#40H
THERE: DEC R2
MOV A,R2
JZ EX
MOV A,@R0
INC R0
CJNE A,50H,THERE
ACALL FORWARD
EX: MOV IE,#91H
RETI
FORWARD:CLR IE0
MOV IE,#00H
MOV A,60H
MOV P1,A
CPL A
MOV 60H,A
ACALL DELAY
40
Rajagiri School of Engineering & Technology, Kakkanad
MOV P1,#00H
MOV P3,#0FFH
MOV IE,#91H
RETI
DELAY: MOV R2,#40H
L2:MOV R3,#0FFH
L3: MOV R4,#0FFH
L6: DJNZ R4,L6
DJNZ R3,L3
DJNZ R2,L2
RET
41
Rajagiri School of Engineering & Technology, Kakkanad
APPENDIX – C: THE 8051 IDE
8051 IDE window screen snapshot
The 8051 Integrated Development Environment (IDE) combines a text editor,
assembler and software simulator into a single program. All components needed to
develop 8051 programs (and its various derivatives) available and controllable from this
single IDE.
The steps that have to be performed for the 8051 programming are as follows:
Enter and modify the program source code from within the built in editor. Then assemble
the source code by selecting the Assemble command. If any errors are located the
42
Rajagiri School of Engineering & Technology, Kakkanad
appropriate source module can be automatically loaded and the cursor placed on the line
containing the error. Fix the error and move to the next error (if any). Once all errors
have been fixed reassemble the code.
After successfully assembling the source code use the simulator to step through
the program. Check the registers, flags, ports and memory locations change as the
program progresses. The flow of program can be viewed and can be verified whether it
operates as intended. If it does not, then return to the editor, reassemble and go back to
the simulator. The 8051 Integrated Development Environment (IDE) is a Windows 95
based application. It operates with the same look and feel of other Windows based
application.
43
Rajagiri School of Engineering & Technology, Kakkanad
APPENDIX – D: THE PCB DESIGN
The overall circuitry laid on a bread board was too bulky, which led us to design a ‘printed circuit board’. The design of the circuit to be printed was done on the software called, Express PCB.
The ExpressPCB window
44
Rajagiri School of Engineering & Technology, Kakkanad
The PCB designs of the Transmitter, Receiver and the Motor Drive circuit are given below:
Transmitter
Receiver
45
Rajagiri School of Engineering & Technology, Kakkanad