Difference between revisions of "S22: Firebolt"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Schedule)
(Schedule)
Line 151: Line 151:
 
|-
 
|-
 
! scope="row"| 5
 
! scope="row"| 5
03/28 to 04/03
+
04/02 to 04/08
 
|
 
|
 
* 04/02
 
* 04/02
* 03/29
+
* 04/02
* 03/29
+
* 04/02
* 03/29
+
* 04/02
* 03/31
+
* 04/02
* 04/03
 
 
|
 
|
* 04/03
+
* 04/08
* 04/01
+
* 04/08
* 04/01
+
* 04/08
* 04/01
+
* 04/08
* 04/03
+
* 04/08
* 04/04
 
 
|
 
|
 
* Finalize the DBC file  
 
* Finalize the DBC file  
 
* Design obstacle avoidance and steering logic on the DRIVER node
 
* Design obstacle avoidance and steering logic on the DRIVER node
 
* Design motor driving logic on the MOTOR node with the encoder
 
* Design motor driving logic on the MOTOR node with the encoder
* Interface the LCD module with the DRIVER node to display messages
 
 
* Integrate sensor data on the SENSOR node and check the tuning requirements  
 
* Integrate sensor data on the SENSOR node and check the tuning requirements  
* '''Collective Test 1:'''<font color = "DarkGreen"> '''Integrate all the completed modules and test on BusMaster''' </font color>
+
* Integrate all the completed modules and test on BusMaster
 
|
 
|
* <font color = 'maroon>04/05</font>
+
* 04/09
* 04/01
+
* 04/09
* 04/01
+
* 04/09
* 04/01
+
* 04/09
* <font color = 'maroon'>04/04</font>
+
* 04/09
* 04/04
 
 
|  
 
|  
*<font color = "Green"> In Progress
+
*<font color = "orange"> In Progress
*<font color = "green"> Completed
+
*<font color = "orange"> In Progress
*<font color = "green"> In Progress
+
*<font color = "orange"> In Progress
*<font color = "green"> In Progress
+
*<font color = "orange"> In Progress
*<font color = "Red"> Not Completed
+
*<font color = "orange"> In Progress
*<font color = "Red"> Not Completed
 
 
|-
 
|-
 
! scope="row"| 6
 
! scope="row"| 6
 
04/04 to 04/10
 
04/04 to 04/10
 
|
 
|
* 04/05
+
* 04/
* 04/05
+
* 04/
* 04/08
+
* 04/
* 04/10
+
* 04/
 
|
 
|
* 04/08
+
* 04/
* 04/08
+
* 04/
* 04/10
+
* 04/
* 04/11
+
* 04/
 
|
 
|
 
* Tune the SENSOR and DRIVER nodes to drive the RC car
 
* Tune the SENSOR and DRIVER nodes to drive the RC car
Line 206: Line 201:
 
* '''Collective Test 2''':<font color = "DarkGreen">''' Drive the car to a hardcoded GPS destination'''</font color>  
 
* '''Collective Test 2''':<font color = "DarkGreen">''' Drive the car to a hardcoded GPS destination'''</font color>  
 
|
 
|
* 04/08
+
* 04/
* 04/08
+
* 04/
* 04/08
+
* 04/
* 04/08
+
* 04/
 
|  
 
|  
 
*<font color = "Red">Not Completed
 
*<font color = "Red">Not Completed
Line 217: Line 212:
 
|-
 
|-
 
! scope="row"| 7
 
! scope="row"| 7
04/11 to 04/17
+
04/ to 04/
 
|
 
|
* 04/12
+
* 04/
* 04/15
+
* 04/
* 04/12
+
* 04/
* 04/17
+
* 04/
 
|
 
|
* 04/15
+
* 04/
* 04/18
+
* 04/
* 04/16
+
* 04
* 04/18
+
* 04/
 
|
 
|
 
* Integrate GEO node to DRIVER node for navigation
 
* Integrate GEO node to DRIVER node for navigation
Line 234: Line 229:
 
* '''Collective Test 3''':<font color = "DarkGreen">''' Test the car driving with navigation data from the Android app'''</font color>
 
* '''Collective Test 3''':<font color = "DarkGreen">''' Test the car driving with navigation data from the Android app'''</font color>
 
|
 
|
* 04/15
+
* 04/
* 04/18
+
* 04/
* 04/16
+
* 04/
* 04/18
+
* 04/
 
|  
 
|  
 
*<font color = "Red">Not Completed
 
*<font color = "Red">Not Completed
Line 245: Line 240:
 
|-
 
|-
 
! scope="row"| 8
 
! scope="row"| 8
04/18 to 04/24
+
04/ to 04/
 
|
 
|
* 04/19
+
* 04/
* 04/19
+
* 04/
* 04/19
+
* 04/
* 04/19
+
* 04/
 
|
 
|
* 04/25
+
* 04/
* 04/25
+
* 04/
* 04/25
+
* 04/
* 04/25
+
* 04/
 
|
 
|
 
* Add functionalities to display various sensor data on the Android app
 
* Add functionalities to display various sensor data on the Android app
Line 262: Line 257:
 
* Test and improve the RC car performance based on the changes  
 
* Test and improve the RC car performance based on the changes  
 
|
 
|
* 04/25
+
* 04/
 
*  
 
*  
* 04/25
+
* 04/
* 04/25
+
* 04/
 
|  
 
|  
 
*<font color = "green">Not Completed
 
*<font color = "green">Not Completed
Line 272: Line 267:
 
|-
 
|-
 
! scope="row"| 9
 
! scope="row"| 9
04/25 to 05/01
+
04/ to 05/
 
|
 
|
* 04/26
+
* 04/
* 04/26
+
* 04/
* 04/26
+
* 04/
* 05/01
+
* 05/
 
|
 
|
* 04/30
+
* 04/
* 04/30
+
* 04/
* 04/30
+
* 04/
* 05/02
+
* 05/
 
|
 
|
 
* Design individual architecture diagrams and algorithms for documentation
 
* Design individual architecture diagrams and algorithms for documentation
Line 289: Line 284:
 
* '''Collective Test 4:'''<font color = "DarkGreen">''' Test car on various terrains and slopes'''</font color>
 
* '''Collective Test 4:'''<font color = "DarkGreen">''' Test car on various terrains and slopes'''</font color>
 
|
 
|
* 04/30
+
* 04/
* 04/30
+
* 04/
* 04/30
+
* 04/
* 05/02
+
* 05/
 
|  
 
|  
 
*<font color = "Red">Not Completed
 
*<font color = "Red">Not Completed
Line 300: Line 295:
 
|-
 
|-
 
! scope="row"| 10
 
! scope="row"| 10
05/02 to 05/10
+
05/ to 05/
 
|
 
|
* 05/03
+
* 05/
* 05/03
+
* 05/
* 05/08
+
* 05/
 
|
 
|
* 05/07
+
* 05/
* 05/07
+
* 05/
* 05/09
+
* 05/
 
|
 
|
 
* Replace the circuits with their corresponding PCBs and assemble
 
* Replace the circuits with their corresponding PCBs and assemble
Line 315: Line 310:
 
* '''Collective Test 5:'''<font color = "DarkGreen">''' Test the Prototype 1 with the aim of sending the car to return Preet's PCAN Dongle'''</font color>
 
* '''Collective Test 5:'''<font color = "DarkGreen">''' Test the Prototype 1 with the aim of sending the car to return Preet's PCAN Dongle'''</font color>
 
|
 
|
* 05/07
+
* 05/
* 05/07
+
* 05/
* 05/07
+
* 05/
 
|
 
|
 
*<font color = "Red">Not Completed
 
*<font color = "Red">Not Completed
Line 324: Line 319:
 
|-
 
|-
 
! scope="row"| 11
 
! scope="row"| 11
05/11 to 05/15
+
05/ to 05/
 
|
 
|
* 05/10
+
* 05/
* 05/10
+
* 05/
* 05/10
+
* 05/
* 05/15
+
* 05/
 
|
 
|
* 05/16
+
* 05/
* 05/16
+
* 05/
* 05/16
+
* 05/
* 05/16
+
* 05/
 
|
 
|
 
* Revise and improve the wiki report to cover all the aspects of design and implementation
 
* Revise and improve the wiki report to cover all the aspects of design and implementation
Line 341: Line 336:
 
* '''Collective Test 6:'''<font color = "DarkGreen">''' Have the final version of the project tested with all the functionalities'''</font color>
 
* '''Collective Test 6:'''<font color = "DarkGreen">''' Have the final version of the project tested with all the functionalities'''</font color>
 
|
 
|
* 05/16
+
* 05/
* 05/16
+
* 05/
* 05/16
+
* 05/
* 05/16
+
* 05/
 
|
 
|
 
*<font color = "Red">Not Completed
 
*<font color = "Red">Not Completed
Line 352: Line 347:
 
|-
 
|-
 
! scope="row"| 12  
 
! scope="row"| 12  
05/16 to 05/20
+
05/ to 05/
 
|
 
|
* 05/16
+
* 05/
* 05/18
+
* 05/
 
|
 
|
* 05/20
+
* 05/
* 05/20
+
* 05/
 
|
 
|
 
* Demo
 
* Demo
 
* Wiki Page Update
 
* Wiki Page Update
 
|
 
|
* 05/20
+
* 05/
* 05/20
+
* 05/
 
*<font color = "maroon">  
 
*<font color = "maroon">  
 
|  
 
|  

Revision as of 18:41, 6 April 2022

FireBolt RC Car

Abstract

Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge & sensor node, and geological node over the CAN bus. It is interfaced to the mobile application which sends GPS coordinates for the destination location to the driver node and reaches the destination by avoiding any obstacles that comes in the path. For obstacle detection and avoidance it uses Ultrasonic Sensor and makes the decision of steering and maintaining speed based on the bridge and sensor node's input.

Objectives & Introduction

Objectives

  • RC car can communicate with an Android application to:
    • Receive new coordinates to travel to
    • Send diagnostic information to the application
    • Emergency stop and start driving
  • RC car can travel to received coordinates in an efficient path while avoiding obstacles
  • RC car can maintain speed when driving on sloped ground
  • Design printed circuit board (PCB) to neatly connect all SJ2 boards
  • Design and 3D print sensor mounts for the ultrasonic sensors
  • Design a simple and intuitive user interface for the Android application
  • Design a DBC file

Introduction

The Firebolt RC car uses 4 SJ2 boards as nodes on the CAN bus

  1. Driver Node
  2. GEO Node
  3. Sensors and Bridge Node
  4. Motor Node
  5. Mobile Application

Team Members & Responsibilities

  • Priyanka Rai
    • Geo Controller
    • Bridge and Sensor Controller
    • Wiki Page Update
  • Ritu Patil
    • Motor Controller
    • Android Application
    • Integration Testing
  • Ritika Beniwal
    • Driver Node
    • PCB Designing
    • Wiki Page Update
  • Utsav Savaliya
    • Sensor Controller
    • Driver Node

Schedule

Week# Start Date Target Completion Date Task Actual Completion Date Status
1

03/06 to 03/12

  • 03/06
  • 03/08
  • 03/12
  • 03/10
  • 03/10
  • 03/12
  • Study and discuss previous project reports
  • Brainstorm on the requirements for the project
  • Identify and order/purchase the required components
  • 03/10
  • 03/10
  • 03/12
  • Completed
  • Completed
  • Completed
2

03/13 to 03/19

  • 03/13
  • 03/13
  • 03/14
  • 03/14
  • 03/18
  • 03/18
  • Distribute initial roles among the team members
  • Study the datasheets and manual of acquired components
  • Create and setup Gitlab Repository
  • 03/14
  • 03/18
  • 03/18
  • Completed
  • Completed
  • Completed
3

03/20 to 03/26

  • 03/20
  • 03/22
  • 03/20
  • 03/25
  • 03/26
  • 03/24
  • Write basic driver for ultrasonic sensor
  • Analyze and decide the hardware placement of the RC Car
  • Create SENSOR and DRIVER nodes to transmit and receive data
  • 03/26
  • 03/23
  • 03/25
  • Completed
  • Completed
  • Completed
4

03/27 to 04/01

  • 03/27
  • 03/27
  • 03/27
  • 04/04
  • 04/01
  • 03/28
  • Create the GEO node to get coordinates and cardinal directions from GPS and Compass
  • Create the MOTOR node to drive the RC Car
  • Start designing the DBC file
  • 04/02
  • 04/04
  • 04/01
  • In Progress
  • In Progress
  • In Progress
5

04/02 to 04/08

  • 04/02
  • 04/02
  • 04/02
  • 04/02
  • 04/02
  • 04/08
  • 04/08
  • 04/08
  • 04/08
  • 04/08
  • Finalize the DBC file
  • Design obstacle avoidance and steering logic on the DRIVER node
  • Design motor driving logic on the MOTOR node with the encoder
  • Integrate sensor data on the SENSOR node and check the tuning requirements
  • Integrate all the completed modules and test on BusMaster
  • 04/09
  • 04/09
  • 04/09
  • 04/09
  • 04/09
  • In Progress
  • In Progress
  • In Progress
  • In Progress
  • In Progress
6

04/04 to 04/10

  • 04/
  • 04/
  • 04/
  • 04/
  • 04/
  • 04/
  • 04/
  • 04/
  • Tune the SENSOR and DRIVER nodes to drive the RC car
  • Communicate to the DRIVER node over Bluetooth via Android app
  • Debug and revise the integrated modules with necessary improvements
  • Collective Test 2: Drive the car to a hardcoded GPS destination
  • 04/
  • 04/
  • 04/
  • 04/
  • Not Completed
  • Not Completed
  • Not Completed
  • Not Completed
7

04/ to 04/

  • 04/
  • 04/
  • 04/
  • 04/
  • 04/
  • 04/
  • 04
  • 04/
  • Integrate GEO node to DRIVER node for navigation
  • Design driving decision logic based on the navigation data
  • Design a dashboard on the LCD to display the values
  • Collective Test 3: Test the car driving with navigation data from the Android app
  • 04/
  • 04/
  • 04/
  • 04/
  • Not Completed
  • Not Completed
  • Not Completed
  • Not Completed
8

04/ to 04/

  • 04/
  • 04/
  • 04/
  • 04/
  • 04/
  • 04/
  • 04/
  • 04/
  • Add functionalities to display various sensor data on the Android app
  • Design and 3D print the required components
  • Design and order PCB
  • Test and improve the RC car performance based on the changes
  • 04/
  • 04/
  • 04/
  • Not Completed
  • Not Completed
  • Not Completed
9

04/ to 05/

  • 04/
  • 04/
  • 04/
  • 05/
  • 04/
  • 04/
  • 04/
  • 05/
  • Design individual architecture diagrams and algorithms for documentation
  • Make any necessary improvements based on previous test results
  • Complete the final version of the Android app
  • Collective Test 4: Test car on various terrains and slopes
  • 04/
  • 04/
  • 04/
  • 05/
  • Not Completed
  • Not Completed
  • Not Completed
  • Not Completed
10

05/ to 05/

  • 05/
  • 05/
  • 05/
  • 05/
  • 05/
  • 05/
  • Replace the circuits with their corresponding PCBs and assemble
  • Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1
  • Refactor the code modules with necessary improvements
  • Collective Test 5: Test the Prototype 1 with the aim of sending the car to return Preet's PCAN Dongle
  • 05/
  • 05/
  • 05/
  • Not Completed
  • Not Completed
  • Not Completed
11

05/ to 05/

  • 05/
  • 05/
  • 05/
  • 05/
  • 05/
  • 05/
  • 05/
  • 05/
  • Revise and improve the wiki report to cover all the aspects of design and implementation
  • Fix all the errors and make improvements
  • Final testing of all the modules and car
  • Collective Test 6: Have the final version of the project tested with all the functionalities
  • 05/
  • 05/
  • 05/
  • 05/
  • Not Completed
  • Not Completed
  • Not Completed
  • Not Completed
12

05/ to 05/

  • 05/
  • 05/
  • 05/
  • 05/
  • Demo
  • Wiki Page Update
  • 05/
  • 05/
  • Not Completed
  • Not Completed
  • Not Completed


Parts List & Cost

Item# Part Desciption Vendor Qty Cost
1 RC Car Traxxas [1]
2 CAN Transceivers MCP2551-I/P Comimark [2]
3 Ultrasonic Sensors Max Botix[3]
4 GPS and Antenna Adafruit[4]
5 HC05 bluetooth RF Transreceiver HiLetgo[5]
6 Triple-axis Accelerometer Adafruit[6]
7 Traxxas RPM Sensor Traxxas[7]
8 Discrete Electronic Components Generic[8]
9 Buck-Boost Voltage Regulator Generic[9]
10 Traxxas Telemetry Trigger magnet & holder Traxxas[10]
11 Acrylic Sheet Tap Plastic
12 Battery
13 Traxxas Battery and Charger


Printed Circuit Board

PCB Schematic

PCB Design

CAN Communication

We use controller area network to broadcast data between the 4 nodes. All nodes are connected to each other through a physically conventional two wire bus. The wires are a twisted pair with 120 Ω resistors at each ends of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). A CAN frame has the following contents:

  • Data Length Code (4bits)
  • Remote Transmission Request.
  • ID extend bit.
  • Message ID (11 bit or 29 bit)
  • Data bytes( depends on DLC)
  • CRC


Arbitration: No two nodes will transmit at the same time because if arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.

Bit Stuffing: CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.

Sr. No Message ID Message function Receivers
Driver Controller
1 300 speed and steering direction for the motor. Motor
2 310 Destination reached Sensor
Sensor Controller
1 200 Sensor sonars from front, back, left ,right sensor Driver
Motor Controller
8 700 motor speed, motor direction Driver
Geo and Bridge Controller
1 400 Bearing, Heading and Distance Driver
Debug messages
1 851 Driver Debug SENSOR,MOTOR,GEO_AND_BRIDGE
1 811 Motor Debug SENSOR,MOTOR,GEO_AND_BRIDGE
1 801 Sensor Debug SENSOR,MOTOR,GEO_AND_BRIDGE


Hardware Design


DBC File



Sensor ECU

Sensor Controller Diagram


Hardware Design

Sensor Controller Schematic

Board Pin Connections

Sensors are interfaced with combination of GPIO, ADC Pins on SJTWo board. Below is the descriptive pin layout:


Software Design

The sensor node mainly does two activity viz. 1) Read sensor values, 2) Transmit obstacle distance over CAN bus. Both of these activities happen in a 20Hz periodic callback.

1. Read Sensor Values


2. Transmit obstacle distance over CAN bus:


Technical Challenges

Neighboring Sensor Interference:

Frequent noisy measurements:



Motor ECU

Hardware Design


The motor node(SJ-2) interfaces primarily interfaces with:


All these three components have 3 pins each. The functionalities of these pins are mentioned in the table below.


Software Design

Technical Challenges



Geographical And Bridge Controller

Hardware Design











Software Design

Technical Challenges


Driver Node

Hardware Design

The Driver Node has one peripheral connected to it and that is the LCD screen.

Software Design

  • Driver Node Flow Chart

Technical Challenges



Mobile Application

User Interface

Software Design

This app has mainly two activities, The main activity and maps activity.

Maps Activity

Bluetooth/WIFI

Technical Challenges





Conclusion

Project Video

Project Source Code

Advise for Future Students

Acknowledgement

References

http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus