Difference between revisions of "F14: Team3-Self Driving Car - Optimus Prime"
Proj user22 (talk | contribs) (→Schedule) |
Proj user22 (talk | contribs) (→Controller Communication Table) |
||
Line 1,027: | Line 1,027: | ||
bytes [0-3] : latitude (float) | bytes [0-3] : latitude (float) | ||
bytes [4-7] : longitude (float) | bytes [4-7] : longitude (float) | ||
+ | |- | ||
+ | | 0x530 | ||
+ | | Turn to degree | ||
+ | | | ||
+ | bytes [0-3] : degree(float) | ||
+ | |- | ||
+ | | 0x531 | ||
+ | | Way points longitude | ||
+ | | | ||
+ | bytes [0-1] :total waypoints count | ||
+ | bytes [2-3] :waypoint index | ||
+ | bytes [4-7] : longitude(float) | ||
+ | |- | ||
+ | | 0x532 | ||
+ | | Way points latitude | ||
+ | | | ||
+ | bytes [0-1] :total waypoints count | ||
+ | bytes [2-3] :waypoint index | ||
+ | bytes [4-7] : latitude(float) | ||
+ | |- | ||
+ | | 0x540 | ||
+ | | remote status (ie. Android connection status) | ||
+ | | | ||
+ | bytes [0]=> | ||
+ | 0:disconnected(passive send) | ||
+ | 1:on disconnect(active) | ||
+ | 2:connected(passive) | ||
+ | 3:on connect(active) | ||
+ | 0xFF:error(active/passive) | ||
|- | |- | ||
|} | |} | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ IO Communication Table | |+ IO Communication Table |
Revision as of 11:07, 28 November 2014
Contents
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 |
|
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 |
|
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 |
|
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 |
|
10/28/2014 |
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 |
|
--/--/---- |
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 |
|
--/--/---- |
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' |
|
--/--/---- |
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 |
|
--/--/---- |
9 | 11/25/2014 | 12/02/2014 |
* Final Integration and testing Self_Drive Capability of the Car |
|
--/--/---- |
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 |
|
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 |
|
10/11/2014 |
3 | 10/14/2014 | 10/21/2014 |
* Define the duty cycles for proper motor and servo signals |
|
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 |
|
11/04/2014 |
5 | 10/28/2014 | 11/04/2014 |
* Start working on CAN Periodic message structure * Start looking for speed sensors |
|
--/--/---- |
6 | 11/04/2014 | 11/11/2014 |
* Attach speed sensors to the motor * Test CAN communication between motor controller and other controllers |
|
--/--/---- |
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 |
|
--/--/---- |
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 |
|
--/--/---- |
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 | 10/28/2014 | Implementing CAN structure with LCD tasks. | Completed | 11/30/2014 |
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 | Done | 11/24/2014 |
6 | 10/14/2014 | 11/21/2014 | Ajax & Websocket server remote structure | Done | 11/01/2014 |
7 | 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 | Done | 11/24/2014 |
8 | 10/21/2014 | 11/24/2014 | Android App and webpage GUI enhancements (Google Maps, Google Drive) | Done | 11/24/2014 |
9 | 10/21/2014 | 11/30/2014 | Data visualization (status, compass, speed, location,....) | On going | 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
Controller ID | Controller Type |
0x01 | Master Controller |
0x02 | Motor Controller |
0x03 | Sensor Controller |
0x04 | Geographical Controller |
0x05 | IO Controller |
0x06 | Bridge Controller |
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 % |
Byte 0 | Effect |
0 | Off |
1 | 1Hz |
5 | 5Hz |
10 | 10Hz |
20 | 20Hz |
50 | 50Hz |
Any other value | Invalid date rate |
Message Number | Purpose | Data Byte Pattern | |
0x101 | Request each Controller Boot Status |
Byte[0]: Request command for Boot Info. |
|
0x102 | Request each Controller version info. |
Byte[0]: Request command for Version Info. |
|
0x103 | Request GPS Controller for Satellite Time |
Byte[0]: Request command for Time |
|
0x104 | Set Time on each Controller received from Satellite |
Byte[0-3]: Time in HH:MM:SS |
|
0x201 | Receives Boot status from each Controller |
Byte[0]: Boot Status Info. |
|
0x202 | Receives Version info. from each Controller |
Byte[0-3]: Controller Version Info. |
|
0x203 | Receives the Time from GPS Controller |
Byte[0-3]: Time in HH:MM:SS |
|
0x301 | Request destination co-ordinates from Communication_Bridge |
Byte[0-7]: Displays "Waiting for Destination Location Input" |
|
0x302 | Set the destination GPS co-ordinates to GPS_Controller |
Byte[0-3]: Latitude Co-ordinate Byte[4-7]: Longitude Co-ordinate |
|
0x303 | Set the Motors in Start/Stop Position |
Byte[0]: START (or) STOP command |
|
0x500 | Display Boot and Version Info. on LCD |
Byte[0]: Boot Status Response Byte[1-4]: Version Info. |
|
0x501 | Display Controller Time on LCD |
Byte[0-3]: Time in HH:MM:SS |
|
0x502 | Turn Right/ Turn Left |
Byte[0]: LEFT (or) RIGHT command |
|
0x503 | Set Speed on Motor |
Byte[0]: Speed Value |
|
0x504 | Display Motor speed on LCD |
Byte[0]: Speed Value |
|
0x505 | Display Dist. to Destination and Heading Direction on LCD |
Byte[0]: Distance to Destination Byte[1]: Heading Direction |
|
0x506 | Display Sensor Values on LCD |
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 |
|
0x507 | Display Battery Status & Light Sensor Value on LCD |
Byte[0]: Battery Status Value Byte[1]: Light Sensor Value |
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 |
Message Number | Purpose | Data layout |
0x518 | Set GPS Location |
byte [0 - 3] : Latitude - Float byte [3 - 7] : Longitude - Float |
Message Number | Purpose | Data layout |
0x528 | Set Car Speed (Kill Switch) - temporary allow for other non-zero value for demo | byte[0] - speed value |
0x529 | Destination GPS location |
bytes [0-3] : latitude (float) bytes [4-7] : longitude (float) |
0x530 | Turn to degree |
bytes [0-3] : degree(float) |
0x531 | Way points longitude |
bytes [0-1] :total waypoints count bytes [2-3] :waypoint index bytes [4-7] : longitude(float) |
0x532 | Way points latitude |
bytes [0-1] :total waypoints count bytes [2-3] :waypoint index bytes [4-7] : latitude(float) |
0x540 | remote status (ie. Android connection status) |
bytes [0]=> 0:disconnected(passive send) 1:on disconnect(active) 2:connected(passive) 3:on connect(active) 0xFF:error(active/passive) |
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] : Vehicle Direction |
0x522 | Subscribe to Compass Data | bytes [0] : Compass Data in degrees |
0x523 | Subscribe to Battery Status | bytes [0] : Battery Status Value |
Message Number | Purpose | Data layout |
0x508 | Speed Sensor Data |
byte [0] : Speed sensor value in rpm |
0x509 | 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
Communication Bridge + Android Interface
- The bridge controller and Android APP work as routers
Bridge Controller
- bridge controller translates CAN bus data into plain text and send it to android platform
- .........
Android Controller
- android platform receives the text data from bridge controller, then, transmit the data through ajax or websocket
- External controller could be any TCP accessible device (simple pebble watch program (20 lines) are used to control start and stop)
- One administrator(control and receive), multiple observers(only receive)
Implementation
Testing & Technical Challenges
Sensor Controller Testing
- Front and Back Sensors Controller
- Describe how you tested the Sensors and calibration of the sensors
Mention the Issues you faced and also the solutions you'll used to overcome the problem.
Motor Controller Testing
- Motor Controller
- Describe how you tested the motors. Explain the speed control methods used and difficulties you faced during calibration.
Mention the Issues you faced and also the solutions you'll used to overcome the problem.
I/O Testing
- I/O Testing
- Describe how you tested the LCD. Problems faced during testing.
Mention the Issues you faced and also the solutions you'll used to overcome the problem.
Communication Bridge Testing
TESTs
- 100000 message(20bytes per message) Bluetooth transmission between board and android under 200fps with range <5m
- 100% success
ISSUE
- 3G network server could not be access(3G network is used for long range communication)
- might use google sheet or external server to communicate
Geographical Controller
- Geographical Controller
- Describe how you tested the Compass and explain how did you manage to achieve the maximum accuracy.
Mention the Issues you faced and also the solutions you'll used to overcome the problem.
Master Controller
- Master Controller
- Describe how you tested the Master Controller and problems faced while integrating it with all the other controllers.
Mention the Issues you faced and also the solutions you'll used to overcome the problem.
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