Self Driving Picar

by Majed ALHarbi in Circuits > Raspberry Pi

683 Views, 2 Favorites, 0 Comments

Self Driving Picar

WhatsApp Image 2021-04-12 at 14.02.43.jpeg
WhatsApp Image 2021-04-12 at 14.02.51.jpeg

Introduction :

A self-driving car (also known as an autonomous car or a driverless
car) has no human input and can sense surrounding without any human interactions. Variety of sensors are combined and are used to identify the pathway, obstacles, pedestrians etc. from the surrounding. Benefit of having a driverless car is having reduced costs due to less wastage of fuel, increased safety, increased mobility, increased customer satisfaction etc. Safety benefits means we will be having reduced traffic collisions, lower accident rate reducing injuries and related costs such as, insurance. Automated cars could increase traffic flow by having proper routine mobility from source and destination, providing mobility for children, the elderly, disabled, and the poor who cannot operate the non-autonomous vehicles. Travelers could relieve their stress from driving and navigation issues when they go to a unknown city, reduce needs for parking space, lower fuel consumption, reduce crime and facilitate transportation as service like convert existing vehicles such as taxi, train buses to fully automated for the people. Between manually driven vehicles which are referred to as (SAE Level 0) and fully autonomous vehicles referred to as (SAE Level 5) we have wide range of vehicles that are classified in these SAE range. These are known as semi-automated vehicles. These were developed before fully automation could come in exitance. These were iterative approach done for semi automating a car for example some parts get automated. These semi-automated vehicles could take some properties of fully automated vehicles, while still keeping driver in charge of the vehicle they operate. Since the cars rely on a preprogrammed code primarily. The traffic light, sudden pedestrians contact on road, is secondary data they need to process. Hence, they tend travelling slower for processing these extra scenarios. The vehicle sometime might have difficulty when determining certain objects such as light debris, trash, when humans such as police officers are signaling the vehicle to stop, spotting potholes on the road is also sometimes difficult hence avoiding them becomes not possible. Advantages could include higher speed limits with smoother rides since these have better control of vehicle and can view larger distance then a human high and can increase the roadway capacity and minimized(reduce) traffic congestion caused due to decreased need for safety gaps between vehicles travelling at higher speeds.

Supplies:

  • Raspberry Pi 3 ( Model B+ )
  • Micro SD card 64GB
  • Raspberry pi camera
  • Adapter HDMI 90 Degree Angle
  • Battery DURACELL AA4
  • Traffic signs
  • Smart Robot 4 Weel Car Chassis Kit For Arduino

Brief Description

cam.PNG

The driver assistance system is a system that relies on the camera

to assist the driver by analyzing the images coming from the camera and giving the driver instructions on a five-inch screen, for example when the car exits the lane, whether from the right or left, an alert appears on the screen to alert the driver to return to the correct lane and the percentage that also appears He exited from the lane and the direction needed to be requested and also one of the system's features when approaching any obstacle gives the driver a warning to stop, and if he does not stop the car, the car stops automatically and also gives him the traffic signal information in three colors, and if he finds a stop traffic sign, it gives him a warning to stop .

Purchases

IMG_0351.jpg
IMG_0352.jpg
IMG_0356.jpg
IMG 0308
IMG_0512.jpg
WhatsApp Image 2021-03-29 at 15.29.42.jpeg
ro.PNG

Raspberry Setup

Screen Recording 3 8 2021 4 13 04 PM
Screen Recording 3 11 2021 9 50 59 PM
d2.PNG
d3.PNG
  • 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

Installation#3
Installation#4
Circuit Diagram
WhatsApp Image 2021-03-07 at 18.34.35.jpeg
Circuit.PNG

Using the instruction book, we start to install the Robot kit, the kit is contain of :

  • Instruction book
  • Body of Robot
  • DC motor
  • DC motor driver (TRA9118A)
  • Step-down DC-DC converter module
  • servo motor
  • pulse with modulation module (PWM PCA9685)
  • Regulator
  • USB module
  • Batteries 1.5 V four piece
  • Batteries case
  • Wheel (4)
  • wires
  • screw driver (different kind of it)
  • Screws

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
  • Servo Calibration - Operation on Raspberry Pi

Note: Before move on to the front part, since servos are used in back side, they need some configuration for protection.

  • Assembling of the acrylic Plates and wheel from the front side
  • Electrical Module Assembly
  • Circuit Connecting

Setup of Picar With the Raspberry Pi

pi
WIN 20210323 22 19 56 Pro
  • Raspberry Pi Operating System Set up.
  • Setup Remote Access (IP address/sudo/SSH/VNC.
  • Setup Remote File Access.
  • Install Camera.
  • Install Python software, Go to the Python website www.python.org, find the latest Python 3 and install. After installation, RESTART the computer then continue the setup as the instruction book write.
  • Start Calibration.
  • Motor Adjustment.
  • Mount Adjustment.

Note: all the software we use here are FREE and open source.

Machine Learning and Practice

Machine Learning and Practice
projecct.PNG
pro.PNG

Before we start a deep learning, we should give the self driving both an eye (camera and OpenCV) and a brain (Tensor Flow), so we have to follow this first :

  • OpenCV for Computer Vision
  • Install Open CV and Related Libraries

In this step, we will use deep learning techniques such as single shot multi-box object detection and transfer learning to teach self driving car to detect various (miniature) traffic signs and pedestrians on the road. And then we will teach it to stop at red lights and stop signs, go on green lights, stop to wait for a pedestrian to cross, and change its speed limit according to the posted speed signs, and a lot of practice .

Common, Cascade and Boost tabs can be used for setting numerous parameters for customizing the classifier training. Cascade Trainer GUI sets the most optimized and recommended settings for these parameters by default ,still some parameters need to be modified for each training.

Optional :

All file for our project

https://drive.google.com/drive/folders/1c2hSm8x0cw...

Project's Video

Project’s Video
Final Product
Final

Appreciation for Dr. Jaber Alyamany

Dr. Jaber Alyamany, we would like to express our thanks and appreciation for your all great efforts you did for us to success this project.

Respect and appreciation,

Thanks,