Difference between revisions of "S19: Automophiles"

From Embedded Systems Learning Academy
Jump to: navigation, search
(DBC File)
(Schedule)
Line 83: Line 83:
 
* Setup private channel on Slack workspace
 
* Setup private channel on Slack workspace
 
|
 
|
* Completed
 
 
* Completed
 
* Completed
 
|
 
|
* 02/19/19
 
* 02/19/19
 
 
* 02/19/19
 
* 02/19/19
 
|-
 
|-
Line 99: Line 96:
 
|
 
|
 
* Completed
 
* Completed
* Completed
 
* Completed
 
* Completed
 
 
|
 
|
* 02/26/19
 
* 02/26/19
 
* 02/26/19
 
 
* 02/26/19
 
* 02/26/19
 
|-
 
|-
Line 119: Line 110:
 
* Demo CAN Communication
 
* Demo CAN Communication
 
|
 
|
* In-Progress
 
* Completed
 
* Completed
 
* Completed
 
* Completed
 
* Completed
 
 
* Completed
 
* Completed
 
|
 
|
* 03/11/19
 
* 03/11/19
 
* 03/11/19
 
* 03/11/19
 
* 03/11/19
 
* 03/11/19
 
 
* 03/11/19
 
* 03/11/19
 
|-
 
|-
Line 142: Line 121:
 
* Make unit-level diagrams of each module
 
* Make unit-level diagrams of each module
 
|  
 
|  
* Completed
 
* Completed
 
 
* Completed
 
* Completed
 
|
 
|
* 03/18/19
 
* 03/18/19
 
 
* 03/18/19
 
* 03/18/19
 
|-
 
|-
Line 158: Line 133:
 
* Establish Communication of every module on CAN bus showing on BUS Master
 
* Establish Communication of every module on CAN bus showing on BUS Master
 
|
 
|
* Completed
 
* Completed
 
* Completed
 
 
* Completed
 
* Completed
 
|
 
|
* 03/25/19
 
* 03/25/19
 
* 03/25/19
 
 
* 03/25/19
 
* 03/25/19
 
|-
 
|-
Line 175: Line 144:
 
* Check Laser Sensor response on I2C bus with I2C Master.
 
* Check Laser Sensor response on I2C bus with I2C Master.
 
|
 
|
* Completed
 
* Completed
 
 
* Completed
 
* Completed
 
|
 
|
* 04/01/19
 
* 04/01/19
 
 
* 04/01/19
 
* 04/01/19
 
|-
 
|-
Line 191: Line 156:
 
* Interface laser distance sensors and measure sensor values.
 
* Interface laser distance sensors and measure sensor values.
 
|  
 
|  
* Completed
 
* Completed
 
* Completed
 
 
* Completed
 
* Completed
 
|
 
|
* 04/08/19
 
* 04/08/19
 
* 04/08/19
 
 
* 04/08/19
 
* 04/08/19
 
|-
 
|-
Line 208: Line 167:
 
* Hookup Bridge Controller with CAN bus to Master and successfully control RC Car
 
* Hookup Bridge Controller with CAN bus to Master and successfully control RC Car
 
|
 
|
* Completed
 
* Completed
 
 
* Completed
 
* Completed
 
|
 
|
* 04/15/19
 
* 04/15/19
 
 
* 04/15/19
 
* 04/15/19
 
|-
 
|-
Line 225: Line 180:
 
* Finalize overall UI of Android app
 
* Finalize overall UI of Android app
 
|
 
|
* Completed
 
* Completed
 
* Completed
 
* Completed
 
 
* Completed
 
* Completed
 
|
 
|
* 04/22/19
 
* 04/22/19
 
* 04/22/19
 
* 04/22/19
 
 
* 04/22/19
 
* 04/22/19
 
|-
 
|-
Line 245: Line 192:
 
* Mount GPS with external antenna on RC car and transmit GPS fix and current coords
 
* Mount GPS with external antenna on RC car and transmit GPS fix and current coords
 
|
 
|
* Completed
 
* Completed
 
* Completed
 
 
* Completed
 
* Completed
 
|
 
|
* 04/29/19
 
* 04/29/19
 
* 04/29/19
 
 
* 04/29/19
 
* 04/29/19
 
|-
 
|-
Line 263: Line 204:
 
* Test and validate obstacle avoidance in outside environments
 
* Test and validate obstacle avoidance in outside environments
 
|
 
|
* Completed
 
* Completed
 
* Completed
 
 
* Completed
 
* Completed
 
|
 
|
* 05/06/19
 
* 05/06/19
 
* 05/06/19
 
 
* 05/06/19
 
* 05/06/19
 
|-
 
|-
Line 283: Line 218:
 
* Receive PCB
 
* Receive PCB
 
|
 
|
* Completed
 
* Completed
 
* Completed
 
* Completed
 
 
* Completed
 
* Completed
 
|
 
|
 
* 05/07/19
 
* 05/07/19
* 05/07/19
 
* 05/07/19
 
* 05/07/19
 
* 05/09/19
 
 
|-
 
|-
 
! scope="row"| 14
 
! scope="row"| 14
Line 303: Line 230:
 
|
 
|
 
* In Progress  
 
* In Progress  
* In Progress
 
* In Progress
 
 
|
 
|
 
*
 
*

Revision as of 16:22, 13 May 2019

Project Title

Automophiles

Abstract

<2-3 sentence abstract>

Introduction

The project was divided into 7 modules:

  • Sensor Controller
  • Motor Controller
  • Master Controller
  • Geographical Controller
  • Bridge Controller
  • Android Application
  • PCB/Hardware Integration

Team Members & Responsibilities

<Team Picture>


Schedule

Week# Date Task Status Completion Date
1 02/12/19
  • Form Teams
  • Completed
  • 02/12/19
2 02/19/19
  • Setup a Slack workspace for the team.
  • Setup private channel on Slack workspace
  • Completed
  • 02/19/19
3 02/26/19
  • Create a Gitlab project
  • Order 3.3V CAN transcievers
  • Create merge requests for every member
  • Invite Preet and TA to Gitlab project
  • Completed
  • 02/26/19
4 03/05/19
  • Research Past Projects.
  • Setup a Bill of Materials.
  • Order an RC car and charger.
  • Assign responsibilities
  • Create Splitwise group
  • Order HC-06 Bluetooth module
  • Demo CAN Communication
  • Completed
  • 03/11/19
5 03/12/19
  • Finish ordering components for additional modules (GPS/compass, Sensors, etc)
  • Init Android project/begin work & research on UI fragments, Bluetooth, Maps API
  • Make unit-level diagrams of each module
  • Completed
  • 03/18/19
6 03/19/19
  • Interface GPS module to SJOne Board over UART
  • Make high-level block diagram of system
  • Write sample DBC file for communication of each module
  • Establish Communication of every module on CAN bus showing on BUS Master
  • Completed
  • 03/25/19
7 03/26/19
  • Configure ESC for correct speed outcome according to frequency & PWM values.
  • Develop PWM API based on configuration results.
  • Check Laser Sensor response on I2C bus with I2C Master.
  • Completed
  • 04/01/19
8 04/02/19
  • Finalize PCB design/order by end of week
  • Set-up Bluetooth API on Android app/transmit to board
  • Develop Laser sensor driver API to get singleshot response.
  • Interface laser distance sensors and measure sensor values.
  • Completed
  • 04/08/19
9 04/09/19
  • Interface GPS and receive correct GPRMC sentences
  • Hookup Motor Controller with CAN bus and successfully receive messages from Master
  • Hookup Bridge Controller with CAN bus to Master and successfully control RC Car
  • Completed
  • 04/15/19
10 04/16/19
  • Build obstacle avoidance logic in Master logic and do hallway testing
  • Configure Busmaster with converted DBC file and display working sensor values
  • Write module-level unit tests
  • Add MIA management to each module
  • Finalize overall UI of Android app
  • Completed
  • 04/22/19
11 04/23/19
  • Mount RPM sensor on DC motor and do ramp testing
  • Streamline and verify obstacle avoidance on uphill and downhill ramp tests
  • Mount compass on RC car and transmit calibrated heading on CAN bus
  • Mount GPS with external antenna on RC car and transmit GPS fix and current coords
  • Completed
  • 04/29/19
12 04/30/19
  • Add dozens of useful debug messages and transmit on CAN
  • Configure Busmaster to display signal graphs of RPM/sensor values
  • Add debug popup menu on Android app to display sensor and GPS values
  • Test and validate obstacle avoidance in outside environments
  • Completed
  • 05/06/19
13 05/07/19
  • Add target heading and distance calculation logic to GPS module
  • Display GPS target heading and distance in Android debug menu
  • Add a physical on/off switch to RC car setup
  • Add start/stop logic to master state machine depending on bridge input
  • Interface and display RPM value/motor cmd on LCD display
  • Receive PCB
  • Completed
  • 05/07/19
14 05/14/19
  • Add checkpoint logic to GPS module given predefined routes
  • Replace current setup with PCB interface
  • Perform outside testing on predefined routes
  • In Progress
15 05/22/19
  • Final Demo

Parts List & Cost

Item# Part Desciption Vendor Qty Cost
1 RC Car Traxxas 1 $240.00
2 RC Car Charger Wall Adapter Traxxas 1 $25.00
3 CAN Transceiver PCB Board Waveshare 7 $48.03
4 HC-06 Bluetooth Module eBay 1 $10.51
5 PCB Bay Area Circuits 2 $250

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.>

Hardware Design

<Show your CAN bus hardware design>

DBC File

VERSION ""

NS_ :

BS_:

BU_: MASTER GPS BRIDGE MOTOR SENSOR

BO_ 100 MOTOR_CMD: 3 MASTER 
 SG_ STEER_CMD_enum : 0|8@1+ (1,0) [0|0] "" MOTOR
 SG_ SPEED_CMD : 8|8@1+ (0.1,0) [0|0] "m/sec" MOTOR
 SG_ MASTER_INIT_DEBUG : 16|1@1+ (1,0) [0|0] "" MOTOR
 SG_ MASTER_SEND_LEFT : 17|1@1+ (1,0) [0|0] "" MOTOR
 SG_ MASTER_SEND_STRAIGHT : 18|1@1+ (1,0) [0|0] "" MOTOR
 SG_ MASTER_SEND_RIGHT : 19|1@1+ (1,0) [0|0] "" MOTOR
   
BO_ 105 RPM_VALUE_CMD: 4 MOTOR 
 SG_ RPM_VALUE : 0|8@1+ (1,0) [0|0] "" BRIDGE,MASTER
 SG_ CAN_INIT_MSG : 8|8@1+ (1,0) [0|0] "" BRIDGE,MASTER
 SG_ RECEIVED_STEER_CMD : 16|8@1+ (1,0) [0|0] "" BRIDGE,MASTER
 SG_ MOTOR_HEARTBEAT : 24|1@1+ (1,0) [0|0] "" BRIDGE,MASTER
 
BO_ 110 COMPASS_CMD: 4 GPS
 SG_ HEADING : 0|32@1+ (0.1,0) [0|0] "" BRIDGE,MASTER
 
BO_ 115 COMPASS_INIT_DEBUG: 1 GPS
 SG_ INIT_DEBUG : 0|1@1+ (1,0) [0|0] "" MASTER
 
BO_ 120 GPS_CURRENT_LAT_LONG: 8 GPS
 SG_ CUR_LAT : 0|32@1+ (0.000001,0.000000) [36.000000|38.000000] "degrees" BRIDGE,MASTER
 SG_ CUR_LONG : 32|32@1+ (0.000001,-123.000000) [-123.000000|-120.000000] "degrees" BRIDGE,MASTER
 
BO_ 125 GPS_INIT_DEBUG: 1 GPS
 SG_ INIT_DEBUG : 0|1@1+ (1,0) [0|0] "" MASTER
 
BO_ 130 GPS_FIX_DEBUG: 1 GPS
 SG_ GPS_FIX_DEBUG : 0|1@1+ (1,0) [0|0] "" MASTER
 
BO_ 135 COMPASS_MAN_CAL_DEBUG: 1 GPS
 SG_ IS_CAL_DEBUG : 0|1@1+ (1,0) [0|0] "" MASTER

BO_ 140 GPS_HEARTBEAT: 1 GPS
 SG_ GPS_HEARTBEAT : 0|1@1+ (1,0) [0|0] "" MASTER
 
BO_ 145 GPS_TARGET_HEADING: 8 GPS
 SG_ TARGET_HEADING : 0|32@1+ (0.1,0) [0.00|360.00] "degrees" BRIDGE,MASTER
 SG_ DISTANCE : 32|32@1+ (0.1,0) [0|0] "meters" BRIDGE,MASTER

BO_ 200 SENSOR_STATUS: 7 SENSOR
 SG_ SENSOR_FRONT : 0|16@1+ (1,0) [0|0] "milimeters" BRIDGE,MASTER
 SG_ SENSOR_LEFT : 16|16@1+ (1,0) [0|0] "milimeters" BRIDGE,MASTER
 SG_ SENSOR_RIGHT : 32|16@1+ (1,0) [0|0] "milimeters" BRIDGE,MASTER
 SG_ SENSOR_LEFT_BLOCKED : 48|1@1+ (1,0) [0|0] "" BRIDGE,MASTER
 SG_ SENSOR_CENTER_BLOCKED : 49|1@1+ (1,0) [0|0] "" BRIDGE,MASTER
 SG_ SENSOR_RIGHT_BLOCKED : 50|1@1+ (1,0) [0|0] "" BRIDGE,MASTER 
 SG_ SENSORS_HEARTBEAT : 51|1@1+ (1,0) [0|0] "" BRIDGE,MASTER
  
BO_ 300 BRIDGE_STOP: 1 BRIDGE
 SG_ BRIDGE_STOP : 0|1@1+ (1,0) [0|0] "" MASTER
 
BO_ 310 BRIDGE_GO: 1 BRIDGE
 SG_ BRIDGE_GO : 0|1@1+ (1,0) [0|0] "" MASTER
 
BO_ 315 BRIDGE_INIT_DEBUG: 1 BRIDGE
 SG_ INIT_DEBUG : 0|1@1+ (1,0) [0|0] "" MASTER

BO_ 320 BRIDGE_HEARTBEAT: 1 BRIDGE
 SG_ BRIDGE_HEARTBEAT : 0|1@1+ (1,0) [0|0] "" MASTER
 
BO_ 325 BRIDGE_DEST: 8 BRIDGE
 SG_ DEST_LAT : 0|32@1+ (0.000001,0) [36.000000|38.000000] "degrees" GPS
 SG_ DEST_LNG : 32|32@1+ (0.000001,-123) [-123.000000|-120.000000] "degrees" GPS
 

CM_ BU_ MASTER "The master controller driving the RC car";
CM_ BU_ SENSOR "The obstacle avoidance sensor module";
CM_ BU_ MOTOR "The motor module driving the car";
CM_ BU_ GPS "The GPS module";
CM_ BU_ BRIDGE "The main communications module between car and app";

BA_DEF_ SG_ "FieldType" STRING ;

BA_DEF_DEF_ "FieldType" "";

BA_ "FieldType" SG_ 100 STEER_CMD_enum "STEER_CMD_enum";
 
VAL_ 100 STEER_CMD_enum 2 "steer_straight" 1 "slight_left" 3 "slight_right" 0 "stop" 6 "steer_right" 4 "steer_left" 8 "reverse" 7 "left_reverse" 9 "right_reverse";

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