Sunteți pe pagina 1din 27
CAR LAMP FAILURE DETECTOR AND WARNING SYSTEM. MUHAMAD EDIB BASRI This report is submitted in partial fulfillment of requirements for the award of Bachelor of Electronic Engineering Industrial Electronics with honours Fakulti Kejuruteraan Elektronik dan Kejuruteraan Komputer Universiti Teknikal Malaysia, Melaka April 2007 vii ABSTRACT Car lamp failure is common scenarios that happen occasionally but it is hard to detect car lamp failure. Driver notice that they had car lamp failure usually when we driving at night or been told by other that they had a lamp failure. Sometime the driver only knows only knows it when they got summons from the police traffic. Worse car accident could also happen because of the car lamp failure, In this project a circuit is designed to give a warning system if the car had a lamp failure. The circuit will use a Programmable Integrated Controller (PIC) and other power electronic device that will detect the short or open of the circuit. In others word if the car had a lamp failure it will be on the short circuit, open circuit or low voltage at the lamp. ‘At the end of the project, a car lamp failure detector and warning system model will be produced. Thit system will notify the user of which lamp had failed, viii ABSTRAK Kerosakan lampu kereta adalah perkara biasa yang sering berlaku tetapi sukar untuk mengesannya, Pemandu hanya menyedari bahawa mereka menghadapi kerosakan lampu kereta apabila memandu di waktu malam atau diberitahu oleh orang lain. Kadangkala pemandu hanya menyedarinya apabila mereka disaman kerana kerosakan lampu kereta. Apa yang lebih membimbangkan adalah kemalangan jalanraya boleh berlaku disebabkan oleh kerosakan lampu. Di dalam projek ini satu sistem yang dapat mengesan kerosakan lampu kereta direkacipta. Litar yang menggunakan Litar bersepadu teraturcara dan peranti elektronik kuasa ini dapat mengesan litar pintas dan litar terbuka. dalam erti kata lain kerosakan lampu kereta adalah disebabkan oleh litar pintas dan litar terbuka ataupun voltan yang kurang pada lampu kereta Satu sistem yang dapat mengesan dan memberi amaran mengenai_ kerosakan lampu kereta akan direkacipta pada penghujung projek ini. Sistem ini akan memberitahu pengguna kedudukan lampu yang rosak. CHAPTER 1 INTRODUCTION 1.1 Introduction to the Project Lamp is a replaceable part which is designed to create brightness from the electrical energy. The lighting system of ears consists of lighting and signalling devices mount to the front, sides and rear of the vehicle. The rationale of this system is to provide lighting by which for the driver to manage the vehicle securely after dark to increase the brightness of the vehicle, and to show information about the vehicle's existence, location, dimension, route of travel and projected travel, and brake status. Research about car lamp failure detector must be done in order for us to upgrade our car price market. Just imagine when user didn’t know that their car lamp fails, they only realize that when there involved in car accident due to the lamp failure such as brake lamp, headlamp failure and etc, In Malaysia there is none of the national car that uses such system but for an imported car there is a system that can detect lamp failure. 1.2 Project Objective There are few objectives that have to achieve such as: To study about the car wiring diagram © To learn how to use the Programmable Integrated Controller * To study and know the terms and practicality of using power electronic devices «To design a car lamp failure detector and warning system © To build and to develop the hardware and circuit that could be integrated and be implemented in a car © Do research about convenient way and cheap way to make a car lamp failure detector and warning system. 1.3 Problem Statement From the research, there have a lot of problems that having in the car lamp failure detector. The problem such a * No lamp failure indicator in a passenger car = Most of the car manufacturer in Malaysia does not include this system in their manufactured car. Statistic shows that there are 14, 660, 012 registered vehicle in Malaysia and majority of the car didn’t have this system # High cost of car lamp failure detector and warning system. -Existing system of car lamp is expensive and that make many users didn’t want tohave it © One of the accident factor - Statistic from PDRM shows that in 2005, 6200 people died in a car accident and cone of the factors is mechanical factor such as car lamp failure. It also contributes to death accident. ‘© Lamp panel indicator -There are some others car lamp failure detector that told driver that their car lamp fail but didn’t shows where car lamp fail. 1.4 Work Scope ‘The project will cover simulation, design & fabrication of the system model and testing. Among the software used for the stimulation are Multisim, Proteus and PSpice. Beside that, Sourceboost, MPLAB IDE and IC prog software is used to program the PIC microcontroller. The Proteus is also used to design Printed Circuit Board (PCB) in this project. This project will not include installation of the system in actual car but a model to represent the system is fabricated to demonstrate how the system works. The model consists of voltage regulator, voltage comparator and Programmable Integrated Controller. LED is used in this project as car lamp and display representation. This model also represents the car lamp failure detector method and warning system that can be used to be implemented in a car. The content of this thesis is all about the project that had been done. This thesis will be divided into five chapters to provide reader to understand the whole project. © Chapter | is covering the overview and the introduction of the project. © Chapter II will cover up entire of the project theory, perspective, component review and any hypothesis that related with the research of the methodology. © Chapter III is covers the research of methodology that was important in this project and also method that was use to solve the problem, or the © Chapter IV is covers the contrivance and the outcome of the data analysit project result that was found out from the project. © Chapter V this chapter, discussion, conclusion for this project is made. Future covers the whole contents of this thesis and project. At the end of recommendation is also suggested if the project want to be implemented. CHAPTER 2 LITERATURE REVIEW Literature review 2.1 Introduction The project is about developing a car lamp failure detector and warning system that can detect failed lamp. The system can detect which car lamp is in failed. The basic idea for this circuit is by using the voltage comparator to compare and differentiate between a good and bad lamp. User must switch on the car lamp failure detector and warning system switch in order to detect failed lamp. It will also have a fuse on the circuit as safety precaution if short circuit happens so that the circuit and component on it will not damage because of the high current circuitry. The system will connected to the PIC in order to make LED lights and produce an input to the buzzer system. If the lamp fails, it happens due to the open circuit or short circuit of the bulb and this can be detected by voltage comparator. Car Lamp in Voltage LED Lights Good Comparator On, running Condition Circuit light run and no buzzer sound (a) Car Lamp in Voltage Failure Comparator LED Lights Condition Cireuit Off, running light off and Buzzer Sound (b) Figure 2.1: (a) Operation of car lamp failure detector in a good condition (b) Operation in a failure condition The circuit idea is to display an indicator to the user that warning them that they have a lamp failure. The circuit can be represented by the following diagram Switch Input Power Electronic Voltage Warning Devices ‘Comparator Light Figure 2.2: Simplified Circuit Operation Switch is used to connect and disconnect supply to the power electronic device, voltage comparator and PIC while Power electronic devices are used to control high PIC used to give desired output to the power electronic device and others. In addition PIC also functions to intersect between the circuit and output. ‘Slide Switeh 2 way [ ft | Lame vokage Faulty —_— Ceenparator Iieator Tr Duplay C Damage Lamp Figure 2.3: Model of Car Lamp Failure Detector Diagram In this model the supply will go to the voltage regulator which converts the 12V supply to a 5V regulated supply. It then gives supply to good LED and bad LED (represent car lamp), voltage comparator with its reference voltage and also the OR gate chip. From the LED (which represent car lamp) it will then go to the voltage comparator. Whenever signal voltage is less than reference voltage, buzzer, running light and display will be activated. Display will show the position of the fail lamp. 2.2 Car Lamp ‘The following specification of car lamp is cited from en.wikipedia.org/wiki/Automotive_lighting ‘There are specifications of car lamps which a Headlamp (Low Beam) Low-beam is lamp that provides a distribution of light designed to provide sufficient forward and sideways illumination with limits on light focussed towards the eyes of other road users, to control glare. This beam is projected for use each time other vehicles are present ahead Headlamps (High Beam) High beam is lamp that provides a clear, centre-weighted distribution of light with no remarkable control of light directed towards other road user's eyes. This lamp is projected for use each time when alone on the road, as the glare they produce will unsighted other drivers Signal Lamp Signal lamps are lamp that provides lateral enlightenment in the route of a projected turn or lane change. These are actuated in combination with the turn signals. ‘Turn signals are required to blinking at a fixed rate Brake lamps Brake Lamps are lamp that brighter than the tail lamps which are activated when the driver applies the vehicle's brakes. Tail lamps Tail Lamps are lamp that provides intensity at the tail near the back rear lamp. It gives dimmer red light for the tail lamp when it is function 2.2.1 Bulb Failure There are many cause of bulb failure such as:~ Contaminated Bulb Envelope - This can be indicated by a blackened or dark envelope Failure to Ignite - This can be indicated by the bulb’s refusal to establish a maintained are, either from the automatic or manual ignition system, Leaker - This can be indicated by a bluish-white colour of the envelope when the bulb is operating. Low Light Output - This can be indicated by poor screen foot-lambert readings. Unstable Are or Flicker - This can be indicated by the bright spot on the screen jumping around. 2.2.2 Car Lamp Wiring Diagram (b) [J orcruaen © Figure 2.4: Car Lamp Wiring Diagram (a) Front Lamp (b) Tail Lamp (c) Signal Lamp 2.3 Voltage Comparator Comparator is a device that compares two voltages or currents and switches its output to indicate which is larger. It is also used to refer to a device that compares two items of data. A standard op-amp without negative feedback can be used as a comparator, as indicated in the following diagram. Vout Vs- Figure 2.5: Voltage comparator symbol When the non-inverting input (V+) is higher than the inverting input (V-), it drive transistor inside the voltage comparator to be on. When the non- werting input (V+) drops below the inverting input (V-), it drive transistor inside the voltage comparator to be on. Vous <= Vx when (V.> ¥.) Ql The voltage divider rule used to set the reference voltage of the voltage comparator. Two re lors are connected as shown in the following diagram: It is used to set reference voltage of the voltage comparator Figure 2.6: Voltage Divider Operation ‘The output voltage Voy: is related to Vin as follows: Re Vou = RO Rit (2.2) In the circuit RI will be a fixed resistor and R2 will be a variable resistor 2.3.2 Voltage Comparator Cireuit Rv toro 1 J raf) es{} r7{] eo mnG me Vsiget > , fe noly paz, Vsignal > Figure 2.7: Voltage Comparator Circuit 2.4LED A light-emitting diode (LED) is a semiconductor device that emits incoherent narrow-spectrum light when electrically biased in the forward direction. -@- ft. +} - Figure 2.8: Led Diagram and symbol The negative side of an LED lead can be indicated in by the flat side of the bulb or by the shorter of the two leads extending from the LED. The negative lead should be connected to the negative terminal of a battery. LED’s operate at low currents between about 10 and 40 milliamperes. Currents above these values can melt a LED chip. 2.4.2Advantages of using LEDs cited from en.wikipedia.org/wiki/LED There are advantages of using LED such as: + LEDs are significantly more energy-efficient than incandescent bulbs. + LEDs can emit light of an intended colour without the use of colour filters that traditional lighting methods requ + The solid package of an LED can be designed to focus its light. Incandescent and fluorescent sources often require an external reflector to collect light and direct it in a useable manner. + When used in applications where dimming is required, LEDs do not change their colour tint as the current passing through them is lowered, unlike incandescent lamps, which yellow. + LEDs are built inside solid cases that protect them, unlike incandescent and discharge sources, making them extremely durable, + LEDs have an extremely long life span: typically ten years, twice as long as the best fluorescent bulbs and twenty times longer than the best incandescent bulbs. (Incandescent bulbs can also be made to last an extremely long time by running at lower than normal voltage, but only at a huge cost in efficiency; LEDs have a long life when operated at their rated power.) ‘+ Further, LEDs fail by dimming over time, rather than the abrupt burn-out of incandescent bulbs. + LEDs give off much less heat than incandescent light bulbs with similar light output. + LEDs light up very quickly. A typical red indicator LED will achieve full brightness in microseconds, or possibly less if it’s used for communication devices. 2.5 Resistor A resistor is a two-terminal electrical or electronic component that resists an electric current by producing a voltage drop between its terminals in accordance with Ohm’s law. (Certain ultra-precise resistors have 2 extra terminals, for a total o! ‘The the current through the resistor. Resistors are used as part of electrical networks and -etrical re tance is equal to the voltage drop across the resistor divided by electronic circuits. Variable resistors consist of a resistance track with connections at both ends and a wiper which moves along the track as you turn the spindle. The track is usually rotary but straight track versions, usually called sliders, are also available, wiper reersinals @ ) © Figure 2.9: (a) Variable Resistor inner diagram (b) Variable Resistor symbol (c) Variable Resistor Picture This is the simplest way of using a variable resistor. Two terminals are used: one connected to an end of the track, the other to the moveable wiper. Turning the spindle changes the resistance between the two terminals from zero up to the maximum resistance, 2.6 Car Ignition Switch. The ignition switch takes electricity from the battery via a fuse and when switched on, allows the electricity to be used by the rest of the car. Lights use a lot of power and take the power through a relay direct from the battery, with a small connection ‘on the ignition switch operating the relay for the lights. As well for the starter position on the ignition switch which also operates a heavy duty relay (solenoid) for the starter motor. 2.7 PIC 16F84A — SS seenom a . STATUS reg manos eux | ‘weer [J = Coe To = Pee || cso a 2H. “ee Figure 2.10: PIC 16F84A Block Diagram PIC 16F84A_ is a powerful programmer, easy-to-program CMOS Hash EPROM-based which is in 8-bit microcontroller architecture into an 18-pin package. It is easily adapted for automotive, industrial, appliances low power remote veitsors, electronic locks and security applications. 2.7.1 Features ‘There some features of PIC 16F84A such as:~ ‘The program memory contains 1K words, which translates to 1024 instruetions, The data memory (RAM) contains 68 bytes. * Data EEPROM is 64 bytes. + 1310 pins that are user-configured on a pin-to-pin basis. «© RESET © Power-on Reset © Power-up Timer © Oscillator Start-up Timer Interrupts * Watchdog Timer © Code Protection 2.8 LM7805 ‘The LM7805 has the capab requirements up to 150mA. It has three legs which is input leg which can hold up to to take current up to 1A, 78L05 can be used for 36VDC, common leg (GND) and an output leg with the regulator's voltage. If maximum 19 voltage regulation is needed, adding a capacitor in parallel between the common leg and the output is recommended. 0.1MF is ordinary capacitor that is used for LM7805. This climinates any high frequency voltage that could combine with the output voltage. ° =, san aur 736v' + & MersevOe as er SE ct Wht voc ‘come — 2 OF ot 1 Figure 2.11: LM7805 circuit diagram Input Sejes Pass] | Outre Pr Eisment ‘e enorate Protect = H Pee" | Abin : tL Figure 2.12: Block Diagram of LM7805 However, before design is made, there are a number of features and facts that must be taken into considerations such as: 1. The power supply must be "tight." In other terms, the track-work for the power supply ‘must be short so that the capacitors across the regulator can perform their function to remove parasitic oscillations. 2. The regulator can dissipate heat so it can be touched on it for at least 30 seconds or more. 3. The input voltage must be at least 5V above the output voltage so that the diode bridge can have at least 1.5v across it and regulator and 3.5V across it. There are two most popular types of voltage regulator. 1. The 78L05. This is a +5V, 100mA device that looks exactly like a small transistor 2. The 7805. This is a +5V, 1 A device. T0220 70.220 Input—_, Ground — Ground" oro Input —* et ‘Output / ‘Output _ Positive Regulators Negative Regulators Figure 2.13: LM7805 pin description 1N4001 +12v a 330n 100n Ov Ov cuit Figure 2.14: Standard fixed regulator In the standard circuit, the "common" terminal goes straight to ground and the output is SV. The diode across the regulator used to protects the regulator against reverse voltage from capacitor (C2) or the load if the supply is shorted to the ground. 21 2.9 OR gate The OR gate is a digital logic gate that implements logical disjunction and behaves according to the truth table. A HIGH output (1) results if one or both the inputs to the gate are HIGH (1). If neither input is HIGH, a LOW output will (0) results. input] outeur, A 7 A B/ AORB 4) i oo oO ‘Military’ OR Symbol ST oli] 4 ilo) 4 31 a) 4 “Rectangular OF Syne a) b) AY output yo 1A Input at output 1B Input @ input 1c Input 2C Input ©) 1 Input 2p input ure 2.15: OR wwe 2A Input. Gate (a) Truth Table (b) Gate vss mc symbol (©) CD 4072 Pin Diagram 22 2.10 555 Timer ‘The 555 is an integrated circuit (chip) implementing a wide range of timer and inultivibrator applications. The 555 has three operating modes: + Monostable mode: in this mode the 555 functions as a "one-shot" + Astable mode (Free Running mode in this 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, ete. * Bistable mode: in this mode the 555 can operate as a flip-flop, if the DIS pin is not connected and no capacitor is used. Uses include bouncefree latched switches, etc. NESSS aR Qe gk DISi5 3jcY THRE ZIGND Vtg Figure 2.16: NE 555 Pin Diagram 2.11 Printed Circuit Board (PCB) Printed Circuit Board is commonly known as PCBs circuit boards consist of an insulator material as a base, into which conductive strip are printed. The insulator may consist of one or numerous layers of material glued into a single enti ‘These additional layers may serve a number of purposes, including providing grounding to the board 23 PCB board design defines the electrical pathways between components and ircuit. When it is derived, or imported derived from a schematic representation of the from a schematic design, it translates the schematic symbols and libraries into physical components and connections There is also a different type of sensitized copper clay for both of the PCB types is the part on the board which makes the copper “picks up” the pattern from the layout of the PCB. There are positive sensitized and negative sensitized. Both of this type will need a different type of developing process and PCB ed board should be retains which means the black area remain black and the white areas become clear. This design layout. The polarity of the layout image for positive sensi is the opposite for the negative sensitized board. 2.12Software ‘There are many software can be used to design the circuit for this project. There is 2 type of software used to design the circuit which is Proteus VSM 6 Professional and SourceBoost IDE. Proteus VSM (Virtual System Modelling) is used to design the schematic diagram and the PCB (Printed Circuit Board), while the SourceBoost IDE is used to write the program for the PIC. 2.12.1 SourceBoost IDE, SourceBoost IDE (Integrated Development Environment) is a low cost development programming. It includes a modem editor, project manager, C, C++ and Pascal cross-compilers, Project wizard, assembler level debugger, clock accurate wulator and a number of virtual devices. 24 Ithas many features on it such as:- ‘* Project management. + Syntax colouring, auto complete, value hover, function prototype tool tips ete, © Built n debugger. + Clock accurate simulator for PIC12, PIC16 and PIC18 targets; © Built-in profiler; ‘* Support of different compilers; * Project wizard. 2.12.2 Proteus VSM 6 Professional Proteus VSM combines mixed mode on it such as SPICE circuit simulation, animated components and microprocessor models to facilitate co-simulation of complete microcontroller based designs. It is possible to develop and test designs before a physical prototype is constructed with this software. ¥->-Ei-o- +->-E ie -Using traditional design tools- — TE = eee Using Proteus VSM- Figure 2.17: Different between traditional method and Proteus VSM 6.9

S-ar putea să vă placă și