S24: Team Zero

From Embedded Systems Learning Academy
Revision as of 01:01, 22 May 2024 by 243 user4 (talk | contribs) (CAN Communication)

Jump to: navigation, search

Project Title

TEAM ZERO



Abstract

Team Zero's Self driving RC car, as the name states, is an autonomous vehicle designed to navigate to a given specified destination successfully, avoiding obstacles along its way. The car's infrastructure is built upon four key components: the Driver, Sensor and Bridge, Geo, and Motor nodes, which communicate internally via a CAN Bus and with the user via a mobile app. The vehicle continuously senses and processes all the information from these nodes to make decisions to ensure it stays on course and reaches its destination. It is built on a hobby-grade RC car chassis, modified with the necessary components and adjustments to fulfill its primary objectives of autonomous navigation and obstacle avoidance.

Introduction

The project was divided into N modules:

  • Geographical Controller and LCD
  • Motor Controller
  • Sensor-Bridge Controller
  • Driver Controller
  • Mobile Application

Team Members & Responsibilities

Team zero image.jpeg

Gitlab Project Link - [1]

Cody Ourique [2]

  • Geo controller
  • Compass,GPS and LCD interfacing
  • Hardware design, development and mounting
  • LCD modules
  • Unit Testing

Anusha Arunnandi [3]

  • Bridge-Sensor controller
  • Ultrasonic range finder and bluetooth interfacing
  • Web application
  • Unit Testing

Chaitanya Battula [4]

  • Driver controller
  • Motor controller
  • RPM sensor, ESC, and servo motor interfacing
  • Unit Testing

Rohit Duvvuru [5]

  • Unit Testing


Schedule

Week# Start Date End Date Task Status
1 03/03/2024 03/09/2024
  • Read previous projects, gather information and discuss among the group members.
  • Distribute modules to each team member.
  • Decide on list of parts to be used.
Completed
2 03/10/2024 03/16/2024
  • Order sensor parts, RC car, and other items from list.
  • Complete implementation of controller interfaces using custom values and communicating over CAN Bus with DBC.
3 03/17/2024 03/23/2024
  • Receive all parts from list
  • Start hardware prototype design
  • Integrate sensor values into Sensor controller interface.
  • Connect Motor, Driver, and Sensor modules over CAN Bus and verify their messages.
4 03/24/2024 03/30/2024
  • Connect geographical modules over CAN Bus and verify messages
  • Connect sensors to RC car
  • Prototype hardware components on bread board
5 03/31/2024 04/06/2024
  • Connect sensors to RC car/perf board
6 04/07/2024 04/13/2024
7 04/14/2024 04/20/2024
8 04/21/2024 04/27/2024


Parts List & Cost

Item# Part Desciption Vendor Qty Cost
1 RC car Traxxas [6] 1 $239.95
2 RPM sensor Traxxas [7] 1 $12.00
3 GPS Breakout Board Adafruit [8] 1 $54.95
4 PCB prototype circuit board A1 Cables N PCBs [9] 1 $8.57
5 Plexiglass Lesnlok [10] 1 $9.98
6 Wireless bluetooth RF transceiver HiLetgo [11] 1 $9.95
7 Compass Adafruit [12] 1 $5.95
8 Ultrasonic range finder Adafruit [13] 4 $114.00
8 Potentiometer Amazon [14] 1 $9.99
8 2 Pack 15000mAh power bank Amazon [15] 1 $19.99
8 GPS Antenna Mount Honbay [16] 2 $7.29
8 I2C Qwiic Cable Kit Amazon [17] 1 $9.99
8 Black Foam Padding Amazon [18] 1 $11.99
8 Traxxas 6537 Wire Retainers Amazon [19] 1 $6.95
8 USB Micro-B Breakout Board Adafruit [20] 1 $4.88
8 24 awg Wire Solid Core Amazon [21] 1 $14.99
8 ELEGOO 6PCS 170 tie-Points Mini Breadboard Amazon [22] 1 $6.98
8 GPS Antenna Amazon [23] 1 $10.99
8 Standoffs Amazon [24] 1 $22.96
8 Breadboard Wires Amazon [25] 1 $5.97
8 3/16 inch fiberglass rod TAP plastics 1 $5.11


Prototype Circuit Board

This prototype circuit board was carefully designed so that it could power all the microcontrollers, compass module, GPS module, bluetooth module, ultrasonic sensors and the LCD. In addition, the board has 4 slots for CAN tranceivers and an integrated CAN bus line. The board has a common ground line for all connected devices and has a total of 20 available sockets. Also, the board has 3.3V power and has 20 open sockets. Additionally, the board has 5V power with 4 available sockets delivered via micro USB.

Prototype board front.jpg Prototype board back.jpg




CAN Communication

<Talk about your message IDs or communication strategy, such as periodic transmission, MIA management etc.> The microcontrollers communicates using the CAN bus. Each controller is sending or receiving CAN messages through periodic callback functions.

Geological Controller CAN Messages:

  • 301 GEO_READINGS: This message holds the compass heading and bearing and the distance to destination values. This message is sent to the driver node so that the driver can correct knows the orientation of the vehicle and how far it is from reaching the destination.
  • 302 GEO_DATA_TO_DRIVER_AND_BRIDGE:
  • 304 GEO_DEBUG_MESSAGE

Sensor Controller CAN Messages:

  • Item 1
  • Item 2
  • Item 3

Motor Controller CAN Messages:

  • Item 1
  • Item 2
  • Item 3

Driver Controller CAN Messages:

  • Item 1
  • Item 2
  • Item 3


Hardware Design

CAN tranceiver no wire.jpg CAN tranceivers.jpeg

DBC File

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




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

<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

Bluetooth - https://gitlab.com/Ouriquco/cmpe_243_team_zero/-/tree/SensorBridgeNode/projects/Sensor_Controller/l5_application/Bluetooth?ref_type=heads


TZBluetooth.jpg

The HC-05 Bluetooth module is a widely used and versatile wireless communication module that enables Bluetooth connectivity using its Serial Port Protocol. Key Features HC-05 Bluetooth Module:

Bluetooth Standard:

The HC-05 Bluetooth module operates on Bluetooth version 2.0 + EDR (Enhanced Data Rate), supporting reliable and efficient wireless communication.

Operating Modes:

The module can operate in both Master and Slave modes. In Slave mode, it can pair with other Bluetooth devices, while in Master mode, it can initiate connections.

Communication Range:

The HC-05 is classified as a Class 2 Bluetooth device, providing a communication range of approximately 10 meters (33 feet). This makes it suitable for short to medium-range applications.

Serial Communication:

It communicates with other devices using a serial communication interface, making it compatible with microcontrollers like Arduino. The module typically supports standard baud rates like 9600 bps.

AT Command Configuration:

The HC-05 Bluetooth module can be configured using AT commands, allowing users to customize various parameters such as the device name, pairing code, and operating mode.

Voltage Compatibility:

The module operates within a voltage range of 3.6V to 6V, making it compatible with a variety of power sources.

Security Features:

The HC-05 supports basic security features, including the ability to set a PIN code for pairing and configuring security modes.

LED Indicator:

Many HC-05 modules have an onboard LED indicator that provides visual feedback on the pairing status and communication activity.

Hardware Design

Connected Vcc, GND, Tx and Rx pins. It requires 3.6-6V for functioning. The Tx and Rx pins are used to transmit and recieve the data to and from the application.

Software Design

o begin using serial transmission, you first need to pair the module to your device. During the pairing process, the password request encountered should be expecting one of the default passwords "1234" or "0000". You can change this password using one of the AT commands. We are calling the bluetooth the recieve and transmit functions periodically to send and recieve data in 10Hz periodic callbacks.

Technical Challenges

When we were powering to 3.3V, the LED on the bluetooth was blinking but it was not listing on the mobile phone when we had to connect it. After careful reading of the datasheet, we figured out that we have to power up with 3.6-6V.



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

MIT App Inventor 2 is a free, open-source web application for creating basic Android mobile applications without needing to code in Java or Kotlin. Instead, it uses block-based coding and a graphical user interface (GUI) similar to the Scratch programming language. Users can drag and drop blocks to design the user interface (UI) and employ functional blocks to develop logic, functions, and control flow.

Originally developed by Google and released in 2010, MIT App Inventor for Android was created by a team led by Hal Abelson and Mark Friedman. In the latter half of 2011, Google released the source code, ceased its server operations, and funded the establishment of The MIT Center for Mobile Learning. This center, led by App Inventor creator Hal Abelson and MIT professors Eric Klopfer and Mitchel Resnick, launched the MIT version of App Inventor in March 2012.

The platform includes the MIT AI Companion app, a mobile application that allows users to download a server-cached version of their app in development. This feature facilitates easy and convenient testing of intermediate functions and bug fixes by enabling real-time observation of changes. Once development is complete, users can build and download a ".apk" file, an installable file for the Android OS that allows them to test their app as a standalone application.

The web app features two key sections for mobile app development: the Designer page and the Blocks page.

Flow

TZFlow.png

User Interface

TZScreen1.jpg

Connects and disconnects the bluetooth and has start and stop buttons. The destination can be given by dropping the pin on the map. It can also be entered manually.

TZScreen2.jpg

Connects and disconnects the bluetooth. This screen gives the current latitude, longitude, distance to destination, speed of the car and all other details.

Bluetooth Block

The App uses the bluetooth client block to establish a connection with the HC-05 bluetooth module onboard the car. It is necessary to establish connection and connect to a bluetooth pair to send and receive messages. BluettothModule.png

Testing and Downloading

MIT App inventor projects can be accessed for testing on the MIT AI companion app or built into a downloadable APK file. It can also be exported as a file to be later imported. The file extension for an app inventor project is “.aia”.






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