Pi Car Discovery

From ESE205 Wiki
Jump to navigation Jump to search

[Weekly Logs Link]

Project Proposal

Project Overview

Nowadays, with the fast development of technology, artificial intelligence becomes highly valued and popular. High-tech companies have developed incredible technology. Some notable examples are Tesla with self-driving cars, Google has invented its instant translation machine, Apple has created Siri, etc. With all the excitement and hype of A.I, our group decided to study and explore the Raspberry Pi Car. The goal of this project is to build a model car and use Raspberry Pi to navigate through certain trails. For example, our preliminary goal is for the car to navigate a path clearly marked on a white floor with black tape. We will try some easy trails first, then we will attempt harder tasks as we achieve our goals. We can either increase the complexity of road or add more functions into the car.


Presentation

Team Members

  • Yinghan Ma (James)
  • Jiaqi Li (George)
  • Zhimeng Gou (Zimon)
  • David Tekien (TA)
  • Jim Feher (instructor)

Objectives

  • Build a pi car
  • Connect the car with Raspberry Pi wirelessly
  • Interface the Raspberry Pi and Arduino with sensors and actuators
  • Enable the car to move
  • Navigate the car by following a easy, straight path clearly marked on a white floor with black tape
  • Navigate the car by following a curved path
  • try some harder path with complex environment
  • Install Night Light into the car
  • Honk the horn when the car detecting barriers at the front

Challenges

  • Learn how to use Raspberry Pi and how Pi interact with each electronical component
  • Code with Python.
  • Understand the meaning of the code in software section
  • Learn CAD and figure out how to 3D print accessories for Pi Car

Budgets

Item Description Source URL Price/unit Quantity Shipping/Tax Total
Buggy Car Used as our pi car Link $99.99 1 $0 $99.99
Rotary Encoder Link $39.95 1 $0 39.95
Raspberry Pi [Provided] $0 1 $0 $0
32GB MicroSD Card [Provided] $0 1 $0 $0
IMU 9DoF Senor Stick Link $14.95 1 $0 $14.95
Raspberry Pi Camera Module V2 Link $29.95 1 $0 $29.95
Brushed ESC Motor Speed Controller Link $8.95 1 $0 $8.95
TowerPro SG90 Micro Servo Link $7.29 1 $0 $7.29
TFMini- Micro LiDAR Module Link $39.95 1 $0 $39.95
Current Sensors Link $6.39 6 $0 $38.34
Honk Link $11.99 1 $0 $11.99
$286.67

Gantt Chart

GanttChartnew.png

References

Pi Car Project

Pi Car Lab

Arduino Tutorial

Serial Communication

Design and Solutions

Build the car

Extra Materials that we need:

  • 3D printed layers
  • 3D printed frame for fixing the encoder and the car
  • Gear that fix the encoder
  • Some plastic central plastic gears for back up (since they broke easily)

The first thing we have to do is to remove the original parts from the Buggy car. More instructions can be found in Pi Car Project.

Pi Arduino communication

We used serial communication first. It can be done easily by plugging in USB wire from Pi to Arduino. However, later on, we found I2C communication is better. Thus we switched to I2C communication in the end.

Install Arduino software on the pi and follow this useful website: Serial Communication.

Serial Communication code:

  • Arduino communicated with Raspberry Pi
AtoP.png
AtoPi.png


  • Pi communicated with Arduino
PtoA.png
PitoA.png


I2C communication approach:

I2C.jpg







ESC & Motor & Encoder & Arduino Connection

Here is how we connect the ESC, motor, encoder, and Arduino.

(Picture! Firtizing and Real Car)

(1st step) Make the car move

Run WASD file to make the motor move.

(2nd step) Make the car move stably

  • Encoder did not work very well. It did not control the speed as it supposed to be.
  • Thus we made some changes in the WASD.ino.

Changes:

Servo

Run the car automatically

Line tracking

Combine everything together

  • Description of each module of your project, and the solutions you designed to complete them.
  • If you had to learn a new skill to solve a problem (e.g., how to install a particular API, how to communicate using Bluetooth, etc.), then you must create a new HowTo wiki page with a clear tutorial of what you learned.

Results

  • Present all your results, including modules that only partially worked.
  • Discuss how the results compare to your original objectives.
  • Identify the critical decisions or factors in your project that stopped you from getting a better result (try to avoid obvious comments such as "we run out of time").
  • Include a copy of the poster you used in your demonstration to help explain your results.