S19: Hot Wheels
Contents
Project Title
Self-navigating RC car based on CAN communication.
Abstract
Embedded Systems are used to take real world input and covert it into the data that can be processed to monitor,control or obtain desired results. In this project , we aim to design and develop an autonomous self-driving RC car that navigates from the current location to the destination location that is selected through an Android application, avoiding all the obstacles in the path. The car comprises of 5 controllers communicating with each other over the CAN Bus, each having different functionality.
Introduction
The project was divided into 5 modules:
- Sensor Controller: This module detects obstacles in the driving path with the help of ultrasonic sensors.
- Motor Controller: This controller drives the DC motor and Servo in the car.
- Geographical Controller: This module assists the car in navigating to a destination with the help of location details provided by GPS and the
orientation(bearing and heading angle) provided by the compass.
- Bluetooth Controller: The controller uses Bluetooth to communicate with an Android application on the Android phone. Destination coordinates are provided by this module. The Bluetooth module also displays important data like Ultrasonic sensor values, GPS coordinates and speed.
- Master Controller: This module will collect data from all modules and direct the motor module towards the destination.
Team Members & Responsibilities
<Team Picture>
Gitlab Project Link - [1]
- Master Controller
- Kailash Chakravarty
- Sensor Controller
- Rishabh Sheth
- Motor Controller
- Kriti Hedau
- Tahir Rawn
- Geographical Controller
- Harmeen Joshi
- Nandini Shankar
- Communication Bridge Controller & Android Application
- Swanand Sapre
- Aquib Mulani
- Code Review & Commit Approvers
- Rishabh Sheth
- Nandini Shankar
- Kailash Chakravarty
Schedule
Week# | Date | Task | Status | Completion Date |
---|---|---|---|---|
1 | 02/12/19 |
|
|
|
2 | 02/17/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 Desciption | Vendor | Qty | Cost |
---|---|---|---|---|
1 | RC Car | Traxxas | 1 | $250.00 |
2 | CAN Transceivers MCP2551-I/P | Microchip [2] | 8 | Free Samples |
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>
DBC File
Gitlab link to your DBC file [3]
VERSION "0.1.0"
BU_: MASTER SENSOR MOTORIO GEO APP
BO_ 220 MOTORIO_CMD: 4 MASTER
SG_ MOTORIO_CMD_Direction : 0|8@1+ (1,0) [0|2] "" MOTORIO
BO_ 210 ULTRA_CMD: 4 SENSOR
SG_ SENSOR_SONARS_FrontDistance : 0|8@1+ (1,0) [2|100] "" MASTER
BO_ 250 DISTANCE: 4 GEO
SG_ DISTANCE_FinalDistance : 0|16@1+ (0.1,0) [0|0] "" MASTER
BO_ 102 BLUETOOTH: 4 APP
SG_ DISTANCE_FinalDistance : 0|16@1+ (0.1,0) [0|0] "" MASTER
CM_ BU_ MASTER "The Master controller of the car";
CM_ BU_ MOTOR "The motor controller of the car";
CM_ BU_ SENSOR "The sensor controller of the car";
CM_ BU_ GEO "The Geo controller of the car";
CM_ BU_ APP "The Bluetooth/App controller of the car";
Sensor ECU
<Picture and link to Gitlab>
MOTOR CONTROLLER
Group Members
Design & Implementation
Hardware Design
SJOne Pin Diagram | ||
---|---|---|
Sr.No | Pin Number | Pin Function |
1 | P0.0 | CAN RX |
2 | P0.1 | CAN TX |
3 | P2.0 | Servo Motor |
4 | P2.1 | Electronic Speed Controller (ESC) |
5 | P2.5 | RPM Sensor |
Hardware Specifications
ESC and DC Motor
The DC motor is used to drive the vehicle using PWM signal transmitted to ESC. The DC motor in the car is provided by Traxxas and is a 12-turn brush-less motor. It can be considered as the most important part of the vehicle as it drives the vehicle ahead. The motor can be driven either in the forward direction or reverse by setting appropriate duty cycle to the ESC. In order to achieve reverse direction, the motor has to cycle through states of neutral at least once before going into reverse.
Wires on (ESC) | Description | Wire Color Code |
---|---|---|
(+)ve | Positive Terminal | RED |
(-)ve | Negetive terminal | BLACK |
S.No | Wires on (ESC) | Description | Wire Color Code |
---|---|---|---|
1. | (+)ve | Connects to DC Motor (+)ve | RED |
2. | (-)ve | Connects to DC Motor (-)ve | BLACK |
3. | (+)ve | Connects to (+)ve of Battery | RED |
4. | (-)ve | Connects to (-)ve of Battery | BLACK |
5. | P2.1 (PWM2) | PWM Signal From SJOne | WHITE |
6. | NC | NC | RED |
7. | (-)ve | Negetive terminal | BLACK |
Servo
The servo motor is used to steer the vehicle based on commands received from the master controller. The servo motor is powered on using 5V power supply via PCB from the power-bank. The servo motor also has three pins which serve as pins for PWM signal(WHITE Color), VCC(RED Color) and GND(BLACK Color). The PWM pin configured to supply steering signal on the SJ-one board is connected to the PWM pin on the servo. We have used PWM signals at 120Hz, the values were sent for the five different positions as per the Master controller commands.
Pin No. (SJOne Board) | Function | Wire Color Code |
---|---|---|
P2.3 (PWM4) | PWM Signal | WHITE |
VCC | 5 Volts | RED |
GND | 0 volts | BLACK |
RPM Sensor
The RPM sensor is used to measure the RPS of the shaft attached to DC motor. The sensor consists of magnet and a signal is generated every time the motor shaft cuts the magnet. This signal is used received as an interrupt on a GPIO pin in the SJ-one board. By using this, the rotations per second is calculated by clearing the interrupt every one second in the 1Hz periodic function. The sensor is installed in the gear compartment of the Traxxas car along with the magnet trigger. The pulse gets generated every time the wheel roattes and is sent on the white wire. The other two wires are used for 5V power Supply (Red) and Ground(Black).
Pin No. (SJOne Board) | Description | Wire Color Code |
---|---|---|
P2.6 | GPIO (INPUT) | WHITE |
VCC | 5V | RED |
GND | Ground | BLACK |
Hardware Interface
Software Design
Technical Challenges
Future Counsel
Geographical Controller
<Picture and link to Gitlab>
Hardware Design
Software Design
<List the code modules that are being called periodically.>
Technical Challenges
<Bullet or Headings of a module>
Unreliable GPS lock
<Problem Summary> <Problem Resolution>
Communication Bridge Controller & LCD
User communicates with the car through the Communication Bridge Controller. This module consists of the LPC1758 communicating with the Android application on the phone via Bluetooth.The user selects the final destination on the google map to which the car should navigate, through an android application. The Android application also works as a display where it displays the recorded values of the ultrasonic sensors, the current latitude and longitude, the bearing angle, and the compass values for the car.
<Picture and link to Gitlab>
The Hardware and the Software details are given below:
Hardware Design
Software Design
<List the code modules that are being called periodically.>
Technical Challenges
<Bullet or Headings of a module>
Insane Bug
<Problem Summary> <Problem Resolution>
Master Module
<Picture and link to Gitlab>
Hardware Design
Software Design
<List the code modules that are being called periodically.>
Technical Challenges
<Bullet or Headings of a module>
Improper Unit Testing
<Problem Summary> <Problem Resolution>
Conclusion
<Organized summary of the project>
<What did you learn?>
Project Video
Project Source Code
Advise for Future Students
<Bullet points and discussion>