Motorcyle Anti-Theft Alarm


RESULT45 DISCUSSION47 CHAPTER 748 CONCLUSION AND RECOMMENDATION48 CONCLUSION48 RECOMMENDATION49 LIST OF REFERENCES50 ACKNOWLEDGEMENT Assalamualaikum w. b. t Alhamdulillah and thank God as His willingness and blessings that brought us upon completing our microprocessor ELE 505 project which is ‘MOTORCYCLE ANTI-THEFT ALARM. First of all, we would like to express our grateful thanks to our lecturer, En Mahmud b Ibrahim for all information and guidance regarding to our project. She was being enormously helpful in giving suggestions, improving our project.

Without her guidance we won’t think that we were able to complete this project on time. Furthermore, we would like to extend our acknowledgement to other lecturers for their thought and ideas even though they did not involve directly into this project report. Then, a lot of thanks to our entire fellow friends which has also give many ideas and share their suggestion for our project. It is always a pleasure working with them. The information and the brilliant knowledge that we gained from this project can give us benefit in future.

Finally, words cannot adequately express our gratitude colleagues as well who gave full support and commitment while doing this project and help us when we encounter problems. Last but not least, we wish to record this appreciation to our family members for their moral support. CHAPTER 1 INTRODUCTION GROUP MEMBER STRUCTURE There are 4 person involved in this “motorcycle alarm lock” project. Each of them has a task to accomplish in order to construct the system as follows: OVERALL FLOWCHART Problem Definition Presentation Final Project Design Prototype Circuit System Specification

Conceptual Design Requirement Specification PROBLEM STATEMENT Nowadays, there are so many innovations that created for human convenient. All of the modern things are friendly user and make people easier to use it. The motorcycle anti theft alarm is created for this purpose. An innovation for a standard manual motorcycle is the concept of motorcycle anti theft alarm that automatically turns itself on or off. The places where the motorcycle theft occurs is at the unsupervised and unsecured public parking, shopping complexes, housing areas, hotel car parks or even on the roadsides.

Contributing factors to motorcycle thefts is that there are no basic locks, no additional motorcycle alarm locks and parking the motorcycle at secluded areas that’s very dark at night. Preventive measure of the following situations is to use extra locks and chains is important in preventing motorcycle theft. The users often use the unreliable extra locks, big or heavy chains to be carried around. Sometimes at the crucial times they even forget to lock their motorcycle. In such situations, a motorcyclist might appreciate of having a good alarm system for their motorcycle.

CLIENT STATEMENT * This anti theft alarm is for the manual motorcycle only and we aim the price is less than RM500. * The design of anti theft alarm that suitable for manual motorcycle in a small scale size. * Design a system that can easily be operated and require less maintenance. * Alarm automatically arms itself right after the user takes out the main key. It will lock after 15 seconds. To unlock the alarm systems just swipe the RFID card. * There’s also a mechanic protection such as water proof, electric shock proof, sawing proof, cutting proof and ice-spray proof body (box). Warranty cruel quality control with service free guarantee in 5 years time. * It is friendly user and it is easy to use. Just swipe the card to switch off the system. * Two swipe cars provided. Different user has different identity code in the RFID card and it is impossible to duplicate. Motorcycle Anti-Theft Alarm SAFE Safety Feature SIRIM Durable Anti force Anti Vibration Water Resistant Easy To Use Controllable Short Period of Time Marketable Appeals to Customer Perceived as Save Friendly User Affordable Private and Confidential Software Permits Marketing Flexibility OBJECTIVE TREE

PAIRWISE COMPARISON Goal| Safety Feature| Durable| Easy To Use| Appeal To Customer| Permits Marketing Flexibility| Scores| Safety Feature| …| 1| 0| 0| 1| 2| Durable| 0| …| 0| 1| 0| 1| Easy To Use| 1| 1| …| 0| 1| 3| Appeal To Customer| 1| 0| 1| …| 1| 3| Permits Marketing Flexibility| 0| 1| 0| 0| …. | 1| WEIGHTED OBJECTIVE TREE Safe 1. 0|0. 2 SIRIM 1. 0|0. 2 Safety Feature 1. 0|0. 2 Anti force 0. 3|0. 03 Durable 0. 125|0. 1 Anti Vibration 0. 3|0. 03 Anti Vibration 0. 3|0. 03 Water Resistant 0. 4|0. 04 Motorcycle Anti-Theft Alarm 1. 0|1. 0 Easy To Use 0. 375|0. 3 Marketable 1. 0|0. 8

Permits Marketing Flexibility 0. 125|0. 1 Appeals to Customer 0. 375|0. 3 Private and Confidential Software 0. 5|0. 05 Perceived as Save 0. 5|0. 15 Friendly User 0. 5|0. 15 Affordable 0. 5|0. 05 Controllable 0. 5|0. 15 Short Period of Time 0. 5|0. 15 MORPHOLOGICAL CHART FUNCTION| OPTION 1| OPTION 2| OPTION 3| OPTION 4| Material of Box| Stainless steel | PVC | Metal| Plastic and Utensil | Controller| PIC| M68k| PLC| ATMEGA32| Operating system| Radio-frequency identification(RFID)| Global System for Mobile Communication(GSM)| Fingerprint| Remote control| Switch| Toggle switch| Transistor| Relay| Solenoid|

Status indicator| LED| 7-segment| LCD| Buzzer| NUMERICAL EVALUATION MATRIX Design Constraint/Objectives| Weight (%)| Radio-frequency identification(RFID)| Global System for Mobile Communication(GSM)| Fingerprint| Remote control| C: No sharp edges| | | | | | O: Safety Feature| 20| 0. 5|2010%| 0. 2|204%| 0. 1|202%| 0. 2|204%| O: Durable| 10| 0. 7|107%| 0. 1|101%| 0. 1|101%| 0. 1|101%| O: Easy To Use| 30| 0. 4|3012%| 0. 1|303%| 0. 3|309%| 0. 2|306%| O: Appeal To Customer| 30| 0. 3|309%| 0. 3|309%| 0. 1|303%| 0. 3|309%| O: Permits Marketing Flexibility| 10| 0. 3|103%| 0. |101%| 0. 1|101%| 0. 5|105%| Total| 100| 41%| 18%| 16%| 25%| FUNCTION MEAN-TREE To deactivated the alarm SWITCH CARD DETECTER Unlock the cover box for service motorcycle Identification and tracking the card of user RFID RELAY To switch off the circuit for service purpose FUNCTION To control the period of the system need to activate. To control the output of circuit CONTROLLER PIC To give the confirmation that circuit off. DISPLAY BUZZER LINEAR RESPONSIBILITY CHART Linear Responsibility Chart| LEADER| HARDWARE| SOFTWARE| TESTING AND| | | DESIGN| (PROGRAMMER) | DEBUGGING| . Understand Customer Requirement | 1| 1 | 1| 4| 1. 1 Clarify Problem Statement | 1 | 3| 3 | | 1. 2 Conduct research | | 1 | 4 | 1| 1. 3 Develop objective tree | | 1| | | 1. 3. 1 Draft Objectives tree | | 1| | | 1. 3. 2 Review w/client | | 1| 1| | 1. 3. 4 Revise Objectives Tree | | 2 | 2| | 2. Analyse Function Requirement| | 3| 3 | 4 | 3. Generate Alternatives | 6| 1 | 1 | 3 | 4. Evaluate Alternatives | 6| 1| 1 | 3 | 4. 1 Objectives | 6| | | | 4. 2 Develop Test protocol | 6| | | | 4. 3 Conduct Test | 6| 2| 2| 1 | 4. Report Test Result | 6| 2 | 2 | 1 | 5. Select Preferred Design | 6| 1| 1 | | 6. Document Design Result | 1| | | 1| 6. 1 Design specifications | | | | | 7. Draft Final Report | 5| 2| 2| 1| 8. Project Management | 1 | 1| | | 8. 1 Weekly meetings | 1| 2| 2 | 2 | 8. 2 Develop Project Plan | 1| 1| | | 8. 3 Track Progress | 1| 1| | 5| 8. 4 Progress Reports | 1| | | | | Key: | | 1= Primary Responsibility 2= Support/work 3= Must be consulted | | 4= Maybe consulted 5= Review 6= Final Approval | TEAM CALENDAR

GANTT CHART NO| TIME/TITLE| WEEK1| WEEK2| WEEK3| WEEK4| WEEK5| WEEK6| WEEK7| WEEK8| WEEK9| WEEK10| WEEK11| WEEK12| WEEK13| WEEK14| 1| Briefing for coursework and divied group| | | | | | | | | | | | | | | 2| Selecting project title| | | | | | | | | | | | | | | 3| Collecting data for the project title| | | | | | | | | | | | | | | 4| Present project description and propasal| | | | | | | | | | | | | | | 5| Confirm function and user requirement | | | | | | | | | | | | | | | 6| Circuit design | | | | | | | | | | | | | | 7| PCB design| | | | | | | | | | | | | | | 8| Hardware design| | | | | | | | | | | | | | | 9| Final report| | | | | | | | | | | | | | | 10| Present final report project | | | | | | | | | | | | | | | PERT CHART 8 Design programming complete programming 13 10 9 7 6 3 2 1 Create schedule Design hardware Buy hardware Test hardware Release hardware Manufacture hardware Breadboard hardware Design software 12 1111 5 4 Layout manualcomplete softwareFinish manualrelease manual

WORK BREAKDOWN STRUCTURE Design motorcycle anti theft alarm Detailed Design Select Among Alternatives Evaluate Alternatives Generate Alternatives Analyze Function Requirements Understand Customer Requirement Clarify the project statements Alarm with sensor Brain Storm for Idea Develop Sensor for Objectives Apply Test Blueprints/ Diagram Research Theft construction instructions Maintenance Service Review Customer Requirement Review Results wit Liaison Developed Morphological Chart Generate Function list RFID Function Analyses Type of motor Match means option to function Type of location

Compile a list of Flexible Alternatives Type of stolen Review with liaison Review on Objectives tree Develop Objectives Tree Type of sensor (design) BLOCK DIAGRAM BUZZER SOLENOID PIC SW * Physic lock * Switch motor POWER LED HARDWARE IMPLEMENTATION Sensor * LM7035 (to reduce the voltage to 5V) System * Radio-frequency identification (RFID) Output * Light Emitting Diode (LED) * Buzzer * Solenoid * Relay Specification: * Size of the box: 22. 6 X 11. 6 cm * Weight:35 grams. It is light but stable because it is placed below the seat * The price RM 399 with service and maintenance 1 year. Alarm buzzer sound is 10 dB. * Alarm system: . Auto-alarming system & locking system * Corrosion Resistant The battery Life time of security circuit is depend on the Lock keys: * Copper material keys * High security * More keys available Advantages of this alarm lock: Widely use, for motorcycles, bicycles etc. Can protect you from unnecessary lost. SYSTEM DESCRIPTION AND SYSTEM OPERATION OVERALL OPERATION After turn OFF the key motor, our circuit will ON automatically. During at the time, relay will be function as switch and break-off the full circuit from connect to the main key switch (motor switch).

So, if we try to turn ON the motorcycle at the time it will be refuse and useless. Motor can’t be turn ON. To turn OFF the security circuit, we need to swipe our card into RFID detector. It will detect whether the frequency match within RFID and card. If it is not match, LED A and LED B will blinking two times and buzzer will buzz two times. But when the card and RFID frequency is match, RFID will send signal to the PIC to turn OFF the security circuit. At that time, LED A and LED B blinking one times and also same goes to buzzer.

Then, relay will turn ON full circuit. So, when we start the motor it will turn ON. CHAPTER 2 THEORETICAL BACKGROUND 2. 0PIC 16F877A The PIC16F877A CMOS FLASH-based 8-bit microcontroller is upward compatible with the PIC16C5x, PIC12Cxxx and PIC16C7x devices. It features 200 ns instruction execution, 256 bytes of EEPROM data memory self programming an ICD, 2 Comparators, 5 channels of 10-bit Analog-to-Digital (A/D) converter, 2 capture/compare/PWM functions a synchronous serial port that can be configured as either 3-wire SPI or 2-wire I2C bus and a USART.

The PIC however was upgraded with internal EPROM to produce a programmable channel controller and today a huge variety of PICs are available with various on-board peripherals (serial communication modules UARTs, motor control kernels etc), and program memory from 256 words to 64k words and more (a “word” is one assembly language instruction varying from 12, 14 or 16 bits depending on the specific PIC micro family). 2. 1RFID (Radio Frequency Identification) Radio Frequency Identification (RFID) is a technology that uses electronic chips embedded on tags to transmit radio waves.

These tags can identify products, assets, medical records, and even individuals with embedded security cards or wristbands. Technology similar in theory to bar code identification. With RFID, the electromagnetic or electrostatic coupling in the RF portion of the electromagnetic spectrum is used to transmit signals. An RFID system consists of an antenna and a transceiver, which read the radio frequency and transfer the information to a processing device and a transponder or tag which is an integrated circuit containing the RF circuitry and information to be transmitted.

The advantage of using RFID are whether you are concerned with tracking inventory in a warehouse or maintaining a fleet of vehicles, there is a clear need for a fully automated data capture and analysis system that will help you keep track of your valuable assets and equipment. RFID’s comparative low cost, invisibility and ease of development in automated tracking often make it appear more attractive than the alternatives. 2. 3Voltage Regulator LM7805

Voltage Regulator (regulator), usually having three legs, converts varying input voltage and produces a constant regulated output voltage. They are available in a variety of outputs. The most common part numbers start with the numbers 78 or 79 and finish with two digits indicating the output voltage. The number 78 represents positive voltage and 79 negative one. The 78XX series of voltage regulators are designed for positive input. And the 79XX series is designed for negative input. 2. 4Relay

A relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal. The applications of relay are Control a high-voltage circuit with a low-voltage signal, as in some types of modems or audio amplifiers.

Control a high-current circuit with a low-current signal, as in the starter solenoid of an automobile, Detect and isolate faults on transmission and distribution lines by opening and closing circuit breakers (protection relays). Time delay functions. Relays can be modified to delay opening or delay closing a set of contacts. A very shorts (a fraction of a second) delay would use a copper disk between the armature and moving blade assembly. Current flowing in the disk maintains magnetic field for a short time, lengthening release time. 2. 5Magnetic Solenoid A solenoid is a coil wound into a tightly packed helix.

In physics, the term solenoid refers to a long, thin loop of wire, often wrapped around a metallic core, which produces a magnetic field when an electric current is passed through it. Solenoids are important because they can create controlled magnetic fields and can be used as electromagnets. The term solenoid refers specifically to a magnet designed to produce a uniform magnetic field in a volume of space where some experiment might be carried out. In engineering, the term solenoid may also refer to a variety of transducer devices that convert energy into linear motion. The term is lso often used to refer to a solenoid valve which is an integrated device containing an electromechanical solenoid which actuates either a pneumatic or hydraulic valve or a solenoid switch which is a specific type of relay that internally uses an electromechanical solenoid to operate an electrical switch. For example, an automobile starter solenoid or a linear solenoid which is an electromechanical solenoid. 2. 6Light Emitting Diode Light – emitting diodes are semiconductor diode that emits light when an electric current is applied in the forward direction of the device.

The effect is a form of electroluminescence where incoherent and narrow-spectrum light is emitted from the p-n junction. LEDs are widely used as indicator lights on electronic devices and increasingly in higher power applications such as flashlights and area lightning. An LED is usually a small area light source. The color of the emitted light depends on the composition and condition on the semiconducting material used and can be infrared, visible or ultraviolet. LEDs were commonly used for indicators, seven-segment display and in such appliances as TVs, telephones and calculators. . 7Resistor A resistor is two-terminal electronic component that produces a voltage across its terminal that is proportional to the current passing through it in accordance with Ohm’s law: V=IR The primary characteristics of a resistor are the resistance, the tolerance, maximum working voltage and power rating. Other characteristics include temperature coefficient, noise and inductance. Less well-known is critical resistance, the value below which power dissipation limits the maximum permitted current flow and above which the limit is applied voltage.

Critical resistance depends upon the materials constituting the resistor as well as its physical dimensions. 2. 8Crystal Oscillator A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time to provide a stable clock signal for digital integrated circuits and to stabilize frequencies for radio transmitters and receivers.

The most common type of piezoelectric resonator used is quartz crystal, so oscillator circuits designed around them were called “crystal oscillator”. 2. 9Transistor The 2N2222 often referred to as the ‘quad two’ transistor is a small common NPN BJT transistor used for general purpose low-power amplifying or switching applications. It’s designed for low to medium current, low power, medium voltage and can operate at moderately high speeds. 2. 10Switch (button) In electronics, a switch is an electrical component that can break an electrical circuit, interrupting the current or diverting it from one conductor to another.

The most familiar form of switch is a manually operated electromechanical device with one or more sets of electrical contacts. Each set of contacts can be in one of two states, either ‘closed’ meaning the contacts are touching and electricity can flow between them or ‘open’ meaning the contacts are separated and non-conducting. CHAPTER 3 HARDWARE DESIGN Figure 1:PCB design Figure 2:PCB design (Back) MAIN CIRCUIT SCHEMATIC DESIGN Figure 3:Main schematic diagram Figure 4:Main schematic diagram HARDWARE CONSTRUCTION PROCESS

For the first step, the process of manufacturing the printed circuit board is to draw the circuit on the PCB cuprum board. Draw the circuit from towards the back of the original circuit. OrCAD capture layout software is use to draw the circuit. Then printed the complete circuit on the tracing paper and put it on the PCB. The PCB board must be clean up using machine, soap or sand paper to remove all the unwanted elements. The best and the fastest way to remove the unwanted element are by using the machine. The PCB must be laminated using dry film.

Before laminated the PCB, remove the first layer of the dry film. The laminator must be set to 120? C and its speed was 4. After the laminating process, put the printed layout on the laminated PCB. Then put it into UV light exposure to trace the printed layout on the laminated PCB. This process only takes for 18 seconds. After this process, remove the printed layout. The PCB must be put on the developer machine to strengthen the drawing line on the PCB. This process must be repeated if the PCB is not clean enough and the line on the circuit is not clearly seen.

This process only takes for 4 minutes. Then, the PCB must undergo the etching process to remove the cooper layer on the PCB. The etching process must be repeated if the copper are not fully remove. This process will only take 4 minutes. After etching process, the PCB is washed with water and dries it up using dryer machine. The PCB is now ready to be inserting with component, solder and ready to be tested. For the drilling process, the sized of drill used is determine by the diameter of the lead component like IC base pin connector and resistor.

The lead access holes must be drilled through the centers of each copper terminal pad where a component lead will pass through the PC board. Components were inserting in the holes to make sure that all holes can get through. We also want to be sure that we do not miss any holes to drill. The important part in making printed circuit board is soldering the component. There are a few rules to solder component correctly. First, the component leads with a small piece of emery paper. Secondly, take the hot iron and place its tip on the component lead while holding the end of the solder wire at the point where the lead emerges from the board.

The iron tip must touch the lead slightly above the p. c board. When the solder starts to melt and flow wait till it covers evenly the area around the hole and the flux boils and gets out from underneath the solder. The whole operation should not take more than 5 seconds. Remove the iron and allow the solder to cool naturally without blowing on it or moving the component. If everything was done properly the surface of the joint must have bright metallic finish and its edges should be smoothly ended on component lead and the board track.

If the solder looks dull, cracked, or has the shape of a blob then we have made a dry joint and we should remove the solder (with a pump or a solder wick) and redo it. Besides that, when soldering a sensitive component it is good practice to hold the lead from the component side of the board with a pair of long- nose pliers to divert any heat that could possibly damage the component. Do not use more solder than it is necessary as we are running the risk of short circuiting adjacent tracks on the board, especially if they are very close together.

Finally when finished soldering, cut off the excess of the component leads and clean the board thoroughly with a suitable solvent to remove all flux residues that may still remain on it De- soldering is required when component lead near to be detached from a circuit, usually because if the soldered lead are imperfect. It may sometimes be necessary during testing or assembly, if a wrong part has been fitted or modification has to be made. In the field, it is not infrequent for defective components to be swapped out, or poor joints (perhaps ‘dry joints’) to need re- marking properly

CHAPTER 4 SOFTWARE DESIGN INTRODUCTION The software is developed by using the C programming language tool. It is important to understand the C programming language of PIC so that it can be implemented together with the circuit. After the circuit was completely designed, the next step taken was to develop the software programming. Before starting to write a completely for hole program language, it is proceed with a simple programming first. The simple programming is program language for manual and then automatic.

Thus is very important to avoid us to do mistake and make it easier to trace mistake in the program. In the order to do the complete task successfully, the program is written based on the hardware circuit designed before. A flowchart is guideline or simple explanation in our program. It is easier to translate the program language by using flowchart. A process of writing the procedure of assembly language programming can be done by using PIC C Compiler. Thus follow by downloading the program in the PIC that we are used PIC 16F877A using trainer board. Then, PIC 16F877A was applied in the circuit.

As a result, it introduces the fundamental knowledge necessary for writing assembly program thus creating the link between the hardware and the C program language. FLOWCHART OUTPUT| ON| LED1| PORT A , 3| 0| LED2| PORT B , 3| 0| BUZZER| PORT C , 0| 1| RELAY| PORT C , 3| 0| SOLENOID| PORT C , 1| 0| RFID| PORT C , 7| -| SWITCH| PORT A , 0 1| 12 V| Data from RFID Compare LED ON (1Time) BUZZER ON (1 Time) LED ON (Blinking) SWITCH ON BUZZER ON (2 Time) RELAY ON SOLENOID YES NO NO YES CODING WITH EXPLAINATION OF THE PROGRAM //======================================================================== -RFID alarm motorcycle security) /Project description: Scan RFID tag and unlock of solenoid and relay //======================================================================== //======================================================================== //include //======================================================================== #include <pic. h> //======================================================================== //Configuration //======================================================================== __CONFIG ( 0x3F32 );//configuration for the microcontroller //========================================================================= //Define /========================================================================= #definebuzzerRC0//buzzer (1 to on buzzer active high) #definesolenoidRC1//solenoid (active low) #definerelayRC3//relay (active low) #defineled1RA2//led 1 (active high) #defineled2RA3//led 2 (active high) #definebuttonRA0//switch (active high) //=========================================================================== //Function prototype(every function must have a function prototype) //=========================================================================== void delay(unsigned long data); void send_config(unsigned char data); oid send_char(unsigned char data); void send_string(const char *s); unsigned char uart_rec(void); void beep(void); //=========================================================================== //Main function(main fucntion of the program) //=========================================================================== void main(void) { //assign variable unsigned char i,temp,database; unsigned char data[14];//14 bytes of data received from RFID Reader. //The data include start of text, RFID ID, //carriage return, new line, and end of text unsigned char id_1[10]={“0013099330”};//define use card nsigned char id_2[10]={“0004960950”};//define use keychain //set I/O input output TRISC = 0b10000000;//configure PORTC I/O direction TRISA = 0b00000001;//configure PORTA I/O direction //setup USART SPBRG = 0x81;//set baud rate to 9600 for 20Mhz BRGH = 1;//baud rate high speed option TXEN = 1;//enable transmission CREN = 1;//enable reception SPEN = 1;//enable serial port //setup ADC ADCON1 = 0b00000110;//set ADx pin digital I/O //set initial condition buzzer=0;//off buzzer relay=1;//off relay led1=1;//off led 1 led2=1;//off led 2 solenoid=0;//on solenoid button=0;//switch on beep();//initial beep //infinity loop while(1) { or(i=0;i<14;i+=1)data[i]=uart_rec();//wait for 14 character data receive from RFID reader //The data receive are start of text, RFID ID, //carriage return, new line, and end of text led1=0;//on led to indicate system is buzy delay(40000);//delay led1=1//led off database=0;//clear the value of database and start scanning //comparing with the 1st id temp=0;//comparing the received data with the saved id. //only byte 2-11 which is RFID ID data, will be used to compare between //receive data and saved id. for(i=1;i<11;i+=1)//comparing digit by digit { if((data[i])! =(id_1[i-1]))temp=1;//if the id is different from the id define bove, }//then set temp=1; if(temp==0) database=1;//if temp=0, mean the id match, set the database=1 //comparing with the 2nd id temp=0;//comparing the received data with the saved id //only byte 2-11 which is RFID ID data, will be used to compare between //receive data and saved id. for(i=1;i<11;i+=1)//comparing digit by digit { if((data[i])! =(id_2[i-1]))temp=1;//if the id is different from the id define above, }//then set temp=1; if(temp==0) database=2;//if temp=0, mean the id match, set the database=1 switch(database) { case 1://id 1 match led2=0;//on led 2 delay(40000) beep();//beep once f(button=1) {relay=0; solenoid=0; } break; case 2://id_2 match led2=0;//on led 2 delay(40000) beep();//beep once if(button=1) {relay=0; solenoid=0; } break; default://id doesnt match led2=0; delay(40000) led2=1//display “user not found” beep();//beep twice beep(); break; } delay(300000);//delay led1=1;//off led after the process complete led2=1; } } //=========================================================================== //Functions //=========================================================================== void delay(unsigned long data)//delay function, the delay time {//depend on the given value or( ;data>0;data-=1); } unsigned char uart_rec(void)//receive uart value { unsigned char rec_data; while(RCIF==0);//wait for data rec_data = RCREG; return rec_data;//return the data received } void beep(void)//short beep function { buzzer=1;//on buzzer delay(10000);//short delay buzzer=0;//off buzzer delay(10000);//short delay } EXPLAINATION OF THE PROGRAM Firstly, we initialized our program regarding the port in PIC ports. Port A, RA0 and port C, RC7 we used as input port. This input port A RA0 that has RFID circuit that use to put the RFID reader.

When we swipe the card to RFID, RFID will receive the right string data and send the data to the PIC. We use 2 input data either keychain or card. Each of them has their own unit data. From here we know that both unit data that can be use to unlock the security alarm circuit. After the RFID get match data it will send the data to the PIC. PIC will compare the unit data either the data match or not. If the PIC gets wrong data the LED1 and LED2 (RA2 and RA3) will blink and buzzer (RC0) will buzz 2 times. But when the data match, LED and buzzer will turn ON once at 1 time.

Then, the circuit will wait about 0. 5 seconds delay to get the value input switch (RE0) whether it give input HIGH or LOW. If the input HIGH it will give LOW to relay (RC3) to turn ON and 1 to solenoid (RC1) to unlock. After that, if the circuit switch input LOW, security alarm will be turn ON. CHAPTER 5 TESTING AND DEBUGGING Hardware Testing Before doing the Printed Circuit Board (PCB), the designed circuit that has already done must be constructing on the breadboard. The reason of doing this is to make sure that the correct output is obtained before start soldered on the PCB.

Furthermore, if there is any mistake on the connection among the components, it can be corrected. While testing the circuit on the breadboard, if there are some problem that occurs due to the connection and the components, it must be solved before PCB board is made. This is because after done doing the PCB, if there is any mistake on the PCB board, it has to redo again and it is such a waste of time. Software Testing Software must be compatible with hardware to ensure that the system functions well. There are steps that show whether the program runs or not. First, we ave to test the circuit whether it will function or not. We use the battery 9V to test whether our hardware in function or not. It successfully functions because the voltage regulator produces the Vout and LED at the voltage regulator circuit are function. Troubleshoot Troubleshoot is very important in every project to find the causes of the problem that occurred in the project. Hardware and software are related to each other. So that, the program and the hardware were match and function well. If the project does not work, there must be problem encountered on that project, either on software or hardware.

It can be traced by comparing the result on testing and its required task. Both of the result must be same as well. In this project, each of the component were doing troubleshoot to determine of all the entire component will function or not. The troubleshooting was described as followed: a) Battery Battery that we use supposes to be 9V, but it is not enough power supply to supply it to the circuit. So, the circuit can’t function well. So, we have to use the new one battery. b) PIC16F877A PIC is very sensitive. So, it is easily damage if we did not take seriously care about it.

When we want to use the PIC to test our circuit we found that the PIC did not function. So, the circuit did not function as we want because of the damages of the PIC. c) Track loose In this project we use the Protel DXP software to design our circuit. We have to design our own track for our main circuit and the motor driver circuit. But, we figure out some mistake in the connection on the track circuit. Other than that, we also found that one of the tracks was flimsy due to so many times when sucks the component on that track. Problem Encounter and Solutions No| Problem| Solutions| . | Battery| Make sure check the battery before using it. Check by using multimeter to know that it had enough supply to supply it before we want to use it. | 2. | PIC16F877A| We have to be careful when using the PIC because it is very sensitive due to the high sensitivity. Make sure put it in the safety places. | 3. | Footprint | When soldering the components, have to make sure that do not do any mistakes. If the solder looks dull, cracked, or has the shape of a blob then we have made a dry joint and we should remove the solder (with a pump or a solder wick) and redo it.

Besides that, when soldering a sensitive component it is good practice to hold the lead from the component side of the board with a pair of long- nose pliers to divert any heat that could possibly damage the component. | CHAPTER 6 RESULT AND DISCUSSION RESULT Figure 5 Figure 6 Figure 7 Figure 8 DISCUSSION Motorcycle anti-theft alarm, this project title already shows that how important new outcome design in our life. Day by day, there are too many cases of stolen about missing motorcycle. This was happen because of lack security on motorcycle security systems.

During implementation this project there are a lot of problem that we need to face. This problem already happen was starting the time when we design out circuit. There are too many arguments during design the circuit and until finally the true circuit outcome. By this project, there are many new things that we know during complete all the process developing board and assemble all components into the board. This was fascinating experiences especially time convert PCB into hardware. Then, during testing and debugging for the first time there are too many errors in outputs out come.

There are a lot of different outputs and do not follows as what we set. So, many times we troubleshoot our circuit to find out what the major problem. In the first place, we checked again the overall connection of the circuit and seem it not give any major problem. We also checked one by one the component by testing each of components whether functions well or not. From the finding the problem comes from component and hardware was solved. By then, we troubleshoot on the programming part. Form the finding there are some errors at our programming.

We need to reprogram the input both unit data that to use to unlock the security alarm circuit. In this part, there are a lot of confusing during set or reprogram to match and mismatch the data between RFID and PIC. There are a lot of time we use in testing and debugging in this problem. Unfortunately, we need to change our coding and reprogram it using code block rather than using MPLAB. Even thought it easy to assemble by using MPLAB because there are too many things we need to study and to make it easier we use code block. Finally, there some output come out.

But then, there are come another problem last minute. Our RFID do not function because some technically mistake, the RFID where broke down. Even though this project do not completely achieve the target, but we still satisfied because out hardware still can function as well. CHAPTER 7 CONCLUSION AND RECOMMENDATION CONCLUSION As the conclusion, this project is important for Electrical Engineering students as requirement in this subject. Thus, students had tried to accomplish this project as scheduled. During the implementing this project, the students came across some problems that occurred in this project that aused this project unable to run accordingly. After completing all the process such as developing the board and assemble all the components, we had to implementing the project into hardware. By doing this project, we learn many things and face too many experiences especially in making this project into hardware and software. This mini project is not just helping us in developing our programming and design skills, but it also help us to develop our communication skills and soft-skills which is one of the outcomes of the programmed.

Our time management which is too important nowadays compared to the past. It comes since we need to present our mini project in front of our experienced panels. Every single steps and advice from our dearest supervisor was taken and been used widely when needed. Lastly, with this mini project it will develop our basic knowledge on how to do our final year project as time goes by. Every mistake in this mini project development will be reduced and hopefully we can implement our final project without having the same problems that we are facing along this mini project. RECOMMENDATION LIST OF REFERENCES


ˆ Back To Top