F14: Team3-Self Driving Car

From Embedded Systems Learning Academy
Revision as of 04:16, 4 November 2014 by Proj user22 (talk | contribs) (Controller Communication Table)

Jump to: navigation, search

Grading Criteria

  • How well is Software & Hardware Design described?
  • How well can this report be used to reproduce this project?
  • Code Quality
  • Overall Report Quality:
    • Software Block Diagrams
    • Hardware Block Diagrams
      Schematic Quality
    • Quality of technical challenges and solutions adopted.

Self Driving Car

Abstract

Objectives & Introduction

Team Members & Responsibilities

  • Sensor Controller
    • Team 1: Deepak Yadav & Vinod Pangul
  • Motor Controller
    • Team 2: Naghma Anwar & Shiva Moballegh
  • I/O Unit
    • Team 3: Shreeram Gopalakrishnan & Sreeharsha Paturu Gangadhara
  • Communication Bridge & Android
    • Team 4: Johnny Yam, Kevin Beadle & Chia Pin Tseng
  • Geographical Controller
    • Team 5: Bhushan Gopala Reddy, Ryan Marlin & Rishikesh Nagare
  • Master Controller
    • Team 6: Shashank Tupkar, Bhargava Leepeng Chandra & Preeti Benake

Schedule

Team Schedule

Sl.No Start Date End Date Task Status Actual Completion Date
1 Order RC Car Completed on time
2 Order Other parts(Sensor/LCD/Motor Controller...) Completed
3 9/30/2014 11/25/2014 Master Controller Team task Ongoing
4 10/06/2014 11/15/2014 Sensor Team task Ongoing
5 Motor Controller Team task Ongoing
6 Geographical Controller Team task Ongoing
7 I/O Team task Ongoing
8 Communication Bridge + Android Team task Ongoing
9 Complete project integration  ???
10 Testing-1  ???
11 Testing-2  ???


Master Controller Team Schedule

Week No. Start Date Planned End Date Task Status Actual End Date
1 9/30/2014 10/7/2014
* Implement Basic CAN Hardware to communicate between 2 Controllers
  • Completed
We are able to send a message from Tx over CAN and perform a specific operation at the Rx.
10/7/2014
2 10/7/2014 10/14/2014
* Design CAN Acceptance Filter among different Controllers
* Define and Implement CAN Frame structure for proper communication
  establishment
  • Completed
Only messages with in range of acceptance filter are received, Decided on CAN frame structure using 11-bit frame.
10/11/2014
3 10/14/2014 10/21/2014
* Develop Inter-Controller Communication over CAN
* Test point-to-point and Broadcast message transmission
* Implement a Counter to count and display number of messages 
  • Completed
CAN Communication among multiple boards achieved, Point-to-Point & Broadcast modes are working, Able to display the count on 7-Seg Display on SJOne board.
10/19/2014
4 10/21/2014 10/28/2014
* Layout blueprint for Controller and Module positioning 
* Assemble the RC Car with all the controllers and Modules
* Define the Message List by working with other teams
* Start working on CAN Periodic message structure
  • Ongoing
--/--/----
5 10/28/2014 11/04/2014
* Complete CAN Periodic message structure to transmit Broadcast
  messages over CAN and establish controlled communication among
  different controllers 
* Implement Start condition detection and Fetch boot status from
  all controllers and display the status of each controller
  • Scheduled
--/--/----
6 11/04/2014 11/11/2014
* Design 'Kill Switch' in co-ordination with Motor Controller team
  and Bridge Controller team
* Develop a 'CAN Bus Crash' detection and reset CAN Bus methodology
* Design Automatic Head Light turn ON/OFF functionality by
  working with Sensors Controller team
  • Scheduled
--/--/----
7 11/11/2014 11/18/2014
* Implement File Log saving to SD Card at periodic intervals
* Work on Restoring to last known Status if the system crashes while running
* Develop Detection technique if controllers are reaching 'Error State' 
  • Scheduled
--/--/----
8 11/18/2014 11/25/2014
* Project Integration and testing Basic Self_Drive Capability of the Car
* Check the Functionality and behavior of all controllers in all the known 
  contexts
* Perform modifications (if any) to eliminate any bugs to make the car work
  seamlessly
* Final Integration of car and testing there after
  
  • Scheduled
--/--/----


Sensor Team Schedule

Sl.No Start Date End Date Task Status Actual Completion Date
1 10/6/2014 10/18/2014 Order Ultra Sonic Sensors Completed [Got two sensors (front and back), 2 more (front right & left) to order ->Completed.] 10/19/2014
2 10/9/2014 10/9/2014 Sensor Data Sheet review with the team Completed 10/9/2014
3 10/9/2014 10/16/2104 Sensor code development Completed (Implementing filter (HW/SW) to get more accurate data ->(Done). Add logic to get the rest of the three sensor(front right/left and back data)->(Done) (Note: Delayed due to the implementation of CAN structure and calibration of IR sensor) 10/21/2014
4 10/22/2014 10/25/2014 Sensor software testing Ongoing
5 10/25/2014 10/28/2014 Sensor real time testing Ongoing
6 10/13/2014 10/15/2014 Light sensor code Development Completed 10/14/2014
7 10/13/2014 10/15/2014 Accelerometer sensor code Development to detect tilt Completed 10/14/2014
8 10/15/2014 10/15/2014 Light Sensor and Accelerometer Testing Completed 10/15/2014
9 10/29/2014 10/31/2014 Battery status controller circuit Design Ongoing
10 11/01/2014 11/02/2014 Battery status-circuit Testing
11 11/03/2014 11/04/2014 Common Communication SW code implementation and testing
11 11/04/2014 11/09/2014 Complete Hardware testing-1
12 11/10/2014 11/15/2014 Complete Hardware testing-2


Motor Controller Team Schedule

Week No. Start Date Planned End Date Task Status Actual End Date
1 9/30/2014 10/7/2014
* Study SJOne board's motor controller concepts and PWM
  • Completed
Very simple code. Just two lines. Set the frequency. Set the duty cycle.
10/7/2014
2 10/7/2014 10/14/2014
* Open up RC Car's motor and servo connections 
* Study the Electronic Speed Control's functions
  • Completed
Motor and Servo operate on the same frequency
ESC needs calibration each time it is switched on. Need to find a solution for this.
10/11/2014
3 10/14/2014 10/21/2014
* Define the duty cycles for proper motor and servo signals 
  • Completed
Using trial and run, figured out the duty cycle for constant speed and turns
10/19/2014
4 10/21/2014 10/28/2014
* Add CAN frame structure to the motor functions 
* Test for communication between motors and sensors for prototype demo 
* Define the Message List by working with other teams
  • Ongoing
--/--/----
5 10/28/2014 11/04/2014
* Start working on CAN Periodic message structure
* Start looking for speed sensors
  • Scheduled
--/--/----
6 11/04/2014 11/11/2014
* Attach speed sensors to the motor
* Test CAN communication between motor controller and other controllers
  • Scheduled
--/--/----
7 11/11/2014 11/18/2014
* Work on speed sensors. Figure out the way to send sensor data to master controller. 
* Test for proper and accurate CAN communication 
  • Scheduled
--/--/----
8 11/18/2014 11/25/2014
* Project Integration and testing basic self drive capability of the car
* Check the functionality and behavior of the motor controller in all the known 
  contexts
* Perform modifications (if any) to eliminate any bugs to make the motor work
  seamlessly
* Final Integration of car and testing there after
  
  • Scheduled
--/--/----


Geographical Team Schedule

Sl.No Start Date End Date Task Status Actual Completion Date
1 10/4/2014 10/13/2014 Research and Order GPS module Received GPS module 10/7/2014
2 10/7/2014 10/18/2014 Interface GPS module with LPC1758 Finished 10/17/14
3 10/14/2014 10/18/2014 Receive Compass module from Preet Received 10/9/2014
4 10/18/2014 11/4/2014 Parse GPS data and setup constructs to send appropriate data Ongoing
5 10/14/2014 10/18/2014 Interface the Compass Module Finished 10/16/2014
6 10/25/2014 11/4/2014 Calibration of Compass Code completed. Need to test using the car --/--/----
7 11/4/2014 11/11/2014 Integrate GPS and Compass data Ongoing
8 10/25/2014 11/09/2014 Testing and mapping of GPS co-ordinates Ongoing
9 11/18/2014 11/25/2014 Final integration and testing

IO Team Schedule

Sl.No Start Date End Date Task Status Actual Completion Date
1 10/7/2014 10/13/2014 Research and Order LCD Display Ordered LCD Display 10/13/2014
2 10/14/2014 10/21/2014 Interfacing LCD Display with LPC1758 Completed 10/21/2014
3 10/21/2014 11/28/2014 Implementing CAN structure with LCD tasks. Ongoing
4 10/28/2014 11/04/2014 Subscribe data from motor, sensor and GPS controller,display it on LCD. Ongoing
5 11/04/2014 11/11/2014 Setup hardware and write code for START, STOP and Headlight buttons. TBD
6 11/11/2014 11/18/2014 Testing and mounting hardware on car. TBD
7 11/18/2014 11/25/2014 Final Testing TBD


Communication Bridge & Android Team Schedule

Sl.No Start Date Planned End Date Task Status Actual End Date
1 9/30/2014 9/30/2014 Obtain Bluetooth Module (already had one) Done 9/30/2014
2 9/30/2014 10/14/2014 Develop Basic Android App with Bluetooth Sensor Communication Done 10/7/2014
3 10/11/2014 10/14/2014 Interface Bluetooth Module with SJSU Dev Board Done 10/11/2014
4 10/12/2014 10/19/2014 Be able to send bi-directional arbitrary messages between Android App and Dev Board via Bluetooth Done 10/14/2014
5 10/14/2014 11/21/2014 Subscribe to all CAN messages and dump all of them via Bluetooth to Android App or web interface On going TBD
6 10/14/2014 11/21/2014 Be able to input GPS coordinates through either (or both) Android App and web interface and send through Bluetooth then CAN bus On going TBD
7 10/21/2014 11/24/2014 Android App and webpage GUI enhancements (Google Maps, Google Drive) Scheduled TBD

Parts List & Cost

Item# Part Desciption Vendor Part Number Qty Cost
1 RC Car Amazon.com Traxxas 37076 Rustler VXL 1 $380.57
2 CAN Transceiver Anchor & HSC 15 $75.00
3 Assembly Components Amazon & Anchor PCBs, Mechnical & Electical Components NA $90.13
4 Power Supply Pololu 6V Battery, 5V Regulator 1 $34.85
5 LCD Display New Haven NHD-0216B3Z-FL-GBW-V3-ND 1 $$$.$$
6 Sonar sensor Maxbotix LV-MaxSonar-EZ1 MB1010 2 $66.55
7 Sonar sensor Given by Preet LV-MaxSonar-EZ1 MB1010 1 Free
8 IR sensor Given by Preet Sharp-GP2Y0A21YK 1 Free
9 Compass Module Given by Preet HoneyWell: HMC 6352 1 Free
Total Cost $$$.$$

Design & Implementation

Controller Communication Table

Controllers
Controller ID Controller Type
0x01 Master Controller
0x02 Motor Controller
0x03 Sensor Controller
0x04 Geographical Controller
0x05 IO Controller
0x06 Bridge Controller
Common Communication Table
Message Number Purpose / Data layout
0x101 Get version and boot info
0x102 Get general info
0x103 Synchronize (set) time:
byte [0-3] : System time
0x201
byte [0-3] : Version Info
byte [4-7] : boot timestamp
0x202
byte [0-3] : Current time
byte [4]   : CPU usage %
Subscription Rate Info
Byte 0 Effect
0 Off
1 1Hz
5 5Hz
10 10Hz
20 20Hz
50 50Hz
Any other value Invalid date rate


Master Controller Communication Table
Message Number Purpose
0x101 Get Boot Status
0x102 Get version info.
0x103 Get Controller Time
0x104 Get Destination GPS input
0x201 Receives the Boot status from each controller
0x202 Receives the Version info. from each Controller
0x203 Receives the Time from each controller
0x301 Set the destination GPS Location
0x302 Set the Motors in Start condition
0x303 Initiate the LCD display
0x304 Initiate the sensors
0x500 Get GPS data at intervals
0x501 Get Sensor Data at intervala
0x502 Get Motor Speed
0x503 Get Motor Direction
0x504 Display info at IO


Sensor Controller Communication Table
Message Number Purpose Data layout
0x510 Front/Back Range Sensor Data
byte [0] : Front sensor value in inches
byte [1] : Front Left sensor value in inches
byte [2] : Front Right sensor value in inches
byte [3] : Back sensor value in inches
byte [4] : Back Left sensor value in inches
byte [5] : Back Right sensor value in inches
0x511 Accelerometer Sensor Data
byte [0] : X axis Value
byte [1] : Y axis Value
byte [2] : Z axis Value 
0x512 Light Sensor Data
byte [0] : Light sensor value
0x513 Battery Status Data
byte [0] : Battery status value
0x514 Motor command Data
byte [0] : Motor command value
GPS Controller Communication Table
Message Number Purpose Data layout
0x518 Set GPS Location byte [0 - 3] : Latitude - Float
 byte [3 - 7] : Longitude - Float
Communication Bridge Communication Table
Message Number Purpose Data layout
0x00 Set Car Speed (Kill Switch) - temporary allow for other non-zero value for demo byte[0] - speed value
0x104 Destination GPS location bytes [0-3] : latitude (float)

bytes [4-7] : longitude (float)

- - -
IO Communication Table
Message Number Purpose Data layout
0x520 Subscribe to Sensor data bytes [0-5] : Sensor Value in Inches
0x521 Subscribe to Motor data bytes [0-2] : Vehichle Direction
0x522 Subscribe to Compass Data bytes [0] : Compass Data in degrees
0x523 Subscribe to Battery Status bytes [0] : Battery Status Value
Motor Controller Communication Table
Message Number Purpose Data layout
0x502 Speed Sensor Data
byte [0] : Speed sensor value in rpm
0x503 Vehicle Direction/Movement Data
byte [0] : Movement Control
     0x1 : Forward
     0x2 : Reverse
     0x3 : Stop
byte [1] : Steering Control
     0x1 : Left
     0x2 : Right
     0x3 : Straight

Hardware Design

Hardware Interface

Software Design

Implementation

Testing & Technical Challenges

Conclusion

Project Video

Project Source Code

References

Acknowledgement

References Used

http://www.socialledge.com/sjsu/index.php?title=Self-driving_Car

http://www.nxp.com/documents/user_manual/UM10360.pdf

http://www.socialledge.com/sjsu/images/d/de/2012SJOneBoardSchematic.pdf

http://www.maxbotix.com/documents/MB1010_Datasheet.pdf

http://www.sharpsma.com/webfm_send/1208

https://www.sparkfun.com/datasheets/Components/HMC6352.pdf

Appendix