S19: Zeus
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.
Project Title
Zeus : The Autonomous Car
Abstract
When over a century ago Karl Benz invented the first car, it came as a miracle to people. Now, Almost every household owns a car. The industry has come from a 20 Horse power producing 2.9 liter Ford Model T (1908) to a massive 1500 Horsepower 5 liter Koenigsegg Regera (2018). And as such, further developments into the driving industry are bound to come. One such major field is the realm of Driverless smart cars. This project focuses on developing a driverless smart car(model) that is capable of going from one place to the destination without any manual input, avoiding obstacles along the way.
Objectives & Introduction
Zeus revolves around several SJone boards that have LPC 1758 at the center......(continue here). Following are the objectives of this project.:
- Zeus should successfully navigate from a fixed starting point to a fixed destination based on GPS.
- Obstacles on the way should be avoided.
- Code should be 100% Unit-Tested
- Communication should be established between Zeus and a mobile phone through an APP.
Team Members & Responsibilities
- Neel Patel
- Team Lead
- Master Module
- Android App
- BLE Module
- Himanshu Gunjal
- Master Module
- BLE Module
- Oliver Zhu
- GIT repository Manager
- Sensor Module
- Aman Chandan
- Material/ Components manager
- GEO module
- Karan Daryani
- Car Layout Designer
- Motor Module
- PCB
- Namdev Prabhugaonkar
- GEO module
- PCB
- Artik Shetty
- Motor Module
- Wendy Chao
- Sensor Module
Schedule
Week# | Date | Task | Activities | Status | Completion Date |
---|---|---|---|---|---|
1 | 02/12/19 |
|
|
|
|
2 | 02/19/19 |
|
|
|
|
3 | 02/26/19 |
|
|
|
|
4 | 03/05/19 |
|
|
|
|
5 | 03/12/19 |
|
|
|
|
6 | 03/19/19 |
|
|
|
|
7 | 03/26/19 |
|
|
|
|
8 | 04/02/19 |
|
|
|
|
9 | 04/09/19 |
|
|
|
|
10 | 04/16/19 |
|
|
|
|
11 | 04/23/19 |
|
|
|
|
12 | 04/30/19 |
|
|
|
|
13 | 05/07/19 |
|
|
|
|
14 | 05/14/19 |
|
|
|
|
15 | 05/22/19 |
|
|
|
|
Parts List & Cost
Item# | Part Description | Vendor | Qty | Cost $ |
---|---|---|---|---|
1 | RC Car | Sheldon's Hobby Store | 1 | 180.00 |
2 | SJOne board | Preet | 5 | 400.00 |
3 | GPS Module | 1 | ||
4 | Lipo Battery (7200 mAh) | Amazon | 1 | 37.99 |
5 | DB9 Connector | Amazon | 1 | 6.50 |
6 | LIPO Battery Charger | Sheldon's Hobby Store | 1 | 39.99 |
7 | Ultrasonic sensor | Robotshop | 4 | 99.80 |
8 | PCB | |||
9 | CAN Transceiver | Amazon | 5 | 49.95 |
10 | LCD Display | Obtained From Preet | 1 | Free |
11 | Xbee | Obtained From Preet | 1 | Free |
12 | Adapter for Lipo Charger | Amazon | 1 | 15.84 |
Design & Implementation
The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.
Sensors Controller
In this project, the sensor we use is LV-MAXSonar-EZ4, which is ultrasonic sensor. There are three sensors put in the front of our RC car and detect the left, middle and right side independently.
Hardware Design
Discuss your hardware design here. Show detailed schematics, and the interface here.
Hardware Interface
There are seven pins in this sensor.
Pin Name | Function |
---|---|
Pin 1 | BW |
Pin 2 | PW |
In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.
Software Design
Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.
Implementation
This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.
Android Application and Bridge
Group Members
Design
The bridge controller is responsible for establishing communication between the CAR and an Android Phone. This communication is achieved using Bluetooth technology and HC-05 bluetooth transceiver. The android app "ZeusApp" sends Co-ordinates as well as Start/Stop command to the car. Once the bridge ECU receives this data over UART, it transmits it to corresponding controllers using CAN bus. The HC-05 module communicates with SJONE over UART at 9600bps baud rate. The overall architecture of the system is given below:
Pin Configuration:
Sl. No | Pin on SJOne Board | Pin on HC-05 | Purpose |
---|---|---|---|
1 | TXD3 | RXD | Transmit using UART3(TXD3) to HC-05 |
2 | RXD3 | TXD | Receive using UART3(RXD3) from HC-05 |
3 | 3V3 | VCC | 3.3V voltage supply |
4 | GND | GND | Ground |
Bluetooth Hardware Design
We decided to go with HC-05 as our bluetooth module HC-05 because of the vast amount of information on it on the internet. It is basically a plug and play module which makes the work very convenient. Given below are features of HC-05:
- -80dBm sensitivity
- Up to +4dBm transmit power
- Low Power operation
- UART interface with programmable baud rate.
- Integrated Antenna and edge connector.
- Supported Baud Rate: 9600,19200,38400,57600,115200,230400,460800.
- Auto-connect to the last device on power as default.
- Auto-pairing PINCODE:”0000” as default
- Auto-reconnect in 30 min when disconnected as a result of beyond the range of connection.
Bluetooth Software Design
The BLE ECU is responsible for receiving data over UART and then Packaging it in correct message format and sending it over the can bus. To achieve this a few messages were made in the DBC file. The Message IDs and info is given in the table below:
Sl. No | Message ID | Message name | Purpose |
---|---|---|---|
1 | 181 | APP_DATA | Sends 2 bit start OR stop command |
2 | 182 | APP_DATA_LAT_LONG | Send Destination Latitude and Longitude to the ECU. |
Our BLE is ECU is pretty simple and has one function as its core operation. This Function is given below.
void parse_data() { char coord[100]={0}; getstring(coord,100,0); if(coord[0]==1) { printf("\nStart"); BLE_data.START_CAR=1; c_LED_display_set_number(1); memset(coord,0,sizeof(coord)); } else if(coord[0]==2) { printf("\nStop"); BLE_data.START_CAR=2; c_LED_display_set_number(0); memset(coord,0,sizeof(coord)); } else if(strlen(coord)) { while(coord[i] != ',') { Latitude[i]=coord[i]; i++; } Latitude[i]='\0'; i++; while(coord[i] != '@' ) { Longitude[j]=coord[i]; i++; j++; } Longitude[j]='\0'; i=0; j=0; float LAT1=atof(Latitude); float LON1=atof(Longitude); printf("\nLatitude: %.15f",LAT1); printf("\nLongitude: %.15f",LON1); gps_destination.DEST_LAT=LAT1; gps_destination.DEST_LONG=LON1; } dbc_encode_and_send_APP_DATA(&BLE_data); dbc_encode_and_send_APP_DATA_LAT_LONG(&gps_destination); }
As seen in the code above, there are two DBC structures that are made, BLE_data to send start/stop command and gps_destination to send the destination co-ordinates. The android app sends a string over bluetooth to HC-05 which passes it on to SJone over UART. By parsing this string we can figure out which command was received from the App. If the 1st character of string is '1' the its a START command, if its '2' the it is STOP command and otherwise it parses the string to find Coordinates. Through the app i am sending coordinates in the format of LATITUDE,LONGITUDE so, in parse_data() function, two global character arrays were accessed. Until the iterator reaches the comma it puts everything in the Latitude array and after the till the end of string it puts everything in the Longitude array. Library function atof() was used to convert the character array to float to be able to send it over CAN.
The function parse_data() is periodically called at 1hz (so every one second). This means that the UART data is parsed and a can message is sent every second.
Android Application Design
Implementation
Testing & Technical Challenges
Describe the challenges of your project. What advise would you give yourself or someone else if your project can be started from scratch again? Make a smooth transition to testing section and described what it took to test your project.
Include sub-sections that list out a problem and solution, such as:
<Bug/issue name>
Discuss the issue and resolution.
Conclusion
Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?
Project Video
Upload a video of your project and post the link here.
Project Source Code
References
Acknowledgement
Any acknowledgement that you may wish to provide can be included here.
References Used
List any references used in project.
Appendix
You can list the references you used.