Now we are going to demonstrate the Hump And Pothole Detection on Roads using 8051.
Hump And Pothole Detection on Roads using 8051
Abstract
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.
Introduction
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
Prerequisites
Before seeing the code, first you can see the basic interfacing tutorials of these components.
Block Diagram
Explanation
- 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
LCD:
- RS – P0.0
- RW – P0.1
- EN – P0.2
- Data lines – P2
Ultrasonic Sensor:
- Trigger – P3.5
- Echo – P3.2
GSM:
- GSM RX – P3.1
- GSM TX – P3.0
Switch: P0.7
Code
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.
#include<reg51.h> #include"ULTRASONIC.H" #include"GSM.H" #include"LCD.H" #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) { ser_init(); ultrasonic_init(); lcd_init(); show("Loading "); for(k=0;k<5;k++) { dat('.'); delay; } sw=1; delay; while(1) { cmd(0x80); show("DISTANCE: "); range=ultrasonic(); cmd(0x8a); dat((range/100)+48); dat(((range/10)%10)+48); dat((range%10)+48); show(" cm "); if(sw==0) { if(range<16) { cmd(0xc0); show("Hump Detected..."); hump[9]=(range/100)+48; hump[10]=((range/10)%10)+48; hump[11]=(range%10)+48; hump[15]=' '; hump[16]=' '; hump[17]='H'; hump[18]='U'; hump[19]='M'; hump[20]='P'; hump[21]=' '; cmd(0xc0); show("Sending message!"); sms(NUMBER,hump); cmd(0xc0); show("Message Sent!!!!"); delay; } else if ((range>20) && (range<50)) { cmd(0xc0); show("Pothole Detected"); hump[9]=(range/100)+48; hump[10]=((range/10)%10)+48; hump[11]=(range%10)+48; hump[15]='P'; hump[16]='O'; hump[17]='T'; hump[18]='H'; hump[19]='O'; hump[20]='L'; hump[21]='E'; cmd(0xc0); show("Sending message!"); sms(NUMBER,hump); cmd(0xc0); show("Message Sent!!!!"); delay; } else { cmd(0xc0); show("<<Drive Safely>>"); } } else { cmd(0xc0); show("~PLS SWITCH ON~ "); } } }
Explanation
- 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.

Embedded Software | Firmware | Linux Devic Deriver | RTOS
Hi, I’m SLR. I am a tech blogger and an Embedded Engineer. I am always eager to learn and explore tech-related concepts. And also, I wanted to share my knowledge with everyone in a more straightforward way with easy practical examples. I strongly believe that learning by doing is more powerful than just learning by reading. I love to do experiments. If you want to help or support me on my journey, consider sharing my articles, or Buy me a Coffee! Thank you for reading my blog! Happy learning!