Hump And Pothole Detection on Roads

Now we are going to demonstrate the Hump And Pothole Detection on Roads using 8051.

Hump And Pothole Detection on Roads using 8051


Many ongoing projects in the field of vehicular networks are working in the direction of providing the driver with relevant information about roads and traffic movements. One of the major problems in developing countries is the maintenance of roads. Well-maintained roads contribute a major portion to the country’s economy. And also many people are killed by unwanted potholes and humps on road. So Identification of pavement distress such as potholes and humps not only helps drivers to avoid accidents or vehicle damages but also helps authorities to maintain roads. The implementation of this service will provide users with valuable information about the conditions of roadways that will limit potential damage to the user’s vehicle or the Maintenance Authority. This project proposes a cost-effective solution to identify potholes and humps on roads and provide timely alerts to drivers to avoid accidents or vehicle damages, and also send a message to authorities. An ultrasonic sensor is used to identify potholes and humps and also to measure their depth and height respectively. The sensed data includes pothole depth, the height of the hump.


As one type of pavement distresses, a pothole is defined as a bowl-shaped depression in the pavement surface and the minimum plan dimension is 150 mm. Potholes can generate damages such as flat tire and wheel damage, impact and damage on the lower part of a vehicle, sudden braking and steering wheel operation, and vehicle collision and major accidents. During the course of this observation, we found that 17 out of 48 drivers choose to avoid depression rather than go through it. These results tell us a significant number of users care about the safety of their vehicles. With this information, it becomes apparent that there are drivers that value knowing where there are potential road hazards.

The hazard that we observed was a relatively minor depression around a steel plate. If the hazard were deeper, it is likely that more drivers would have tried to avoid it. Also, potholes are important clues indicating structural defects of the asphalt road, and accurately detecting these potholes is one of the important tasks for determining proper strategies of asphalt-surfaced pavement maintenance and rehabilitation. However, pothole detection mostly done by Maintenance departments needs to regularly assess the quality of the roads in order to properly maintain them. Currently, this is done by yearly inspections or in response to reports from the general public. The inspection is sometimes done by workers walking along the streets and recording the conditions on paper which later is put into a database. All this is performed manually, labor-intensive, and time-consuming.

Thus, this system has been made for developing a technology that can automatically detect and recognize potholes, which may contribute to the improvement of survey efficiency and pavement quality through prior investigation and immediate action. Thus, the purpose of this study is to develop a system and method for effectively detecting potholes based on video data. In this study, we developed a system that collects video data through a newly designed optical device mounted on a vehicle and a method that detects potholes.

Many reasons like rains, oil spills, road accidents or wear and tear; make the road difficult to drive upon. Also while driving in the night just the headlights might not be sufficient assistance for the driver. Unexpected hurdles on-road may cause more accidents. Also because of bad road conditions, the fuel consumption of the vehicle increases; causing wastage of precious fuel. All these reasons urge that it is important to get information about such bad road conditions, collect this information and distribute it to vehicles, which in turn can warn the driver.

In this Project, the Ultrasonic Sensor is used to find the Pothole and Humps on the roads. This Ultrasonic sensor emits the pulses at regular intervals of time; the receiver listens to the echo, and round-off time into the function of height. The Receiver detects the abrupt changes in the terrain, by comparing the round-off time. By default, the nature of the terrain has to be determined before. Thus when the Pothole is detected by the system it correspondingly sends the intimation to the Road maintenance Authority, thus this may decrease the valuable time for them in finding the Potholes in the roads.

Components Required

  • 8051 Development board
  • LCD Module
  • GSM Module
  • Ultrasonic Sensor

Software Required

  • Keil IDE


Before seeing the code, first you can see the basic interfacing tutorials of these components.

Block Diagram

Hump And Pothole Detection on Roads using 8051Explanation

  • An ultrasonic sensor is used to sense the distance, this is interfaced to the microcontroller
  • The system uses an LCD Display to display the sensor outputs and status
  • The Microcontroller block functions as the main control unit which will monitor the data from the Ultrasonic sensor and control the LCD and GSM modem
  • GSM is used to send the message when an Ultrasonic sensor finds a pothole and hump.

Circuit Diagram


  • RS – P0.0
  • RW – P0.1
  • EN – P0.2
  • Data lines – P2

Ultrasonic Sensor:

  • Trigger – P3.5
  • Echo – P3.2


  • GSM RX – P3.1
  • GSM TX – P3.0

Switch: P0.7



Here I have added only the main source code. If you want to download the full project, please visit the below link.

Please visit Here.


#define NUMBER "0123456789"  //Your mobile number

#define delay for(i=0;i<=60000;i++)

sbit sw=P0^7;

unsigned int range=0,i,k;
unsigned char snumb[10],numb[10],temp;
unsigned char hump[]="Distance:   cm,        detected";

void main(void)
    show("Loading ");
    for(k=0;k<5;k++) {
    while(1) {
        show("DISTANCE: ");
        show(" cm ");
            if(sw==0) {
                if(range<16) {
                    show("Hump Detected...");
                    hump[15]=' ';
                    hump[16]=' ';
                    hump[21]=' ';   
                    show("Sending message!");
                    show("Message Sent!!!!");
                } else if ((range>20) && (range<50)) {
                show("Pothole Detected");
                show("Sending message!");
                show("Message Sent!!!!");
            } else {
                show("<<Drive Safely>>"); 
        } else {
            show("~PLS SWITCH ON~ "); 


  • The ultrasonic sensor always detects the pothole and humps on-road and it sends the data to 8051.
  • 8051 send the details of the pothole and hump to the LCD module. LCD Module displays that data.
  • When the switch is ON If the ultrasonic sensor finds any pothole or hump it sends the message to the road authority by using GSM Module.
  • The driver should ON the switch when he starts the vehicle. If we do not provide a switch, it will always send the message unnecessarily even a car is in OFF. That’s why we kept switching there.

Anybody needs a Full Report of this project Please contact us. In the subject please mention the project name and provide your email id. Ex [Hump And Pothole Detection on Roads – Full Report] Contact Us.

Please read the other 8051 projects here.

You can also read the below tutorials.

Linux Device Driver TutorialsC Programming Tutorials
FreeRTOS TutorialsNuttX RTOS Tutorials
RTX RTOS TutorialsInterrupts Basics
I2C Protocol – Part 1 (Basics)I2C Protocol – Part 2 (Advanced Topics)
STM32 TutorialsLPC2148 (ARM7) Tutorials
PIC16F877A Tutorials8051 Tutorials
Unit Testing in C TutorialsESP32-IDF Tutorials
Raspberry Pi TutorialsEmbedded Interview Topics
Reset Sequence in ARM Cortex-M4BLE Basics
VIC and NVIC in ARMSPI – Serial Peripheral Interface Protocol
STM32F7 Bootloader TutorialsRaspberry PI Pico Tutorials
STM32F103 Bootloader TutorialsRT-Thread RTOS Tutorials
Zephyr RTOS Tutorials - STM32Zephyr RTOS Tutorials - ESP32
AUTOSAR TutorialsUDS Protocol Tutorials
Product ReviewsSTM32 MikroC Bootloader Tutorial
VHDL Tutorials

Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Newest Most Voted
Inline Feedbacks
View all comments
Table of Contents