Smart Fuel Theft Detection using Microcontroller ARM7

DOI : 10.17577/IJERTV4IS090155

Download Full-Text PDF Cite this Publication

  • Open Access
  • Total Downloads : 2664
  • Authors : Nandini Hiremath, Mrunali Kumbhar, Aakriti Singh Pathania, Vinod Patil
  • Paper ID : IJERTV4IS090155
  • Volume & Issue : Volume 04, Issue 09 (September 2015)
  • DOI :
  • Published (First Online): 12-09-2015
  • ISSN (Online) : 2278-0181
  • Publisher Name : IJERT
  • License: Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 International License

Text Only Version

Smart Fuel Theft Detection using Microcontroller ARM7

Nandini Hiremath ,

Mrunali Kumbhar1, Aakriti Singh Pathania

1 Electronics and Telecommunication Engineering Department, Bharati Vidyapeeth Deemed University College of Engineering,

Pune-411043, India.

Vinod Patil


Electronics and Telecommunication Engineering Department, Bharati Vidyapeeth

Deemed University College of Engineering, Pune-411043, India.

Abstract – With rising prices of oil, fuel theft has become a very common incidence. From economic point of view a system is devised that will take care of these practices. This system makes use of smart fuel theft detection with GSM alert and GPS tracking system. Using the ARM7 microcontroller, the real time position of vehicle and its fuel content is sent to owners mobile in case of intrusion.

The system includes GPS module, Microcontroller, GSM module, LCD and a keypad. The GPS module transmits coordinates to the microcontroller that converts the data which is sent to the user in text format. This text message contains longitude and latitude of the location. This smart system gives 24x7access to fuel consumption, alerts when fuel drains and storage tank leaks immediately identified.

Keywords : ARM7, GPS module, SIM900, ADC, MAX232.


    All internal combustion engines running on liquid fuel have to be very fuel efficient from economic point of view. All these engines are equipped with most advanced automated fuel indication devices. These are system built devices. There should be some provision at the user level to know the quantity of fuel at all times. The safety and security of fuel is of utmost importance. In the recent years, escalating oil demands and costs of fuel are increasing. This indirectly increases the overheads of many businesses and those with large vehicle fleets.

    Global oil supply and demand forecasts for 2015 have changed significantly recently, but these changes have largely cancelled each other out: the outlook is still one of a market roughly in balance. However, it is at times of rapid market change that forecasting becomes most difficult. In July of 2014, before crude prices collapsed, forecasts from the International Energy Agency, US Energy Information Administration and OPEC suggested that world oil demand would rise by about 1.35 million b/d in 2015 and that the global supply/demand balance would be very slightly positive.

    To cater the needs of fuel savings due to a one of the few above mentioned problems, the SIM 900 GSM module is used over a Global System for Mobile Communications (GSM) network to provide a practical and cost-effective remote fuel-level monitoring system.

    A study conducted by Reza et al. on automated water level sensing and controlling used microcontrollers. However this was implemented locally. Later work was carried out using embedded control based system for remote monitoring of fuel level. Hemnandan et al.

    Aher and Kokate [1] studied fuel monitoring and vehicle tracking system using microprocessor-based control system. Senthilraja et al. made use of third party monitoring software for detection of fuel theft and vehicle position. The system consisted of an ultrasonic fuel sensor, numeric lock, and third party monitoring software for providing indication about fuel theft. Work done by authors are large and a few of them are mentioned here. This work will help to provide periodic details about fuel level, vehicle position and will also help to track fuel theft.

    The current research has been designed to work with GPS and GSM technology. This technology receives the coordinates from the satellites along with other critical information. It generates a message, whenever an intruder tries to gain unauthorized access of the vehicle. GSM being one of the most popular and used mean of mobile communication makes it viable and unique in a way that many of the systems / applications designed can be made to work with GSM because it is a worldwide used, implemented and followed standards [2][3].

    The system is microcontroller based that consists of a global positioning system (GPS) and global system for mobile communication (GSM). This project uses only one GPS device and a two way communication process is achieved using a GSM modem. GSM modem, provided with a SIM card uses the same communication process as we are using in regular phone.

    The work includes the design and construction of a remote fuel-level sensor followed by remote monitoring of the fuel level. Monitoring is done by sending messages from a compatible mobile phone. Messages are sent to the owner at regular interval of time. One more distinguishing feature of this research is the locking of vehicle using remote password. Siren can also be enabled during intrusion.

    This fuel-level monitoring system will ensure efficient use of fuel, minimize operating cost, and help realize maximum profit. This system is user friendly, easily to install and low cost.


    The research work was carried out by making use of ARM7LPC2148, GPS module and GSM module. The Power supply for the entire system is 3.3V & 5V. Alphanumeric keypad is used to enter security code. GPS module is used to find the used to display the co-ordinates of any location with the help of GSM module. The system architecture is shown in Fig.1.

    Fig.1 : System Architecture

    Hardware Components

    1. ARM7TDMI Processor : – Increasingly, embedded systems developers and system-on-chip designers select specific microprocessor cores and a family of tools, libraries, and off-the-shelf components to quickly develop new microprocessor-based products and applications. ARM is one of the major options available for embedded system developer. Over the last few years, the ARM architecture has become the most pervasive 32-bit architecture in the world, with wide range of ICs available from various IC manufacturers. ARM processors are embedded in products ranging from cell/mobile phones to automotive braking systems. ARM7 is one of the widely used micro-controller family in embedded system application. T-D-M-I stands for : T stands for Thumb, which is a 16-bit instruction, set extension to the 32-bit ARM architecture, referred as states of the processor. D and I together comprise the on-chip debug facilities offered on all ARM cores. These stand for the Debug signals and Embedded ICE logic, respectively. M signifies the support for 64-bit results and an enhanced multiplier, resulting in higher performance. This multiplier is now standard on all ARMv4 architectures and above. The LPC2138 microcontrollers are based on a 16/32-bit ARM7TDMI-S CPU with real-time emulation and embedded traces upport, that combine the microcontroller with 32 kB, 64 kB, 128 kB, 256 kB and 512 kB of embedded high-speed flash memory. A 128-bit wide memory interface and a unique accelerator architecture enable 32-bit code execution at maximum clock rate. For critical code size applications, the alternative 16-bit Thumb mode reduces code by more than 30 % with minimal performance penalty. Due to their tiny size and low power consumption, these microcontrollers are ideal for applications where miniaturization is a key requirement, such as access control and point-of-sale. With a wide range of serial communications interfaces and on-chip SRAM

      options of 8 kB, 16 kB, and 32 kB, they are very well suited for communication gateways and protocol converters, soft modems, voice recognition and low-end imaging, providing both large buffer size and high processing power. Various 32-bit timers, single or dual

      10-bit 8-channel ADC(s), 10-bit DAC, PWM channels and

      47 GPIO lines with up to nine edge or level sensitive external interrupt pins make these microcontrollers particularly suitable for industrial control and medical systems.

      ARM7 consists of number of peripherals interfaced to it, some of them being alphanumeric keypad, LCD display etc. It is a link between GPS and GSM modules for communication.

      Key features common for LPC213x and LPC213x/01

      • 16/32-bit ARM7TDMI-S micro controller in a tiny LQFP64 or HVQFN64 package.

      • 8/16/32 kB of on-chip static RAM and 32/64/128/256/512 kB of on-chip flash program memory. 128-bit wide interface/accelerator enables high-speed 60 MHz operation.

      • In-System Programming/In-Application Programming (ISP/IAP) via on-chip bootloader software. Single flash sector or full chip erase in 400 ms and programming of 256 B in 1 ms.

      • EmbeddedICE RT and Embedded Trace interfaces offer real-time debugging with the on-chip RealMonitor software and high-speed tracing of instruction execution.

        • One (LPC2131/32) or two (LPC 2134/36/38) 8-channel 10-bit ADCs provide a total of up to 16 analog inputs, with conversion times as low as 2.44s per channel.

        • Single 10-bit DAC provides variable analog output (LPC2132/34/36/38).

        • Two 32-bit timers/external event counters (with four capture and four compare channels each), PWM unit (six outputs) and watchdog.

        • Low power Real-time clock with independent power and dedicated 32 kHz clock input.

        • Multiple serial interfaces including two UARTs (16C550), two Fast I2C-bus (400 kbit/s), SPI and SSP with buffering and variable data length capabilities.

        • Vectored interrupt controller with configurable priorities and vector addresses.

        • Up to forty-seven 5 V tolerant general purpose I/O pins in tiny LQFP64 or HVQFN package.

        • Up to nine edge or level sensitive external interrupt pins available.

        • 60 MHz maximum CPU clock available from programmable on-chip PLL with settling time of 100


        • On-chip integrated oscillator

        • operates with external crystal in range of 1 to 30 MHz and with external oscillator upto 50 MHz.

        • Power saving modes include Idle and Power-down.

        • Individual enable /disable of peripheral functions as well as peripheral clock scaling down for additional power optimization.

        • Processor wake-up from power-down mode via external interrupt or BOD.

        • Single power supply chip with POR and BOD circuits.

        • CPU operating voltage range of 3.0V to 3.6V with 5V tolerant I/O pads [4].

    2. GPS module

      The GPS module continuously transmits serial data (RS232 protocol) in the form of sentences according to NMEA standards. The latitude and longitude values of the location are contained in the GPGGA sentence. To communicate over UART or USART, we just need three basic signals which are namely, RXD (receive), TXD (transmit), GND (common ground). The data is received from satellite to LPC2148 Primer Board by using GPS module through UART0. The serial data is taken from the GPS module through MAX232 into the SBUF register of LPC2138 microcontroller. The serial data from the GPS receiver is taken by using the Serial Interrupt of the controller. This data consists of a sequence of NMEA sentences from which GPGGA sentence is identified and processed. The GPS interfaced with Microcontroller using MAX232 is shown in fig.2.

      Fig. 2 : Schematic diagram of GPS module

    3. GSM SIM 900 Module.

      GSM (Global System for Mobile communication) is a digital mobile telephony system used to send short text messages. This is a wireless system with no limits to distance. During intrusion sms is sent to the predefined number through the GSM. In this system GSM SIM 900 module is made use of.

      The SIM900 is a complete Quad-band GSM/GPRS solution in a SMT module which can be embedded in the customer applications. Featuring an industry-standard interface, the SIM900 delivers GSM/GPRS 850/900/1800/1900MHz performance for voice, SMS, Data, and Fax in a small form factor and with low power consumption. With a tiny configuration of 24mm x 24mm x 3mm, SIM900 can fit almost all the space requirements in your M2M application, especially for slim and compact demand of design.

      • SIM900 is designed with a very powerful single-chip processor integrating AMR926EJ-S core

      • Quad – band GSM/GPRS module with a size of 24mmx24mmx3mm

      • SMT type suit for customer application

      • An embedded Powerful TCP/IP protocol stack

      • Supply voltage range : 3.2 to 4.8V

      • Low power consumption: 1.0 mA (sleep mode & BS- PAMFRMS=9 )

      • Operation temperature: -40°C to +85 °C

        This component digitizes and compresses the data and sends it along with two other streams of user data, each in its own time slot. The modem needs only 3 wires (Tx, Rx, GND) except Power supply to interface with Microcontroller/Host PC. SIM900 is designed with power saving technique so that the current consumption is as low as 1.0 mA. SIM900 is integrated with TCP/IP protocol. It can send and read SMS, connect to internet via GPRS through simple AT commands [5]. Fig.3 below shows the image of SIM900 and fig.4 shows the GSM modem along with SIM900 used in the present study

        Fig. 3 : Diagram of SIM900.

        Fig. 4 : SIM900 GSM Module

    4. ADC converter

      An analog-to-digital converter (ADC, A/D, or A to D) is a device that converts a continuous physical quantity (voltage) to a digital number that represents the quantity's amplitude. ADC is widely used in data acquisition, an increasing number of microcontrollers have an on-chip ADC peripheral, just like timers and USART. An on-chip ADC eliminates the need for an external ADC connection, which leaves more pins for other I/O activities. Most important specification of ADCs is the resolution. This specifies how accurately the ADC measures the analog input signals. Common ADCs are 8 bit, 10 bit and 12 bit. For example if the reference voltage of ADC is 0 to 5v then a 8 bit ADC will break it in 256 divisions so it can measure it accurately up to 5/256 v = 19mV approx. While the 10 bit ADC will break the range in 5/1024 = 4.8mV approx.

      So you can see that the 8 bit ADC cant tell the difference between 1mV and 18mV. The ADC in PIC18 is 10 bit.

      The A/D Converters on the LPC2138 are able to run at a maximum speed of 4.5MHz. The conversion speed is selectable by the user, but the only catch is that to arrive at a number equal to or less than 4.5MHz, we need to 'divide' our PCLK (the speed at which our microprocessor is running) by a fixed number, which we provide (in binary format).

    5. LCD

      LCDs are used to display the text messages. A 16×2 LCD displays 2 lines with 16 characters per line. Each character in the LCD is displayed in 5×7 pixel matrix. LCD can store the command instruction given to it for performing a definite task (clear screen, adjust cursor position) while the data register stores the data to be displayed on LCD screen.

    6. Keypad

    Keypad is a device used to provide input to the microcontroller. The keypad consists of

    microswitches which are connected to the microcontroller pins in a matrix format. Each key is assigned with the special character or symbol or digit. An alphanumeric keypad is keypad containing 26 alphabets, 0-9 numericals and a few greek symbols. Such keypads are commonly used in mobile phones to write an SMS and other texts. It can have further applications in displaying instant messages on other display systems such as LED/LCD matrices or other multi-segment displays. The keypad used in this research work is shown in fig.5.

    to supply RS232 voltage levels from a single 5V supply. Each receiver converts RS232 inputs to5V TTL/CMOS levels. These receivers (R1 & R2) can accept ±30V inputs. The drivers (T1 & T2), also called transmitters, convert the TTL/CMOS input level into RS232 level. The transmitters take input from controllers serial transmission pin and send the output to RS232s receiver. The receivers, on the other hand, take input from transmission pin of RS232 serial port and give serial output to microcontrollers receiver pin. MAX232 needs four external capacitors whose value ranges from 1µF to 22µF [6][7].

    RS232 is internationally defined standard named as EIA/TIA-232-E and in this standard logic 0 is the voltage between +3 to +15 and logic 1 is defined as the voltage between -3 to -15.In TTL logic 0 is defined is by 0 volt and 1 is defined by 5 volt so in this scenario this is a very handy IC to be incorporated. Fig.6 shows the pin configuration of MAX232 and table 1 explains the pin description.

    Fig. 6 : Pin Configuration for MAX232 Table 1 : Pin Description

    Pin No





    Positive lead of C1 capacitor



    Positive charge pump o/p for

    storage capacitor only



    Negative lead of C1 capacitor



    Positive lead of C2 capacitor



    Negative lead of C2 capacitor



    Negative charge pump o/p for

    storage capacitor only

    7, 14

    T2 OUT, T1


    RS232 line data output (to

    remote RS232 system)

    8, 13

    R2 IN, R1 IN

    RS232 line data input to remote

    RS232 system)


    R2 OUT, R1


    Logic data output (to UART) at

    TTL logic level

    10, 11

    T2 IN, T1 IN

    Logic data input (to UART) at

    TTL logic level



    Ground (0V)



    Supply voltage, 5V (4.5V


    Fig.5 : Alphanumeric keypad

    7 . MAX232

    Max232 is an IC is widely used in RS232 Communication systems in which the conversion of voltage level is required to make TTL devices to be compatible with PC serial port and vice versa. This chip contains charge pumps which pumps the voltage to the Desired Level. It can be powered by a single +5 volt power supply and its output can reach ±7.5 volts. It can be used as a hardware layer convertor for 2 systems to communicate simultaneously. Premierly MAX232 is used in Serial communication. Problem arises when we have to communicate between TTL logic and CMOS logic based systems. The intermediate link is provided through MAX232. It is a dual driver/receiver that includes a capacitive voltage generator

    8. Sensors

    The float operated level switch used for fuel tank is shown in fig. 7. However for more sensibility, accuracy and reliability the advanced version of switches are also available.

    Fig. 7: Fuel tank level sensor

    The components that are described above all assembled together which is shown in fig.8. Experimental runs was carried out on this circuit and the results were obtained were found to be quite satisfactory.

    Fig. 8 : Full Assembled Circuit of Fuel Theft Detection.


It is basically a low level programming language to program a microcontroller. The action to be taken by the microcontroller depends on the type of signal received which in turn depends on the programming language. The flow diagram is shown below (fig. 9) along with the algorithm.


    It is basically a low level programming language to program a microcontroller. The action to be taken by the microcontroller depends on the type of signal received which in turn depends on the programming language. The flow diagram is shown below (fig. 9) along with the algorithm.

    Fig. 9 : Signal flow diagram


    The algorithm for the flow sheet mentioned in fig. 9 is explained here.

    Step 1 : Start the process

    Step 2 : Enter unlock Keypad code Step 3 : Check fuel level

    Step 4 : Is fuel below the range? If YES then goto Step

    5. If NO the message will not be sent to owner. Step 5 : Send text message to owner

    Step 6 : Buzzer is ON .

    Step 7 : Check the buzzer is stopped within 2 minutes. Step 8 : Send message to police station & owner.

    Step 9 : Stop


    The user can access the quantity of fuel in the tank through this GSM and GPS technology. The keypad is unlocked using the secret password. A signal is sent for fuel verification. If fuel is beyond the range of the sensor the buzzer will go on for two minutes and simultaneously a text message is sent to the owner. The intruder cant stop the buzzer and if the buzzer is not stopped within two minutes then it will be treated as a theft of fuel and vehicle and a message is sent to the police station and to previously stored numbers with co-ordinates of that location.


    • Reduction in fuel expenses by about 23%

    • 24×7 access to fuel consumption

    • Fuel drain alerted along with time and location

    • Information of balance of fuel remaining in the tank

    • Secured access to fuel tank.

    • Any leaks in the fuel tank is immediately detected.


Due to rising prices of fuel the need for tracking fuel theft is necessary. Whenever there is intrusion or tampering of fuel and fuel tank the smart system is activated giving the owner the precise indication of vehicle and its fuel content. The basic purpose of this work which is security that is provided by the GPS and GSM module functioning. In this research work an advance and cost effective approach for fuel security has been proposed. It can be installed in a small space which cannot be easily accessed. The distinct feature of this system is, it continuously sends the text message to the owner until the owner acknowledges in return. Even though these and many systems are in use but most of them are either expensive, unreliable, complicated in design occupying more space and ineffective for long distance signal transmission. Further improvement can be done by making use of advanced sensors, SIM, microcontrollers to make it full proof.


  1. SS Aher, RD Kokate, Fuel monitoring and vehicle tracking. Int. J. Eng. Innovat. Technol. 1(3), 166169 (2012)

  2. Huang, H., Xiao, S., Meng , X., and Xiong, Y., A Remote Home Security System Based on Wireless Sensor Network and GSM Technology, Proceedings of Second International Conference on Networks Security, Wireless Communications and Trusted Computing, 2010. (Conference Proceedings)

  3. B.G. Nagaraja, Ravi Rayappa, M. Mahesh, Chandrasekhar M. Patil, Dr.T.C. Manjunath:-Design & Development of a GSM Based Vehicle Theft Control System 978-0-7695-3516-6/08 ©2008 IEEE, DOI 10.1109/ICACC.2009.154, pp.148-152.

[4] LPC2131/32/34/36/38, Single-chip 16/32-bit microcontrollers; 32/ 64/ 128/256/512 kB ISP/IAP flash with 10- bit ADC and DAC. Rev. 5.1- 29 July 2011. http:// documents /data sheet/LPC2131_32_34_36_38. pdf.

  1. SIM900, The GSM/GPRS module for M2Mapplications.http://www.propox. com/download/docs/SIM900 .pdf.

  2. MAX232x EIA-232 Drivers / Receivers. SLLS047M February 1989 Revised November 2014 ds/symlink/max232.pdf

  3. MAX232 datasheet. http://www. components/max232- datasheet.

Leave a Reply