8051-Based Fuel-Level Indication and Engine-Temperature Guard for Two-Wheelers is an embedded-systems project that replaces the wobbling analog fuel needle of a commuter motorcycle or scooter with a stable digital readout, and adds an engine-temperature guard that most 100–150 cc commuter bikes simply do not have. The unit is built around the AT89S52 microcontroller (the 8051 device taught in the M-scheme Microcontroller course), an ADC0808 eight-channel analogue-to-digital converter, the tank's existing float-type fuel sender, an LM35 temperature sensor, a 16x2 LCD, a buzzer and a relay.
The rider sees fuel remaining in litres and in per cent, calibrated for the actual tank shape instead of an arbitrary needle sweep. When the tank reaches reserve (about 1.2 litres on a typical commuter), a low-fuel alert sounds. The LM35, mounted on the cylinder head of our demo rig, drives a two-stage warning: a temperature display with a slow beep at 100 °C, and a relay output that switches a cooling fan on the rig at 105 °C — both with hysteresis so the relay does not chatter.
Because the M-scheme Embedded Systems practical expects a working, tested prototype rather than a paper design, the signal-conditioning circuits are first simulated in NI Multisim / TINA, then breadboarded, calibrated against a measuring cylinder and a water bath, and finally integrated on a veroboard as a bench rig powered from a 12 V battery.
Commuter two-wheelers in India give their riders almost no reliable information about fuel level or engine temperature. The analog fuel needle swings with braking and cornering, sticks with age, and gives no warning before the tank hits reserve, so riders run dry far from a pump. Air-cooled engines carry no temperature indication at all; riders discover overheating only when the engine loses power or seizes, turning a ₹200 coolant or oil-top-up situation into a ₹4,000 rebore. What is needed is a low-cost, programmable digital instrument that reads the tank's existing sender, shows fuel in litres and per cent with a reserve alarm, measures engine temperature, and raises staged alerts with a relay output — all of which a polytechnic student can build and calibrate with the components and skills from the diploma curriculum.
Synopsis
Abstract
Two-wheelers dominate Indian roads, and the commuter segment that most diploma families ride is the worst equipped: many 100–110 cc bikes have no fuel gauge at all, and the ones that do use a bimetallic or float-driven analog needle that swings with cornering, braking and vibration. At the same time, air-cooled engines pushed through city traffic or long ghat climbs overheat with no warning until the engine seizes. This project builds a low-cost digital instrument add-on: an 8051-based fuel-level indicator and engine-temperature guard, simulated, breadboarded and tested as a bench rig.
Introduction
A stranded rider walking to a pump at night is a common scene on Tamil Nadu highways, and a seized engine from overheating is an expensive repair. Both problems are information problems: the rider does not know how much fuel is left or how hot the engine is. Clusters that show these readings cost several thousand rupees and are hard to retrofit; our target is a sub-₹1,500 add-on a diploma student can build, calibrate and demonstrate.
Existing System
Fuel level is shown by an analog needle driven by the tank's float sender; it swings, sticks and gives no reserve alarm beyond a blinking lamp on some models.
Most commuter bikes have no engine-temperature indication; a red oil lamp appears only after oil pressure is already lost.
The float sender's resistance is nonlinear across the tank, so a simple linear circuit reads wrong in the middle of the tank.
Limitations: no numeric reading, no programmable alert thresholds, no temperature sensing, and no record of what the readings were.
Proposed System
Read the existing float sender (about 10–180 Ω across our reference tank) through a divider and the ADC0808, and display fuel in litres and per cent on a 16x2 LCD, corrected by a measured calibration lookup table.
Read an LM35 fitted to the cylinder-head area of the demo rig and display temperature in °C with about 1 °C resolution.
Two-stage guard: warning (slow beep + indicator) at 100 °C, alert (continuous buzzer + relay) at 105 °C with 4 °C hysteresis; the relay drives a cooling fan on the rig to prove the output stage safely.
Low-fuel alert with blinking display when the tank reaches reserve (1.2 L).
Sensor-fault detection: an open or shorted sender shows an error code instead of a wrong reading.
Runs from the vehicle's 12 V battery through a 7805-based supply tested over 11–14.5 V.
Feasibility Study
Technical: every block — ADC interfacing, LCD, relay driving and Embedded C programming — is covered by the 34052 Microcontroller and 34066 Embedded Systems practical courses; the circuit is first proved in Multisim / TINA simulation.
Economic: the bill of materials works out to roughly ₹1,100–₹1,700, and many parts are already available in the college lab.
Operational: the unit uses the bike's own sender, needs no tank modification, and the demo rig keeps the workbench safe.
Objectives
01Interface the vehicle's existing resistive float-type fuel sender to the AT89S52 through the ADC0808 and display fuel remaining in litres and per cent on a 16x2 LCD.
02Calibrate the sender against a measuring cylinder and correct its nonlinearity with a 16-point lookup table stored in firmware.
03Measure engine temperature with an LM35 and display it with about 1 °C resolution by setting the ADC reference to 2.56 V so that one LSB equals 10 mV.
04Implement a two-stage over-temperature guard: slow beep at 100 °C and continuous buzzer with relay output at 105 °C, with hysteresis to prevent relay chatter.
05Raise a low-fuel alert with a blinking display when the tank reaches the 1.2-litre reserve mark.
06Detect sensor faults (open or shorted sender wiring) and display an error code instead of a misleading reading.
07Simulate the signal-conditioning and relay-driver circuits in NI Multisim / TINA before building, and power the unit from the vehicle's 12 V battery using a 7805 regulator.
08Verify the complete unit on a bench rig through calibration tests, threshold tests, a two-hour soak test and a supply-voltage variation test.
Scope
In scope
A single-vehicle bench demo rig: fuel sender emulated first with a 220 Ω potentiometer and then with the actual tank unit salvaged from the college's scrap commuter bike.
Fuel display (0–10 litres, per cent), reserve alert at 1.2 L, temperature display, two-stage over-temperature alert, relay-driven cooling fan on the rig.
Calibration tables, error-code handling, and a 12 V-to-5 V regulated supply tested over the bike battery's real voltage range.
Out of scope (v1)
No wiring to a running engine and no ignition cut-off — safety and road-worthiness rules both forbid it at diploma level; the guard is proved on the rig.
No speedometer, odometer or mileage calculation.
No Bluetooth app, GPS tracking or fuel-theft detection (listed under future scope).
No injection-controlled or CNG-variant engines.
Methodology
The project follows a phased build-and-test plan rather than a pure software SDLC, because every stage ends with a measurable hardware result. Reviews are timed to the M-scheme schedule: Review I after the design phase, Review II after the working breadboard.
Phase
Weeks
Activities
Deliverable
Requirement & specification
1–2
Measure the scrap bike's sender resistance at known fuel volumes; fix display formats and thresholds
Requirement sheet + test plan
Circuit design & simulation
3–4
Divider for the sender, LM35 chain, 2.56 V reference, relay driver; simulate in NI Multisim / TINA
Simulation screenshots, component list
Breadboarding
5–6
Power supply, ADC0808–AT89S52 interface, LCD on breadboard
Working sensor chains on DSO/multimeter
Firmware development
7–9
Embedded C in Keil C51: ADC read with EOC handshake, 8-sample averaging, lookup table, alerts with hysteresis, error codes
Flash-tested firmware
Integration
10
Shift to veroboard, mount LCD and relay, cable the rig
Integrated bench rig
Calibration & testing
11–12
Fuel calibration in 1 L steps, water-bath temperature test, threshold/hysteresis test, soak test, supply test
Testing approach: every sensor chain is verified against a known reference before firmware trusts it — known voltages for the ADC, a measuring cylinder for fuel, a water bath against a lab thermometer for temperature. Alert behaviour is tested at the boundaries (1.3 L, 1.1 L, 99 °C, 101 °C, 104 °C, 106 °C) and recorded in a test-case table with expected and observed results.
Architecture & tech stack
2 diagrams · 9 technologies · 2 min read
8051 microcontroller (AT89S52)
Embedded C
ADC0808 8-channel ADC
LM35 temperature sensor
Float-type fuel sender (tank unit)
16x2 LCD (HD44780)
NI Multisim / TINA circuit simulation
Keil C51 compiler (industry-standard extra)
12 V relay driver (ULN2003)
The unit is a classic sensor → converter → controller → output embedded system, organised as four blocks around the AT89S52.
flowchart LR
B["12 V vehicle battery"] --> PS["7805 regulated 5 V supply"]
F["Float fuel sender (10–180 ohm)"] --> C1["Divider: 470 ohm + sender, RC filter"]
T["LM35 on cylinder head"] --> C2["RC filter and buffer"]
C1 -->|"CH0"| A["ADC0808, Vref 2.56 V"]
C2 -->|"CH1"| A
PS --> A
A -->|"8-bit data, EOC handshake"| U["AT89S52 (8051)"]
PS --> U
U --> L["16x2 LCD (HD44780)"]
U --> Z["Buzzer"]
U --> D["ULN2003 driver"] --> RY["12 V SPDT relay"] --> FN["Cooling fan on demo rig"]
Sensing block. The float sender forms the lower leg of a divider fed from 5 V through a 470 Ω resistor, so a full tank (low resistance, about 10 Ω) reads near 0.1 V and an empty tank (about 180 Ω) reads near 1.4 V — safely inside the ADC's 2.56 V span and inverted in firmware. An RC filter removes the sender's noise; the LM35 output is filtered and buffered before CH1.
Conversion block. The ADC0808 is chosen because the 8051 has no on-chip ADC. Its Vref(+) is set to 2.56 V with a TL431 reference so that one LSB = 10 mV, which matches the LM35's 10 mV/°C scale exactly — one count is one degree. Channel selection is on ADDA/ADDB/ADDC, and the ALE/START and EOC lines handshake with the controller.
Control block. Firmware in Embedded C averages eight samples per channel, converts fuel counts through the lookup table and temperature counts directly in °C, refreshes the LCD every 500 ms, and evaluates the alert rules with hysteresis.
flowchart TD
S["Main loop (every 500 ms)"] --> R["Read CH0 and CH1, average 8 samples"]
R --> C["Convert: fuel via lookup table, temp in deg C"]
C --> D["Update LCD: litres, per cent, temperature"]
D --> Q1{"Fuel below reserve?"}
Q1 -->|Yes| A1["Blink fuel field, short beep"]
Q1 -->|No| Q2
A1 --> Q2{"Temp above 105 deg C?"}
Q2 -->|Yes| A2["Continuous buzzer, relay energised"]
Q2 -->|No| Q3{"Temp above 100 deg C?"}
Q3 -->|Yes| A3["Warning indicator, slow beep"]
Q3 -->|No| S
A2 --> S
A3 --> S
Output block. Port pins drive the buzzer directly and the relay through the ULN2003 Darlington array with a flyback diode, so the inductive load never stresses the controller.
Modules
6 modules
Module 01
Fuel-Level Sensing & Calibration (Member 1)
Member 1 characterises the scrap bike's float sender (resistance at each litre from empty to full), designs the 470 Ω divider and RC filter so the span fits the ADC's 2.56 V reference, simulates it in Multisim / TINA, and produces the 16-point lookup table that the firmware uses to convert counts to litres.
Module 02
Temperature Chain & Voltage Reference (Member 2)
Member 2 builds the LM35 conditioning circuit, sets up the TL431-based 2.56 V reference that gives 10 mV per LSB, verifies the chain in a water bath against a lab thermometer, and selects the 100 °C and 105 °C thresholds from service-manual guidance for air-cooled engines.
Module 03
ADC & Microcontroller Interface (Member 3)
Member 3 wires the ADC0808 to the AT89S52 (data on Port 0 with pull-ups, ADDA–ADDC channel select, ALE/START and EOC handshake), writes and debugs the read routine in Embedded C on Keil, and ensures a missed or stuck EOC raises the sensor-fault error code.
Module 04
Display & Alert Firmware
Jointly owned by Members 2 and 3: the HD44780 LCD driver (8-bit mode, custom fuel-pump and thermometer glyphs), the 500 ms refresh loop, the reserve-alert blink, the two-stage buzzer pattern, and the hysteresis logic that holds the relay until the temperature falls below 101 °C.
Module 05
Output Stage & Power Supply (Member 3, reviewed by Member 1)
ULN2003-driven 12 V relay with flyback diode switching the rig's cooling fan, the buzzer driver, and the 7805 supply with input protection diodes, sized and soak-tested across the 11–14.5 V range a motorcycle battery actually presents while running.
Module 06
Rig Integration & Test Records
The whole team assembles the veroboard and rig, then runs and records the formal test set: ADC linearity against known voltages, fuel calibration in 1 L steps, water-bath temperature errors, threshold and hysteresis boundary tests, a two-hour soak test and a 500-cycle relay endurance check, each entered in the report's test-case tables.
Slides
12 slides · titles free · bullets, notes and the .pptx unlock
Slide 1
Fuel-Level Indication & Engine-Temperature Guard for Two-Wheelers
Slide 2
Introduction
Slide 3
Problem Statement
Slide 4
Existing vs Proposed System
Slide 5
Objectives
Slide 6
System Block Diagram
Slide 7
Sensing & Signal Conditioning
Slide 8
Firmware Logic
Slide 9
Simulation & Calibration
Slide 10
Testing & Results
Slide 11
Cost Estimate & Applications
Slide 12
Conclusion & Future Scope
Bullets, speaker notes and the .pptx · ₹2,000
The titles above are the real outline. The rest is what you present from.
Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.
01Concept
Why does your design need an external ADC0808 when the AT89S52 is the heart of the project?
The 8051 family is an all-digital controller: its ports read only logic levels and it has no on-chip analogue-to-digital converter. The fuel sender and the LM35 both produce analogue voltages, so the ADC0808, an eight-channel successive-approximation converter, digitises them and hands the 8051 an eight-bit result through its data port using the ALE/START and EOC handshake.
02Concept
Why did you set the ADC reference voltage to 2.56 V instead of using the 5 V supply?
With a 2.56 V reference, one LSB works out to exactly 10 mV, which matches the LM35's scale of 10 mV per degree Celsius. So one ADC count is one degree and the firmware needs no scaling arithmetic. Our fuel divider was designed to keep its span between 0.1 and 1.4 V, comfortably inside the reduced reference range, with the trade-off of slightly coarser absolute accuracy, which the calibration absorbs.
03Concept
What is hysteresis and where does your project use it?
Hysteresis means the turn-on and turn-off conditions are set at different levels so a signal hovering near the threshold cannot switch the output on and off repeatedly. Our guard warns at 100 °C, energises the relay at 105 °C, and releases the relay only when the temperature falls below about 101 °C. Without that 4 °C band, the relay around the threshold would chatter and its contacts would wear out quickly.
+12 more questions, with answers
Try the free ones out loud first. Your examiner will not accept “it's in the PPT”.
Muhammad Ali Mazidi, Janice Gillispie Mazidi and Rolin D. McKinlay, The 8051 Microcontroller and Embedded Systems Using Assembly and C, 2nd ed., Pearson
Cylinder and toggle sizing from bending and shear forces, two-hand safety control, shop-floor build and a stopwatch comparison with hammer-and-drill work.
CAD drawings (2D AutoCAD / 3D modelling) and ISO 1219 pneumatic circuit symbols
Double-acting cylinder, 5/2 valves, FRL unit, flow-control valves