Autonomous Vehicle
Summary: The main aim of making an autonomous car is to make some contribution in the era of Artificial Intelligence and IoT-based technologies. This car will follow traffic signs, traffic lights to maintain the equilibrium of the environment. It also does lane detection, obstacle avoidance,
2025-06-28 16:25:31 - Adil Khan
Autonomous Vehicle
Project Area of Specialization Artificial IntelligenceProject SummarySummary:
The main aim of making an autonomous car is to make some contribution in the era of Artificial Intelligence and IoT-based technologies. This car will follow traffic signs, traffic lights to maintain the equilibrium of the environment. It also does lane detection, obstacle avoidance, obstacle detection to prevent 94%of road accidents and car collisions due to human error. Our project is capable of sensing the environment and navigating roads without human input. Our system relies on a camera to detect lanes and make intelligent decisions, where L298D controls the direction and speed of the car. By configuring an Ultrasonic sensor with a microcontroller Raspberry pi obstacle detection is done and also avoids the obstacle of a collision. Overall our autonomous vehicle will help to improve road safety, reduce emissions and ease congestion. As a result, it could provide significant economic, environmental, and social benefits.
Project ObjectivesObjectives:
The main objectives of this project are to learn more and more techniques in the field of artificial intelligence, IoT, and machine learning and used these techniques in favor of humanity.
1. Providing hardware-based applications for technology lovers.
2. To increase road safety.
3. Providing Secured driving modules for Pakistan roads and areas.
4. Provide relaxation to tired drivers by making their cars on auto mode.
5. By providing facilities to handicapped and blind people so that they will be able to have their car.
Project Implementation MethodWe aim to design a Prototype of an Autonomous vehicle for which we train our system using machine learning, Artificial intelligence, OpenCV by embedding it on a Microcontroller Raspberry Pi3B+.
- Lane detection.
Some methods are being used to detect the road lanes accurately. One of these methods used is canny edge detection which identifies the points that are used to detect edges in the captured video frames. The road lane detection technique is applied through some steps which are, applying the Gaussian ?lter to smooth the video frame as well as removing the noise, ?nding the intensity gradients of the image. Then ?nally track detected edges and connect them. Filters such as grayscale and blurred are also being applied to the captured frames to smooth them to make it easier to apply some of the methods as well. In this stage, Hough transform is used. It is a feature extraction technique used in image analysis techniques, computer vision ?eld, and digital image processing.
2.Obstacle detection:
The HC-SR04 ultrasonic distance sensor is comprised of a transmitter, a receiver, and other circuitry but the transmitter and receiver parts are the most visible, the protrusions resembling eyes. To measure the distance between the object and the sensor is that We use the relationship between speed, distance, and time. Since we know that the speed of sound in air is about 343 meters per second, we just need to know how long the sound wave takes to bounce off an object. However, we divide the time by 2 because the sound wave travels double the distance from the sensor to the object. Remember, it travels to the object and then back to the sensor. Attach an F-F jumper wire from the Trig pin on the HC-SR04 Ultrasonic distance sensor to GPIO24 on the Raspberry Pi 3b+. Attach an F-M jumper wire from the Echo pin on the HC-SR04 Ultrasonic distance sensor to D9 on the breadboard. Finally, connect an F-M jumper wire between GND on the Raspberry Pi and the ground rail on the breadboard. Power up the Raspberry Pi 3b+ and then open up the Thonny IDE or write the code using the nano editor from the terminal. Let's start by getting a reading from the HC-SR04 sensor.
3. Obstacle Avoidance:
When the distance from an object is less than or equal to 25cm, the robot will move backward for 1 second before moving left for another second. This will have it avoid obstacles in its way. If the distance from an object is more than 25cm, then the robot will keep moving forwards.
4. Traffic light detection
A pi camera detects the traffic light by using an RGB scale and through raspberry pi.
5. Traffic Sign detection
- The pi camera is connected with raspberry pi in every direction
- Lights in each signal are connected to GPIO pins of a Raspberry pi
- The power supply should be given to raspberry pi
- Power for the Signal light can be given using an external power supply using relay switches. It is done through image processing.
So the benefits of an idea to design an autonomous system. Which is equipped with nifty tools specialized to maintain traffic protocols and tackling road scenarios. The concept of a portable decision-making system finds its uses in many fields for instance
In the Agriculture field:
An automated vehicle can be programmed to perform tasks like :
Pest analysis
Spraying pesticides
Spraying fertilizers
PH analysis of soil
Temperature checks
Spraying water in case of a forest fire
Detecting poachers
In Medical Field:
Usually, in case of an emergency, an ambulance is called which causes a delay that can be fatal at times.
In the case of an autonomous emergency system, the vehicle is programmed to self navigate its path to the nearest hospital without delay. The patient switches the emergency mode and reaches the hospital earlier.
Technical Details of Final DeliverableBefore finalizing the prototype Autonomous vehicle we tested each module one by one and then integrated the code with the raspberry pi and hardware and then tested it again.
Tools:
- Thonny IDE
- Visual studio
- Open Cv
- Python IDE
Languages:
- Python
| Item Name | Type | No. of Units | Per Unit Cost (in Rs) | Total (in Rs) |
|---|---|---|---|---|
| Total in (Rs) | 80000 | |||
| Raspberry pi | Equipment | 1 | 25000 | 25000 |
| Pi camera | Equipment | 2 | 7000 | 14000 |
| Ultrasonic Sensor | Equipment | 8 | 900 | 7200 |
| IR | Equipment | 8 | 800 | 6400 |
| Car | Equipment | 1 | 3000 | 3000 |
| Structure Model | Equipment | 1 | 10000 | 10000 |
| Modules Motors | Equipment | 2 | 2000 | 4000 |
| Miscallaneous | Miscellaneous | 1 | 10000 | 10000 |
| DC motors | Equipment | 1 | 400 | 400 |