Driver Assistant

by mohseq in Circuits > Raspberry Pi

371 Views, 1 Favorites, 0 Comments

Driver Assistant

WhatsApp Image 2021-04-07 at 9.10.46 PM.jpeg

Introduction :

With the increase in the number of traffic accidents in the world, the person needed to devise some technologies that help in driving the vehicle in a way that raises the value of traffic safety and reduces the number of traffic accidents that may happen unintentionally.

What is a Driver Assistant ?

The driver assistant is It is an electronic system that is a Raspberry Pi controller that uses a camera installed at the top of the vehicle to read the various targeted external influences and convert them to the opencv system. Alerts are displayed via the LCD screen to alert the driver.

Also, there is an Arduino controller that takes off-lane alerts from a Raspberry Pi microcontroller and applies tire feedback via DC Motors.


Project Idea :

an electronic system that alerts the driver when the vehicle exits the lane or when there is an obstacle in front of the vehicle or even by reading some traffic guide signs.

Supplies:

- The body mass of a robot car with four wheels.

- Raspberry Pi 3 Model B+.

- Arduino UNO.

- Micro SD card.

- Raspberry Pi Camera Module.

- Raspberry Pi LCD Screen.

- L298 Dual H-Bridge Module Motor Driver.

- 4 TT Motor with plastic gear and wheel.

- Anker Power Bank (26800 mA).

- 3 USB Cable for power.

- Connecting wires.

- Traffic signs

- Road Platform

Supplies Order

WhatsApp Image 2021-04-06 at 8.28.58 PM (1).jpeg
516300.jpg
FWAZ8MEKI1PFIMU.jpg
WhatsApp Image 2021-04-06 at 8.28.58 PM.jpeg

Raspberry Pi Setup

R.Pi setting#
FZCXUG5KIFZW6QW.jpg
F23XQ1NKIFZW6CP.jpg

To do the setting for the Raspberry Pi you need to have :

- Micro SD card.

- Micro usb cable.

- Key board.

- Mouse.

- HDMI Monitor.

- HDMI cable.

steps of setting :

After you connected the micro SD card, start to down load the obrution system from the official website of the Raspberry Pi, https://www.raspberrypi.org/downloads/ ,use the NOBBS software and downloaded to the micro SD card by copping all the file on it. After that, insert the micro SD card to the Raspberry Pi and plug all the cable ( HDMI cable to the monitor, usb cable to ac, etc.), all the optional will seen on the screen.

Assembling and Installing

WhatsApp Image 2021-04-05 at 12.46.58 PM.jpeg
WhatsApp Image 2021-04-05 at 12.46.57 PM.jpeg
WhatsApp Image 2021-04-05 at 12.46.57 PM (1).jpeg
WhatsApp Image 2021-04-05 at 12.46.56 PM.jpeg
WhatsApp Image 2021-04-05 at 12.46.55 PM.jpeg
WhatsApp Image 2021-04-05 at 12.46.54 PM.jpeg

- Body of car.

- DC motor.

- DC motor driver.

- Power bank.

- 4 Wheel.

- Wires.

- screw driver (different kind of it).

Note 1: Before starting installation be sure every electronic parts of the kit working will, test them separately.

Note 2: If you using Raspberry Pi 3 and above, no need to install the antenna cause the raspberry has internal Wi fi and Bluetooth.

The assembly of the parts goes through several stages :

- Assembling of the acrylic Plates and wheel from the back side.

- Installing the motor on it.

- Operation on Raspberry Pi.

- Assembling of the acrylic Plates and wheel from the front side.

- Electrical Module Assembly.

- Circuit Connecting.

Handcrafts

WhatsApp Image 2021-04-06 at 8.55.56 PM (1).jpeg
WhatsApp Image 2021-04-06 at 8.55.56 PM (2).jpeg
WhatsApp Image 2021-04-06 at 8.55.56 PM.jpeg
1.jpeg
2.jpeg
3.jpeg
4.jpeg

Little of handcrafts is needed to made the traffic sign and used with project.

we used :

- Red traffic light.

- Stop sign.

- Speed sign.

- Road Platform.

Setup Open Cv

علاء

Installing raspian:

Step 1: Download the Required Software and Files

Step 2: Get the SD Card and the Card Reader.

Step 3: Check the Drive in Which the SD Card Is Mounted.

Step 4: Format the SD Card.

Step 5: Write the OS on the SD Card.

Step 6: Eject the SD Card.

Installing open cv:

Step 1: Select OpenCV version to install. First let's prepare the system for the installation.

Step 2: Update Packages. view source.

Step 3: Install OS Libraries.

Step 4: Install Python Libraries.

Step 5: Download opencv and opencv_contrib.

Step 6: Compile and install OpenCV with contrib modules.

Step 7: Reset swap file.

Machine Learning and Practice

سعيد
صورة1.png
صورة2.png
صورة3.png
صورة4.png
صورة5.png
صورة6.png
صورة7.png
صورة8.png

Training model on cascada software:

In this section different parts and functionalities of Cascade Trainer GUI are described. Note that by moving your mouse over to each element on the graphical interface you will get a short description of it at the bottom status bar.

When Cascade Trainer GUI is first started you will be presented with the following screen.

This is the starting screen and it can be used for training classifiers.

To train classifiers usually you need to provide the utility with thousands of positive and negative image samples, but there are cases when you can achieve the same with less samples.

To start the training, you need to create a folder for your classifier.

Create two folders inside it.

One should be “p” (for positive images) and the other should be “n” (for negative images).For example, you should have a folder named “Car” which has the mentioned folders inside it.Positive image samples are the images of the object you want to train your classifier and detect.For example, if you want to train and detect cars then you need to have many car images.

And you should also have many negative images.

Negative images are anything but cars.

Important Note 1: Negative images must NEVER include any positive images. Not even partially.

Important Note 2: In theory, negative images can be any image that is not the positive image but in practice, negative images should be relevant to the positive images.

Connection Between Raspberry Pi and Arduino

مهند

Diagram and Codes

دايقرام.png
صورة1.jpg

Recognizing Traffic Signs

Lane End.png
Red Trafic.png
Speed40.png
Stop.png

Final Work

Final Work