Difference between revisions of "S21: (RC)^2"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Software Design)
(Software Design)
Line 301: Line 301:
 
: This function is used by the periodic callback to '''set the motor speed and the servo motor angle'''. This public function will invoke two ''private functions'', ''motors__speed_handler()'' which handles the motor speed of the car, and ''motors__steering_handler()'' which handles the steering angle of the car.
 
: This function is used by the periodic callback to '''set the motor speed and the servo motor angle'''. This public function will invoke two ''private functions'', ''motors__speed_handler()'' which handles the motor speed of the car, and ''motors__steering_handler()'' which handles the steering angle of the car.
 
*;''void motors__set_speed_and_steering_values(dbc_MOTOR_VALUES_s *motor_values)''
 
*;''void motors__set_speed_and_steering_values(dbc_MOTOR_VALUES_s *motor_values)''
: This is used for
+
: This function is used by the '''CAN Bus Message Handler to set the desired speed and steering angle'''. When the CAN Bus Message Handler module receives a CAN package, it will decode the motor values and call this function. This function is also used by the MIA handler as well to stop the RC Car if it doesn't receive any CAN messages from the driver node ten times in a 10Hz periodic callback.
 
*;''dbc_MOTOR_VALUES_TO_DRIVER_s motors__get_motor_values(void)''
 
*;''dbc_MOTOR_VALUES_TO_DRIVER_s motors__get_motor_values(void)''
: This is used for
+
: This function is used by the '''CAN Bus Message Handler to transmit the current speed''' of the car.
  
 
=== Technical Challenges ===
 
=== Technical Challenges ===

Revision as of 19:04, 16 May 2021

(RC)^2

(RC)^2



Abstract

<2-3 sentence abstract>

Introduction

The project was divided into N modules:

  • Sensor ...
  • Motor..
  • ...
  • Android

Team Members & Responsibilities

<Team Picture>

Gitlab Project Link - https://gitlab.com/rc-2/sjtwo-c



Schedule

Week# Start Date End Date Task Status
1 03/01/2021 03/07/2021
  • Read previous projects, gather information and discuss among the group members.
  • Distribute modules to each team member.
Complete
2 03/08/2021 03/14/2021
  • Host individual group meetings and review past semester projects for parts to purchase
  • Generate individual meeting notes to set baselines for project team meeting
  • Update to-buy list excel sheet with any parts ordered
  • Set up GitLab for team project
Complete
3 03/15/2021 03/21/2021
  • Setup GitLab for Android Application
  • Design mockups for the Android Application.
  • Interface SJ2 board and the ESP8266:Connecting to a local Wireless Access point
  • Try adding the MQTT Client library and publish and subscribe the first message to/from the server
  • Get distance data from ultrasonic sensors
  • Send ultrasonic sensor data over CAN bus
  • Control RC car motor speed and wheel alignment with SJ2 board
Complete
4 03/22/2021 03/28/2021
  • Solder GPS & compass modules
  • Motor: Control Motor node with Ultrasonic sensor data
  • Master Driver: Basic rules for driving the car
  • Code review before Spring Break
Complete
5 03/29/2021 04/04/2021
  • Geographical: Get compass and GPS data and send over CAN bus
  • Android Application Prototype[1]
  • Master Driver: Add Rules for heading to destination based on GPS/Compass value
  • Set up prototype board for all nodes
  • DBC file review for current system
Complete
6 04/05/2021 04/11/2021
  • Power requirements for PCB design
  • Submit pin-outs for all connected peripherals
  • Integrate ESP-8266 with SJ2 (read from Wi-Fi module)
  • Integrate Google Maps API into Android Application
  • Start on PCB Design
  • Interface OLED for data display
  • Test Run 1: Sensor and Motor Node integration
In Progress
7 04/12/2021 04/18/2021
  • Establish MQTT broker on a cloud
  • Interface with SJ2 using Android Mobile phone (Send and acknowledge coordinates)
  • Finalize Geo node, test for its accuracy
  • Define and test for "ideal" running environment for all nodes, focus on Sensor and Geo node
  • Acceleration/Velocity calculation with using acceleration sensor
  • Send PCB design to a manufacturer
  • Test Run 2: Sensor/Motor/Geo car driving
  • DBC file finalize
To-do
8 04/19/2021 04/25/2021
  • Feature improvement and bug fixes for Android Application and MQTT protocol
  • Test and verify PCB board
  • Power Delivery for the project
  • Master Driver: Add Rule for driving control based on current speed
  • Test Run 3: Find any potential bugs and improvement in the ideal running environment
To-do
9 04/26/2021 05/02/2021
  • Update the DBC for any final changes
  • Test Run 4: Improvement from Test Run 3
  • Update Wiki Report
To-do
10 05/03/2021 05/09/2021
  • Outer casing for (RC)^2
  • Test Run 5: Improvement from Test Run 4
To-do
11 05/10/2021 05/16/2021
  • Test Run 6: Improvement from Test Run 5
To-do
12 05/17/2021 05/23/2021
  • Check for operational bugs
  • Perform final bug fixes for any/all nodes
  • Video for (RC)^2
  • Test Run 7: Improvement from Test Run 6
To-do
13 05/24/2021 05/26/2021
  • Finalize Wiki Report
  • Finalize code and commit to master branch
  • Complete Final Demo
To-do


Parts List & Cost

TODO: Check Drive and add to this table

Item# Part Desciption Vendor Qty Cost
1 RC Car Traxxas 1 $250.00
2 CAN Transceivers MCP2551-I/P Microchip [2] 8 Free Samples
3 GPS Module Adafruit [3] 1 $59.99
4 Compass Adafruit [4] 1 $14.95
5 ESP8266 (WiFi) DIYmall [5] 1 $14.95
6 HC-020K (Wheel Encoder) Hilitchi [6] 1 $8.99
7 URM09 Ultrasonic Sensor (I²C) DFRobot [7] 4 $12.90
8 SJ2 Board Microcontroller SCE [8] 5 $250.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>

DBC File

Current DBC File




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



Motor ECU

<Picture and link to Gitlab>

Hardware Design

Software Design

The motor node is designed to receive a desired speed and a desired steering angle from the driver node. These values will be used to adjust the RC Car's motor speed and servo motor angle to align with those requested values.

There are four public functions that are provided in the motor node.

  • void motors__init(void)
This function is used by the periodic callback to initialize the required peripherals used to control the motor speed as well as the servo motor angle.
  • void motors__run(void)
This function is used by the periodic callback to set the motor speed and the servo motor angle. This public function will invoke two private functions, motors__speed_handler() which handles the motor speed of the car, and motors__steering_handler() which handles the steering angle of the car.
  • void motors__set_speed_and_steering_values(dbc_MOTOR_VALUES_s *motor_values)
This function is used by the CAN Bus Message Handler to set the desired speed and steering angle. When the CAN Bus Message Handler module receives a CAN package, it will decode the motor values and call this function. This function is also used by the MIA handler as well to stop the RC Car if it doesn't receive any CAN messages from the driver node ten times in a 10Hz periodic callback.
  • dbc_MOTOR_VALUES_TO_DRIVER_s motors__get_motor_values(void)
This function is used by the CAN Bus Message Handler to transmit the current speed of the car.

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>



Master 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