Difference between revisions of "S24: Team Gran Turismo"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Project Title)
(Parts List & Cost)
 
(24 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
<b>Gran Turismo</b>
 
<b>Gran Turismo</b>
 
<HR>
 
<HR>
<BR/>
 
 
Daniel Zhao Yeung <BR/>
 
Suryanto Phienanda <BR/>
 
Kaijian Wu <BR/>
 
Lianshi Gan <BR/>
 
  
 
== Abstract ==
 
== Abstract ==
<2-3 sentence abstract>
+
"The Gran Turismo" is an autonomous RC car designed to navigate to a specified destination using GPS coordinates, communicated via a mobile application. The car integrates four microcontrollers (Driver, Sensor/Bridge, Geo, and Motor nodes) which communicate over a Controller Area Network (CAN) bus. It utilizes FreeRTOS to manage periodic tasks for data gathering, processing, and decision-making, ensuring effective obstacle detection and avoidance while maintaining the intended path.
  
 
=== Introduction ===
 
=== Introduction ===
  
The project was divided into N modules:
+
The project was divided into 5 modules:
  
* Sensor ...
+
* Sensor/Bridge node
* Motor..
+
* Motor node
* ...
+
* Geo node
* Android
+
* Driver node
 +
* Android App
  
 
=== Team Members & Responsibilities ===
 
=== Team Members & Responsibilities ===
 
<Team Picture>
 
<Team Picture>
  
Gitlab Project Link - [https://gitlab.com/...]
+
Team Members:  
 
<BR/>
 
<BR/>
  
<Provide ECU names and members responsible>
+
Daniel Zhao Yeung <BR/>
<One member may participate in more than one ECU>
+
Suryanto Phienanda <BR/>
 +
Kaijian Wu <BR/>
 +
Lianshi Gan <BR/>
  
* Sensor
 
** Link to Gitlab user1
 
** Link to Gitlab user2
 
  
* Motor
+
Gitlab Project Link - [https://gitlab.com/lianshi.gan/sjtwo-c-team-gran-turismo C243_GT]
** Link to Gitlab user1
+
<BR/>
** Link to Gitlab user2
 
  
* Geographical
+
{| class="wikitable"
** Link to Gitlab user1
+
|-
** Link to Gitlab user2
+
! scope="col"| Team Members
 +
! scope="col"| Task Responsibility
 +
|-
 +
! scope="row" style="text-align: left;"|
 +
* Daniel Zhao Yeung
 +
|
 +
* Geo Node
 +
|-
 +
! scope="row" style="text-align: left;"|
 +
* [https://www.linkedin.com/in/lianshi-gan-967494116/ Lianshi Gan]
 +
|
 +
* Sensor Node
 +
|-
 +
! scope="row" style="text-align: left;"|
 +
* Suryanto Phienanda
 +
|
 +
* Motor Node
 +
|-
 +
! scope="row" style="text-align: left;"|
 +
* Suryanto Phienanda
 +
|
 +
* Driver Node
 +
|-
 +
! scope="row" style="text-align: left;"|
 +
* Kaijian Wu
 +
|
 +
* Mobile App, Bridge Node
 +
|-
  
* Communication Bridge Controller & LCD
+
|}
** Link to Gitlab user1
 
** Link to Gitlab user2
 
 
 
* Android Application
 
** Link to Gitlab user1
 
** Link to Gitlab user2
 
 
 
* Testing Team
 
** Link to Gitlab user1
 
** Link to Gitlab user2
 
  
 
<HR>
 
<HR>
 
<BR/>
 
<BR/>
 +
 
== Schedule ==
 
== Schedule ==
  
Line 75: Line 86:
 
* Connect db9 to Busmaster.
 
* Connect db9 to Busmaster.
 
* Assign tasks to each team member.
 
* Assign tasks to each team member.
| <font color = "red">Incomplete
+
| <font color = "green">Completed
  
 
|-
 
|-
Line 85: Line 96:
 
* Get all the sensors and parts.
 
* Get all the sensors and parts.
 
* Play with sensors and SJ2 boards.
 
* Play with sensors and SJ2 boards.
| <font color = "red">Incomplete
+
| <font color = "green">Completed
  
 
|-
 
|-
Line 96: Line 107:
 
* Get Data from different modules(GPS, Sensors).
 
* Get Data from different modules(GPS, Sensors).
 
* Starting to check on motor.
 
* Starting to check on motor.
| <font color = "red">Incomplete
+
| <font color = "green">Completed
  
 
|-
 
|-
Line 105: Line 116:
 
* Develop LCD module.
 
* Develop LCD module.
 
* Start working on driver module.
 
* Start working on driver module.
* Work on Bluetooth/WIFI module.
+
* Build libraries for all modules (Bluetooth/WIFI, GPS, Sensor....).
* Work on Geo sensor with Geo controller.
 
* Work on motors with motor module.
 
* Work on ultrasonic sensors with sensor module.
 
 
* Continue work on mobile app.
 
* Continue work on mobile app.
| <font color = "red">Incomplete
+
| <font color = "green">Completed
  
 
|-
 
|-
Line 121: Line 129:
 
* Create unit/integration tests.
 
* Create unit/integration tests.
 
* Continue work on mobile app.
 
* Continue work on mobile app.
| <font color = "red">Incomplete
+
| <font color = "green">Completed
  
 
|-
 
|-
Line 131: Line 139:
 
* Motors with PID control.
 
* Motors with PID control.
 
* Continue work on mobile app.
 
* Continue work on mobile app.
| <font color = "red">Incomplete
+
| <font color = "green">Completed
  
 
|-
 
|-
Line 141: Line 149:
 
* Integrate bluetooth module
 
* Integrate bluetooth module
 
* Continue with mobile app
 
* Continue with mobile app
| <font color = "red">Incomplete
+
| <font color = "green">Completed
  
 
|-
 
|-
Line 150: Line 158:
 
* Finalize/Connect mobile app with RC car.
 
* Finalize/Connect mobile app with RC car.
 
* Obstacle avoidance.
 
* Obstacle avoidance.
| <font color = "red">Incomplete
+
| <font color = "green">Completed
  
 
|-
 
|-
Line 159: Line 167:
 
* PROTOTYPE 3
 
* PROTOTYPE 3
 
* Prepare for outdoor tests.
 
* Prepare for outdoor tests.
| <font color = "red">Incomplete
+
| <font color = "green">Completed
  
 
|-
 
|-
Line 168: Line 176:
 
* PROTOTYPE 4
 
* PROTOTYPE 4
 
* Perform outdoors tests and recalibrate.
 
* Perform outdoors tests and recalibrate.
| <font color = "red">Incomplete
+
| <font color = "green">Completed
  
 
|-
 
|-
Line 204: Line 212:
 
| Free Samples
 
| Free Samples
 
|-
 
|-
 +
! scope="row"| 3
 +
| Ultrasonic Sensor URM09 from DFRobots
 +
| dfrobot [https://www.dfrobot.com/product-1862.html]
 +
| 4
 +
| $8 * 4
 +
|-
 +
! scope="row"| 4
 +
| DSD TECH HM-10 Bluetooth 4.0 BLE
 +
| Amazon [https://www.amazon.com/dp/B06WGZB2N4?psc=1&ref=ppx_yo2ov_dt_b_product_details]
 +
| 1
 +
| $12.00
 +
|-
 +
 
|}
 
|}
  
 
<HR>
 
<HR>
 
<BR/>
 
<BR/>
 +
 
== Printed Circuit Board  ==
 
== Printed Circuit Board  ==
 
<Picture and information, including links to your PCB>
 
<Picture and information, including links to your PCB>
Line 219: Line 241:
 
=== Hardware Design ===
 
=== Hardware Design ===
 
<Show your CAN bus hardware design>
 
<Show your CAN bus hardware design>
 +
 +
 +
 +
==== Bluetooth Module ====
 +
For the communication between the Mobile app and the RC car. We use the DSD TECH HM-10 Bluetooth 4.0 BLE module. This module communicate with the SJ2 board by using UART. It transmits raw data between mobile app and bridge. It is lightweight but due to its design, it can read/send strings up to 20 characters at a time. Any string more than 20 characters will be break into 2 line of strings automatically. The datasheet provides limited information when developing the Bluetooth module.
  
 
=== DBC File ===
 
=== DBC File ===
Line 231: Line 258:
  
 
=== Hardware Design ===
 
=== Hardware Design ===
 +
 +
 +
==== Ultrasonic Sensor ====
 +
 +
[[File:MFG SEN0388.jpeg]]
 +
 +
Selecting the appropriate distance sensor is crucial for the success of the project. Our team chose the Ultrasonic Sensor URM09 from DFRobots due to its ease of use and cost-effectiveness. The URM09 offers multiple communication protocols, and we opted for the I2C package to simplify the configuration and reading process, allowing us to focus on the overall system integration.
 +
 +
* Ultra-Sonic Sensor URM09 (I2C Protocol)
 +
** '''Supply Voltage:''' 3.3~5.5V DC
 +
** '''Operating Current:''' 20mA
 +
** '''Operating Temperature Range:'''  -10℃~+70℃
 +
** '''Measurement Range:''' 2cm~500cm (can be set)
 +
** '''Resolution:''' 1cm
 +
** '''Accuracy:''' 1%
 +
** '''Frequency:''' 50Hz Max
 +
** '''Dimension:''' 47mm × 22 mm/1.85” × 0.87”
  
 
=== Software Design ===
 
=== Software Design ===
Line 237: Line 281:
 
=== Technical Challenges ===
 
=== Technical Challenges ===
  
< List of problems and their detailed resolutions>
+
==== Configure 4 ADC channels ====
 +
We load the distance sensor data by ADC channel.
 +
There are only 3 channels ready to use on SJ2 board.
 +
Need to modify P0_26 as below to unlock ADC:
 +
 
 +
<pre>
 +
static void distance__configure_all_adc_pins(void) {
 +
  LPC_IOCON->P0_25 &= ~(3 << 3);
 +
  LPC_IOCON->P0_25 &= ~(1 << 7);
 +
 
 +
  LPC_IOCON->P0_26 &= ~(3 << 3);
 +
  LPC_IOCON->P0_26 &= ~(1 << 16);
 +
  LPC_IOCON->P0_26 &= ~(1 << 7);
 +
 
 +
  LPC_IOCON->P1_30 &= ~(3 << 3);
 +
  LPC_IOCON->P1_30 &= ~(1 << 7);
 +
 
 +
  LPC_IOCON->P1_31 &= ~(3 << 3);
 +
  LPC_IOCON->P1_31 &= ~(1 << 7);
 +
}
 +
</pre>
  
 
<HR>
 
<HR>
 
<BR/>
 
<BR/>
 +
 
== Motor ECU ==
 
== Motor ECU ==
 
<Picture and link to Gitlab>
 
<Picture and link to Gitlab>
Line 287: Line 352:
 
<HR>
 
<HR>
 
<BR/>
 
<BR/>
== Master Module ==
+
== Driver Module ==
  
 
<Picture and link to Gitlab>
 
<Picture and link to Gitlab>
Line 302: Line 367:
 
<HR>
 
<HR>
 
<BR/>
 
<BR/>
 +
 
== Mobile Application ==
 
== Mobile Application ==
 
<Picture and link to Gitlab>
 
<Picture and link to Gitlab>

Latest revision as of 00:49, 22 May 2024

Project Title

Gran Turismo


Abstract

"The Gran Turismo" is an autonomous RC car designed to navigate to a specified destination using GPS coordinates, communicated via a mobile application. The car integrates four microcontrollers (Driver, Sensor/Bridge, Geo, and Motor nodes) which communicate over a Controller Area Network (CAN) bus. It utilizes FreeRTOS to manage periodic tasks for data gathering, processing, and decision-making, ensuring effective obstacle detection and avoidance while maintaining the intended path.

Introduction

The project was divided into 5 modules:

  • Sensor/Bridge node
  • Motor node
  • Geo node
  • Driver node
  • Android App

Team Members & Responsibilities

<Team Picture>

Team Members:

Daniel Zhao Yeung
Suryanto Phienanda
Kaijian Wu
Lianshi Gan


Gitlab Project Link - C243_GT

Team Members Task Responsibility
  • Daniel Zhao Yeung
  • Geo Node
  • Sensor Node
  • Suryanto Phienanda
  • Motor Node
  • Suryanto Phienanda
  • Driver Node
  • Kaijian Wu
  • Mobile App, Bridge Node


Schedule

Week# Start Date End Date Task Status
1 03/04/2024 03/10/2024
  • Learn about the Busmaster and dbc.
  • Connect db9 to Busmaster.
  • Assign tasks to each team member.
Completed
2 03/11/2024 03/17/2024
  • Finish up RC Car Infrastructure.
  • Get all the sensors and parts.
  • Play with sensors and SJ2 boards.
Completed
3 03/18/2024 03/24/2024
  • Start working on dbc and mobile app.
  • Integrate sensors with SJ2 boards.
  • Get Data from different modules(GPS, Sensors).
  • Starting to check on motor.
Completed
4 03/25/2024 03/31/2024
  • Develop LCD module.
  • Start working on driver module.
  • Build libraries for all modules (Bluetooth/WIFI, GPS, Sensor....).
  • Continue work on mobile app.
Completed
5 04/01/2024 04/07/2024
  • PROTOTYPE 1
  • Build the car with all the modules.
  • Create unit/integration tests.
  • Continue work on mobile app.
Completed
6 04/08/2024 04/14/2024
  • Get the speed measuring sensor.
  • Motors with PID control.
  • Continue work on mobile app.
Completed
7 04/15/2024 04/21/2024
  • PROTOTYPE 2
  • Integrate bluetooth module
  • Continue with mobile app
Completed
8 04/22/2024 04/28/2024
  • Finalize/Connect mobile app with RC car.
  • Obstacle avoidance.
Completed
9 04/29/2024 05/05/2024
  • PROTOTYPE 3
  • Prepare for outdoor tests.
Completed
10 05/06/2024 05/12/2024
  • PROTOTYPE 4
  • Perform outdoors tests and recalibrate.
Completed
11 05/13/2024 05/19/2024
  • Final Demo
Incomplete


Parts List & Cost

Item# Part Desciption Vendor Qty Cost
1 RC Car Traxxas 1 $250.00
2 CAN Transceivers MCP2551-I/P Microchip [1] 8 Free Samples
3 Ultrasonic Sensor URM09 from DFRobots dfrobot [2] 4 $8 * 4
4 DSD TECH HM-10 Bluetooth 4.0 BLE Amazon [3] 1 $12.00


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>


Bluetooth Module

For the communication between the Mobile app and the RC car. We use the DSD TECH HM-10 Bluetooth 4.0 BLE module. This module communicate with the SJ2 board by using UART. It transmits raw data between mobile app and bridge. It is lightweight but due to its design, it can read/send strings up to 20 characters at a time. Any string more than 20 characters will be break into 2 line of strings automatically. The datasheet provides limited information when developing the Bluetooth module.

DBC File

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




Sensor ECU

<Picture and link to Gitlab>

Hardware Design

Ultrasonic Sensor

MFG SEN0388.jpeg

Selecting the appropriate distance sensor is crucial for the success of the project. Our team chose the Ultrasonic Sensor URM09 from DFRobots due to its ease of use and cost-effectiveness. The URM09 offers multiple communication protocols, and we opted for the I2C package to simplify the configuration and reading process, allowing us to focus on the overall system integration.

  • Ultra-Sonic Sensor URM09 (I2C Protocol)
    • Supply Voltage: 3.3~5.5V DC
    • Operating Current: 20mA
    • Operating Temperature Range: -10℃~+70℃
    • Measurement Range: 2cm~500cm (can be set)
    • Resolution: 1cm
    • Accuracy: 1%
    • Frequency: 50Hz Max
    • Dimension: 47mm × 22 mm/1.85” × 0.87”

Software Design

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

Technical Challenges

Configure 4 ADC channels

We load the distance sensor data by ADC channel. There are only 3 channels ready to use on SJ2 board. Need to modify P0_26 as below to unlock ADC:

static void distance__configure_all_adc_pins(void) {
  LPC_IOCON->P0_25 &= ~(3 << 3);
  LPC_IOCON->P0_25 &= ~(1 << 7);

  LPC_IOCON->P0_26 &= ~(3 << 3);
  LPC_IOCON->P0_26 &= ~(1 << 16);
  LPC_IOCON->P0_26 &= ~(1 << 7);

  LPC_IOCON->P1_30 &= ~(3 << 3);
  LPC_IOCON->P1_30 &= ~(1 << 7);

  LPC_IOCON->P1_31 &= ~(3 << 3);
  LPC_IOCON->P1_31 &= ~(1 << 7);
} 


Motor ECU

<Picture and link to Gitlab>

Hardware Design

Software Design

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

Technical Challenges

< List of problems and their detailed resolutions>



Geographical Controller

<Picture and link to Gitlab>

Hardware Design

Software Design

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

Technical Challenges

< List of problems and their detailed resolutions>





Communication Bridge Controller & LCD

<Picture and link to Gitlab>

Hardware Design

Software Design

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

Technical Challenges

< List of problems and their detailed resolutions>



Driver Module

<Picture and link to Gitlab>

Hardware Design

Software Design

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

Technical Challenges

< List of problems and their detailed resolutions>



Mobile Application

<Picture and link to Gitlab>

Hardware Design

Software Design

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

Technical Challenges

< List of problems and their detailed resolutions>






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