S19: Mystery Machine

From Embedded Systems Learning Academy
Revision as of 02:26, 1 May 2019 by Proj user18 (talk | contribs) (Schedule)

Jump to: navigation, search
Team Logo

Abstract

This project demonstrates the learning involved in Embedded Systems class to design a self-driving car capable of navigating through terrain and avoiding obstacles to reach a destination. The car receives destination GPS coordinates from a custom Android Application and relays back statistics and progress in reaching the target.

Introduction

The objective of this project was to create an autonomous self-driving car which was able to reach the target destination while avoiding obstacles through the terrain. In order to accomplish this, five SJ One boards were used that handled separate functionality of the car:

  • Master Controller
  • Sensor Controller
  • Geo Controller
  • Bridge Controller
  • Android Application
  • Motor and Steering Controller

Team Members & Responsibilities

<Team Picture>
Gitlab Project Link


Schedule

Week# Start Date End Date Task Status
1
  • 02/22/2019
  • 02/22/2019
  • 02/22/2019
  • 02/22/2019
  • 02/22/2019
  • 03/01/2019
  • Read previous projects, gather information and discuss among the group members.
  • Assign team responsibilities for each module.
  • Analysis of component required for each module
  • Completed
  • Completed
2
  • 03/01/2019
  • 03/01/2019
  • 03/01/2019
  • 03/01/2019
  • 03/01/2019
  • 03/01/2019
  • 03/08/2019
  • 03/08/2019
  • 03/08/2019
  • 03/08/2019
  • Project plans and timelines discussed
  • Android Application: Upload Project to GitLab and Plot Route to destination with dummy location
  • Bridge Controller: Establish access point and STA mode on ESP8266
  • Motor Controller: Understand the working of Electronic Speed Controllers and study previous project reports
  • Sensor Controller: Decide and order the sensors required for Obstacle Avoidance
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
3
  • 03/08/2019
  • 03/08/2019
  • 03/08/2019
  • 03/08/2019
  • 03/08/2019
  • 03/10/2019
  • 03/15/2019
  • 03/15/2019
  • 03/13/2019
  • 03/15/2019
  • Order the RC car and the required peripherals
  • Android Application: Create base android project with map and display activities
  • GPS Controller: Create an algorithm for the navigation system
  • Bridge Controller: Implementation of basic lightweight web server for WiFi configuration using GUI
  • Motor Controller: Work on the ESC of the RC car and develop algorithm for the Steering Control
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
4
  • 03/15/2019
  • 03/15/2019
  • 03/15/2019
  • 03/15/2019
  • 03/15/2019
  • 03/15/2019
  • 03/15/2019
  • 03/15/2019
  • Android: Get access tokens for Google API to enable maps in the application
  • GPS Controller: Get raw values from MPU9150 IMU sensor
  • Bridge Controller:Implementation of mDNS protocol for discovery of device on local subnet
  • Motor Controller: Tap into the servo motor controlling the steering
  • Completed
  • Completed
  • Completed
  • Completed
5
  • 03/08/2019
  • 03/08/2019
  • 03/08/2019
  • 03/08/2019
  • 03/08/2019
  • 03/22/2019
  • 03/22/2019
  • 03/22/2019
  • 03/22/2019
  • 03/22/2019
  • Android: Embed Google maps onto the Android App and add the project to the git repository
  • GPS Controller: Implement driver to get filtered values from the IMU
  • Bridge Controller: Implementation of local MQTT Broker on ESP8266 and Cloud broker on EC2 Instance
  • Pin Layouts from all groups
  • Motor Controller: Tap into the in-built ESC and overclock
  • Completed
  • Completed
  • Completed
  • Completed
6
  • 03/22/2019
  • 03/22/2019
  • 03/22/2019
  • 03/22/2019
  • 03/22/2019
  • 03/29/2019
  • 03/29/2019
  • 03/29/2019
  • 03/24/2019
  • 03/29/2019
  • GPS Controller: Send and receive coordinates and other parameters between Car and application
  • PCB layout 1st Iteration
  • Bridge Controller: Configure ESP8266 (as Wifi-to-serial bridge) to receiver data over Wifi and push it on UART
  • Motor Controller: Find suitable Motor Driver Module and place an order
  • Sensor Controller: Experiment with the different sensors to check for which type works best for the RC Car
  • Completed
  • Completed
  • Completed
  • Completed
7
  • 03/29/2019
  • 03/29/2019
  • 03/29/2019
  • 03/29/2019
  • 04/05/2019
  • 04/07/2019
  • 04/05/2019
  • 04/05/2019
  • GPS Controller: Send and receive coordinates and other parameters between Car and appS
  • Bridge Controller: Program for MQTT Client to UART link on ESP8266 module
  • Motor Controller: Find optimal Frequency and PWM values to drive Steering and Rear Wheels
  • Sensor Controller: Obstacle detection with SJ One board
  • Completed
  • Completed
  • Completed
  • Completed
8
  • 04/05/2019
  • 04/05/2019
  • 04/05/2019
  • 04/05/2019
  • 04/05/2019
  • 04/05/2019
  • 04/09/2019
  • 04/09/2019
  • 04/12/2019
  • 04/12/2019
  • 04/12/2019
  • 04/10/2019
  • Android: Read the current position and get user input for the destination
  • GPS Controller: Get GPS and COMPASS readings and parse them
  • Bridge Controller: MQTT to UART to CAN Bus Link and Bridge Controller MQTT to Android application Connection Link
  • Master Controller: Define and acquire DBC messages intended for master
  • Motor Controller: Implementation of basic maneuvering of the RC car
  • Sensor Controller: Integration with the RC Car and distance calculation
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
9
  • 04/12/2019
  • 04/12/2019
  • 04/12/2019
  • 04/12/2019
  • 04/12/2019
  • 04/12/2019
  • 04/16/2019
  • 04/16/2019
  • 04/16/2019
  • 04/16/2019
  • 04/16/2019
  • 04/16/2019
  • Android: Configure the UI elements for live monitoring in the app.
  • GPS Controller: Get the destination and waypoints from the Bridge Controller
  • Bridge Controller: Define messages and MQTT topics for bridge to app communication
  • Master Controller: Create a simple program to instruct motor ECU to drive and acquire sensor values to send stop instruction to motor ECU
  • Motor Controller: Implementation of RPM Sensor and integration with CAN Bus
  • Sensor Controller: Final Testing
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
10
  • 04/19/2019
  • 04/19/2019
  • 04/19/2019
  • 04/19/2019
  • 04/19/2019
  • 04/23/2019
  • 04/23/2019
  • 04/23/2019
  • 04/23/2019
  • 04/23/2019
  • Android: Define the message parameters and packing format for communication between car and app and plot the waypoints for the given coordinates
  • GPS Controller: Calculate Bearing and send navigation instructions to the Master
  • Bridge Controller: Encapsulation and parsing the data from MQTT payload
  • Master Controller: Receive navigation instructions from the GPS Controller and move the car accordingly
  • Motor Controller: Fine tuning of Speed Control and Steering control using PWM duty cycle levels
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
11
  • 04/26/2019
  • 04/26/2019
  • 04/26/2019
  • 04/26/2019
  • 04/26/2019
  • Android: Send coordinates to Car
  • GPS Controller: Mount on the car and start testing on the field and make final changes accordingly
  • Bridge Controller: Update debug messages
  • Master Controller: Implement algorithm and avoid obstacles while maintaining bearing angles as provided by Geo Controller
  • Motor Controller: Optimize control by accelerating / decelerating as instructed by Master Controller
12
  • 05/03/2019
  • 05/03/2019
  • 05/03/2019
  • 05/03/2019
  • 05/03/2019
  • Android: Add additional commands to the app (stop, reset, reroute)
  • GPS Controller: Final system testing
  • Bridge Controller: Display interfacing and final Testing
  • Master Controller: Final testing of obstacle avoidance and navigation
  • Motor Controller: Final Testing
13

05/10/2019

Design and implementation of exterior body

14

05/17/2019

Resolve any issues before Final Demo

15

05/22/2019

FINAL DEMO

Parts List & Cost

Item# Part Desciption Vendor Qty Cost
1 RC Car Amazon 1 $90.00
2 CAN Transceivers MCP2551-I/P AliExpress 8 $1.13/piece

Printed Circuit Board

<Picture and information, including links to your PCB>

CAN Communication

Talk about your message IDs or communication strategy, such as periodic transmission, MIA management etc.

System Nodes: SENSOR, MOTOR, GEO CONTROLLER, BRIDGE, MASTER

SNo. Message ID Message from Source Node Receiver Nodes
Master Controller Message
1 400 Direction(Left, Right) and STOP or START) Motor
Sensor Controller Message
2 500 Packs center, left, right and back Ultrasonic sensor values in to CAN Frame Master
Motor Controller Message
3 600 Packs momentum and turn in to CAN Frame Master
Geo Controller Message
4 700 Sends Steer direction(Left, Right, Straight) Master
5 701 Sends GPS Co-ordinates(x,y) Master, Bridge
6 710 sends the destination reached status Master, Bridge
Bridge Controller Message
7 800 System start/stop command Master
8 801 GPS Co-ordinates Geo

Hardware Design

<Show your CAN bus hardware design>

DBC File

<Gitlab link to your DBC file> <You can optionally use an inline image>

BO_ 500 SENSOR_CONTROLLER: 18 SENSORS
 SG_ SENSOR_CONTROLLER_Front_US : 0|16@1+ (1,0) [0|100] "%" MASTER
 SG_ SENSOR_CONTROLLER_Front_left_IR : 16|16@1+ (1,0) [0|100] "%" MASTER
 SG_ SENSOR_CONTROLLER_Front_right_IR : 32|16@1+ (1,0) [0|100] "%" MASTER
 SG_ SENSOR_CONTROLLER_Back_IR : 48|16@1+ (1,0) [0|100] "%" MASTER
 
BO_ 600 MOTOR_CONTROLLER: 1 MOTOR
 SG_ MOTOR_CONTROLLER_MOMENTUM : 0|4@1+ (1,0) [0|15] "" MASTER
 SG_ MOTOR_CONTROLLER_TURN : 4|4@1+ (1,0) [0|15] "" MASTER

BO_ 400 MASTER_CONTROLLER: 3 MASTER
 SG_ MASTER_CONTROLLER_LEFT : 0|8@1+ (1,0) [0|15] "" MOTOR
 SG_ MASTER_CONTROLLER_RIGHT : 8|8@1+ (1,0) [0|15] "" MOTOR
 SG_ MASTER_CONTROLLER_STOP : 16|8@1+ (1,0) [0|15] "" MOTOR
 SG_ MASTER_CONTROLLER_START : 24|8@1+ (1,0) [0|15] "" MOTOR

BO_ 700 STEER_DIRECTION: 1 GEO
 SG_ STEER_DIRECTION_LEFT : 0|8@1+ (1,0) [0|0] "STEER LEFT DEGREES" MASTER
 SG_ STEER_DIRECTION_RIGHT : 8|8@1+ (1,0) [0|0] "STEER RIGHT DEGREES" MASTER
 SG_ STEER_DIRECTION_STRAIGHT : 16|8@1+ (1,0) [0|0] "STRAIGHT" MASTER

BO_ 701 TELEMETRY: 2 GEO
 SG_ CURRENT_GPS_COORDINATES_X : 0|32@1+ (0.000001,0) [0|0] "" MASTER,BRIDGE 
 SG_ CURRENT_GPS_COORDINATES_Y : 32|32@1+ (0.000001,0) [0|0] "" MASTER,BRIDGE 

BO_ 710 DESTINATION_REACHED: 1 GEO
 SG_ DESTINATION_REACHED : 0|8@1+ (1,0) [0|0] "" MASTER,BRIDGE

BO_ 800 APP_CMD: 2 BRIDGE
 SG_ START_COMMAND : 0|8@1+ (1,0) [0|0] "" MASTER 
 SG_ ABORT_COMMAND: 8|16@1+ (1,0) [0|0] "" MASTER 
BO_ 801 APP_GPS: 8 BRIDGE
 SG_ DEST_GPS_COORDINATES_X : 0|32@1+ (0.000001,0) [0|0] "" GEO 
 SG_ DEST_GPS_COORDINATES_Y : 32|32@1+ (0.000001,0) [0|0] "" GEO

Sensor ECU

<Picture and link to Gitlab>

Hardware Design

Software Design

<List the code modules that are being called periodically.>

Technical Challenges

<Bullet or Headings of a module>

Unreliable sonor sensors

<Problem Summary> <Problem Resolution>



Motor ECU

<Picture and link to Gitlab>

Hardware Design

Software Design

<List the code modules that are being called periodically.>

Technical Challenges

<Bullet or Headings of a module>

Unreliable Servo Motors

<Problem Summary> <Problem Resolution>



Geographical Controller

<Picture and link to Gitlab>

Hardware Design

Software Design

<List the code modules that are being called periodically.>

Technical Challenges

<Bullet or Headings of a module>

Unreliable GPS lock

<Problem Summary> <Problem Resolution>



Communication Bridge Controller & LCD

<Picture and link to Gitlab>

Hardware Design

Software Design

<List the code modules that are being called periodically.>

Technical Challenges

<Bullet or Headings of a module>

Insane Bug

<Problem Summary> <Problem Resolution>



Master Module

<Picture and link to Gitlab>

Hardware Design

Software Design

<List the code modules that are being called periodically.>

Technical Challenges

<Bullet or Headings of a module>

Improper Unit Testing

<Problem Summary> <Problem Resolution>



Mobile Application

<Picture and link to Gitlab>

Hardware Design

Software Design

<List the code modules that are being called periodically.>

Technical Challenges

<Bullet or Headings of a module>

Wifi Link Reliability

<Problem Summary> <Problem Resolution>



Conclusion

<Organized summary of the project>

<What did you learn?>

Project Video

Project Source Code

Advise for Future Students

<Bullet points and discussion>

Acknowledgement

References