Published on


Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 1 CHAPTER-1 INTRODUCTION It is microcontroller based project which controls whole assembly i.e. smart card, motor, relay. Basically it includes mathematical calculations which decides motor ON & OFF period. It also provides onsite recharge facility. The main attraction of this project is that it eliminates human interaction (serviceman) & avoids situation of black selling as there is no serviceman. Basically smart card and microcontroller communicate with I2C protocol. In this microcontroller acts as master device while smart card acts as slave device. On completion of transaction balance (money) is deducted from card and updated balance is shown again. While in case of low balance transaction cannot complete and respective message is shown on display. The automation covers various aspects of the outlets, including level gauges in underground tanks and gauges to check quality parameters of the fuel. Every time fuel is dispensed, a bill, giving details of the date, time, quantity of the purchase, the pump and the attendant who delivered the product, will be generated automatically. Automation of pumps will give oil companies accurate data on sales and control over any adulteration, which might happen at the retail end. These benefits will also flow to the customer. The next step is to bring in a vehicle identification unit within the vehicle. This will allow the petrol pump to recognize the vehicle, fill it up and add the amount to the customer’s credit card, in a cashless transaction. This “unit” is an RFID chip on a fob that is read when in proximity to the pump, or when the customer waves it close to the reader.“This will help fleet owners who are concerned over theft, besides being a convenience. The system will not allow a driver to divert fuel from the vehicle’s fuel tank to a jerry can, for instance.
  2. 2. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 2 CHAPTER-2 BLOCK DIAGRAM & EXPLANATION 2.1 Block Diagram Fig 1: block diagram of petrol bunk automation with prepaid cards & GSM communication
  3. 3. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 3 2.2. BLOCK DIAGRAM EXPLANATION 1. dsPIC 30F4013 Microcontroller unit - Serves as a central processing unit. 2. Mobile phone - Interfaces to the UART of the controlled and used to send SMS Message to the user. 3. Relay Driver and Relays - relay drivers are used to drive the electromagnetic relay and relays act as a electromagnetic switch for the Pump and motors. 4. LCD Display - Used to display the events. 5 .Power Supply unit - Generates DC Power supply for the total unit from the 230V AC supply. 6. Keypad - Keypad is used to set the amount of fuel to the filled in. 7. Alarm - Alarm is actuated when there is a wrong card or when no balance is available. 8. Smoke sensor - Used to detect any smoke in the area. 9. Infra red Level sensors - Used to sense the fuel level available in the tank. 10. Engine Switch - Used to switch off engine when found on.
  4. 4. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 4 This project is designed with microcontroller, Embedded or RFID card, RFID reader, Relay driver circuit with relay and keypad. Each vehicle is fitted with a prepaid card. When a car has arrived at the gate, the RFID reader reads the card and opens the gate, only when the card is a valid card. Once entered the user will be shown the balance amount available on the card and he must select a option to dispense the fuel based on litres or rupees. The system should check whether the user has entered a valid data i.e., the amount should not exceed the balance available in the card. After ensuring that, a motor is actuated to dispense the fuel. Once this is done, the information such as available balance is sent to the user’s mobile phone using GSM technology. In other words In this project the customer having the RFID card. The card is nothing magnetic member is embedded in the card. The reader circuit generates majestic signal to read the majestic number. When customer shows this card on the reader, the reader reads that majestic number and given the corresponding signal to microcontroller. In microcontroller we have already programmed. So it checks the number whether it is related to Hindus than Petroleum, Bharat Petroleum or Reliance Petroleum card corresponding information is displayed on the LCD display. The keypad is used to enter the quantity of petrol. In microcontroller we already set time for liters. When you entered the designed quantity on the keypad the microcontroller activates the relay driver for that particular time period. The driver circuit is used to turn ON, turn OFF the relays. Relay output is directly connected to petrol pump. So it pumps the petrol as per our designed quantity entered in the keypad. The petrol quantity and their corresponding cost are displayed on the LCD display. Hence this project made the automated petrol bunk in coder to save time and manpower.
  5. 5. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 5 CHAPTER-3 HARDWARE USED 3.1 DsPIC30F4013 microcontroller unit: 3.1.1 Microcontroller Introduction: A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications. Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, toys and other embedded systems. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems. Fig 2: Microcontroller(IC)
  6. 6. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 6 3.1.2 Microcontroller features: A micro-controller is a single IC, commonly with the following features:  Central processing unit - ranging from small and simple 4-bit processors to complex 32- or 64-bit processors  ROM, EPROM, EEPROM or Flash memory for program and operating parameter storage and volatile memory (RAM) for data storage.  discrete input and output bits, allowing control or detection of the logic state of an individual package pin  Serial input/output such as serial ports (UARTs).  Peripherals such as timers, event counters, PWM generators, and watchdog.  Clock generator - often an oscillator for a quartz timing crystal, resonator or RC circuit.  Many include analog-to-digital converters; some include digital-to-analog converters.  USB and Ethernet are common on high end microcontrollers. 3.1.3 Types of microcontrollers:  8051 (many variations and vendors of original Intel-product)  ARM and ARM Cortex-M & Parallax Propeller .  Rabbit 2000 (8-bit)  Atmel AVR (8-bit), AVR32 (32-bit).  AT91SAM (32-bit) & PowerPC ISE  Free scale Cold fire (32-bit) and S08 (8-bit) .  Free scale 68HC11 (8-bit)  Texas Instruments TI MSP430 (16-bit) C2000 (32-bit)  Toshiba TLCS-870 (8&16 bit).
  7. 7. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 7 3.1.4 What is a PIC Microcontroller? A PIC microcontroller is a single integrated circuit small enough to fit in the palm of a hand. ‘Traditional’ microprocessor circuits contain four or five separate integrated circuits - the microprocessor (CPU) itself, an EPROM program memory chip, some RAM memory and an input/output interface. With PIC microcontrollers all these functions are included within one single package, making them cost effective and easy to use. PIC microcontrollers can be used as the ‘brain’ to control a large variety of products. In order to control devices, it is necessary to interface (or ‘connect’) them to the PIC microcontroller. This section will help to enable those with limited electronics[9] Fig3: Pin configurations of microcontroller 3.1.5 dsPIC 30F4013 microcontroller unit details:  Category : Integrated Circuits (ICs)  Family : Embedded - Microcontrollers  Series : dsPICtm 30F  Core Processor : dsPIC  Core Size : 16-Bit  Speed : 30 MIPs  Number of I /O : 30  Program Memory Size : 48KB (16K x 24)  Program Memory Type : FLASH  EEPROM Size : 1K x 8
  8. 8. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 8  RAM Size : 2K x 8  Voltage - Supply (Vcc /Vdd) : 2.5-5.5v  Data Converters : A/D 13x12b  Oscillator Type : internal Fig 4: Dspic30f4013 Block Diagram
  9. 9. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 9 3.2 Mobile phone: Interfaces to the UART of the controlled and used to send SMS Message to the user. In this project the customer having the prepaid card. The card is nothing magnetic member is embedded in the card. The reader circuit generates majestic signal to read the majestic number. When customer inserting this card on the reader, the reader reads that majestic number and given the corresponding signal to microcontroller. 3.2.1 UART: The Universal Asynchronous Receiver Transmitter or simple UART is one of the common peripheral found on microcontrollers (MCU) widely used for communication with the external devices and systems. Modules, ASIC's , and PC's are among the devices that the microcontroller can communicate to through the UART . For microcontrollers that offer this peripheral, the UART circuitry is built- in the chip and can be accessed from 2 pins, a transmitter and a receiver usually named RX and TX or RXD and TXD respectively .With such a configuration, a full duplex set up is possible. Although in some applications, such as in display modules, only the transmit pin may be utilized as the MCU only needs to send graphic information to the display. A GPS module on the other hand, may only require the UART's receive pin since the MCU only awaits the GPS data but need not sent information to the module. In any case, we can say that the UART can receive and transmit information to and from another compatible device. Fig5: functioning of UART with MCU Connecting the MCU's UART is a simple direct connection to the external device so long as both logic levels are the same. Of course, the ground connection
  10. 10. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 10 should be common for both device. Below shows the pin connection between the MCU and an external device, say, a GSM Module. Notice that the RX and TX pins are "crossed" against the other RX/TX. Since a TX is an output pin, it should be connected to an input pin and vice versa. A common mistake is to connect both RX's together and TX's in another joint. You will have to be careful though on the name given to the pins both of the MCU and the external device. The names "RX", "Receive" ,"Receiver" will often pertain to the UART's input pin relative to itself. The "TX", "Transmit" or "transmitter" pin is the output pin at the point of view of the MCU. 3.2.2 PREPAID CARD A Subscriber Identity Module (SIM) card is a portable memory chip used mostly in cell phones that operate on the Global System for Mobile Communications (GSM) network. These cards hold the personal information of the account holder, including his or her phone number, address book, text messages, and other data. Fig6 : prepaid card or smart card A smart card, chip card, or integrated circuit(s) card (ICC), is defined as any pocket-sized card with embedded integrated circuits. Although there is a diverse range of applications, there are two broad categories of ICCs. Memory cards contain
  11. 11. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 11 only non-volatile memory storage components, and perhaps some specific security logic. Microprocessor cards contain memory and microprocessor components. The standard perception of a "smart card" is a microprocessor card of credit card dimensions (or smaller, e.g. the mini GSM SIM card) with various tamper- resistant properties (e.g. a secure crypto-processor, secure file system, human- readable features) and is capable of providing security services (e.g. confidentiality of information in the memory). Not all chip cards contain a microprocessor (eg. the memory cards), therefore not all chip cards are necessarily also smart cards. However, the public usage of the terminology is often inconsistent. 3.3 Relay driver and relays Relay drivers are used to drive the electromagnetic relay and relays acts as a electromagnetic switch for the Pump and motors. which is useful if you want to use a low voltage circuit to switch on and off a light bulb (or anything else) connected to the 220v mains supply. Relays are components which allow a low-power circuit to switch a relatively high current on and off, or to control signals that must be electrically isolated from the controlling circuit itself. Fig7: Relay and its symbol A relay is an electrically operated switch. Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch
  12. 12. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 12 contacts. The coil current can be on or off so relays have two switch positions and they are double throw (changeover) switches.  The relay’s switch connections are usually labeled COM (POLE),NC &NO  COM/POLE= Common, NC and NO always connect to this, it is the moving part of the switch.  NC = Normally Closed, COM/POLE is connected to this when the relay coil is not magnetized.  NO = Normally Open, COM/POLE is connected to this when the relay coil is MAGNETIZED and vice versa. [10] There are 5 Pins in a relay. Two pins A and B are two ends of a coil that are kept inside the relay. The coil is wound on a small rod that gets magnetized whenever current passes through it.COM/POLE is always connected to NC(Normally connected) pin. As current is passed through the coil A, B, the pole gets connected to NO (Normally Open) pin of the relay. The current needed to operate the relay coil is more than can be supplied by most chips (op. amps etc), so a transistor is usually needed, as shown in the diagram below.
  13. 13. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 13 Fig 8: Relay with transistor 3.4 LCD display 3.4.1 Basics of LCD Displays:- The liquid-crystal display has the distinct advantage of having low power consumption than the LED. It is typically of the order of microwatts for the display in comparison to the some order of mill watts for LEDs. Low power consumption requirement has made it compatible with MOS integrated logic circuit. Its other advantages are its low cost, and good contrast. The main drawbacks of LCDs are additional requirement of light source, a limited temperature range of operation (between 0 and 60° C), low reliability, short operating life, poor visibility in low ambient lighting, slow speed and the need for an ac drive. 3.4.2 Basic structure of an LCD A liquid crystal cell consists of a thin layer (about 10 u m) of a liquid crystal sandwiched between two glass sheets with transparent electrodes deposited on their inside faces. With both glass sheets transparent, the cell is known as transmittive type cell. When one glass is transparent and the other has a reflective coating, the cell is called reflective type. The LCD does not produce any illumination of its own. It, in fact, depends entirely on illumination falling on it from an external source for its visual effect. [11] Fig9: Block Diagram of LCD Display
  14. 14. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 14 3.4.3 Types of LCD Two types of display available are dynamic scattering display and field effect display. 1. Dynamic scattering display is energized , the molecules of energized area of the display become turbulent and scatter light in all directions. Consequently, the activated areas take on a frosted glass appearance resulting in a silver display. Of course, the UN energized areas remain translucent. 2. Field effect LCD contains front and back polarizer’s at right angles to each other. Without electrical excitation, the light coming through the front polarizer is rotated 90° in the fluid. Now, let us take a look at the different varieties of liquid crystals that are available for industrial purposes. The most usable liquid crystal among all the others is the pneumatic phase liquid crystals. Most of the LCD Displays available in the market are 16X2 (That means, the LCD displays are capable of displaying 2 lines each having 16 Characters a), 20X4 LCD Displays (4 lines, 20 characters). It has 14 pins. It uses 8lines for parallel data plus 3 control signals, 2 connections to power, one more for contrast adjustment and two connections for LED back light. 16×2 LCD module is a very common type of LCD module that is used in 8051 based embedded projects. It consists of 16 rows and 2 columns of 5×7 or 5×8 LCD dot matrices. The module were are talking about here is type number JHD162A which is a very popular one . It is available in a 16 pin package with back light, contrast adjustment function and each dot matrix has 5×8 dot resolution. 3.4.4 16X2 LCD character display: VEE pin is meant for adjusting the contrast of the LCD display and the contrast can be adjusted by varying the voltage at this pin. This is done by connecting one end of a POT to the Vcc (5V), other end to the Ground and connecting the center terminal (wiper) of of the POT to the VEE pin. See the circuit diagram for better understanding. The JHD162A has two built in registers namely data register and command register. Data register is for placing the data to be displayed , and the command register is to place the commands.
  15. 15. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 15 The 16×2 LCD module has a set of commands each meant for doing a particular job with the display. We will discuss in detail about the commands later. High logic at the RS pin will select the data register and Low logic at the RS pin will select the command register. If we make the RS pin high and the put a data in the 8 bit data line (DB0 to DB7) , the LCD module will recognize it as a data to be displayed . If we make RS pin low and put a data on the data line, the module will recognize it as a command. Pin No: Name Function 1 VSS This pin must be connected to the ground 2 VCC Positive supply voltage pin (5V DC) 3 VEE Contrast adjustment 4 RS Register selection 5 R/W Read or write 6 E Enable 7 DB0 Data 8 DB1 Data 9 DB2 Data 10 DB3 Data 11 DB4 Data 12 DB5 Data 13 DB6 Data 14 DB7 Data 15 LED+ Back light LED+ 16 LED- Back light LED- Table 1: Pin Configuration of a 16X2 LCD character display: R/W pin is meant for selecting between read and write modes. High level at this pin enables read mode and low level at this pin enables write mode. E pin is for enabling the module. A high to low transition at this pin will enable the module.
  16. 16. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 16 DB0 to DB7 are the data pins. The data to be displayed and the command instructions are placed on these pins. LED+ is the anode of the back light LED and this pin must be connected to Vcc through a suitable series current limiting resistor. LED- is the cathode of the back light LED and this pin must be connected to ground. Fig 10-A : LCD - Front View Fig 10-B: LCD – Back View 3.4.5 Interfacing 16x2 LCD module to 8051 Fig11 : Interfacing 16x2 LCD module to 8051 circuit diagram
  17. 17. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 17 The circuit diagram given above shows how to interface a 16X2 LCD module with AT89S1 microcontroller .Capacitor C3, resistor R3and push button switch S1 forms the reset circuitry. Ceramic capacitors C1, C2 and crystal X1 is related to the clock circuitry which produces the system clock frequency. P1.0 to P1.7 pins of the microcontroller is connected to the DB0 to DB7 pins of the module respectively and through this route the data goes to the LCD module. P3.3, P3.4 and P3.5 are connected to the E, R/W, RS pins of the microcontroller and through this route the control signals are transferred to the LCD module. Resistor R1 limits the current through the back light LED and so do the back light intensity. POT R2 is used for adjusting the contrast of the display. [11] 3.4.6 LCD Characteristics: LCDs have many characteristics that have caused their demand to increase over the past several years. They are lightweight, aesthetically appealing, energy efficient and long-term cost effective. Some of the disadvantages are that they are not suitable for dimly lit applications, can require frequent adjustments throughout the day, have limited viewing angles, and their purchase cost is relatively expensive. LCD Advantages Brightness Produces very bright images due to high peak intensity. Very suitable for environments that are brightly lit . Emissions Produce considerably lower electric, magnetic and electromagnetic fields than CRTs. Geometric Distortion No geometric distortion at the native resolution. Minor distortion can occur for other resolutions. Power Consumption Energy efficient. Consume less than 1/3 the power of a comparable CRT. Consume less electricity than a CRT and produce little heat. Physical Aspects Take up about 40% less desk space. LCDs are thin and compact. Screen Shape Completely flat screen. Sharpness At the native resolution, the image is perfectly sharp. Adjustments are required at all other resolutions which can result in measurable degradation to the image. Table2: LCD advantages
  18. 18. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 18 LCD Disadvantages Aspect Ratio The aspect ratio and resolution are fixed. Black-Level Not proficient at producing black and very dark grays. In a "standard" configuration, not appropriate for use in dimly lit and dark conditions. Contrast Lower contrast than CRTs due to a poor black-level. Color and Gray-Scale Accuracy Color saturation is reduced at low intensity levels due to a poor black-level. Images are satisfactory, but not accurate due to problems with black-level, gray-scale and Gamma. Cost Considerably more expensive purchase price than comparable CRTs . (Cheaper lifetime cost: lasts about 13,000 - 15,000 more hours than a typical CRT.) Gray-Scale Have an irregular intensity scale and typically produce fewer than 256 discrete intensity levels. For some LCDs portions of the gray-scale may be dithered. Motion Artifacts Slow response times and scan rate conversion result in severe motion artifacts and image degradation for moving or rapidly changing images. Resolution Works best at the native resolution. The native resolution cannot be changed. All other resolutions require adjusting procedures which cause considerable deterioration of image. Viewing Angle Restricted viewing angles. Viewing angles affect the brightness, contrast and colors shown. Wide angles can lead to contrast and color reversal. Table 3: LCD Disadvantages Other LCD Characteristics Bad Pixels Can have many weak or stuck pixels, which are permanently on or off. Some pixels may be improperly connected to adjoining pixels, rows or columns. Interference May require frequent readjustments throughout the day due to timing drift and jitter. Analog input requires careful modification of pixel tracking / phase to decrease or eliminate digital noise in the image. Table 4: Other LCD characteristics
  19. 19. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 19 3.5 POWER SUPPLY UNIT: The purpose of a power supply is to take electrical energy in one form and convert it into another. There are many types of power supply. Most are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronic circuits and other devices such as computers, fax machines and telecommunication equipment. In Singapore, supply from 230V, 50Hz AC mains is converted into smooth DC using AC-DC power supply. A power supply can by broken down into a series of blocks, each of which performs a particular function. A transformer first steps down high voltage AC to low voltage AC. A rectifier circuit is then used to convert AC to DC. This DC, however, contains ripples, which can be smoothened by a filter circuit. Power supplies can be ‘regulated’ or ‘unregulated’. A regulated power supply maintains a constant DC output voltage through ‘feedback action’. The output voltage of an unregulated supply, on the other hand, will not remain constant. It will vary depending on varying operating conditions. 3.5.1 Regulated Power Supply: Regulated power supply is an electronic circuit that is designed to provide a constant dc voltage of predetermined value across load terminals irrespective of ac mains fluctuations or load variations. Fig12: Regulated power supply diagram For example when the magnitude of input AC voltage changes. Main components of a regulated supply to convert 230V AC voltage to 5V DC are shown below. Fig13: Block diagram of a regulated power supply
  20. 20. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 20 Power supplies are designed to produce as little ripple voltage as possible, as the ripple can cause several problems. For Example  In audio amplifiers, too much ripple shows up as an annoying 50 Hz or 100 Hz audible hum.  In video circuits, excessive ripple shows up as “hum” bars in the picture.  In digital circuits it can cause erroneous outputs from logic circuits. Fig14: Regulated Power Supply Circuit 3.5.2 Regulated Power Supply Circuit Explanation: A regulated power supply essentially con sists of an ordinary power supply and a volt age regulating device, as illustrated in the figure. The output from an ordinary power supply is fed to the voltage regulating device that provides the final output. The output voltage remains constant irrespective of variations in the ac input voltage or variations in output (or load) current. Figure given above shows the complete circuit of a regulated power supply with a transistor series regulator as a regulating device. The ac voltage, typically 230 Vrms is connected to a transformer which transforms that ac voltage to the level for the desired dc output. A bridge rectifier then provides a full-wave rectified voltage that is initially filtered by a Π (or C-L-C) filter to produce a dc voltage. The resulting dc voltage usually has some ripple or ac voltage variation. A regulating circuit use this dc input to provide a dc voltage that not only has much less ripple voltage but also remains constant even if the input dc voltage varies somewhat or the load connected to the output dc voltage changes. The regulated dc supply is available across a voltage divider. Often more than one dc voltage is required for the operation of electronic circuits. A single power supply can provide as many as voltages as are required by using a voltage (or potential) divider, as illustrated in the figure. As illustrated in the
  21. 21. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 21 figure, a potential divider is a single tapped resistor connected across the output terminals of the supply. The tapped resistor may consist of two or three resistors connected in series across the supply. In fact, bleeder resistor may also be employed as a potential divider. 3.5.3 Power Supply Characteristics There are various factors that determine the quality of the power supply like the load voltage, load current, voltage regulation, source regulation, output impedance, ripple rejection, and so on. Some of the characteristics are briefly explained below: 1. Load Regulation The load regulation or load effect is the change in regulated output voltage when the load current changes from minimum to maximum value. Load regulation = V no-load – V full-load V no-load – Load Voltage at no load V full-load – Load voltage at full load . From the above equation we can understand that when Vno-load occurs the load resistance is infinite, that is, the out terminals are open circuited. Vfull-load occurs when the load resistance is of the minimum value where voltage regulation is lost. % Load Regulation = [(V no-load – V full-load)/V full-load] * 100 2. Minimum Load Resistance The load resistance at which a power supply delivers its full-load rated current at rated voltage is referred to as minimum load resistance. Minimum Load Resistance = V full-load/I full-load The value of I full-load, full load current should never increase than that mentioned in the data sheet of the power supply. 3. Source/Line Regulation In the block diagram, the input line voltage has a nominal value of 230 Volts but in practice, here are considerable variations in ac supply mains voltage. Since this
  22. 22. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 22 ac supply mains voltage is the input to the ordinary power supply, the filtered output of the bridge rectifier is almost directly proportional to the ac mains voltage. The source regulation is defined as the change in regulated output voltage for a specified rage of lie voltage. 4. Output Impedance A regulated power supply is a very stiff dc voltage source. This means that the output resistance is very small. Even though the external load resistance is varied, almost no change is seen in the load voltage. An ideal voltage source has an output impedance of zero. 5. Ripple Rejection Voltage regulators stabilize the output voltage against variations in input voltage. Ripple is equivalent to a periodic variation in the input voltage. Thus, a voltage regulator attenuates the ripple that comes in with the unregulated input voltage. Since a voltage regulator uses negative feedback, the distortion is reduced by the same factor as the gain. [12] 3.6 KEYPAD 3.6.1 Why keypad? Keypad is a widely used input device with lots of application in our everyday life. From a simple telephone to keyboard of a computer, ATM, electronic lock, etc., keypad is used to take input from the user for further processing. 3.6.2 Keypad Invention The invention of the keypad is attributed to John E. Kerlin, an industrial psychologist at Bell Labs in Murray Hill.[1] 3.6.3 Basics Of Keypad Keypads are a part of HMI or Human Machine Interface and play really important role in a small embedded system where human interaction or human input is needed .A keypad is a set of buttons arranged in a block or "pad" which usually
  23. 23. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 23 bear digits, symbols and usually a complete set of alphabetical letters. If it mostly contains numbers then it can also be called a numeric keypad. Keypads are found on many alphanumeric keyboards and on other devices such as calculators, push-button telephones, combination locks, and digital door locks, which require mainly numeric input. Matrix keypads are well known for their simple architecture and ease of interfacing with any microcontroller. 3.6.4 Construction of a keypad Construction of a keypad is really simple. As per the outline shown in the figure below we have four rows and four columns. In between each overlapping row and column line there is a key. So keeping this outline we can construct a keypad using simple SPST Switches as shown below: Fig15: 4x4 Key pad outline Fig16: 4x4 Key pad schematic 3.6.5 Scanning a Matrix Keypad There are many methods depending on how you connect your keypad with your controller, but the basic logic is same. We make the columns as i/p and we drive the rows making them o/p, this whole procedure of reading the keyboard is called scanning. In order to detect which key is pressed from the matrix, we make row lines low one by one and read the columns. Let’s say we first make Row1 low, then read the columns. If any of the key in row1 is pressed will make the corresponding
  24. 24. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 24 column as low i.e if second key is pressed in Row1, then column2 will give low . So we come to know that key 2 of Row1 is pressed. This is how scanning is done .So to scan the keypad completely, we need to make rows low one by one and read the columns. If any of the buttons is pressed in a row, it will take the corresponding column to a low state which tells us that a key is pressed in that row. If button 1 of a row is pressed then Column 1 will become low, if button 2 then column2 and so on... Fig17: Keypad for Fueling 3.6.6 Keypad Applications:  Access Control The keypad is generally used to dial a code which allows to open a door. Typing a code often activates a relay and then the door can be opened. Generally our customers use keypads with "A" and "B" keys to replace the standard "*" and "#" keys.  Vending Machine The vending machine is used to deliver products to the consumers, without the help of any person. You put money in the machine and then you automatically get your product.
  25. 25. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 25  Security Security is more or less the same as the access control, except that security is more for a personal use whereas the access control is mainly for buildings.  Public Phones The phones are located in public environment: in the streets, in cabins, or in building. Here are our favorite products for this application:  Heavy Duty Vehicles These vehicles are used for indoor and outdoor environment; they are useful to carry heavy duties in warehouses. Our suggestion for this application [2] 3.7 ALARM Alarm is actuated when there is a wrong card or when no balance is available. 3.7.1 How Alarm Systems Work? Electronic alarm systems are made up of three component parts designed to detect, determine and deter criminal activity or other threatening situations. An alarm system can detect an event such as an invasion, fire, gas leak or environmental changes; determine if the event poses a threat; and then send a notification about the event. [3] 3.8 SMOKE SENSOR A smoke detector also called a smoke alarm is a device that detects smoke, typically as an indicator of fire. Commercial, industrial, and mass residential devices issue a signal to a fire alarm system, while household detectors, known as smoke alarms, generally issue a local audible or visual alarm from the detector itself. Smoke detectors are typically housed in a disk-shaped plastic enclosure about 150 millimeters (6 in) in diameter and 25 millimeters (1 in) thick, but the shape can vary by manufacturer or product line. Most smoke detectors work either by
  26. 26. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 26 optical detection (photoelectric) or by physical process (ionization), while others use both detection methods to increase sensitivity to smoke. Sensitive alarms can be used to detect, and thus deter, smoking in areas where it is banned such as toilets and schools. Smoke detectors in large commercial, industrial, and residential buildings are usually powered by a central fire alarm system, which is powered by the building Power with a battery backup . However, in many single family detached and smaller multiple family housings, a smoke alarm is often powered only by a single disposable battery. The two most commonly recognized smoke detection technologies are ionization smoke detection and photoelectric smoke detection. 3.8.1 Photoelectric Smoke Detection. Photoelectric smoke detection is generally more responsive to fires that begin with a long period of smoldering (called “smoldering fires”). How they work? Photoelectric-type alarms aim a light source into a sensing chamber at an angle away from the sensor. Smoke enters the chamber, reflecting light onto the light sensor; triggering the alarm. An optical detector is a light sensor. When used as a smoke detector, it includes a light source (incandescent bulb or infrared LED-Light- Emitting Diode), a lens to collimate the light into a beam, and a photodiode or other photoelectric sensor at an angle to the beam as a light detector. In the absence of smoke, the light passes in front of the detector in a straight line. When smoke enters the optical chamber across the path of the light beam, some light is scattered by the smoke particles, directing it at the sensor and thus triggering the alarm. Also seen in large rooms, such as a gymnasium or an auditorium, optical beam smoke detectors are devices that detect a projected beam. A wall-mounted unit sends out a beam, which is either received by a separate monitoring device or reflected back via a mirror. When the beam becomes less visible to the "eye" of the sensor, it sends an alarm signal to the fire alarm control panel.
  27. 27. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 27 Fig 18-A : Optical Smoke Detector Fig18-B : photoelectric(optical) detector 1: Optical chamber 2: Cover 3: Case moulding 4: Photodiode (detector) 5: Infrared LED Photoelectric smoke detection is generally more responsive to fires that begin with a long period of smoldering (called smoldering fires)." "Photoelectric alarms react slower to rapidly growing fires than ionization alarms, but laboratory and field tests have shown that photoelectric smoke alarms provide adequate warning for all types of fires and have been shown to be far less likely to be deactivated by occupants”. Although optical alarms are highly effective at detecting smoldering fires and do provide adequate protection from flaming fires. Combination ionization/photoelectric smoke alarms are controversial."Ionization smoke alarms may not operate in time to alert occupants early enough to escape from smoldering fires." However, stand-alone photoelectric smoke alarms are proven to provide adequate egress time in both the smoldering and flaming stages of fire. [4] Not all optical or photoelectric detection methods are the same. The type and sensitivity of the photodiode or optical sensor, and type of smoke chamber differ between manufacturers
  28. 28. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 28 3.8.2 Ionization smoke detection Ionization smoke detection is generally more responsive to flaming fires. How they work? Ionization-type smoke alarms have a small amount of radioactive material between two electrically charged plates, which ionize the air and causes current to flow between the plates. When smoke enters the chamber, it disrupts the flow of ions, thus reducing the flow of current and activating the alarm. An ionization smoke detector uses a radioisotope such as americium-241 to produce ionization in air; a difference due to smoke is detected and an alarm is generated. Ionization detectors are more sensitive to the flaming stage of fires than optical detectors, while optical detectors are more sensitive to fires in the early smoldering stage. [5] Fig19: Ionization smoke detector For each type of smoke alarm, the advantage it provides may be critical to life safety in some fire situations. Home fatal fires, day or night, include a large number of smoldering fires and a large number of flaming fires. You cannot predict the type
  29. 29. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 29 of fire you may have in your home or when it will occur. Any smoke alarm technology, to be acceptable, must perform acceptably for both types of fires in order to provide early warning of fire at all times of the day or night and whether you are asleep or awake. For best protection, it is recommended both (ionization and photoelectric) technologies be used in homes. In addition to individual ionization and photoelectric alarms, combination alarms that include both technologies in a single device are available. [6] 3.8.3 Smoke Detector Features  On/Off alarm signal of Smoke Detected  Accurate, cost effective Smoke Detector  LED indicates the status of Smoke Detector  Sensor type - open/closed contact switch  Power source: powered by the unit. No additional power needed.  The unit auto detects the presence of the Smoke Detector (as Dry Contact sensor)  Full Autosense including disconnect alarm (Note that the smoke detector will be detected as a Dry Contact sensor 3.9 INFRARED LEVEL SENSORS Infrared Level Sensors Used to sense the fuel level available in the tank . A sensor is able to detect a change and communicate that change with a user. The infrared sensors have been designed for use in level monitoring applications for the control of oil for transcritical or subcritical application, or screw compressors and can be fitted directly to crankcase or to the separator (internal or external) of the compressor. The switches have no moving parts, thus it is particularly suited for monitoring critical media where high reliability is needed. These level switches use infrared technology for their operation. The switch gives an alarm when low (or high) liquid level is detected. Operation mode: detect liquid presence with contact
  30. 30. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 30 Body materials: Stainless Steel with Glass sensible dome. [7] Fig20: working of level sensor Level sensors detect the level of substances that flow, including liquids, slurries, granular materials, and powders. Fluids and fluidized solids flow to become essentially level in their containers (or other physical boundaries) because of gravity whereas most bulk solids pile at an angle of repose to a peak. The substance to be measured can be inside a container or can be in its natural form (e.g., a river or a lake). The level measurement can be either continuous or point values. Continuous level sensors measure level within a specified range and determine the exact amount of substance in a certain place, while point-level sensors only indicate whether the substance is above or below the sensing point. Generally the latter detect levels that are excessively high or low. Fig21: different types and models of level sensors
  31. 31. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 31 3.10 ENGINE SWITCH Used to switch off engine when found on . Fig22: switch symbol Fig23: models of ON-OFF switch
  32. 32. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 32 CHAPTER-4 SOFTWARE 4.1 MPLAB® X IDE MPLAB® X IDE is a software program that runs on a PC (Windows , Mac OS , Linux) to develop applications for Microchip microcontrollers and digital signal controllers. It is called an Integrated Development Environment (IDE), because it provides a single integrated “environment” to develop code for embedded microcontrollers. MPLAB X Integrated Development Environment brings many changes to the PIC microcontroller development tool chain. Unlike previous versions of MPLAB which were developed completely in-house, MPLAB X is based on the open source Net Beans IDE from Oracle. Taking this path has allowed us to add many frequently requested features very quickly and easily while also providing us with a much more extensible architecture to bring you even more new features in the future. 4.2 MPLAB X IDE Features  Provides a new Call Graph for navigating complex code  Supports Multiple Configurations within your projects  Supports Multiple Versions of the same compiler  Support for multiple Debug Tools of the same type  Supports Live Parsing  Import existing MPLAB 8 projects and use eitherIDE for the same source  Supports hyperlinks for fast navigation todeclarations and includes  Supports Live Code Templates  Supports the ability to enter File Code Templates with license headers or template code  MPLAB X can Track Changes within your own system using local history  Within MPLAB X, a user can configure their own Code Format Style .[8]
  33. 33. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 33 CHAPTER-5 CONCLUSION The conclusion of this project is to provide easy access and save time in the petrol bunk. By installing this project is made the automated petrol bunk. This not only ensures accuracy, but also saves a lot of time for customers and avoids misconceptions and arguments. The customer need not wait in the petrol bunk. It reduces the time as well as man power.
  34. 34. PETROL BUNK AUTOMATION WITH PREPAID CARDS & GSM COMMUNICATION DEPT OF E.C.E S.J.C.E.T Page 34 CHAPTER-6 REFERENCES 1. "Monmouth man, inventor of touch-tone keypad, dies at 94". The Star-Ledger. February 9, 2013. Retrieved 2013-02-09. 2. out=blog&id=901&Itemid=59&lang=en. 3. file:///C:/Documents%20and%20Settings/home/Desktop/yad/alaram/How%20Alarm %20Systems%20Work.htm. 4. ^ "Positions on Smoke Alarms by Australasian Fire Authorities, Fire Safety and Consumer Organizations"( The World Fire Safety Foundation. Retrieved 2013-06-28. 5. ^Fleming, Jay. "Smoke Detector Technology Research" ( Chief-Jay-Fleming), retrieved 2011-11-07. 6. equipment/smoke-alarms/ionization-vs-photoelectric. 7. 8. 9. dsPIC30F3014, dsPIC30F4013 Data Sheet High-Performance Digital Signal Controllers, 2004 Microchip Technology Inc. 10. ( basic Electronics ( 11., note-on-character-lcd-displays 12.,Regulated Power Supply-Block Diagram, Circuit Diagram, Working.