<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://socialledge.com/sjsu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Proj+user9</id>
		<title>Embedded Systems Learning Academy - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://socialledge.com/sjsu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Proj+user9"/>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php/Special:Contributions/Proj_user9"/>
		<updated>2026-05-06T09:21:01Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72860</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72860"/>
				<updated>2024-12-20T01:32:42Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Brick Breaker ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
The project is split into a few sub-topics that could be worked by individuals:&lt;br /&gt;
&lt;br /&gt;
*Main &amp;quot;clock&amp;quot; task for updating the LED matrix.&lt;br /&gt;
*Main gameplay loop task that would update the position of the ball, paddle, and blocks.&lt;br /&gt;
*Design of various game screens via a state machine.&lt;br /&gt;
*Game logic to determine the ball's bounce relative to its current trajectory.&lt;br /&gt;
*MP3 background track during gameplay.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
** Game logic&lt;br /&gt;
** Block generator  &lt;br /&gt;
*  Kevin&lt;br /&gt;
** Hardware connections&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Led testing , button testing&lt;br /&gt;
*  Harbans&lt;br /&gt;
** Accerometer and paddle&lt;br /&gt;
** Block generator&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Part&lt;br /&gt;
! Link&lt;br /&gt;
! Price&lt;br /&gt;
! Quantity&lt;br /&gt;
|-&lt;br /&gt;
| LED Matrix&lt;br /&gt;
| [https://www.sparkfun.com/products/14824 Sparkfun]&lt;br /&gt;
| $80&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Power Supply&lt;br /&gt;
| [https://www.adafruit.com/product/658 Adafruit]&lt;br /&gt;
| $30&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Button&lt;br /&gt;
| [https://www.adafruit.com/product/3489 Adafruit]&lt;br /&gt;
| $2.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Quick connect wires&lt;br /&gt;
| [https://www.adafruit.com/product/1152 Adafruit]&lt;br /&gt;
| $4.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| MP3 Module&lt;br /&gt;
| [https://www.adafruit.com/product/1788 Adafruit]&lt;br /&gt;
| $34.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Speakers&lt;br /&gt;
| [https://www.adafruit.com/product/1669 Adafruit]&lt;br /&gt;
| $7.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| SJ2 Development Board&lt;br /&gt;
| [https://www.amazon.com/Generic-SJTwo-SJ2-SJSU/dp/B08G9LRPZ8/ref=sr_1_2?keywords=SJ2&amp;amp;qid=1639798706&amp;amp;sr=8-2 Amazon]&lt;br /&gt;
| $50&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
For the design and implementation of the Brick Breaker game, the SJ2 board serves as the central controller to interface with a 64x64 LED matrix, control buttons, and an accelerometer. Each of these components plays a crucial role in the functionality of the game, enabling dynamic gameplay and interactivity.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
In the hardware setup for this project, we outlined a few high-level connections that were necessary to implement the Brick Breaker game. These connections can be visualized in the top-level schematic shown below. The schematic was designed using draw.io.&lt;br /&gt;
&lt;br /&gt;
Hardware Interconnects:&lt;br /&gt;
*SJ2 Connection to the LED Matrix&lt;br /&gt;
*SJ2 Connection to Buttons&lt;br /&gt;
*SJ2 Connection to Accelerometer&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to LED Matrix:&lt;br /&gt;
The SJ2 board controlled the 64x64 LED matrix, which served as the primary visual interface for the game. The matrix required a range of GPIO pins for row, column, and color control. It did not use standard communication protocols like I2C or UART but relied on GPIO switching to drive the display. The key pin connections are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Address Pins&lt;br /&gt;
! Color Pins&lt;br /&gt;
! Control Pins&lt;br /&gt;
|-&lt;br /&gt;
| A, B, C, D, E&lt;br /&gt;
| R1, G1, B1 | R2, G2, B2&lt;br /&gt;
| OE, CLK, LAT&lt;br /&gt;
|}&lt;br /&gt;
*Address Pins: Allowed selection of specific rows for updating pixel data (rows 0 - 31).&lt;br /&gt;
*Color Pins: Enabled 8 distinct colors through combinations of red, green, and blue.&lt;br /&gt;
*Control Pins:&lt;br /&gt;
** OE (Output Enable): Controlled when the display was active.&lt;br /&gt;
** CLK (Clock): Synchronized data transfer for row and pixel updates.&lt;br /&gt;
** LAT (Latch): Locked data into the display.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Buttons&lt;br /&gt;
The buttons served as an input interface for the player to control the paddle in the game. The buttons were connected to GPIO pins on the SJ2 board and configured to trigger on falling-edge interrupts. Each button press caused an interrupt, which was handled by a software ISR to update the paddle’s position on the LED matrix.&lt;br /&gt;
&lt;br /&gt;
Key features of the button setup:&lt;br /&gt;
&lt;br /&gt;
*Interrupt-Driven Design:&lt;br /&gt;
**Each button press generated an interrupt to ensure immediate responsiveness.&lt;br /&gt;
*Debouncing:&lt;br /&gt;
**Software debouncing eliminated the effects of mechanical noise in button presses.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Accelerometer&lt;br /&gt;
The accelerometer provided an alternative input method by allowing the player to control the paddle through tilting. It was connected to the SJ2 board via the I2C interface, which facilitated real-time reading of the accelerometer's X-axis data. This data was processed to move the paddle proportionally to the tilt.&lt;br /&gt;
&lt;br /&gt;
Key features of the accelerometer setup:&lt;br /&gt;
&lt;br /&gt;
*I2C Communication:&lt;br /&gt;
**Enabled efficient data transfer between the accelerometer and the SJ2 board.&lt;br /&gt;
*Real-Time Input:&lt;br /&gt;
**X-axis readings were mapped to paddle movement for smooth control.&lt;br /&gt;
*Calibration:&lt;br /&gt;
**Initial calibration ensured accurate and stable readings, compensating for noise or offsets.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
The 64x64 LED matrix acts as the primary display for the game, rendering all visual elements such as the paddle, ball, and bricks. The SJ2 board interfaces with the matrix using GPIO pins, which are configured to drive the rows, columns, and colors.&lt;br /&gt;
&lt;br /&gt;
*GPIO Configuration:&lt;br /&gt;
&lt;br /&gt;
**The matrix requires GPIO pins for address selection (A, B, C, D, E), color data (R2, G2, B2), and control signals (OE, CLK, LAT).&lt;br /&gt;
**The pins are switched at high frequencies to refresh the display and maintain smooth animations.&lt;br /&gt;
*Driving the Display:&lt;br /&gt;
&lt;br /&gt;
**Row Selection: Address pins are used to select a specific row on the matrix for updating pixel data.&lt;br /&gt;
**Pixel Data Transfer: Color pins determine the intensity of red, green, and blue for each pixel, enabling up to 8 colors.&lt;br /&gt;
**Control Signals:&lt;br /&gt;
***OE (Output Enable): Controls when the LEDs are active.&lt;br /&gt;
***CLK (Clock): Synchronizes data transfer to the display.&lt;br /&gt;
***LAT (Latch): Locks the updated data into the matrix for display.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The Brick Breaker game was implemented using a state machine design, which allowed for modular and organized control over the game's logic. The main function driving the game, game_state_machine__run_game(), transitions through different states based on user interactions and game events. These states, such as INIT, GAME, PAUSE, and GAME_OVER, provide a clear structure to the game flow. A state machine design was chosen for its ability to simplify complex logic by dividing it into smaller, well-defined states, making the code easier to understand and maintain. Transitions between states occur based on specific triggers, such as a button press to pause the game or the ball falling out of bounds. By using a state machine, redundant operations were minimized, particularly in the GAME state, where initialization functions were executed only once during transitions to ensure optimal performance.&lt;br /&gt;
&lt;br /&gt;
The LED matrix was updated dynamically within the GAME state to display the paddle, ball, and bricks. Instead of rewriting the entire display buffer, only the portions of the matrix affected by the game elements were updated. This approach ensured smoother animations and reduced computational overhead. For instance, paddle movement involved modifying only the row where the paddle resided, while ball updates modified the ball's current and next positions. This optimization kept the gameplay visually responsive without overloading the system's resources. The main gameplay loop also called specialized functions to handle game elements like the paddle, ball, and brick states, ensuring modularity and scalability for future enhancements.&lt;br /&gt;
&lt;br /&gt;
The ball movement and collision logic, handled within game_state_machine__update_ball_position, formed the core of the game’s mechanics. The ball's trajectory was calculated based on its current velocity and direction. Collisions with walls, the paddle, and bricks were detected and resolved in real time. Wall collisions caused the ball to bounce, while paddle collisions adjusted its angle of reflection based on the contact point, giving players greater control. Brick collisions were handled by checking the corresponding coordinates in the matrix buffer. If a collision occurred, the brick's state was updated, and the ball's direction was adjusted. Special cases, such as corner collisions with multiple bricks, were also addressed by updating all affected bricks and recalculating the ball’s trajectory.&lt;br /&gt;
&lt;br /&gt;
To enhance gameplay, bricks were designed with varying levels of durability represented by their color. Each brick color indicated its &amp;quot;life,&amp;quot; with red bricks having one life and higher durability bricks represented by colors like green, blue, and purple. When a brick was hit, its life was decremented, and the LED matrix was updated to reflect the new state. Scoring was integrated into this system, with players earning points for each hit or destroyed brick. To add a competitive aspect, a high-score table was maintained, tracking the top five scores. Although the high scores were stored in a sorted array for this implementation, future plans include saving them to the SJ2 board’s flash memory to ensure persistence across power cycles.&lt;br /&gt;
&lt;br /&gt;
Player input was managed through buttons and an accelerometer, providing intuitive and responsive control. The buttons allowed precise left or right movement of the paddle, while the accelerometer offered an alternative control method, enabling the paddle to move based on the tilt of the SJ2 board. This dual-input system enhanced player engagement and added variety to the gameplay experience. Additionally, dynamic game elements, such as increasing ball speed and additional levels of difficulty, kept the game challenging as players progressed. The game state transitions were smooth and well-optimized, with the state machine ensuring clear separation of responsibilities and efficient execution of tasks.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
A significant technical challenge during the implementation of the Brick Breaker game was ensuring accurate collision detection, especially when the ball interacted with multiple bricks or hit a corner. The issue arose when the ball's next position overlapped with a corner shared by two or more blocks. This led to inconsistencies in how collisions were detected and resolved. For instance, if two bricks were stacked vertically or placed side by side, the ball's direction could behave unpredictably, leading to unexpected bounces. Initially, our collision logic treated corners as part of either a row or a column based on the ball's direction of travel. While this approach worked in simple cases, it failed when multiple blocks were involved.&lt;br /&gt;
&lt;br /&gt;
To address this, we standardized the handling of corners by treating all corners as part of a column rather than a row. This change provided a consistent logic flow for detecting and handling collisions, ensuring the ball's trajectory behaved predictably even in complex scenarios. Testing this approach revealed that treating corners as rows led to erratic bounces and breaks in the gameplay flow, while treating them as part of columns yielded a smoother and more intuitive experience. This adjustment significantly improved the game's performance and user experience, resolving an issue that had initially seemed insurmountable.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
The Brick Breaker game project served as an excellent opportunity to apply and expand our knowledge of embedded systems, specifically in hardware-software integration and real-time application development. Throughout the project, we faced several challenges, including collision detection issues with block corners and the difficulties associated with debugging real-time game logic. By addressing these problems with a combination of structured design and innovative solutions, such as standardizing collision handling and leveraging modular code, we were able to deliver a functional and engaging game.&lt;br /&gt;
&lt;br /&gt;
Testing was both a critical and challenging aspect of the project. While print statement debugging helped identify and resolve issues, it became evident that this method is not scalable for larger or more complex projects. This realization underscored the importance of implementing robust unit testing frameworks in future endeavors to streamline the debugging process and improve code reliability.&lt;br /&gt;
&lt;br /&gt;
Through this project, we not only deepened our understanding of the SJ2 board and its peripherals but also gained valuable insights into designing interactive systems with real-time constraints. We learned the significance of modular programming, effective problem-solving, and the practical challenges of integrating multiple hardware components. Moreover, this project reinforced the importance of designing for scalability and maintainability, skills that are critical for larger and more complex systems.&lt;br /&gt;
&lt;br /&gt;
Ultimately, this project has enhanced our ability to think critically about embedded system design and implementation, providing a strong foundation for tackling similar challenges in future endeavors. The lessons learned and skills developed here will undoubtedly inform and improve our approach to future projects, whether they involve gaming systems, embedded controls, or other interactive applications.&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
We'd like to thank Preet for giving us the opportunity to develop and learn through an interactive team project. We would also like to acknowledge the TA Shailja Jain for their feedback throughout the semester.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72859</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72859"/>
				<updated>2024-12-20T01:31:04Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Brick Breaker ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
The project is split into a few sub-topics that could be worked by individuals:&lt;br /&gt;
&lt;br /&gt;
*Main &amp;quot;clock&amp;quot; task for updating the LED matrix.&lt;br /&gt;
*Main gameplay loop task that would update the position of the ball, paddle, and blocks.&lt;br /&gt;
*Design of various game screens via a state machine.&lt;br /&gt;
*Game logic to determine the ball's bounce relative to its current trajectory.&lt;br /&gt;
*MP3 background track during gameplay.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
** Game logic&lt;br /&gt;
** Block generator  &lt;br /&gt;
*  Kevin&lt;br /&gt;
** Hardware connections&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Led testing , button testing&lt;br /&gt;
*  Harbans&lt;br /&gt;
** Accerometer and paddle&lt;br /&gt;
** Block generator&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Part&lt;br /&gt;
! Link&lt;br /&gt;
! Price&lt;br /&gt;
! Quantity&lt;br /&gt;
|-&lt;br /&gt;
| LED Matrix&lt;br /&gt;
| [https://www.sparkfun.com/products/14824 Sparkfun]&lt;br /&gt;
| $80&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Power Supply&lt;br /&gt;
| [https://www.adafruit.com/product/658 Adafruit]&lt;br /&gt;
| $30&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Button&lt;br /&gt;
| [https://www.adafruit.com/product/3489 Adafruit]&lt;br /&gt;
| $2.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Quick connect wires&lt;br /&gt;
| [https://www.adafruit.com/product/1152 Adafruit]&lt;br /&gt;
| $4.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| MP3 Module&lt;br /&gt;
| [https://www.adafruit.com/product/1788 Adafruit]&lt;br /&gt;
| $34.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Speakers&lt;br /&gt;
| [https://www.adafruit.com/product/1669 Adafruit]&lt;br /&gt;
| $7.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| SJ2 Development Board&lt;br /&gt;
| [https://www.amazon.com/Generic-SJTwo-SJ2-SJSU/dp/B08G9LRPZ8/ref=sr_1_2?keywords=SJ2&amp;amp;qid=1639798706&amp;amp;sr=8-2 Amazon]&lt;br /&gt;
| $50&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
For the design and implementation of the Brick Breaker game, the SJ2 board serves as the central controller to interface with a 64x64 LED matrix, control buttons, and an accelerometer. Each of these components plays a crucial role in the functionality of the game, enabling dynamic gameplay and interactivity.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
In the hardware setup for this project, we outlined a few high-level connections that were necessary to implement the Brick Breaker game. These connections can be visualized in the top-level schematic shown below. The schematic was designed using draw.io.&lt;br /&gt;
&lt;br /&gt;
Hardware Interconnects:&lt;br /&gt;
*SJ2 Connection to the LED Matrix&lt;br /&gt;
*SJ2 Connection to Buttons&lt;br /&gt;
*SJ2 Connection to Accelerometer&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to LED Matrix:&lt;br /&gt;
The SJ2 board controlled the 64x64 LED matrix, which served as the primary visual interface for the game. The matrix required a range of GPIO pins for row, column, and color control. It did not use standard communication protocols like I2C or UART but relied on GPIO switching to drive the display. The key pin connections are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Address Pins&lt;br /&gt;
! Color Pins&lt;br /&gt;
! Control Pins&lt;br /&gt;
|-&lt;br /&gt;
| A, B, C, D, E&lt;br /&gt;
| R1, G1, B1 | R2, G2, B2&lt;br /&gt;
| OE, CLK, LAT&lt;br /&gt;
|}&lt;br /&gt;
*Address Pins: Allowed selection of specific rows for updating pixel data (rows 0 - 31).&lt;br /&gt;
*Color Pins: Enabled 8 distinct colors through combinations of red, green, and blue.&lt;br /&gt;
*Control Pins:&lt;br /&gt;
** OE (Output Enable): Controlled when the display was active.&lt;br /&gt;
** CLK (Clock): Synchronized data transfer for row and pixel updates.&lt;br /&gt;
** LAT (Latch): Locked data into the display.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Buttons&lt;br /&gt;
The buttons served as an input interface for the player to control the paddle in the game. The buttons were connected to GPIO pins on the SJ2 board and configured to trigger on falling-edge interrupts. Each button press caused an interrupt, which was handled by a software ISR to update the paddle’s position on the LED matrix.&lt;br /&gt;
&lt;br /&gt;
Key features of the button setup:&lt;br /&gt;
&lt;br /&gt;
*Interrupt-Driven Design:&lt;br /&gt;
**Each button press generated an interrupt to ensure immediate responsiveness.&lt;br /&gt;
*Debouncing:&lt;br /&gt;
**Software debouncing eliminated the effects of mechanical noise in button presses.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Accelerometer&lt;br /&gt;
The accelerometer provided an alternative input method by allowing the player to control the paddle through tilting. It was connected to the SJ2 board via the I2C interface, which facilitated real-time reading of the accelerometer's X-axis data. This data was processed to move the paddle proportionally to the tilt.&lt;br /&gt;
&lt;br /&gt;
Key features of the accelerometer setup:&lt;br /&gt;
&lt;br /&gt;
*I2C Communication:&lt;br /&gt;
**Enabled efficient data transfer between the accelerometer and the SJ2 board.&lt;br /&gt;
*Real-Time Input:&lt;br /&gt;
**X-axis readings were mapped to paddle movement for smooth control.&lt;br /&gt;
*Calibration:&lt;br /&gt;
**Initial calibration ensured accurate and stable readings, compensating for noise or offsets.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
The 64x64 LED matrix acts as the primary display for the game, rendering all visual elements such as the paddle, ball, and bricks. The SJ2 board interfaces with the matrix using GPIO pins, which are configured to drive the rows, columns, and colors.&lt;br /&gt;
&lt;br /&gt;
*GPIO Configuration:&lt;br /&gt;
&lt;br /&gt;
**The matrix requires GPIO pins for address selection (A, B, C, D, E), color data (R2, G2, B2), and control signals (OE, CLK, LAT).&lt;br /&gt;
**The pins are switched at high frequencies to refresh the display and maintain smooth animations.&lt;br /&gt;
*Driving the Display:&lt;br /&gt;
&lt;br /&gt;
**Row Selection: Address pins are used to select a specific row on the matrix for updating pixel data.&lt;br /&gt;
**Pixel Data Transfer: Color pins determine the intensity of red, green, and blue for each pixel, enabling up to 8 colors.&lt;br /&gt;
**Control Signals:&lt;br /&gt;
***OE (Output Enable): Controls when the LEDs are active.&lt;br /&gt;
***CLK (Clock): Synchronizes data transfer to the display.&lt;br /&gt;
***LAT (Latch): Locks the updated data into the matrix for display.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The Brick Breaker game was implemented using a state machine design, which allowed for modular and organized control over the game's logic. The main function driving the game, game_state_machine__run_game(), transitions through different states based on user interactions and game events. These states, such as INIT, GAME, PAUSE, and GAME_OVER, provide a clear structure to the game flow. A state machine design was chosen for its ability to simplify complex logic by dividing it into smaller, well-defined states, making the code easier to understand and maintain. Transitions between states occur based on specific triggers, such as a button press to pause the game or the ball falling out of bounds. By using a state machine, redundant operations were minimized, particularly in the GAME state, where initialization functions were executed only once during transitions to ensure optimal performance.&lt;br /&gt;
&lt;br /&gt;
The LED matrix was updated dynamically within the GAME state to display the paddle, ball, and bricks. Instead of rewriting the entire display buffer, only the portions of the matrix affected by the game elements were updated. This approach ensured smoother animations and reduced computational overhead. For instance, paddle movement involved modifying only the row where the paddle resided, while ball updates modified the ball's current and next positions. This optimization kept the gameplay visually responsive without overloading the system's resources. The main gameplay loop also called specialized functions to handle game elements like the paddle, ball, and brick states, ensuring modularity and scalability for future enhancements.&lt;br /&gt;
&lt;br /&gt;
The ball movement and collision logic, handled within game_state_machine__update_ball_position, formed the core of the game’s mechanics. The ball's trajectory was calculated based on its current velocity and direction. Collisions with walls, the paddle, and bricks were detected and resolved in real time. Wall collisions caused the ball to bounce, while paddle collisions adjusted its angle of reflection based on the contact point, giving players greater control. Brick collisions were handled by checking the corresponding coordinates in the matrix buffer. If a collision occurred, the brick's state was updated, and the ball's direction was adjusted. Special cases, such as corner collisions with multiple bricks, were also addressed by updating all affected bricks and recalculating the ball’s trajectory.&lt;br /&gt;
&lt;br /&gt;
To enhance gameplay, bricks were designed with varying levels of durability represented by their color. Each brick color indicated its &amp;quot;life,&amp;quot; with red bricks having one life and higher durability bricks represented by colors like green, blue, and purple. When a brick was hit, its life was decremented, and the LED matrix was updated to reflect the new state. Scoring was integrated into this system, with players earning points for each hit or destroyed brick. To add a competitive aspect, a high-score table was maintained, tracking the top five scores. Although the high scores were stored in a sorted array for this implementation, future plans include saving them to the SJ2 board’s flash memory to ensure persistence across power cycles.&lt;br /&gt;
&lt;br /&gt;
Player input was managed through buttons and an accelerometer, providing intuitive and responsive control. The buttons allowed precise left or right movement of the paddle, while the accelerometer offered an alternative control method, enabling the paddle to move based on the tilt of the SJ2 board. This dual-input system enhanced player engagement and added variety to the gameplay experience. Additionally, dynamic game elements, such as increasing ball speed and additional levels of difficulty, kept the game challenging as players progressed. The game state transitions were smooth and well-optimized, with the state machine ensuring clear separation of responsibilities and efficient execution of tasks.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
A significant technical challenge during the implementation of the Brick Breaker game was ensuring accurate collision detection, especially when the ball interacted with multiple bricks or hit a corner. The issue arose when the ball's next position overlapped with a corner shared by two or more blocks. This led to inconsistencies in how collisions were detected and resolved. For instance, if two bricks were stacked vertically or placed side by side, the ball's direction could behave unpredictably, leading to unexpected bounces. Initially, our collision logic treated corners as part of either a row or a column based on the ball's direction of travel. While this approach worked in simple cases, it failed when multiple blocks were involved.&lt;br /&gt;
&lt;br /&gt;
To address this, we standardized the handling of corners by treating all corners as part of a column rather than a row. This change provided a consistent logic flow for detecting and handling collisions, ensuring the ball's trajectory behaved predictably even in complex scenarios. Testing this approach revealed that treating corners as rows led to erratic bounces and breaks in the gameplay flow, while treating them as part of columns yielded a smoother and more intuitive experience. This adjustment significantly improved the game's performance and user experience, resolving an issue that had initially seemed insurmountable.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
The Brick Breaker game project served as an excellent opportunity to apply and expand our knowledge of embedded systems, specifically in hardware-software integration and real-time application development. Throughout the project, we faced several challenges, including collision detection issues with block corners and the difficulties associated with debugging real-time game logic. By addressing these problems with a combination of structured design and innovative solutions, such as standardizing collision handling and leveraging modular code, we were able to deliver a functional and engaging game.&lt;br /&gt;
&lt;br /&gt;
Testing was both a critical and challenging aspect of the project. While print statement debugging helped identify and resolve issues, it became evident that this method is not scalable for larger or more complex projects. This realization underscored the importance of implementing robust unit testing frameworks in future endeavors to streamline the debugging process and improve code reliability.&lt;br /&gt;
&lt;br /&gt;
Through this project, we not only deepened our understanding of the SJ2 board and its peripherals but also gained valuable insights into designing interactive systems with real-time constraints. We learned the significance of modular programming, effective problem-solving, and the practical challenges of integrating multiple hardware components. Moreover, this project reinforced the importance of designing for scalability and maintainability, skills that are critical for larger and more complex systems.&lt;br /&gt;
&lt;br /&gt;
Ultimately, this project has enhanced our ability to think critically about embedded system design and implementation, providing a strong foundation for tackling similar challenges in future endeavors. The lessons learned and skills developed here will undoubtedly inform and improve our approach to future projects, whether they involve gaming systems, embedded controls, or other interactive applications.&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
We'd like to thank Preet for giving us the opportunity to develop and learn through an interactive team project. We would also like to acknowledge the TA Shailja Jain for their feedback throughout the semester.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72858</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72858"/>
				<updated>2024-12-20T01:30:42Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Acknowledgement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Brick Breaker ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
The project is split into a few sub-topics that could be worked by individuals:&lt;br /&gt;
&lt;br /&gt;
*Main &amp;quot;clock&amp;quot; task for updating the LED matrix.&lt;br /&gt;
*Main gameplay loop task that would update the position of the ball, paddle, and blocks.&lt;br /&gt;
*Design of various game screens via a state machine.&lt;br /&gt;
*Game logic to determine the ball's bounce relative to its current trajectory.&lt;br /&gt;
*MP3 background track during gameplay.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
** Game logic&lt;br /&gt;
** Block generator  &lt;br /&gt;
*  Kevin&lt;br /&gt;
** Hardware connections&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Led testing , button testing&lt;br /&gt;
*  Harbans&lt;br /&gt;
** Accerometer and paddle&lt;br /&gt;
** Block generator&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Part&lt;br /&gt;
! Link&lt;br /&gt;
! Price&lt;br /&gt;
! Quantity&lt;br /&gt;
|-&lt;br /&gt;
| LED Matrix&lt;br /&gt;
| [https://www.sparkfun.com/products/14824 Sparkfun]&lt;br /&gt;
| $80&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Power Supply&lt;br /&gt;
| [https://www.adafruit.com/product/658 Adafruit]&lt;br /&gt;
| $30&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Button&lt;br /&gt;
| [https://www.adafruit.com/product/3489 Adafruit]&lt;br /&gt;
| $2.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Quick connect wires&lt;br /&gt;
| [https://www.adafruit.com/product/1152 Adafruit]&lt;br /&gt;
| $4.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| MP3 Module&lt;br /&gt;
| [https://www.adafruit.com/product/1788 Adafruit]&lt;br /&gt;
| $34.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Speakers&lt;br /&gt;
| [https://www.adafruit.com/product/1669 Adafruit]&lt;br /&gt;
| $7.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| SJ2 Development Board&lt;br /&gt;
| [https://www.amazon.com/Generic-SJTwo-SJ2-SJSU/dp/B08G9LRPZ8/ref=sr_1_2?keywords=SJ2&amp;amp;qid=1639798706&amp;amp;sr=8-2 Amazon]&lt;br /&gt;
| $50&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
For the design and implementation of the Brick Breaker game, the SJ2 board serves as the central controller to interface with a 64x64 LED matrix, control buttons, and an accelerometer. Each of these components plays a crucial role in the functionality of the game, enabling dynamic gameplay and interactivity.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
In the hardware setup for this project, we outlined a few high-level connections that were necessary to implement the Brick Breaker game. These connections can be visualized in the top-level schematic shown below. The schematic was designed using draw.io.&lt;br /&gt;
&lt;br /&gt;
Hardware Interconnects:&lt;br /&gt;
*SJ2 Connection to the LED Matrix&lt;br /&gt;
*SJ2 Connection to Buttons&lt;br /&gt;
*SJ2 Connection to Accelerometer&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to LED Matrix:&lt;br /&gt;
The SJ2 board controlled the 64x64 LED matrix, which served as the primary visual interface for the game. The matrix required a range of GPIO pins for row, column, and color control. It did not use standard communication protocols like I2C or UART but relied on GPIO switching to drive the display. The key pin connections are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Address Pins&lt;br /&gt;
! Color Pins&lt;br /&gt;
! Control Pins&lt;br /&gt;
|-&lt;br /&gt;
| A, B, C, D, E&lt;br /&gt;
| R1, G1, B1 | R2, G2, B2&lt;br /&gt;
| OE, CLK, LAT&lt;br /&gt;
|}&lt;br /&gt;
*Address Pins: Allowed selection of specific rows for updating pixel data (rows 0 - 31).&lt;br /&gt;
*Color Pins: Enabled 8 distinct colors through combinations of red, green, and blue.&lt;br /&gt;
*Control Pins:&lt;br /&gt;
** OE (Output Enable): Controlled when the display was active.&lt;br /&gt;
** CLK (Clock): Synchronized data transfer for row and pixel updates.&lt;br /&gt;
** LAT (Latch): Locked data into the display.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Buttons&lt;br /&gt;
The buttons served as an input interface for the player to control the paddle in the game. The buttons were connected to GPIO pins on the SJ2 board and configured to trigger on falling-edge interrupts. Each button press caused an interrupt, which was handled by a software ISR to update the paddle’s position on the LED matrix.&lt;br /&gt;
&lt;br /&gt;
Key features of the button setup:&lt;br /&gt;
&lt;br /&gt;
*Interrupt-Driven Design:&lt;br /&gt;
**Each button press generated an interrupt to ensure immediate responsiveness.&lt;br /&gt;
*Debouncing:&lt;br /&gt;
**Software debouncing eliminated the effects of mechanical noise in button presses.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Accelerometer&lt;br /&gt;
The accelerometer provided an alternative input method by allowing the player to control the paddle through tilting. It was connected to the SJ2 board via the I2C interface, which facilitated real-time reading of the accelerometer's X-axis data. This data was processed to move the paddle proportionally to the tilt.&lt;br /&gt;
&lt;br /&gt;
Key features of the accelerometer setup:&lt;br /&gt;
&lt;br /&gt;
*I2C Communication:&lt;br /&gt;
**Enabled efficient data transfer between the accelerometer and the SJ2 board.&lt;br /&gt;
*Real-Time Input:&lt;br /&gt;
**X-axis readings were mapped to paddle movement for smooth control.&lt;br /&gt;
*Calibration:&lt;br /&gt;
**Initial calibration ensured accurate and stable readings, compensating for noise or offsets.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
The 64x64 LED matrix acts as the primary display for the game, rendering all visual elements such as the paddle, ball, and bricks. The SJ2 board interfaces with the matrix using GPIO pins, which are configured to drive the rows, columns, and colors.&lt;br /&gt;
&lt;br /&gt;
*GPIO Configuration:&lt;br /&gt;
&lt;br /&gt;
**The matrix requires GPIO pins for address selection (A, B, C, D, E), color data (R2, G2, B2), and control signals (OE, CLK, LAT).&lt;br /&gt;
**The pins are switched at high frequencies to refresh the display and maintain smooth animations.&lt;br /&gt;
*Driving the Display:&lt;br /&gt;
&lt;br /&gt;
**Row Selection: Address pins are used to select a specific row on the matrix for updating pixel data.&lt;br /&gt;
**Pixel Data Transfer: Color pins determine the intensity of red, green, and blue for each pixel, enabling up to 8 colors.&lt;br /&gt;
**Control Signals:&lt;br /&gt;
***OE (Output Enable): Controls when the LEDs are active.&lt;br /&gt;
***CLK (Clock): Synchronizes data transfer to the display.&lt;br /&gt;
***LAT (Latch): Locks the updated data into the matrix for display.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The Brick Breaker game was implemented using a state machine design, which allowed for modular and organized control over the game's logic. The main function driving the game, game_state_machine__run_game(), transitions through different states based on user interactions and game events. These states, such as INIT, GAME, PAUSE, and GAME_OVER, provide a clear structure to the game flow. A state machine design was chosen for its ability to simplify complex logic by dividing it into smaller, well-defined states, making the code easier to understand and maintain. Transitions between states occur based on specific triggers, such as a button press to pause the game or the ball falling out of bounds. By using a state machine, redundant operations were minimized, particularly in the GAME state, where initialization functions were executed only once during transitions to ensure optimal performance.&lt;br /&gt;
&lt;br /&gt;
The LED matrix was updated dynamically within the GAME state to display the paddle, ball, and bricks. Instead of rewriting the entire display buffer, only the portions of the matrix affected by the game elements were updated. This approach ensured smoother animations and reduced computational overhead. For instance, paddle movement involved modifying only the row where the paddle resided, while ball updates modified the ball's current and next positions. This optimization kept the gameplay visually responsive without overloading the system's resources. The main gameplay loop also called specialized functions to handle game elements like the paddle, ball, and brick states, ensuring modularity and scalability for future enhancements.&lt;br /&gt;
&lt;br /&gt;
The ball movement and collision logic, handled within game_state_machine__update_ball_position, formed the core of the game’s mechanics. The ball's trajectory was calculated based on its current velocity and direction. Collisions with walls, the paddle, and bricks were detected and resolved in real time. Wall collisions caused the ball to bounce, while paddle collisions adjusted its angle of reflection based on the contact point, giving players greater control. Brick collisions were handled by checking the corresponding coordinates in the matrix buffer. If a collision occurred, the brick's state was updated, and the ball's direction was adjusted. Special cases, such as corner collisions with multiple bricks, were also addressed by updating all affected bricks and recalculating the ball’s trajectory.&lt;br /&gt;
&lt;br /&gt;
To enhance gameplay, bricks were designed with varying levels of durability represented by their color. Each brick color indicated its &amp;quot;life,&amp;quot; with red bricks having one life and higher durability bricks represented by colors like green, blue, and purple. When a brick was hit, its life was decremented, and the LED matrix was updated to reflect the new state. Scoring was integrated into this system, with players earning points for each hit or destroyed brick. To add a competitive aspect, a high-score table was maintained, tracking the top five scores. Although the high scores were stored in a sorted array for this implementation, future plans include saving them to the SJ2 board’s flash memory to ensure persistence across power cycles.&lt;br /&gt;
&lt;br /&gt;
Player input was managed through buttons and an accelerometer, providing intuitive and responsive control. The buttons allowed precise left or right movement of the paddle, while the accelerometer offered an alternative control method, enabling the paddle to move based on the tilt of the SJ2 board. This dual-input system enhanced player engagement and added variety to the gameplay experience. Additionally, dynamic game elements, such as increasing ball speed and additional levels of difficulty, kept the game challenging as players progressed. The game state transitions were smooth and well-optimized, with the state machine ensuring clear separation of responsibilities and efficient execution of tasks.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
A significant technical challenge during the implementation of the Brick Breaker game was ensuring accurate collision detection, especially when the ball interacted with multiple bricks or hit a corner. The issue arose when the ball's next position overlapped with a corner shared by two or more blocks. This led to inconsistencies in how collisions were detected and resolved. For instance, if two bricks were stacked vertically or placed side by side, the ball's direction could behave unpredictably, leading to unexpected bounces. Initially, our collision logic treated corners as part of either a row or a column based on the ball's direction of travel. While this approach worked in simple cases, it failed when multiple blocks were involved.&lt;br /&gt;
&lt;br /&gt;
To address this, we standardized the handling of corners by treating all corners as part of a column rather than a row. This change provided a consistent logic flow for detecting and handling collisions, ensuring the ball's trajectory behaved predictably even in complex scenarios. Testing this approach revealed that treating corners as rows led to erratic bounces and breaks in the gameplay flow, while treating them as part of columns yielded a smoother and more intuitive experience. This adjustment significantly improved the game's performance and user experience, resolving an issue that had initially seemed insurmountable.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
The Brick Breaker game project served as an excellent opportunity to apply and expand our knowledge of embedded systems, specifically in hardware-software integration and real-time application development. Throughout the project, we faced several challenges, including collision detection issues with block corners and the difficulties associated with debugging real-time game logic. By addressing these problems with a combination of structured design and innovative solutions, such as standardizing collision handling and leveraging modular code, we were able to deliver a functional and engaging game.&lt;br /&gt;
&lt;br /&gt;
Testing was both a critical and challenging aspect of the project. While print statement debugging helped identify and resolve issues, it became evident that this method is not scalable for larger or more complex projects. This realization underscored the importance of implementing robust unit testing frameworks in future endeavors to streamline the debugging process and improve code reliability.&lt;br /&gt;
&lt;br /&gt;
Through this project, we not only deepened our understanding of the SJ2 board and its peripherals but also gained valuable insights into designing interactive systems with real-time constraints. We learned the significance of modular programming, effective problem-solving, and the practical challenges of integrating multiple hardware components. Moreover, this project reinforced the importance of designing for scalability and maintainability, skills that are critical for larger and more complex systems.&lt;br /&gt;
&lt;br /&gt;
Ultimately, this project has enhanced our ability to think critically about embedded system design and implementation, providing a strong foundation for tackling similar challenges in future endeavors. The lessons learned and skills developed here will undoubtedly inform and improve our approach to future projects, whether they involve gaming systems, embedded controls, or other interactive applications.&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
We'd like to thank Preet for giving us the opportunity to develop and learn through an interactive team project. We would also like to acknowledge the TA Shailja Jain for their feedback throughout the semester.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72857</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72857"/>
				<updated>2024-12-20T01:30:24Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Acknowledgement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Brick Breaker ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
The project is split into a few sub-topics that could be worked by individuals:&lt;br /&gt;
&lt;br /&gt;
*Main &amp;quot;clock&amp;quot; task for updating the LED matrix.&lt;br /&gt;
*Main gameplay loop task that would update the position of the ball, paddle, and blocks.&lt;br /&gt;
*Design of various game screens via a state machine.&lt;br /&gt;
*Game logic to determine the ball's bounce relative to its current trajectory.&lt;br /&gt;
*MP3 background track during gameplay.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
** Game logic&lt;br /&gt;
** Block generator  &lt;br /&gt;
*  Kevin&lt;br /&gt;
** Hardware connections&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Led testing , button testing&lt;br /&gt;
*  Harbans&lt;br /&gt;
** Accerometer and paddle&lt;br /&gt;
** Block generator&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Part&lt;br /&gt;
! Link&lt;br /&gt;
! Price&lt;br /&gt;
! Quantity&lt;br /&gt;
|-&lt;br /&gt;
| LED Matrix&lt;br /&gt;
| [https://www.sparkfun.com/products/14824 Sparkfun]&lt;br /&gt;
| $80&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Power Supply&lt;br /&gt;
| [https://www.adafruit.com/product/658 Adafruit]&lt;br /&gt;
| $30&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Button&lt;br /&gt;
| [https://www.adafruit.com/product/3489 Adafruit]&lt;br /&gt;
| $2.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Quick connect wires&lt;br /&gt;
| [https://www.adafruit.com/product/1152 Adafruit]&lt;br /&gt;
| $4.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| MP3 Module&lt;br /&gt;
| [https://www.adafruit.com/product/1788 Adafruit]&lt;br /&gt;
| $34.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Speakers&lt;br /&gt;
| [https://www.adafruit.com/product/1669 Adafruit]&lt;br /&gt;
| $7.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| SJ2 Development Board&lt;br /&gt;
| [https://www.amazon.com/Generic-SJTwo-SJ2-SJSU/dp/B08G9LRPZ8/ref=sr_1_2?keywords=SJ2&amp;amp;qid=1639798706&amp;amp;sr=8-2 Amazon]&lt;br /&gt;
| $50&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
For the design and implementation of the Brick Breaker game, the SJ2 board serves as the central controller to interface with a 64x64 LED matrix, control buttons, and an accelerometer. Each of these components plays a crucial role in the functionality of the game, enabling dynamic gameplay and interactivity.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
In the hardware setup for this project, we outlined a few high-level connections that were necessary to implement the Brick Breaker game. These connections can be visualized in the top-level schematic shown below. The schematic was designed using draw.io.&lt;br /&gt;
&lt;br /&gt;
Hardware Interconnects:&lt;br /&gt;
*SJ2 Connection to the LED Matrix&lt;br /&gt;
*SJ2 Connection to Buttons&lt;br /&gt;
*SJ2 Connection to Accelerometer&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to LED Matrix:&lt;br /&gt;
The SJ2 board controlled the 64x64 LED matrix, which served as the primary visual interface for the game. The matrix required a range of GPIO pins for row, column, and color control. It did not use standard communication protocols like I2C or UART but relied on GPIO switching to drive the display. The key pin connections are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Address Pins&lt;br /&gt;
! Color Pins&lt;br /&gt;
! Control Pins&lt;br /&gt;
|-&lt;br /&gt;
| A, B, C, D, E&lt;br /&gt;
| R1, G1, B1 | R2, G2, B2&lt;br /&gt;
| OE, CLK, LAT&lt;br /&gt;
|}&lt;br /&gt;
*Address Pins: Allowed selection of specific rows for updating pixel data (rows 0 - 31).&lt;br /&gt;
*Color Pins: Enabled 8 distinct colors through combinations of red, green, and blue.&lt;br /&gt;
*Control Pins:&lt;br /&gt;
** OE (Output Enable): Controlled when the display was active.&lt;br /&gt;
** CLK (Clock): Synchronized data transfer for row and pixel updates.&lt;br /&gt;
** LAT (Latch): Locked data into the display.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Buttons&lt;br /&gt;
The buttons served as an input interface for the player to control the paddle in the game. The buttons were connected to GPIO pins on the SJ2 board and configured to trigger on falling-edge interrupts. Each button press caused an interrupt, which was handled by a software ISR to update the paddle’s position on the LED matrix.&lt;br /&gt;
&lt;br /&gt;
Key features of the button setup:&lt;br /&gt;
&lt;br /&gt;
*Interrupt-Driven Design:&lt;br /&gt;
**Each button press generated an interrupt to ensure immediate responsiveness.&lt;br /&gt;
*Debouncing:&lt;br /&gt;
**Software debouncing eliminated the effects of mechanical noise in button presses.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Accelerometer&lt;br /&gt;
The accelerometer provided an alternative input method by allowing the player to control the paddle through tilting. It was connected to the SJ2 board via the I2C interface, which facilitated real-time reading of the accelerometer's X-axis data. This data was processed to move the paddle proportionally to the tilt.&lt;br /&gt;
&lt;br /&gt;
Key features of the accelerometer setup:&lt;br /&gt;
&lt;br /&gt;
*I2C Communication:&lt;br /&gt;
**Enabled efficient data transfer between the accelerometer and the SJ2 board.&lt;br /&gt;
*Real-Time Input:&lt;br /&gt;
**X-axis readings were mapped to paddle movement for smooth control.&lt;br /&gt;
*Calibration:&lt;br /&gt;
**Initial calibration ensured accurate and stable readings, compensating for noise or offsets.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
The 64x64 LED matrix acts as the primary display for the game, rendering all visual elements such as the paddle, ball, and bricks. The SJ2 board interfaces with the matrix using GPIO pins, which are configured to drive the rows, columns, and colors.&lt;br /&gt;
&lt;br /&gt;
*GPIO Configuration:&lt;br /&gt;
&lt;br /&gt;
**The matrix requires GPIO pins for address selection (A, B, C, D, E), color data (R2, G2, B2), and control signals (OE, CLK, LAT).&lt;br /&gt;
**The pins are switched at high frequencies to refresh the display and maintain smooth animations.&lt;br /&gt;
*Driving the Display:&lt;br /&gt;
&lt;br /&gt;
**Row Selection: Address pins are used to select a specific row on the matrix for updating pixel data.&lt;br /&gt;
**Pixel Data Transfer: Color pins determine the intensity of red, green, and blue for each pixel, enabling up to 8 colors.&lt;br /&gt;
**Control Signals:&lt;br /&gt;
***OE (Output Enable): Controls when the LEDs are active.&lt;br /&gt;
***CLK (Clock): Synchronizes data transfer to the display.&lt;br /&gt;
***LAT (Latch): Locks the updated data into the matrix for display.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The Brick Breaker game was implemented using a state machine design, which allowed for modular and organized control over the game's logic. The main function driving the game, game_state_machine__run_game(), transitions through different states based on user interactions and game events. These states, such as INIT, GAME, PAUSE, and GAME_OVER, provide a clear structure to the game flow. A state machine design was chosen for its ability to simplify complex logic by dividing it into smaller, well-defined states, making the code easier to understand and maintain. Transitions between states occur based on specific triggers, such as a button press to pause the game or the ball falling out of bounds. By using a state machine, redundant operations were minimized, particularly in the GAME state, where initialization functions were executed only once during transitions to ensure optimal performance.&lt;br /&gt;
&lt;br /&gt;
The LED matrix was updated dynamically within the GAME state to display the paddle, ball, and bricks. Instead of rewriting the entire display buffer, only the portions of the matrix affected by the game elements were updated. This approach ensured smoother animations and reduced computational overhead. For instance, paddle movement involved modifying only the row where the paddle resided, while ball updates modified the ball's current and next positions. This optimization kept the gameplay visually responsive without overloading the system's resources. The main gameplay loop also called specialized functions to handle game elements like the paddle, ball, and brick states, ensuring modularity and scalability for future enhancements.&lt;br /&gt;
&lt;br /&gt;
The ball movement and collision logic, handled within game_state_machine__update_ball_position, formed the core of the game’s mechanics. The ball's trajectory was calculated based on its current velocity and direction. Collisions with walls, the paddle, and bricks were detected and resolved in real time. Wall collisions caused the ball to bounce, while paddle collisions adjusted its angle of reflection based on the contact point, giving players greater control. Brick collisions were handled by checking the corresponding coordinates in the matrix buffer. If a collision occurred, the brick's state was updated, and the ball's direction was adjusted. Special cases, such as corner collisions with multiple bricks, were also addressed by updating all affected bricks and recalculating the ball’s trajectory.&lt;br /&gt;
&lt;br /&gt;
To enhance gameplay, bricks were designed with varying levels of durability represented by their color. Each brick color indicated its &amp;quot;life,&amp;quot; with red bricks having one life and higher durability bricks represented by colors like green, blue, and purple. When a brick was hit, its life was decremented, and the LED matrix was updated to reflect the new state. Scoring was integrated into this system, with players earning points for each hit or destroyed brick. To add a competitive aspect, a high-score table was maintained, tracking the top five scores. Although the high scores were stored in a sorted array for this implementation, future plans include saving them to the SJ2 board’s flash memory to ensure persistence across power cycles.&lt;br /&gt;
&lt;br /&gt;
Player input was managed through buttons and an accelerometer, providing intuitive and responsive control. The buttons allowed precise left or right movement of the paddle, while the accelerometer offered an alternative control method, enabling the paddle to move based on the tilt of the SJ2 board. This dual-input system enhanced player engagement and added variety to the gameplay experience. Additionally, dynamic game elements, such as increasing ball speed and additional levels of difficulty, kept the game challenging as players progressed. The game state transitions were smooth and well-optimized, with the state machine ensuring clear separation of responsibilities and efficient execution of tasks.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
A significant technical challenge during the implementation of the Brick Breaker game was ensuring accurate collision detection, especially when the ball interacted with multiple bricks or hit a corner. The issue arose when the ball's next position overlapped with a corner shared by two or more blocks. This led to inconsistencies in how collisions were detected and resolved. For instance, if two bricks were stacked vertically or placed side by side, the ball's direction could behave unpredictably, leading to unexpected bounces. Initially, our collision logic treated corners as part of either a row or a column based on the ball's direction of travel. While this approach worked in simple cases, it failed when multiple blocks were involved.&lt;br /&gt;
&lt;br /&gt;
To address this, we standardized the handling of corners by treating all corners as part of a column rather than a row. This change provided a consistent logic flow for detecting and handling collisions, ensuring the ball's trajectory behaved predictably even in complex scenarios. Testing this approach revealed that treating corners as rows led to erratic bounces and breaks in the gameplay flow, while treating them as part of columns yielded a smoother and more intuitive experience. This adjustment significantly improved the game's performance and user experience, resolving an issue that had initially seemed insurmountable.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
The Brick Breaker game project served as an excellent opportunity to apply and expand our knowledge of embedded systems, specifically in hardware-software integration and real-time application development. Throughout the project, we faced several challenges, including collision detection issues with block corners and the difficulties associated with debugging real-time game logic. By addressing these problems with a combination of structured design and innovative solutions, such as standardizing collision handling and leveraging modular code, we were able to deliver a functional and engaging game.&lt;br /&gt;
&lt;br /&gt;
Testing was both a critical and challenging aspect of the project. While print statement debugging helped identify and resolve issues, it became evident that this method is not scalable for larger or more complex projects. This realization underscored the importance of implementing robust unit testing frameworks in future endeavors to streamline the debugging process and improve code reliability.&lt;br /&gt;
&lt;br /&gt;
Through this project, we not only deepened our understanding of the SJ2 board and its peripherals but also gained valuable insights into designing interactive systems with real-time constraints. We learned the significance of modular programming, effective problem-solving, and the practical challenges of integrating multiple hardware components. Moreover, this project reinforced the importance of designing for scalability and maintainability, skills that are critical for larger and more complex systems.&lt;br /&gt;
&lt;br /&gt;
Ultimately, this project has enhanced our ability to think critically about embedded system design and implementation, providing a strong foundation for tackling similar challenges in future endeavors. The lessons learned and skills developed here will undoubtedly inform and improve our approach to future projects, whether they involve gaming systems, embedded controls, or other interactive applications.&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
We'd like to thank Preet for giving us the opportunity to develop and learn through an interactive team project. We would also like to acknowledge the TA Shilja Jain for their feedback throughout the semester.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72856</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72856"/>
				<updated>2024-12-20T01:29:20Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Brick Breaker ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
The project is split into a few sub-topics that could be worked by individuals:&lt;br /&gt;
&lt;br /&gt;
*Main &amp;quot;clock&amp;quot; task for updating the LED matrix.&lt;br /&gt;
*Main gameplay loop task that would update the position of the ball, paddle, and blocks.&lt;br /&gt;
*Design of various game screens via a state machine.&lt;br /&gt;
*Game logic to determine the ball's bounce relative to its current trajectory.&lt;br /&gt;
*MP3 background track during gameplay.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
** Game logic&lt;br /&gt;
** Block generator  &lt;br /&gt;
*  Kevin&lt;br /&gt;
** Hardware connections&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Led testing , button testing&lt;br /&gt;
*  Harbans&lt;br /&gt;
** Accerometer and paddle&lt;br /&gt;
** Block generator&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Part&lt;br /&gt;
! Link&lt;br /&gt;
! Price&lt;br /&gt;
! Quantity&lt;br /&gt;
|-&lt;br /&gt;
| LED Matrix&lt;br /&gt;
| [https://www.sparkfun.com/products/14824 Sparkfun]&lt;br /&gt;
| $80&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Power Supply&lt;br /&gt;
| [https://www.adafruit.com/product/658 Adafruit]&lt;br /&gt;
| $30&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Button&lt;br /&gt;
| [https://www.adafruit.com/product/3489 Adafruit]&lt;br /&gt;
| $2.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Quick connect wires&lt;br /&gt;
| [https://www.adafruit.com/product/1152 Adafruit]&lt;br /&gt;
| $4.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| MP3 Module&lt;br /&gt;
| [https://www.adafruit.com/product/1788 Adafruit]&lt;br /&gt;
| $34.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Speakers&lt;br /&gt;
| [https://www.adafruit.com/product/1669 Adafruit]&lt;br /&gt;
| $7.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| SJ2 Development Board&lt;br /&gt;
| [https://www.amazon.com/Generic-SJTwo-SJ2-SJSU/dp/B08G9LRPZ8/ref=sr_1_2?keywords=SJ2&amp;amp;qid=1639798706&amp;amp;sr=8-2 Amazon]&lt;br /&gt;
| $50&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
For the design and implementation of the Brick Breaker game, the SJ2 board serves as the central controller to interface with a 64x64 LED matrix, control buttons, and an accelerometer. Each of these components plays a crucial role in the functionality of the game, enabling dynamic gameplay and interactivity.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
In the hardware setup for this project, we outlined a few high-level connections that were necessary to implement the Brick Breaker game. These connections can be visualized in the top-level schematic shown below. The schematic was designed using draw.io.&lt;br /&gt;
&lt;br /&gt;
Hardware Interconnects:&lt;br /&gt;
*SJ2 Connection to the LED Matrix&lt;br /&gt;
*SJ2 Connection to Buttons&lt;br /&gt;
*SJ2 Connection to Accelerometer&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to LED Matrix:&lt;br /&gt;
The SJ2 board controlled the 64x64 LED matrix, which served as the primary visual interface for the game. The matrix required a range of GPIO pins for row, column, and color control. It did not use standard communication protocols like I2C or UART but relied on GPIO switching to drive the display. The key pin connections are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Address Pins&lt;br /&gt;
! Color Pins&lt;br /&gt;
! Control Pins&lt;br /&gt;
|-&lt;br /&gt;
| A, B, C, D, E&lt;br /&gt;
| R1, G1, B1 | R2, G2, B2&lt;br /&gt;
| OE, CLK, LAT&lt;br /&gt;
|}&lt;br /&gt;
*Address Pins: Allowed selection of specific rows for updating pixel data (rows 0 - 31).&lt;br /&gt;
*Color Pins: Enabled 8 distinct colors through combinations of red, green, and blue.&lt;br /&gt;
*Control Pins:&lt;br /&gt;
** OE (Output Enable): Controlled when the display was active.&lt;br /&gt;
** CLK (Clock): Synchronized data transfer for row and pixel updates.&lt;br /&gt;
** LAT (Latch): Locked data into the display.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Buttons&lt;br /&gt;
The buttons served as an input interface for the player to control the paddle in the game. The buttons were connected to GPIO pins on the SJ2 board and configured to trigger on falling-edge interrupts. Each button press caused an interrupt, which was handled by a software ISR to update the paddle’s position on the LED matrix.&lt;br /&gt;
&lt;br /&gt;
Key features of the button setup:&lt;br /&gt;
&lt;br /&gt;
*Interrupt-Driven Design:&lt;br /&gt;
**Each button press generated an interrupt to ensure immediate responsiveness.&lt;br /&gt;
*Debouncing:&lt;br /&gt;
**Software debouncing eliminated the effects of mechanical noise in button presses.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Accelerometer&lt;br /&gt;
The accelerometer provided an alternative input method by allowing the player to control the paddle through tilting. It was connected to the SJ2 board via the I2C interface, which facilitated real-time reading of the accelerometer's X-axis data. This data was processed to move the paddle proportionally to the tilt.&lt;br /&gt;
&lt;br /&gt;
Key features of the accelerometer setup:&lt;br /&gt;
&lt;br /&gt;
*I2C Communication:&lt;br /&gt;
**Enabled efficient data transfer between the accelerometer and the SJ2 board.&lt;br /&gt;
*Real-Time Input:&lt;br /&gt;
**X-axis readings were mapped to paddle movement for smooth control.&lt;br /&gt;
*Calibration:&lt;br /&gt;
**Initial calibration ensured accurate and stable readings, compensating for noise or offsets.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
The 64x64 LED matrix acts as the primary display for the game, rendering all visual elements such as the paddle, ball, and bricks. The SJ2 board interfaces with the matrix using GPIO pins, which are configured to drive the rows, columns, and colors.&lt;br /&gt;
&lt;br /&gt;
*GPIO Configuration:&lt;br /&gt;
&lt;br /&gt;
**The matrix requires GPIO pins for address selection (A, B, C, D, E), color data (R2, G2, B2), and control signals (OE, CLK, LAT).&lt;br /&gt;
**The pins are switched at high frequencies to refresh the display and maintain smooth animations.&lt;br /&gt;
*Driving the Display:&lt;br /&gt;
&lt;br /&gt;
**Row Selection: Address pins are used to select a specific row on the matrix for updating pixel data.&lt;br /&gt;
**Pixel Data Transfer: Color pins determine the intensity of red, green, and blue for each pixel, enabling up to 8 colors.&lt;br /&gt;
**Control Signals:&lt;br /&gt;
***OE (Output Enable): Controls when the LEDs are active.&lt;br /&gt;
***CLK (Clock): Synchronizes data transfer to the display.&lt;br /&gt;
***LAT (Latch): Locks the updated data into the matrix for display.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The Brick Breaker game was implemented using a state machine design, which allowed for modular and organized control over the game's logic. The main function driving the game, game_state_machine__run_game(), transitions through different states based on user interactions and game events. These states, such as INIT, GAME, PAUSE, and GAME_OVER, provide a clear structure to the game flow. A state machine design was chosen for its ability to simplify complex logic by dividing it into smaller, well-defined states, making the code easier to understand and maintain. Transitions between states occur based on specific triggers, such as a button press to pause the game or the ball falling out of bounds. By using a state machine, redundant operations were minimized, particularly in the GAME state, where initialization functions were executed only once during transitions to ensure optimal performance.&lt;br /&gt;
&lt;br /&gt;
The LED matrix was updated dynamically within the GAME state to display the paddle, ball, and bricks. Instead of rewriting the entire display buffer, only the portions of the matrix affected by the game elements were updated. This approach ensured smoother animations and reduced computational overhead. For instance, paddle movement involved modifying only the row where the paddle resided, while ball updates modified the ball's current and next positions. This optimization kept the gameplay visually responsive without overloading the system's resources. The main gameplay loop also called specialized functions to handle game elements like the paddle, ball, and brick states, ensuring modularity and scalability for future enhancements.&lt;br /&gt;
&lt;br /&gt;
The ball movement and collision logic, handled within game_state_machine__update_ball_position, formed the core of the game’s mechanics. The ball's trajectory was calculated based on its current velocity and direction. Collisions with walls, the paddle, and bricks were detected and resolved in real time. Wall collisions caused the ball to bounce, while paddle collisions adjusted its angle of reflection based on the contact point, giving players greater control. Brick collisions were handled by checking the corresponding coordinates in the matrix buffer. If a collision occurred, the brick's state was updated, and the ball's direction was adjusted. Special cases, such as corner collisions with multiple bricks, were also addressed by updating all affected bricks and recalculating the ball’s trajectory.&lt;br /&gt;
&lt;br /&gt;
To enhance gameplay, bricks were designed with varying levels of durability represented by their color. Each brick color indicated its &amp;quot;life,&amp;quot; with red bricks having one life and higher durability bricks represented by colors like green, blue, and purple. When a brick was hit, its life was decremented, and the LED matrix was updated to reflect the new state. Scoring was integrated into this system, with players earning points for each hit or destroyed brick. To add a competitive aspect, a high-score table was maintained, tracking the top five scores. Although the high scores were stored in a sorted array for this implementation, future plans include saving them to the SJ2 board’s flash memory to ensure persistence across power cycles.&lt;br /&gt;
&lt;br /&gt;
Player input was managed through buttons and an accelerometer, providing intuitive and responsive control. The buttons allowed precise left or right movement of the paddle, while the accelerometer offered an alternative control method, enabling the paddle to move based on the tilt of the SJ2 board. This dual-input system enhanced player engagement and added variety to the gameplay experience. Additionally, dynamic game elements, such as increasing ball speed and additional levels of difficulty, kept the game challenging as players progressed. The game state transitions were smooth and well-optimized, with the state machine ensuring clear separation of responsibilities and efficient execution of tasks.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
A significant technical challenge during the implementation of the Brick Breaker game was ensuring accurate collision detection, especially when the ball interacted with multiple bricks or hit a corner. The issue arose when the ball's next position overlapped with a corner shared by two or more blocks. This led to inconsistencies in how collisions were detected and resolved. For instance, if two bricks were stacked vertically or placed side by side, the ball's direction could behave unpredictably, leading to unexpected bounces. Initially, our collision logic treated corners as part of either a row or a column based on the ball's direction of travel. While this approach worked in simple cases, it failed when multiple blocks were involved.&lt;br /&gt;
&lt;br /&gt;
To address this, we standardized the handling of corners by treating all corners as part of a column rather than a row. This change provided a consistent logic flow for detecting and handling collisions, ensuring the ball's trajectory behaved predictably even in complex scenarios. Testing this approach revealed that treating corners as rows led to erratic bounces and breaks in the gameplay flow, while treating them as part of columns yielded a smoother and more intuitive experience. This adjustment significantly improved the game's performance and user experience, resolving an issue that had initially seemed insurmountable.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
The Brick Breaker game project served as an excellent opportunity to apply and expand our knowledge of embedded systems, specifically in hardware-software integration and real-time application development. Throughout the project, we faced several challenges, including collision detection issues with block corners and the difficulties associated with debugging real-time game logic. By addressing these problems with a combination of structured design and innovative solutions, such as standardizing collision handling and leveraging modular code, we were able to deliver a functional and engaging game.&lt;br /&gt;
&lt;br /&gt;
Testing was both a critical and challenging aspect of the project. While print statement debugging helped identify and resolve issues, it became evident that this method is not scalable for larger or more complex projects. This realization underscored the importance of implementing robust unit testing frameworks in future endeavors to streamline the debugging process and improve code reliability.&lt;br /&gt;
&lt;br /&gt;
Through this project, we not only deepened our understanding of the SJ2 board and its peripherals but also gained valuable insights into designing interactive systems with real-time constraints. We learned the significance of modular programming, effective problem-solving, and the practical challenges of integrating multiple hardware components. Moreover, this project reinforced the importance of designing for scalability and maintainability, skills that are critical for larger and more complex systems.&lt;br /&gt;
&lt;br /&gt;
Ultimately, this project has enhanced our ability to think critically about embedded system design and implementation, providing a strong foundation for tackling similar challenges in future endeavors. The lessons learned and skills developed here will undoubtedly inform and improve our approach to future projects, whether they involve gaming systems, embedded controls, or other interactive applications.&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72855</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72855"/>
				<updated>2024-12-20T01:26:31Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Testing &amp;amp; Technical Challenges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Brick Breaker ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
The project is split into a few sub-topics that could be worked by individuals:&lt;br /&gt;
&lt;br /&gt;
*Main &amp;quot;clock&amp;quot; task for updating the LED matrix.&lt;br /&gt;
*Main gameplay loop task that would update the position of the ball, paddle, and blocks.&lt;br /&gt;
*Design of various game screens via a state machine.&lt;br /&gt;
*Game logic to determine the ball's bounce relative to its current trajectory.&lt;br /&gt;
*MP3 background track during gameplay.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
** Game logic&lt;br /&gt;
** Block generator  &lt;br /&gt;
*  Kevin&lt;br /&gt;
** Hardware connections&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Led testing , button testing&lt;br /&gt;
*  Harbans&lt;br /&gt;
** Accerometer and paddle&lt;br /&gt;
** Block generator&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Part&lt;br /&gt;
! Link&lt;br /&gt;
! Price&lt;br /&gt;
! Quantity&lt;br /&gt;
|-&lt;br /&gt;
| LED Matrix&lt;br /&gt;
| [https://www.sparkfun.com/products/14824 Sparkfun]&lt;br /&gt;
| $80&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Power Supply&lt;br /&gt;
| [https://www.adafruit.com/product/658 Adafruit]&lt;br /&gt;
| $30&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Button&lt;br /&gt;
| [https://www.adafruit.com/product/3489 Adafruit]&lt;br /&gt;
| $2.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Quick connect wires&lt;br /&gt;
| [https://www.adafruit.com/product/1152 Adafruit]&lt;br /&gt;
| $4.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| MP3 Module&lt;br /&gt;
| [https://www.adafruit.com/product/1788 Adafruit]&lt;br /&gt;
| $34.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Speakers&lt;br /&gt;
| [https://www.adafruit.com/product/1669 Adafruit]&lt;br /&gt;
| $7.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| SJ2 Development Board&lt;br /&gt;
| [https://www.amazon.com/Generic-SJTwo-SJ2-SJSU/dp/B08G9LRPZ8/ref=sr_1_2?keywords=SJ2&amp;amp;qid=1639798706&amp;amp;sr=8-2 Amazon]&lt;br /&gt;
| $50&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
For the design and implementation of the Brick Breaker game, the SJ2 board serves as the central controller to interface with a 64x64 LED matrix, control buttons, and an accelerometer. Each of these components plays a crucial role in the functionality of the game, enabling dynamic gameplay and interactivity.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
In the hardware setup for this project, we outlined a few high-level connections that were necessary to implement the Brick Breaker game. These connections can be visualized in the top-level schematic shown below. The schematic was designed using draw.io.&lt;br /&gt;
&lt;br /&gt;
Hardware Interconnects:&lt;br /&gt;
*SJ2 Connection to the LED Matrix&lt;br /&gt;
*SJ2 Connection to Buttons&lt;br /&gt;
*SJ2 Connection to Accelerometer&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to LED Matrix:&lt;br /&gt;
The SJ2 board controlled the 64x64 LED matrix, which served as the primary visual interface for the game. The matrix required a range of GPIO pins for row, column, and color control. It did not use standard communication protocols like I2C or UART but relied on GPIO switching to drive the display. The key pin connections are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Address Pins&lt;br /&gt;
! Color Pins&lt;br /&gt;
! Control Pins&lt;br /&gt;
|-&lt;br /&gt;
| A, B, C, D, E&lt;br /&gt;
| R1, G1, B1 | R2, G2, B2&lt;br /&gt;
| OE, CLK, LAT&lt;br /&gt;
|}&lt;br /&gt;
*Address Pins: Allowed selection of specific rows for updating pixel data (rows 0 - 31).&lt;br /&gt;
*Color Pins: Enabled 8 distinct colors through combinations of red, green, and blue.&lt;br /&gt;
*Control Pins:&lt;br /&gt;
** OE (Output Enable): Controlled when the display was active.&lt;br /&gt;
** CLK (Clock): Synchronized data transfer for row and pixel updates.&lt;br /&gt;
** LAT (Latch): Locked data into the display.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Buttons&lt;br /&gt;
The buttons served as an input interface for the player to control the paddle in the game. The buttons were connected to GPIO pins on the SJ2 board and configured to trigger on falling-edge interrupts. Each button press caused an interrupt, which was handled by a software ISR to update the paddle’s position on the LED matrix.&lt;br /&gt;
&lt;br /&gt;
Key features of the button setup:&lt;br /&gt;
&lt;br /&gt;
*Interrupt-Driven Design:&lt;br /&gt;
**Each button press generated an interrupt to ensure immediate responsiveness.&lt;br /&gt;
*Debouncing:&lt;br /&gt;
**Software debouncing eliminated the effects of mechanical noise in button presses.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Accelerometer&lt;br /&gt;
The accelerometer provided an alternative input method by allowing the player to control the paddle through tilting. It was connected to the SJ2 board via the I2C interface, which facilitated real-time reading of the accelerometer's X-axis data. This data was processed to move the paddle proportionally to the tilt.&lt;br /&gt;
&lt;br /&gt;
Key features of the accelerometer setup:&lt;br /&gt;
&lt;br /&gt;
*I2C Communication:&lt;br /&gt;
**Enabled efficient data transfer between the accelerometer and the SJ2 board.&lt;br /&gt;
*Real-Time Input:&lt;br /&gt;
**X-axis readings were mapped to paddle movement for smooth control.&lt;br /&gt;
*Calibration:&lt;br /&gt;
**Initial calibration ensured accurate and stable readings, compensating for noise or offsets.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
The 64x64 LED matrix acts as the primary display for the game, rendering all visual elements such as the paddle, ball, and bricks. The SJ2 board interfaces with the matrix using GPIO pins, which are configured to drive the rows, columns, and colors.&lt;br /&gt;
&lt;br /&gt;
*GPIO Configuration:&lt;br /&gt;
&lt;br /&gt;
**The matrix requires GPIO pins for address selection (A, B, C, D, E), color data (R2, G2, B2), and control signals (OE, CLK, LAT).&lt;br /&gt;
**The pins are switched at high frequencies to refresh the display and maintain smooth animations.&lt;br /&gt;
*Driving the Display:&lt;br /&gt;
&lt;br /&gt;
**Row Selection: Address pins are used to select a specific row on the matrix for updating pixel data.&lt;br /&gt;
**Pixel Data Transfer: Color pins determine the intensity of red, green, and blue for each pixel, enabling up to 8 colors.&lt;br /&gt;
**Control Signals:&lt;br /&gt;
***OE (Output Enable): Controls when the LEDs are active.&lt;br /&gt;
***CLK (Clock): Synchronizes data transfer to the display.&lt;br /&gt;
***LAT (Latch): Locks the updated data into the matrix for display.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The Brick Breaker game was implemented using a state machine design, which allowed for modular and organized control over the game's logic. The main function driving the game, game_state_machine__run_game(), transitions through different states based on user interactions and game events. These states, such as INIT, GAME, PAUSE, and GAME_OVER, provide a clear structure to the game flow. A state machine design was chosen for its ability to simplify complex logic by dividing it into smaller, well-defined states, making the code easier to understand and maintain. Transitions between states occur based on specific triggers, such as a button press to pause the game or the ball falling out of bounds. By using a state machine, redundant operations were minimized, particularly in the GAME state, where initialization functions were executed only once during transitions to ensure optimal performance.&lt;br /&gt;
&lt;br /&gt;
The LED matrix was updated dynamically within the GAME state to display the paddle, ball, and bricks. Instead of rewriting the entire display buffer, only the portions of the matrix affected by the game elements were updated. This approach ensured smoother animations and reduced computational overhead. For instance, paddle movement involved modifying only the row where the paddle resided, while ball updates modified the ball's current and next positions. This optimization kept the gameplay visually responsive without overloading the system's resources. The main gameplay loop also called specialized functions to handle game elements like the paddle, ball, and brick states, ensuring modularity and scalability for future enhancements.&lt;br /&gt;
&lt;br /&gt;
The ball movement and collision logic, handled within game_state_machine__update_ball_position, formed the core of the game’s mechanics. The ball's trajectory was calculated based on its current velocity and direction. Collisions with walls, the paddle, and bricks were detected and resolved in real time. Wall collisions caused the ball to bounce, while paddle collisions adjusted its angle of reflection based on the contact point, giving players greater control. Brick collisions were handled by checking the corresponding coordinates in the matrix buffer. If a collision occurred, the brick's state was updated, and the ball's direction was adjusted. Special cases, such as corner collisions with multiple bricks, were also addressed by updating all affected bricks and recalculating the ball’s trajectory.&lt;br /&gt;
&lt;br /&gt;
To enhance gameplay, bricks were designed with varying levels of durability represented by their color. Each brick color indicated its &amp;quot;life,&amp;quot; with red bricks having one life and higher durability bricks represented by colors like green, blue, and purple. When a brick was hit, its life was decremented, and the LED matrix was updated to reflect the new state. Scoring was integrated into this system, with players earning points for each hit or destroyed brick. To add a competitive aspect, a high-score table was maintained, tracking the top five scores. Although the high scores were stored in a sorted array for this implementation, future plans include saving them to the SJ2 board’s flash memory to ensure persistence across power cycles.&lt;br /&gt;
&lt;br /&gt;
Player input was managed through buttons and an accelerometer, providing intuitive and responsive control. The buttons allowed precise left or right movement of the paddle, while the accelerometer offered an alternative control method, enabling the paddle to move based on the tilt of the SJ2 board. This dual-input system enhanced player engagement and added variety to the gameplay experience. Additionally, dynamic game elements, such as increasing ball speed and additional levels of difficulty, kept the game challenging as players progressed. The game state transitions were smooth and well-optimized, with the state machine ensuring clear separation of responsibilities and efficient execution of tasks.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
A significant technical challenge during the implementation of the Brick Breaker game was ensuring accurate collision detection, especially when the ball interacted with multiple bricks or hit a corner. The issue arose when the ball's next position overlapped with a corner shared by two or more blocks. This led to inconsistencies in how collisions were detected and resolved. For instance, if two bricks were stacked vertically or placed side by side, the ball's direction could behave unpredictably, leading to unexpected bounces. Initially, our collision logic treated corners as part of either a row or a column based on the ball's direction of travel. While this approach worked in simple cases, it failed when multiple blocks were involved.&lt;br /&gt;
&lt;br /&gt;
To address this, we standardized the handling of corners by treating all corners as part of a column rather than a row. This change provided a consistent logic flow for detecting and handling collisions, ensuring the ball's trajectory behaved predictably even in complex scenarios. Testing this approach revealed that treating corners as rows led to erratic bounces and breaks in the gameplay flow, while treating them as part of columns yielded a smoother and more intuitive experience. This adjustment significantly improved the game's performance and user experience, resolving an issue that had initially seemed insurmountable.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72852</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72852"/>
				<updated>2024-12-20T01:16:31Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Design &amp;amp; Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Brick Breaker ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
The project is split into a few sub-topics that could be worked by individuals:&lt;br /&gt;
&lt;br /&gt;
*Main &amp;quot;clock&amp;quot; task for updating the LED matrix.&lt;br /&gt;
*Main gameplay loop task that would update the position of the ball, paddle, and blocks.&lt;br /&gt;
*Design of various game screens via a state machine.&lt;br /&gt;
*Game logic to determine the ball's bounce relative to its current trajectory.&lt;br /&gt;
*MP3 background track during gameplay.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
** Game logic&lt;br /&gt;
** Block generator  &lt;br /&gt;
*  Kevin&lt;br /&gt;
** Hardware connections&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Led testing , button testing&lt;br /&gt;
*  Harbans&lt;br /&gt;
** Accerometer and paddle&lt;br /&gt;
** Block generator&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Part&lt;br /&gt;
! Link&lt;br /&gt;
! Price&lt;br /&gt;
! Quantity&lt;br /&gt;
|-&lt;br /&gt;
| LED Matrix&lt;br /&gt;
| [https://www.sparkfun.com/products/14824 Sparkfun]&lt;br /&gt;
| $80&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Power Supply&lt;br /&gt;
| [https://www.adafruit.com/product/658 Adafruit]&lt;br /&gt;
| $30&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Button&lt;br /&gt;
| [https://www.adafruit.com/product/3489 Adafruit]&lt;br /&gt;
| $2.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Quick connect wires&lt;br /&gt;
| [https://www.adafruit.com/product/1152 Adafruit]&lt;br /&gt;
| $4.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| MP3 Module&lt;br /&gt;
| [https://www.adafruit.com/product/1788 Adafruit]&lt;br /&gt;
| $34.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Speakers&lt;br /&gt;
| [https://www.adafruit.com/product/1669 Adafruit]&lt;br /&gt;
| $7.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| SJ2 Development Board&lt;br /&gt;
| [https://www.amazon.com/Generic-SJTwo-SJ2-SJSU/dp/B08G9LRPZ8/ref=sr_1_2?keywords=SJ2&amp;amp;qid=1639798706&amp;amp;sr=8-2 Amazon]&lt;br /&gt;
| $50&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
For the design and implementation of the Brick Breaker game, the SJ2 board serves as the central controller to interface with a 64x64 LED matrix, control buttons, and an accelerometer. Each of these components plays a crucial role in the functionality of the game, enabling dynamic gameplay and interactivity.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
In the hardware setup for this project, we outlined a few high-level connections that were necessary to implement the Brick Breaker game. These connections can be visualized in the top-level schematic shown below. The schematic was designed using draw.io.&lt;br /&gt;
&lt;br /&gt;
Hardware Interconnects:&lt;br /&gt;
*SJ2 Connection to the LED Matrix&lt;br /&gt;
*SJ2 Connection to Buttons&lt;br /&gt;
*SJ2 Connection to Accelerometer&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to LED Matrix:&lt;br /&gt;
The SJ2 board controlled the 64x64 LED matrix, which served as the primary visual interface for the game. The matrix required a range of GPIO pins for row, column, and color control. It did not use standard communication protocols like I2C or UART but relied on GPIO switching to drive the display. The key pin connections are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Address Pins&lt;br /&gt;
! Color Pins&lt;br /&gt;
! Control Pins&lt;br /&gt;
|-&lt;br /&gt;
| A, B, C, D, E&lt;br /&gt;
| R1, G1, B1 | R2, G2, B2&lt;br /&gt;
| OE, CLK, LAT&lt;br /&gt;
|}&lt;br /&gt;
*Address Pins: Allowed selection of specific rows for updating pixel data (rows 0 - 31).&lt;br /&gt;
*Color Pins: Enabled 8 distinct colors through combinations of red, green, and blue.&lt;br /&gt;
*Control Pins:&lt;br /&gt;
** OE (Output Enable): Controlled when the display was active.&lt;br /&gt;
** CLK (Clock): Synchronized data transfer for row and pixel updates.&lt;br /&gt;
** LAT (Latch): Locked data into the display.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Buttons&lt;br /&gt;
The buttons served as an input interface for the player to control the paddle in the game. The buttons were connected to GPIO pins on the SJ2 board and configured to trigger on falling-edge interrupts. Each button press caused an interrupt, which was handled by a software ISR to update the paddle’s position on the LED matrix.&lt;br /&gt;
&lt;br /&gt;
Key features of the button setup:&lt;br /&gt;
&lt;br /&gt;
*Interrupt-Driven Design:&lt;br /&gt;
**Each button press generated an interrupt to ensure immediate responsiveness.&lt;br /&gt;
*Debouncing:&lt;br /&gt;
**Software debouncing eliminated the effects of mechanical noise in button presses.&lt;br /&gt;
&lt;br /&gt;
SJ2 Board Connection to Accelerometer&lt;br /&gt;
The accelerometer provided an alternative input method by allowing the player to control the paddle through tilting. It was connected to the SJ2 board via the I2C interface, which facilitated real-time reading of the accelerometer's X-axis data. This data was processed to move the paddle proportionally to the tilt.&lt;br /&gt;
&lt;br /&gt;
Key features of the accelerometer setup:&lt;br /&gt;
&lt;br /&gt;
*I2C Communication:&lt;br /&gt;
**Enabled efficient data transfer between the accelerometer and the SJ2 board.&lt;br /&gt;
*Real-Time Input:&lt;br /&gt;
**X-axis readings were mapped to paddle movement for smooth control.&lt;br /&gt;
*Calibration:&lt;br /&gt;
**Initial calibration ensured accurate and stable readings, compensating for noise or offsets.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
The 64x64 LED matrix acts as the primary display for the game, rendering all visual elements such as the paddle, ball, and bricks. The SJ2 board interfaces with the matrix using GPIO pins, which are configured to drive the rows, columns, and colors.&lt;br /&gt;
&lt;br /&gt;
*GPIO Configuration:&lt;br /&gt;
&lt;br /&gt;
**The matrix requires GPIO pins for address selection (A, B, C, D, E), color data (R2, G2, B2), and control signals (OE, CLK, LAT).&lt;br /&gt;
**The pins are switched at high frequencies to refresh the display and maintain smooth animations.&lt;br /&gt;
*Driving the Display:&lt;br /&gt;
&lt;br /&gt;
**Row Selection: Address pins are used to select a specific row on the matrix for updating pixel data.&lt;br /&gt;
**Pixel Data Transfer: Color pins determine the intensity of red, green, and blue for each pixel, enabling up to 8 colors.&lt;br /&gt;
**Control Signals:&lt;br /&gt;
***OE (Output Enable): Controls when the LEDs are active.&lt;br /&gt;
***CLK (Clock): Synchronizes data transfer to the display.&lt;br /&gt;
***LAT (Latch): Locks the updated data into the matrix for display.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The Brick Breaker game was implemented using a state machine design, which allowed for modular and organized control over the game's logic. The main function driving the game, game_state_machine__run_game(), transitions through different states based on user interactions and game events. These states, such as INIT, GAME, PAUSE, and GAME_OVER, provide a clear structure to the game flow. A state machine design was chosen for its ability to simplify complex logic by dividing it into smaller, well-defined states, making the code easier to understand and maintain. Transitions between states occur based on specific triggers, such as a button press to pause the game or the ball falling out of bounds. By using a state machine, redundant operations were minimized, particularly in the GAME state, where initialization functions were executed only once during transitions to ensure optimal performance.&lt;br /&gt;
&lt;br /&gt;
The LED matrix was updated dynamically within the GAME state to display the paddle, ball, and bricks. Instead of rewriting the entire display buffer, only the portions of the matrix affected by the game elements were updated. This approach ensured smoother animations and reduced computational overhead. For instance, paddle movement involved modifying only the row where the paddle resided, while ball updates modified the ball's current and next positions. This optimization kept the gameplay visually responsive without overloading the system's resources. The main gameplay loop also called specialized functions to handle game elements like the paddle, ball, and brick states, ensuring modularity and scalability for future enhancements.&lt;br /&gt;
&lt;br /&gt;
The ball movement and collision logic, handled within game_state_machine__update_ball_position, formed the core of the game’s mechanics. The ball's trajectory was calculated based on its current velocity and direction. Collisions with walls, the paddle, and bricks were detected and resolved in real time. Wall collisions caused the ball to bounce, while paddle collisions adjusted its angle of reflection based on the contact point, giving players greater control. Brick collisions were handled by checking the corresponding coordinates in the matrix buffer. If a collision occurred, the brick's state was updated, and the ball's direction was adjusted. Special cases, such as corner collisions with multiple bricks, were also addressed by updating all affected bricks and recalculating the ball’s trajectory.&lt;br /&gt;
&lt;br /&gt;
To enhance gameplay, bricks were designed with varying levels of durability represented by their color. Each brick color indicated its &amp;quot;life,&amp;quot; with red bricks having one life and higher durability bricks represented by colors like green, blue, and purple. When a brick was hit, its life was decremented, and the LED matrix was updated to reflect the new state. Scoring was integrated into this system, with players earning points for each hit or destroyed brick. To add a competitive aspect, a high-score table was maintained, tracking the top five scores. Although the high scores were stored in a sorted array for this implementation, future plans include saving them to the SJ2 board’s flash memory to ensure persistence across power cycles.&lt;br /&gt;
&lt;br /&gt;
Player input was managed through buttons and an accelerometer, providing intuitive and responsive control. The buttons allowed precise left or right movement of the paddle, while the accelerometer offered an alternative control method, enabling the paddle to move based on the tilt of the SJ2 board. This dual-input system enhanced player engagement and added variety to the gameplay experience. Additionally, dynamic game elements, such as increasing ball speed and additional levels of difficulty, kept the game challenging as players progressed. The game state transitions were smooth and well-optimized, with the state machine ensuring clear separation of responsibilities and efficient execution of tasks.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;Bug/issue name&amp;gt; ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72845</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72845"/>
				<updated>2024-12-20T00:47:00Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Team Members &amp;amp; Responsibilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Brick Breaker ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
The project is split into a few sub-topics that could be worked by individuals:&lt;br /&gt;
&lt;br /&gt;
*Main &amp;quot;clock&amp;quot; task for updating the LED matrix.&lt;br /&gt;
*Main gameplay loop task that would update the position of the ball, paddle, and blocks.&lt;br /&gt;
*Design of various game screens via a state machine.&lt;br /&gt;
*Game logic to determine the ball's bounce relative to its current trajectory.&lt;br /&gt;
*MP3 background track during gameplay.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
** Game logic&lt;br /&gt;
** Block generator  &lt;br /&gt;
*  Kevin&lt;br /&gt;
** Hardware connections&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Game page switching logic&lt;br /&gt;
** Led testing , button testing&lt;br /&gt;
*  Harbans&lt;br /&gt;
** Accerometer and paddle&lt;br /&gt;
** Block generator&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Part&lt;br /&gt;
! Link&lt;br /&gt;
! Price&lt;br /&gt;
! Quantity&lt;br /&gt;
|-&lt;br /&gt;
| LED Matrix&lt;br /&gt;
| [https://www.sparkfun.com/products/14824 Sparkfun]&lt;br /&gt;
| $80&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Power Supply&lt;br /&gt;
| [https://www.adafruit.com/product/658 Adafruit]&lt;br /&gt;
| $30&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Button&lt;br /&gt;
| [https://www.adafruit.com/product/3489 Adafruit]&lt;br /&gt;
| $2.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Quick connect wires&lt;br /&gt;
| [https://www.adafruit.com/product/1152 Adafruit]&lt;br /&gt;
| $4.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| MP3 Module&lt;br /&gt;
| [https://www.adafruit.com/product/1788 Adafruit]&lt;br /&gt;
| $34.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Speakers&lt;br /&gt;
| [https://www.adafruit.com/product/1669 Adafruit]&lt;br /&gt;
| $7.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| SJ2 Development Board&lt;br /&gt;
| [https://www.amazon.com/Generic-SJTwo-SJ2-SJSU/dp/B08G9LRPZ8/ref=sr_1_2?keywords=SJ2&amp;amp;qid=1639798706&amp;amp;sr=8-2 Amazon]&lt;br /&gt;
| $50&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
In this section, you can describe how your hardware communicates, such as which BUSes used.  You can discuss your driver implementation here, such that the '''Software Design''' section is isolated to talk about high level workings rather than inner working of your project.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Show your software design.  For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level.  Do not show the details of the code.  For example, do not show exact code, but you may show psuedocode and fragments of code.  Keep in mind that you are showing DESIGN of your software, not the inner workings of it.  &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
This section includes implementation, but again, not the details, just the high level.  For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash.  You can include sub-sections for each of your component implementation.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;Bug/issue name&amp;gt; ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72813</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72813"/>
				<updated>2024-12-19T23:59:26Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Parts List &amp;amp; Cost */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Brick Breaker ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
The project is split into a few sub-topics that could be worked by individuals:&lt;br /&gt;
&lt;br /&gt;
*Main &amp;quot;clock&amp;quot; task for updating the LED matrix.&lt;br /&gt;
*Main gameplay loop task that would update the position of the ball, paddle, and blocks.&lt;br /&gt;
*Design of various game screens via a state machine.&lt;br /&gt;
*Game logic to determine the ball's bounce relative to its current trajectory.&lt;br /&gt;
*MP3 background track during gameplay.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
**   &lt;br /&gt;
*  Kevin&lt;br /&gt;
**   &lt;br /&gt;
*  Harbans&lt;br /&gt;
**&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|- style=&amp;quot;background-color:#34ff34;&amp;quot;&lt;br /&gt;
! Part&lt;br /&gt;
! Link&lt;br /&gt;
! Price&lt;br /&gt;
! Quantity&lt;br /&gt;
|-&lt;br /&gt;
| LED Matrix&lt;br /&gt;
| [https://www.sparkfun.com/products/14824 Sparkfun]&lt;br /&gt;
| $80&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Power Supply&lt;br /&gt;
| [https://www.adafruit.com/product/658 Adafruit]&lt;br /&gt;
| $30&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Button&lt;br /&gt;
| [https://www.adafruit.com/product/3489 Adafruit]&lt;br /&gt;
| $2.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Quick connect wires&lt;br /&gt;
| [https://www.adafruit.com/product/1152 Adafruit]&lt;br /&gt;
| $4.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| MP3 Module&lt;br /&gt;
| [https://www.adafruit.com/product/1788 Adafruit]&lt;br /&gt;
| $34.95&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Speakers&lt;br /&gt;
| [https://www.adafruit.com/product/1669 Adafruit]&lt;br /&gt;
| $7.50&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| SJ2 Development Board&lt;br /&gt;
| [https://www.amazon.com/Generic-SJTwo-SJ2-SJSU/dp/B08G9LRPZ8/ref=sr_1_2?keywords=SJ2&amp;amp;qid=1639798706&amp;amp;sr=8-2 Amazon]&lt;br /&gt;
| $50&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
In this section, you can describe how your hardware communicates, such as which BUSes used.  You can discuss your driver implementation here, such that the '''Software Design''' section is isolated to talk about high level workings rather than inner working of your project.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Show your software design.  For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level.  Do not show the details of the code.  For example, do not show exact code, but you may show psuedocode and fragments of code.  Keep in mind that you are showing DESIGN of your software, not the inner workings of it.  &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
This section includes implementation, but again, not the details, just the high level.  For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash.  You can include sub-sections for each of your component implementation.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;Bug/issue name&amp;gt; ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72811</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72811"/>
				<updated>2024-12-19T23:55:19Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Project Title */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Brick Breaker ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
The project is split into a few sub-topics that could be worked by individuals:&lt;br /&gt;
&lt;br /&gt;
*Main &amp;quot;clock&amp;quot; task for updating the LED matrix.&lt;br /&gt;
*Main gameplay loop task that would update the position of the ball, paddle, and blocks.&lt;br /&gt;
*Design of various game screens via a state machine.&lt;br /&gt;
*Game logic to determine the ball's bounce relative to its current trajectory.&lt;br /&gt;
*MP3 background track during gameplay.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
**   &lt;br /&gt;
*  Kevin&lt;br /&gt;
**   &lt;br /&gt;
*  Harbans&lt;br /&gt;
**&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
In this section, you can describe how your hardware communicates, such as which BUSes used.  You can discuss your driver implementation here, such that the '''Software Design''' section is isolated to talk about high level workings rather than inner working of your project.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Show your software design.  For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level.  Do not show the details of the code.  For example, do not show exact code, but you may show psuedocode and fragments of code.  Keep in mind that you are showing DESIGN of your software, not the inner workings of it.  &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
This section includes implementation, but again, not the details, just the high level.  For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash.  You can include sub-sections for each of your component implementation.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;Bug/issue name&amp;gt; ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72810</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72810"/>
				<updated>2024-12-19T23:54:38Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Objectives &amp;amp; Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Title ==&lt;br /&gt;
Brick Breaker&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
The project is split into a few sub-topics that could be worked by individuals:&lt;br /&gt;
&lt;br /&gt;
*Main &amp;quot;clock&amp;quot; task for updating the LED matrix.&lt;br /&gt;
*Main gameplay loop task that would update the position of the ball, paddle, and blocks.&lt;br /&gt;
*Design of various game screens via a state machine.&lt;br /&gt;
*Game logic to determine the ball's bounce relative to its current trajectory.&lt;br /&gt;
*MP3 background track during gameplay.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
**   &lt;br /&gt;
*  Kevin&lt;br /&gt;
**   &lt;br /&gt;
*  Harbans&lt;br /&gt;
**&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
In this section, you can describe how your hardware communicates, such as which BUSes used.  You can discuss your driver implementation here, such that the '''Software Design''' section is isolated to talk about high level workings rather than inner working of your project.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Show your software design.  For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level.  Do not show the details of the code.  For example, do not show exact code, but you may show psuedocode and fragments of code.  Keep in mind that you are showing DESIGN of your software, not the inner workings of it.  &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
This section includes implementation, but again, not the details, just the high level.  For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash.  You can include sub-sections for each of your component implementation.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;Bug/issue name&amp;gt; ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72611</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72611"/>
				<updated>2024-12-10T01:06:04Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Title ==&lt;br /&gt;
Brick Breaker&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
Show list of your objectives.  This section includes the high level details of your project.  You can write about the various sensors or peripherals you used to get your project completed.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
**   &lt;br /&gt;
*  Kevin&lt;br /&gt;
**   &lt;br /&gt;
*  Harbans&lt;br /&gt;
**&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
In this section, you can describe how your hardware communicates, such as which BUSes used.  You can discuss your driver implementation here, such that the '''Software Design''' section is isolated to talk about high level workings rather than inner working of your project.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Show your software design.  For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level.  Do not show the details of the code.  For example, do not show exact code, but you may show psuedocode and fragments of code.  Keep in mind that you are showing DESIGN of your software, not the inner workings of it.  &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
This section includes implementation, but again, not the details, just the high level.  For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash.  You can include sub-sections for each of your component implementation.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;Bug/issue name&amp;gt; ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72610</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72610"/>
				<updated>2024-12-10T01:04:59Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Title ==&lt;br /&gt;
Brick Breaker&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
Show list of your objectives.  This section includes the high level details of your project.  You can write about the various sensors or peripherals you used to get your project completed.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
**   &lt;br /&gt;
*  Kevin&lt;br /&gt;
**   &lt;br /&gt;
*  Harbans&lt;br /&gt;
**&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - TO_BE_UPDATED&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2024&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2024&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
*11/09/2024&lt;br /&gt;
|&lt;br /&gt;
*11/10/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
*11/15/2024&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit components&lt;br /&gt;
* circuit and component assembly&lt;br /&gt;
* Circuit testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2024 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2024&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2024&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2024&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game &lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2024&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2024&lt;br /&gt;
|&lt;br /&gt;
* Work on game page switching&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
*12/14/2024&lt;br /&gt;
| &lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
*12/16/2024&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
In this section, you can describe how your hardware communicates, such as which BUSes used.  You can discuss your driver implementation here, such that the '''Software Design''' section is isolated to talk about high level workings rather than inner working of your project.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Show your software design.  For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level.  Do not show the details of the code.  For example, do not show exact code, but you may show psuedocode and fragments of code.  Keep in mind that you are showing DESIGN of your software, not the inner workings of it.  &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
This section includes implementation, but again, not the details, just the high level.  For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash.  You can include sub-sections for each of your component implementation.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;Bug/issue name&amp;gt; ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=72570</id>
		<title>Realtime OS on Embedded Systems</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=72570"/>
				<updated>2024-11-05T19:53:06Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /*  Fall 2024 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Program History ==&lt;br /&gt;
My contribution in Embedded System courses started with CmpE146.  This course teaches students on how to write UART, SPI, and I2C Drivers and interface their drivers to peripherals.  There are about 8 weekly labs in which students not only write drivers, but also learn the core of Real-time Operating Systems including threading (tasks), and inter-task communication using Queues and Semaphores.  FreeRTOS is the operating system used with C/C++ Compiler based on GNU.&lt;br /&gt;
&lt;br /&gt;
When the course was started by Dr. Ozemek @ SJSU (sometime before 2005), not many resources were out there.  Still, with helpful guidance from Dr. Ozemek, interesting projects were created.  This is when I started to help out in Embedded System Courses, and by collecting and sharing knowledge, we've raised the bar at SJSU!  &lt;br /&gt;
&lt;br /&gt;
There have been many great projects at SJSU, but since no one knew about them, the hard work went to a waste for anyone but the creator.  But now we've got the infrastructure to share the projects, which turn out as great references for future students.  Here is my project that started around 2007, and turned into Bachelor's Senior Design Project: &amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp YouTube Video of Self-Navigating Car]&lt;br /&gt;
&lt;br /&gt;
As of 2013, I have broadened my contribution to other embedded system courses like CmpE240, CmpE243 and CmpE244.&lt;br /&gt;
&lt;br /&gt;
== Lab Assignments ==&lt;br /&gt;
This article contains laboratory assignments and resources.  The assignments are under construction as we move towards SJ-One development board.&lt;br /&gt;
*  [[Embedded System Tutorial Tasks | Lesson 0: Multiple Tasks]]&lt;br /&gt;
*  [[Embedded System Tutorial GPIO | Lesson 1 : GPIO]]&lt;br /&gt;
*  [[Embedded System Tutorial UART | Lesson 2 : UART]]&lt;br /&gt;
*  [[Embedded System Tutorial SPI  | Lesson 3 : SPI]]&lt;br /&gt;
*  [[Embedded System I2C Tutorial  | Lesson 4 : I2C]]&lt;br /&gt;
*  [[Embedded System Tutorial Interrupts | Lesson 5 : Interrupts]]&lt;br /&gt;
*  [[Embedded System Tutorial FreeRTOS | Lesson 6 : FreeRTOS Tasks]]&lt;br /&gt;
*  [[Embedded System Tutorial File I/O | Lesson 7 : FreeRTOS Application Programming]]&lt;br /&gt;
&lt;br /&gt;
==== Class Project ====&lt;br /&gt;
* [[MP3 Player]]&lt;br /&gt;
&lt;br /&gt;
==Other reference articles==&lt;br /&gt;
*  [[Bitmasking Tutorial]] (+ GPIO Example)&lt;br /&gt;
*  [[ LPC17xx Memory Map &amp;amp; Interrupts]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Senior Design Projects ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Semester Projects ==&lt;br /&gt;
Every semester, students are given about 7-10 weeks to complete their projects.  During this short time-span, students form groups, order parts, and begin working on their projects.  The work performed during the semester is documented at this Wiki.&lt;br /&gt;
&lt;br /&gt;
Here is the list of Preet's documented projects:&amp;lt;BR/&amp;gt;&lt;br /&gt;
*  [[Preet's Relay Controller Project]]&lt;br /&gt;
*  [[Nordic Low Powered Mesh Network stack]]&lt;br /&gt;
*  [http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp Senior Design Project (MS-CmpE) Video]&lt;br /&gt;
&lt;br /&gt;
Here is another resource for good project references :&lt;br /&gt;
[http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/ Cornell EE476 Projects]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2024 | Fall 2024]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[F24: Dodge Cars]]&lt;br /&gt;
*  [[F24: Rival Rush]]&lt;br /&gt;
*  [[F24: Space 6]]&lt;br /&gt;
*  [[F24: Bounce Tales]]&lt;br /&gt;
*  [[F24: Tilt Maze]]&lt;br /&gt;
*  [[F24: Jardinains]]&lt;br /&gt;
*  [[F24: Survival Dodge]]&lt;br /&gt;
*  [[F24: Brick Breaker]]&lt;br /&gt;
*  [[F24: Space Fire]]&lt;br /&gt;
*  [[F24: Brick Breaker]]&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2022 | Fall 2022]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[F22: DDRTOS]]&lt;br /&gt;
*  [[F22: xGameCreate]]&lt;br /&gt;
*  [[F22: Embedded Gamers]]&lt;br /&gt;
*  [[F22: Bob Burgers]]&lt;br /&gt;
*  [[F22: Space Warriors]]&lt;br /&gt;
*  [[F22: Thunder Flash]]&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2021 | Fall 2021]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[F21: ACE MARIO]]&lt;br /&gt;
*  [[F21: Skeh-lleybones]]&lt;br /&gt;
*  [[F21: Sons of Ultron]]&lt;br /&gt;
*  [[F21: Juvenile Jumpers]]&lt;br /&gt;
*  [[F21: Treasure Dive]]&lt;br /&gt;
*  [[F21: FollowMe]]&lt;br /&gt;
*  [[F21: Flame Over]]&lt;br /&gt;
*  [[F21: Space Rage]]&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2020 | Fall 2020]] ===&lt;br /&gt;
*  [[F20: Jubeat]]&lt;br /&gt;
*  [[F20: Flappy]]&lt;br /&gt;
*  [[F20: Space Invaders]]&lt;br /&gt;
*  [[F20: Treasure Diver]]&lt;br /&gt;
*  [[F20: Tom &amp;amp; Jerry]]&lt;br /&gt;
*  [[F20: Hungry Snake]]&lt;br /&gt;
*  [[F20: Son of a Gun]]&lt;br /&gt;
*  [[F20: Corona Run]]&lt;br /&gt;
*  [[F20: Maddening Marbles]]&lt;br /&gt;
*  [[F20: Bubble Shooter]]&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2019 | Fall 2019]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[F19: Smacman]]&lt;br /&gt;
*  [[F19: Tetris]]&lt;br /&gt;
*  [[F19: Space Impact]]&lt;br /&gt;
*  [[F19: Road Max Fury]]&lt;br /&gt;
*  [[F19: T-Rex Run!]]&lt;br /&gt;
*  [[F19: Infinity Mirror]]&lt;br /&gt;
*  [[F19: Tower Defense in Space]]&lt;br /&gt;
*  [[F19: Alien Wars]]&lt;br /&gt;
*  [[F19: Pocket tank]]&lt;br /&gt;
*  [[F19: M&amp;amp;B (Morph &amp;amp; Blend)]]&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2018 | Fall 2018]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[F18: Flappy Bird]]&lt;br /&gt;
*  [[F18: Catch me if you can]]&lt;br /&gt;
*  [[F18: Zero Zero UFO]]&lt;br /&gt;
*  [[F18: Goals of Glory]]&lt;br /&gt;
*  [[F18: Spartan Warrior]]&lt;br /&gt;
*  [[F18: Wireless sensor network]]&lt;br /&gt;
*  [[F18: baem geim]]&lt;br /&gt;
*  [[F18: Hit the Balloon]]&lt;br /&gt;
*  [[F18: 2048]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Spring 2018 | Spring 2018]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[S18: Team Nemesis(SJSU Cam)]]&lt;br /&gt;
*  [[S18: Death Race]]&lt;br /&gt;
*  [[S18: Hand gesture controlled multiplayer game]]&lt;br /&gt;
*  [[S18: Smart Rock Paper Scissors]]&lt;br /&gt;
*  [[S18: Spybot]]&lt;br /&gt;
*  [[S18: Audio Spectrum Analyzer with Graphics Display]]&lt;br /&gt;
*  [[S18: XY-Plotter]]&lt;br /&gt;
*  [[S18: RGB LED Sound Behavior on a Skateboard]]&lt;br /&gt;
*  [[S18: Spark - MP3 Music Player with Audio Spectrum]]&lt;br /&gt;
*  [[S18: Traffic Menace Video Game]]&lt;br /&gt;
*  [[S18: M.E.O.W]]&lt;br /&gt;
*  [[S18: Rahee]]&lt;br /&gt;
&lt;br /&gt;
=== [[Spring 2017 | Spring 2017]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[S17: Wake up Barista]]&lt;br /&gt;
*  [[S17: Propeller Clock]]&lt;br /&gt;
*  [[S17: Sky Knight]]&lt;br /&gt;
*  [[S17: MyAutoHealth]]&lt;br /&gt;
*  [[S17: Logan]]&lt;br /&gt;
*  [[S17: ElectricBoard]]&lt;br /&gt;
*  [[S17: CamBot]]&lt;br /&gt;
*  [[S17: Sphero Droid]]&lt;br /&gt;
*  [[S17: Smart Planter]]&lt;br /&gt;
*  [[S17: Boom-Z Equalizer]]&lt;br /&gt;
*  [[S17: Interactive Snake and ladder ]]&lt;br /&gt;
*  [[S17: Smart Health Gear]]&lt;br /&gt;
*  [[S17: Halo]]&lt;br /&gt;
*  [[S17: Squad]]&lt;br /&gt;
*  [[S17: Smart security system]]&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2016 | Fall 2016]] ===&lt;br /&gt;
&lt;br /&gt;
CMPE146:&lt;br /&gt;
* [http://www.socialledge.com/sjsu/index.php?title=F16:_Seismograph F16: Seismograph]&lt;br /&gt;
* [[F16: Piano Glove]]&lt;br /&gt;
* [[F16: Object Detector]]&lt;br /&gt;
* [[F16: Autonomous Nautical System]]&lt;br /&gt;
* [[F16: Autonomous Fire Extinguishing Vehicle]]&lt;br /&gt;
* [[F16: Autonomous Runaway Alarm Car]]&lt;br /&gt;
* [[F16: E-Bike]]&lt;br /&gt;
* [[F16: NotifyBox]]&lt;br /&gt;
* [[F16: Wireless Tilt Controlled Camera Arm]]&lt;br /&gt;
* [[F16: OBD2 Reader]]&lt;br /&gt;
* [[F16: Micro Watch Monitoring System]]&lt;br /&gt;
* [[F16: Door Alarm System]]&lt;br /&gt;
* [[http://www.socialledge.com/sjsu/index.php?title=F16:_I2Coffee F16: UART Coffee]]&lt;br /&gt;
* [[F16: SJone to FPGA wireless integration]]&lt;br /&gt;
&lt;br /&gt;
=== [[Spring 2016 | Spring 2016]] ===&lt;br /&gt;
*  [[S16: Fantastic Four]]&lt;br /&gt;
*  [[S16: Simpsons]]&lt;br /&gt;
*  [[S16: Mars 1]]&lt;br /&gt;
*  [[S16: OpenSJ Bluz]]&lt;br /&gt;
*  [[S16: Motion Copy Bot]]&lt;br /&gt;
*  [[S16: Biker Assist]]&lt;br /&gt;
*  [[S16: Helios]]&lt;br /&gt;
*  [[S16: Sound Buddy]]&lt;br /&gt;
*  [[S16: Warriors]]&lt;br /&gt;
*  [[S16: Expendables]]&lt;br /&gt;
*  [[S16: Ahava]]&lt;br /&gt;
*  [[S16: Number 1]]&lt;br /&gt;
*  [[S16: SkyNet]]&lt;br /&gt;
*  [[S16: SmartDoorLock]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cmpe 146:&lt;br /&gt;
*  [[S16: Camera Gimbal]]&lt;br /&gt;
*  [[S16: Laser Harp]]&lt;br /&gt;
*  &amp;lt;strike&amp;gt;[[S16: Laser Cutter Motor Controller]]&amp;lt;/strike&amp;gt;&lt;br /&gt;
*  [[S16: Sprinkler]]&lt;br /&gt;
*  [[S16: The Jatrick Car]]&lt;br /&gt;
*  [[S16: Dan]]&lt;br /&gt;
*  [[S16: Robolamp]]&lt;br /&gt;
*  [[S16: Pinball]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2015 | Fall 2015]] ===&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[F15: Autonomous Mobile]]&lt;br /&gt;
* [[F15: Car Report]]&lt;br /&gt;
* [[F15: Electronic Piano]]&lt;br /&gt;
* [[F15: Doorknock over Bluetooth]]&lt;br /&gt;
* [[F15: Smart Car]]&lt;br /&gt;
* [[F15: Plant Control]]&lt;br /&gt;
* [[F15: Laser Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2015 | Spring 2015]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S15: Quadcopter - It flies]]&lt;br /&gt;
* [[S15: Remote Learner]]&lt;br /&gt;
* [[S15: Protocol Interface: I2C - CAN Bridge]]&lt;br /&gt;
* [[S15: Vision RC Car]]&lt;br /&gt;
* [[S15: SJeight Octocopter]]&lt;br /&gt;
* [[S15: Swarm Robots]]&lt;br /&gt;
* [[S15: Smart Sparta Parking System]]&lt;br /&gt;
* [[S15: Touch Navigator]]&lt;br /&gt;
* [[S15: Wizard's Chess System]]&lt;br /&gt;
* [[S15: Bug Rider]]&lt;br /&gt;
* [[S15: Real Time Brake Assist (RTBA)]]&lt;br /&gt;
* [[S15: Wireless Mesh Network]]&lt;br /&gt;
* [[S15: Wireless Power Transfer System]]&lt;br /&gt;
* [[S15: Drone]]&lt;br /&gt;
* [[S15: Tree Node using Google Protocol Buffers]]&lt;br /&gt;
* [[S15: Multi-media Car]]&lt;br /&gt;
* [[S15: Hand Gesture Recognition using IR Sensors]]&lt;br /&gt;
* [[S15: CAN controlled RGB LED cubes]]&lt;br /&gt;
* [[S15: Rubik's Cube Solver]]&lt;br /&gt;
* [[S15: RFID Security Box]]&lt;br /&gt;
* [[S15: Automated Meeting Room Reservation]]&lt;br /&gt;
* [[S15: Patient Buddy System (PBS)]]&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[S15: Hovercopter]]&lt;br /&gt;
* [[S15: Triclops: Smart RC Car]]&lt;br /&gt;
* [[S15: Connect Four - Robotic Player]]&lt;br /&gt;
* [[S15: Self-Balancing Robot]]&lt;br /&gt;
* [[S15: MP3 Player with Graphic Equalizer Display]]&lt;br /&gt;
* [[S15: Motion-Controlled RC Car]]&lt;br /&gt;
* [[S15: MENL (Monster Encounter Night Light) ]]&lt;br /&gt;
* [[S15: Tilt Motion Controlled LED Alarm Clock]]&lt;br /&gt;
* [[S15: Alarm Based Coffee Maker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2014 | Spring 2014]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  Senior Project: [[Project Advising: Remote Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S14: Quadcopter]]&lt;br /&gt;
* [[S14: Smart Weather Clock]]&lt;br /&gt;
* [[S14: Divine WINd]]&lt;br /&gt;
* [[S14: Data Acquisition using CAN bus]]&lt;br /&gt;
* [[S14: E-Ink Display for Shopping Tags]]&lt;br /&gt;
* [[S14: Spectrum Analyzer for Audio Frequency Signals]]&lt;br /&gt;
* [[S14: CAN Firmware Uploader]]&lt;br /&gt;
* [[S14: Asset Management and Location System]]&lt;br /&gt;
* [[S14: Location  Tracker]]&lt;br /&gt;
* [[S14:  Androbot]]&lt;br /&gt;
* [[S14: Virtual Dog]]&lt;br /&gt;
* [[S14: Android based Automation]]&lt;br /&gt;
* [[S14: FaceTime Robo]]&lt;br /&gt;
* [[S14: Wireless Control Car]]&lt;br /&gt;
* [[S14: Power Efficient Security Door System for Light-rail using CAN Bus]]&lt;br /&gt;
* [[S14: Android based home monitoring system]]&lt;br /&gt;
* [[S14: Need For Speed]]&lt;br /&gt;
&lt;br /&gt;
CmpE146&lt;br /&gt;
* [[S14: Hyperintelligent NFC Locker of the Future]]&lt;br /&gt;
* [[S14: Smart Planter]]&lt;br /&gt;
* [[S14: Modular Security System]]&lt;br /&gt;
* [[S14: Autonomous Control System]]&lt;br /&gt;
* [[S14: Anti-Crash Car]]&lt;br /&gt;
* [[S14: Tricopter]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE240 Fall 2013 | Fall 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F13: POV Display]]&lt;br /&gt;
* [[F13: Line Following Robot]]&lt;br /&gt;
* [[F13: LED Display]]&lt;br /&gt;
* [[F13: Bulb Ramper]]&lt;br /&gt;
* [[F13: Garage Parking Assistant]]&lt;br /&gt;
* [[F13: Quadcopter]]&lt;br /&gt;
* [[F13: BarkMaster2000]]&lt;br /&gt;
* [[F13: Remote Control Car]]&lt;br /&gt;
* [[F13: Obstacle Avoidance Robot]]&lt;br /&gt;
* [[F13: Vehicle On Board Diagnostics]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2013 | Spring 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[S13: 2D Plotter]]&lt;br /&gt;
* [[S13: Smart Cube]]&lt;br /&gt;
* [[S13: Garage Parking Aid]]&lt;br /&gt;
* [[S13: Smart Security]]&lt;br /&gt;
* [[S13: Door Alarm System]]&lt;br /&gt;
* [[S13: Solar Panel Tracker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Fall 2012|Fall 2012]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F12: Evil Watchdog]]&lt;br /&gt;
* [[F12: Smart Bulb]]&lt;br /&gt;
* [[F12: All Your Base are Belong to You]]&lt;br /&gt;
* [[F12: Android Controlled MP3]]&lt;br /&gt;
* [[F12: Unified Wireless Health Monitoring System]]&lt;br /&gt;
* [[F12: OBD-II Android Monitor]]&lt;br /&gt;
* [[F12: Self-Driving GPS Following Car]]&lt;br /&gt;
* [[F12: Android Door Lock]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2012|Spring 2012]] ===&lt;br /&gt;
*  [[S12: FreeRTOS based QuadCopter]]&lt;br /&gt;
*  [[S12: Web-based MP3 Player]]&lt;br /&gt;
*  [[S12: Self Drive Car]]&lt;br /&gt;
*  [[S12: VAndroid]]&lt;br /&gt;
*  [[S12: Traffic Light Sensing Vehicle]]&lt;br /&gt;
*  [[S12: Sound Reader]]&lt;br /&gt;
*  [[S12: Remote Controlled MP3 Player]]&lt;br /&gt;
*  [[S12: Android Controlled Robot]]&lt;br /&gt;
*  [[S12: Eyes-Free GPS]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Handy References ==&lt;br /&gt;
*  [[Sample Project Report]]&lt;br /&gt;
*  [[Project Proposal Guidelines]]&lt;br /&gt;
*  [[CmpE146 Lab. Resources]]&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72560</id>
		<title>F24: Brick Breaker</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F24:_Brick_Breaker&amp;diff=72560"/>
				<updated>2024-11-04T22:59:41Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: Created page with &amp;quot;=== Grading Criteria === &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt; *  How well is Software &amp;amp; Hardware Design described? *  How well can this report be used to reproduce this project? *  Code Quali...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Title ==&lt;br /&gt;
Brick Breaker&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Brick Breaker is a classic arcade-style game focused on quick reflexes and survival, reminiscent of retro gaming experiences. This project aims to recreate the intense and fast-paced gameplay using the SJ-2 board and an LED matrix display. In this game, players control a character (or an object) that must dodge incoming obstacles from multiple directions, with the speed and frequency of obstacles increasing over time. The objective is to survive as long as possible, setting high scores based on survival time. Players will use buttons or a joystick to maneuver, with core implementation focusing on responsive controls, real-time collision detection, and adaptive difficulty for sustained challenge.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
Show list of your objectives.  This section includes the high level details of your project.  You can write about the various sensors or peripherals you used to get your project completed.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Manoj&lt;br /&gt;
**   &lt;br /&gt;
*  Kevin&lt;br /&gt;
**   &lt;br /&gt;
*  Harbans&lt;br /&gt;
**&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| &lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* 10/20/2024&lt;br /&gt;
* 10/27/2024&lt;br /&gt;
|&lt;br /&gt;
* Read previous projects, gather information and discuss among the group members.&lt;br /&gt;
* Create GitLab repository for project - https://gitlab.com/cmpe-240-advanced-computer-design/survival-dodge-group-8&lt;br /&gt;
| &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Completed&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| &lt;br /&gt;
*10/27/2024   &lt;br /&gt;
| &lt;br /&gt;
*11/02/2024 &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Order necessary parts - LED Matrix , Speaker , Accelerometer &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;In progress&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|&lt;br /&gt;
*11/02/2024&lt;br /&gt;
|&lt;br /&gt;
*11/08/2024&lt;br /&gt;
|&lt;br /&gt;
*Read and familiarize with LED Matrix Datasheet&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|&lt;br /&gt;
* 11/02/2020&lt;br /&gt;
|&lt;br /&gt;
* 11/08/2020&lt;br /&gt;
|&lt;br /&gt;
* Develop graphics driver for LED matrix and implement initial game objects&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|&lt;br /&gt;
*11/09/2020&lt;br /&gt;
*11/09/2020&lt;br /&gt;
*11/09/2020&lt;br /&gt;
*11/09/2020&lt;br /&gt;
|&lt;br /&gt;
*11/10/2020&lt;br /&gt;
*11/15/2020&lt;br /&gt;
*11/15/2020&lt;br /&gt;
*11/15/2020&lt;br /&gt;
|&lt;br /&gt;
* Finalize wiki schedule&lt;br /&gt;
* Order circuit boards components and complete the design for printing&lt;br /&gt;
* circuit board and component assembly&lt;br /&gt;
* Circuit board testing&lt;br /&gt;
* Additional accessories if required and finalization of hardware&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|&lt;br /&gt;
*11/16/2020 &lt;br /&gt;
| &lt;br /&gt;
*11/22/2020&lt;br /&gt;
|&lt;br /&gt;
*Integration of circuit boards and microcontroller&lt;br /&gt;
* Game logic development&lt;br /&gt;
* Testing and debugging the game logic&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| &lt;br /&gt;
* 11/23/2020&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
* 11/29/2020&lt;br /&gt;
|&lt;br /&gt;
* Integrate game logic code with LED matrix&lt;br /&gt;
* Integrate game sounds with game logic &lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| &lt;br /&gt;
* 11/30/2020&lt;br /&gt;
| &lt;br /&gt;
* 12/06/2020&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
* Integrate subsystem&lt;br /&gt;
* Finalizing the video game &lt;br /&gt;
* Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| &lt;br /&gt;
* 12/07/2020&lt;br /&gt;
| &lt;br /&gt;
* 12/13/2020&lt;br /&gt;
|&lt;br /&gt;
* Address bugs during testing of integrated system&lt;br /&gt;
* Test pause/play functionality&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| &lt;br /&gt;
*12/16/2020&lt;br /&gt;
*12/14/2020&lt;br /&gt;
*12/14/2020&lt;br /&gt;
*12/14/2020&lt;br /&gt;
| &lt;br /&gt;
*12/16/2020&lt;br /&gt;
*12/16/2020&lt;br /&gt;
*12/16/2020&lt;br /&gt;
*12/16/2020&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
*Final Demo&lt;br /&gt;
*Update Gitlab repo with final code.&lt;br /&gt;
*Update test video.&lt;br /&gt;
*Update the wiki page.&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Not started&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
In this section, you can describe how your hardware communicates, such as which BUSes used.  You can discuss your driver implementation here, such that the '''Software Design''' section is isolated to talk about high level workings rather than inner working of your project.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Show your software design.  For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level.  Do not show the details of the code.  For example, do not show exact code, but you may show psuedocode and fragments of code.  Keep in mind that you are showing DESIGN of your software, not the inner workings of it.  &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
This section includes implementation, but again, not the details, just the high level.  For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash.  You can include sub-sections for each of your component implementation.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;Bug/issue name&amp;gt; ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=72559</id>
		<title>Realtime OS on Embedded Systems</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=72559"/>
				<updated>2024-11-04T22:57:19Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /*  Fall 2024 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Program History ==&lt;br /&gt;
My contribution in Embedded System courses started with CmpE146.  This course teaches students on how to write UART, SPI, and I2C Drivers and interface their drivers to peripherals.  There are about 8 weekly labs in which students not only write drivers, but also learn the core of Real-time Operating Systems including threading (tasks), and inter-task communication using Queues and Semaphores.  FreeRTOS is the operating system used with C/C++ Compiler based on GNU.&lt;br /&gt;
&lt;br /&gt;
When the course was started by Dr. Ozemek @ SJSU (sometime before 2005), not many resources were out there.  Still, with helpful guidance from Dr. Ozemek, interesting projects were created.  This is when I started to help out in Embedded System Courses, and by collecting and sharing knowledge, we've raised the bar at SJSU!  &lt;br /&gt;
&lt;br /&gt;
There have been many great projects at SJSU, but since no one knew about them, the hard work went to a waste for anyone but the creator.  But now we've got the infrastructure to share the projects, which turn out as great references for future students.  Here is my project that started around 2007, and turned into Bachelor's Senior Design Project: &amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp YouTube Video of Self-Navigating Car]&lt;br /&gt;
&lt;br /&gt;
As of 2013, I have broadened my contribution to other embedded system courses like CmpE240, CmpE243 and CmpE244.&lt;br /&gt;
&lt;br /&gt;
== Lab Assignments ==&lt;br /&gt;
This article contains laboratory assignments and resources.  The assignments are under construction as we move towards SJ-One development board.&lt;br /&gt;
*  [[Embedded System Tutorial Tasks | Lesson 0: Multiple Tasks]]&lt;br /&gt;
*  [[Embedded System Tutorial GPIO | Lesson 1 : GPIO]]&lt;br /&gt;
*  [[Embedded System Tutorial UART | Lesson 2 : UART]]&lt;br /&gt;
*  [[Embedded System Tutorial SPI  | Lesson 3 : SPI]]&lt;br /&gt;
*  [[Embedded System I2C Tutorial  | Lesson 4 : I2C]]&lt;br /&gt;
*  [[Embedded System Tutorial Interrupts | Lesson 5 : Interrupts]]&lt;br /&gt;
*  [[Embedded System Tutorial FreeRTOS | Lesson 6 : FreeRTOS Tasks]]&lt;br /&gt;
*  [[Embedded System Tutorial File I/O | Lesson 7 : FreeRTOS Application Programming]]&lt;br /&gt;
&lt;br /&gt;
==== Class Project ====&lt;br /&gt;
* [[MP3 Player]]&lt;br /&gt;
&lt;br /&gt;
==Other reference articles==&lt;br /&gt;
*  [[Bitmasking Tutorial]] (+ GPIO Example)&lt;br /&gt;
*  [[ LPC17xx Memory Map &amp;amp; Interrupts]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Senior Design Projects ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Semester Projects ==&lt;br /&gt;
Every semester, students are given about 7-10 weeks to complete their projects.  During this short time-span, students form groups, order parts, and begin working on their projects.  The work performed during the semester is documented at this Wiki.&lt;br /&gt;
&lt;br /&gt;
Here is the list of Preet's documented projects:&amp;lt;BR/&amp;gt;&lt;br /&gt;
*  [[Preet's Relay Controller Project]]&lt;br /&gt;
*  [[Nordic Low Powered Mesh Network stack]]&lt;br /&gt;
*  [http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp Senior Design Project (MS-CmpE) Video]&lt;br /&gt;
&lt;br /&gt;
Here is another resource for good project references :&lt;br /&gt;
[http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/ Cornell EE476 Projects]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2024 | Fall 2024]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[F24: Dodge Cars]]&lt;br /&gt;
*  [[F24: Rival Rush]]&lt;br /&gt;
*  [[F24: Space 6]]&lt;br /&gt;
*  [[F24: Bounce Tales]]&lt;br /&gt;
*  [[F24: Tilt Maze]]&lt;br /&gt;
*  [[F24: Jardinains]]&lt;br /&gt;
*  [[F24: Survival Dodge]]&lt;br /&gt;
*  [[F24: Brick Breaker]]&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2022 | Fall 2022]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[F22: DDRTOS]]&lt;br /&gt;
*  [[F22: xGameCreate]]&lt;br /&gt;
*  [[F22: Embedded Gamers]]&lt;br /&gt;
*  [[F22: Bob Burgers]]&lt;br /&gt;
*  [[F22: Space Warriors]]&lt;br /&gt;
*  [[F22: Thunder Flash]]&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2021 | Fall 2021]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[F21: ACE MARIO]]&lt;br /&gt;
*  [[F21: Skeh-lleybones]]&lt;br /&gt;
*  [[F21: Sons of Ultron]]&lt;br /&gt;
*  [[F21: Juvenile Jumpers]]&lt;br /&gt;
*  [[F21: Treasure Dive]]&lt;br /&gt;
*  [[F21: FollowMe]]&lt;br /&gt;
*  [[F21: Flame Over]]&lt;br /&gt;
*  [[F21: Space Rage]]&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2020 | Fall 2020]] ===&lt;br /&gt;
*  [[F20: Jubeat]]&lt;br /&gt;
*  [[F20: Flappy]]&lt;br /&gt;
*  [[F20: Space Invaders]]&lt;br /&gt;
*  [[F20: Treasure Diver]]&lt;br /&gt;
*  [[F20: Tom &amp;amp; Jerry]]&lt;br /&gt;
*  [[F20: Hungry Snake]]&lt;br /&gt;
*  [[F20: Son of a Gun]]&lt;br /&gt;
*  [[F20: Corona Run]]&lt;br /&gt;
*  [[F20: Maddening Marbles]]&lt;br /&gt;
*  [[F20: Bubble Shooter]]&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2019 | Fall 2019]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[F19: Smacman]]&lt;br /&gt;
*  [[F19: Tetris]]&lt;br /&gt;
*  [[F19: Space Impact]]&lt;br /&gt;
*  [[F19: Road Max Fury]]&lt;br /&gt;
*  [[F19: T-Rex Run!]]&lt;br /&gt;
*  [[F19: Infinity Mirror]]&lt;br /&gt;
*  [[F19: Tower Defense in Space]]&lt;br /&gt;
*  [[F19: Alien Wars]]&lt;br /&gt;
*  [[F19: Pocket tank]]&lt;br /&gt;
*  [[F19: M&amp;amp;B (Morph &amp;amp; Blend)]]&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2018 | Fall 2018]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[F18: Flappy Bird]]&lt;br /&gt;
*  [[F18: Catch me if you can]]&lt;br /&gt;
*  [[F18: Zero Zero UFO]]&lt;br /&gt;
*  [[F18: Goals of Glory]]&lt;br /&gt;
*  [[F18: Spartan Warrior]]&lt;br /&gt;
*  [[F18: Wireless sensor network]]&lt;br /&gt;
*  [[F18: baem geim]]&lt;br /&gt;
*  [[F18: Hit the Balloon]]&lt;br /&gt;
*  [[F18: 2048]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Spring 2018 | Spring 2018]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[S18: Team Nemesis(SJSU Cam)]]&lt;br /&gt;
*  [[S18: Death Race]]&lt;br /&gt;
*  [[S18: Hand gesture controlled multiplayer game]]&lt;br /&gt;
*  [[S18: Smart Rock Paper Scissors]]&lt;br /&gt;
*  [[S18: Spybot]]&lt;br /&gt;
*  [[S18: Audio Spectrum Analyzer with Graphics Display]]&lt;br /&gt;
*  [[S18: XY-Plotter]]&lt;br /&gt;
*  [[S18: RGB LED Sound Behavior on a Skateboard]]&lt;br /&gt;
*  [[S18: Spark - MP3 Music Player with Audio Spectrum]]&lt;br /&gt;
*  [[S18: Traffic Menace Video Game]]&lt;br /&gt;
*  [[S18: M.E.O.W]]&lt;br /&gt;
*  [[S18: Rahee]]&lt;br /&gt;
&lt;br /&gt;
=== [[Spring 2017 | Spring 2017]] ===&lt;br /&gt;
&lt;br /&gt;
*  [[S17: Wake up Barista]]&lt;br /&gt;
*  [[S17: Propeller Clock]]&lt;br /&gt;
*  [[S17: Sky Knight]]&lt;br /&gt;
*  [[S17: MyAutoHealth]]&lt;br /&gt;
*  [[S17: Logan]]&lt;br /&gt;
*  [[S17: ElectricBoard]]&lt;br /&gt;
*  [[S17: CamBot]]&lt;br /&gt;
*  [[S17: Sphero Droid]]&lt;br /&gt;
*  [[S17: Smart Planter]]&lt;br /&gt;
*  [[S17: Boom-Z Equalizer]]&lt;br /&gt;
*  [[S17: Interactive Snake and ladder ]]&lt;br /&gt;
*  [[S17: Smart Health Gear]]&lt;br /&gt;
*  [[S17: Halo]]&lt;br /&gt;
*  [[S17: Squad]]&lt;br /&gt;
*  [[S17: Smart security system]]&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2016 | Fall 2016]] ===&lt;br /&gt;
&lt;br /&gt;
CMPE146:&lt;br /&gt;
* [http://www.socialledge.com/sjsu/index.php?title=F16:_Seismograph F16: Seismograph]&lt;br /&gt;
* [[F16: Piano Glove]]&lt;br /&gt;
* [[F16: Object Detector]]&lt;br /&gt;
* [[F16: Autonomous Nautical System]]&lt;br /&gt;
* [[F16: Autonomous Fire Extinguishing Vehicle]]&lt;br /&gt;
* [[F16: Autonomous Runaway Alarm Car]]&lt;br /&gt;
* [[F16: E-Bike]]&lt;br /&gt;
* [[F16: NotifyBox]]&lt;br /&gt;
* [[F16: Wireless Tilt Controlled Camera Arm]]&lt;br /&gt;
* [[F16: OBD2 Reader]]&lt;br /&gt;
* [[F16: Micro Watch Monitoring System]]&lt;br /&gt;
* [[F16: Door Alarm System]]&lt;br /&gt;
* [[http://www.socialledge.com/sjsu/index.php?title=F16:_I2Coffee F16: UART Coffee]]&lt;br /&gt;
* [[F16: SJone to FPGA wireless integration]]&lt;br /&gt;
&lt;br /&gt;
=== [[Spring 2016 | Spring 2016]] ===&lt;br /&gt;
*  [[S16: Fantastic Four]]&lt;br /&gt;
*  [[S16: Simpsons]]&lt;br /&gt;
*  [[S16: Mars 1]]&lt;br /&gt;
*  [[S16: OpenSJ Bluz]]&lt;br /&gt;
*  [[S16: Motion Copy Bot]]&lt;br /&gt;
*  [[S16: Biker Assist]]&lt;br /&gt;
*  [[S16: Helios]]&lt;br /&gt;
*  [[S16: Sound Buddy]]&lt;br /&gt;
*  [[S16: Warriors]]&lt;br /&gt;
*  [[S16: Expendables]]&lt;br /&gt;
*  [[S16: Ahava]]&lt;br /&gt;
*  [[S16: Number 1]]&lt;br /&gt;
*  [[S16: SkyNet]]&lt;br /&gt;
*  [[S16: SmartDoorLock]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cmpe 146:&lt;br /&gt;
*  [[S16: Camera Gimbal]]&lt;br /&gt;
*  [[S16: Laser Harp]]&lt;br /&gt;
*  &amp;lt;strike&amp;gt;[[S16: Laser Cutter Motor Controller]]&amp;lt;/strike&amp;gt;&lt;br /&gt;
*  [[S16: Sprinkler]]&lt;br /&gt;
*  [[S16: The Jatrick Car]]&lt;br /&gt;
*  [[S16: Dan]]&lt;br /&gt;
*  [[S16: Robolamp]]&lt;br /&gt;
*  [[S16: Pinball]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2015 | Fall 2015]] ===&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[F15: Autonomous Mobile]]&lt;br /&gt;
* [[F15: Car Report]]&lt;br /&gt;
* [[F15: Electronic Piano]]&lt;br /&gt;
* [[F15: Doorknock over Bluetooth]]&lt;br /&gt;
* [[F15: Smart Car]]&lt;br /&gt;
* [[F15: Plant Control]]&lt;br /&gt;
* [[F15: Laser Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2015 | Spring 2015]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S15: Quadcopter - It flies]]&lt;br /&gt;
* [[S15: Remote Learner]]&lt;br /&gt;
* [[S15: Protocol Interface: I2C - CAN Bridge]]&lt;br /&gt;
* [[S15: Vision RC Car]]&lt;br /&gt;
* [[S15: SJeight Octocopter]]&lt;br /&gt;
* [[S15: Swarm Robots]]&lt;br /&gt;
* [[S15: Smart Sparta Parking System]]&lt;br /&gt;
* [[S15: Touch Navigator]]&lt;br /&gt;
* [[S15: Wizard's Chess System]]&lt;br /&gt;
* [[S15: Bug Rider]]&lt;br /&gt;
* [[S15: Real Time Brake Assist (RTBA)]]&lt;br /&gt;
* [[S15: Wireless Mesh Network]]&lt;br /&gt;
* [[S15: Wireless Power Transfer System]]&lt;br /&gt;
* [[S15: Drone]]&lt;br /&gt;
* [[S15: Tree Node using Google Protocol Buffers]]&lt;br /&gt;
* [[S15: Multi-media Car]]&lt;br /&gt;
* [[S15: Hand Gesture Recognition using IR Sensors]]&lt;br /&gt;
* [[S15: CAN controlled RGB LED cubes]]&lt;br /&gt;
* [[S15: Rubik's Cube Solver]]&lt;br /&gt;
* [[S15: RFID Security Box]]&lt;br /&gt;
* [[S15: Automated Meeting Room Reservation]]&lt;br /&gt;
* [[S15: Patient Buddy System (PBS)]]&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[S15: Hovercopter]]&lt;br /&gt;
* [[S15: Triclops: Smart RC Car]]&lt;br /&gt;
* [[S15: Connect Four - Robotic Player]]&lt;br /&gt;
* [[S15: Self-Balancing Robot]]&lt;br /&gt;
* [[S15: MP3 Player with Graphic Equalizer Display]]&lt;br /&gt;
* [[S15: Motion-Controlled RC Car]]&lt;br /&gt;
* [[S15: MENL (Monster Encounter Night Light) ]]&lt;br /&gt;
* [[S15: Tilt Motion Controlled LED Alarm Clock]]&lt;br /&gt;
* [[S15: Alarm Based Coffee Maker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2014 | Spring 2014]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  Senior Project: [[Project Advising: Remote Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S14: Quadcopter]]&lt;br /&gt;
* [[S14: Smart Weather Clock]]&lt;br /&gt;
* [[S14: Divine WINd]]&lt;br /&gt;
* [[S14: Data Acquisition using CAN bus]]&lt;br /&gt;
* [[S14: E-Ink Display for Shopping Tags]]&lt;br /&gt;
* [[S14: Spectrum Analyzer for Audio Frequency Signals]]&lt;br /&gt;
* [[S14: CAN Firmware Uploader]]&lt;br /&gt;
* [[S14: Asset Management and Location System]]&lt;br /&gt;
* [[S14: Location  Tracker]]&lt;br /&gt;
* [[S14:  Androbot]]&lt;br /&gt;
* [[S14: Virtual Dog]]&lt;br /&gt;
* [[S14: Android based Automation]]&lt;br /&gt;
* [[S14: FaceTime Robo]]&lt;br /&gt;
* [[S14: Wireless Control Car]]&lt;br /&gt;
* [[S14: Power Efficient Security Door System for Light-rail using CAN Bus]]&lt;br /&gt;
* [[S14: Android based home monitoring system]]&lt;br /&gt;
* [[S14: Need For Speed]]&lt;br /&gt;
&lt;br /&gt;
CmpE146&lt;br /&gt;
* [[S14: Hyperintelligent NFC Locker of the Future]]&lt;br /&gt;
* [[S14: Smart Planter]]&lt;br /&gt;
* [[S14: Modular Security System]]&lt;br /&gt;
* [[S14: Autonomous Control System]]&lt;br /&gt;
* [[S14: Anti-Crash Car]]&lt;br /&gt;
* [[S14: Tricopter]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE240 Fall 2013 | Fall 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F13: POV Display]]&lt;br /&gt;
* [[F13: Line Following Robot]]&lt;br /&gt;
* [[F13: LED Display]]&lt;br /&gt;
* [[F13: Bulb Ramper]]&lt;br /&gt;
* [[F13: Garage Parking Assistant]]&lt;br /&gt;
* [[F13: Quadcopter]]&lt;br /&gt;
* [[F13: BarkMaster2000]]&lt;br /&gt;
* [[F13: Remote Control Car]]&lt;br /&gt;
* [[F13: Obstacle Avoidance Robot]]&lt;br /&gt;
* [[F13: Vehicle On Board Diagnostics]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2013 | Spring 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[S13: 2D Plotter]]&lt;br /&gt;
* [[S13: Smart Cube]]&lt;br /&gt;
* [[S13: Garage Parking Aid]]&lt;br /&gt;
* [[S13: Smart Security]]&lt;br /&gt;
* [[S13: Door Alarm System]]&lt;br /&gt;
* [[S13: Solar Panel Tracker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Fall 2012|Fall 2012]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F12: Evil Watchdog]]&lt;br /&gt;
* [[F12: Smart Bulb]]&lt;br /&gt;
* [[F12: All Your Base are Belong to You]]&lt;br /&gt;
* [[F12: Android Controlled MP3]]&lt;br /&gt;
* [[F12: Unified Wireless Health Monitoring System]]&lt;br /&gt;
* [[F12: OBD-II Android Monitor]]&lt;br /&gt;
* [[F12: Self-Driving GPS Following Car]]&lt;br /&gt;
* [[F12: Android Door Lock]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2012|Spring 2012]] ===&lt;br /&gt;
*  [[S12: FreeRTOS based QuadCopter]]&lt;br /&gt;
*  [[S12: Web-based MP3 Player]]&lt;br /&gt;
*  [[S12: Self Drive Car]]&lt;br /&gt;
*  [[S12: VAndroid]]&lt;br /&gt;
*  [[S12: Traffic Light Sensing Vehicle]]&lt;br /&gt;
*  [[S12: Sound Reader]]&lt;br /&gt;
*  [[S12: Remote Controlled MP3 Player]]&lt;br /&gt;
*  [[S12: Android Controlled Robot]]&lt;br /&gt;
*  [[S12: Eyes-Free GPS]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Handy References ==&lt;br /&gt;
*  [[Sample Project Report]]&lt;br /&gt;
*  [[Project Proposal Guidelines]]&lt;br /&gt;
*  [[CmpE146 Lab. Resources]]&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=69008</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=69008"/>
				<updated>2022-05-28T07:45:30Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Project Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
The controllers for the project are divided in 5 parts. Each controller has different tasks and communicate with each other over CAN bus.&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
In real world, the source and destination are not on a straight line. The car has to find the best possible and smallest route to its final destination. In this project keeping that in mind we have used checkpoint algorithm. These waypoints are known coordinates which are given according to the destination and source path. The car needs to follow the route determined by the waypoints from source to destination.&lt;br /&gt;
&lt;br /&gt;
We choose 10 points over a known location and hardcoded these coordinates in GEO node logic. Once our car gets the destination coordinates from Bridge and Sensor controller, it starts giving Heading , Bearing and Distance values to Driver Node. This waypoint must satisfy the below conditions:&lt;br /&gt;
* It is the closest waypoint to the current location of the car.&lt;br /&gt;
* Waypoint to destination distance is less than the current coordinate to the final coordinate distance.&lt;br /&gt;
[[File:Checkpoint.jpg]]&lt;br /&gt;
&lt;br /&gt;
So when the algorithm finds the destination coordinates, then bearing is calculated with that particular coordinate, so that car can be further instructions to move towards that particular point. As shown in the figure below, our algorithm keeps finding new coordinates with time (orange ones) and at last go to the final destination coordinates. The algorithm is mentioned below in the form of flowchart and code:&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|center|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
* People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
* Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
* Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
* Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
We did our hardware setup much later, we wasted a lot of time in doing connections again and again. A better strategy would have been to get familiar with hardware connections and make a prototype setup to complete the milestones. We were waiting for PCB, which till the end was not completed and had some issues. It was a complete hassle to finalize our hardware in the end and test individual modules again. We got very less time for integration testing, our Geo navigation could have done much better if we would have done proper integration testing.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
https://gitlab.com/Ritika_Beniwal_/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
*The most critical hardware connection is for motor node. We used the receiver , which we used to calibrate the ESC for Servo, DC and RPM power supply. We did that 1 week before our demo, and the motor node was fine. &lt;br /&gt;
* Do not overlook any software bug or hardware connection, It can cost you very badly. Be responsible for your node to send reliable data on bus. &lt;br /&gt;
* Can Transceiver: Do not trust what you read in the project reports , they might be lucky and have not faced the problems. Our Can bus data was not coming on Bus Master but every node was receiving the data, we were using same module which previous groups used. Later we found out the termination was the problem . Each Can transceiver had 120 ohm resistor. Debugging without Bus Master was a nightmare.&lt;br /&gt;
* It is always better to buy new and quality components. The RC Car performance depends on what components you are using. The better and reliable components makes your life easier.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=69007</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=69007"/>
				<updated>2022-05-28T07:40:21Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
The controllers for the project are divided in 5 parts. Each controller has different tasks and communicate with each other over CAN bus.&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
In real world, the source and destination are not on a straight line. The car has to find the best possible and smallest route to its final destination. In this project keeping that in mind we have used checkpoint algorithm. These waypoints are known coordinates which are given according to the destination and source path. The car needs to follow the route determined by the waypoints from source to destination.&lt;br /&gt;
&lt;br /&gt;
We choose 10 points over a known location and hardcoded these coordinates in GEO node logic. Once our car gets the destination coordinates from Bridge and Sensor controller, it starts giving Heading , Bearing and Distance values to Driver Node. This waypoint must satisfy the below conditions:&lt;br /&gt;
* It is the closest waypoint to the current location of the car.&lt;br /&gt;
* Waypoint to destination distance is less than the current coordinate to the final coordinate distance.&lt;br /&gt;
[[File:Checkpoint.jpg]]&lt;br /&gt;
&lt;br /&gt;
So when the algorithm finds the destination coordinates, then bearing is calculated with that particular coordinate, so that car can be further instructions to move towards that particular point. As shown in the figure below, our algorithm keeps finding new coordinates with time (orange ones) and at last go to the final destination coordinates. The algorithm is mentioned below in the form of flowchart and code:&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|center|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
* People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
* Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
* Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
* Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
We did our hardware setup much later, we wasted a lot of time in doing connections again and again. A better strategy would have been to get familiar with hardware connections and make a prototype setup to complete the milestones. We were waiting for PCB, which till the end was not completed and had some issues. It was a complete hassle to finalize our hardware in the end and test individual modules again. We got very less time for integration testing, our Geo navigation could have done much better if we would have done proper integration testing.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
*The most critical hardware connection is for motor node. We used the receiver , which we used to calibrate the ESC for Servo, DC and RPM power supply. We did that 1 week before our demo, and the motor node was fine. &lt;br /&gt;
* Do not overlook any software bug or hardware connection, It can cost you very badly. Be responsible for your node to send reliable data on bus. &lt;br /&gt;
* Can Transceiver: Do not trust what you read in the project reports , they might be lucky and have not faced the problems. Our Can bus data was not coming on Bus Master but every node was receiving the data, we were using same module which previous groups used. Later we found out the termination was the problem . Each Can transceiver had 120 ohm resistor. Debugging without Bus Master was a nightmare.&lt;br /&gt;
* It is always better to buy new and quality components. The RC Car performance depends on what components you are using. The better and reliable components makes your life easier.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Checkpoint.jpg&amp;diff=69005</id>
		<title>File:Checkpoint.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Checkpoint.jpg&amp;diff=69005"/>
				<updated>2022-05-28T07:38:17Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=69004</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=69004"/>
				<updated>2022-05-28T07:37:56Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Checkpoints */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
The controllers for the project are divided in 5 parts. Each controller has different tasks and communicate with each other over CAN bus.&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
In real world, the source and destination are not on a straight line. The car has to find the best possible and smallest route to its final destination. In this project keeping that in mind we have used checkpoint algorithm. These waypoints are known coordinates which are given according to the destination and source path. The car needs to follow the route determined by the waypoints from source to destination.&lt;br /&gt;
&lt;br /&gt;
We choose 10 points over a known location and hardcoded these coordinates in GEO node logic. Once our car gets the destination coordinates from Bridge and Sensor controller, it starts giving Heading , Bearing and Distance values to Driver Node. This waypoint must satisfy the below conditions:&lt;br /&gt;
* It is the closest waypoint to the current location of the car.&lt;br /&gt;
* Waypoint to destination distance is less than the current coordinate to the final coordinate distance.&lt;br /&gt;
[[File:Checkpoint.jpg]]&lt;br /&gt;
&lt;br /&gt;
So when the algorithm finds the destination coordinates, then bearing is calculated with that particular coordinate, so that car can be further instructions to move towards that particular point. As shown in the figure below, our algorithm keeps finding new coordinates with time (orange ones) and at last go to the final destination coordinates. The algorithm is mentioned below in the form of flowchart and code:&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
* People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
* Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
* Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
* Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
We did our hardware setup much later, we wasted a lot of time in doing connections again and again. A better strategy would have been to get familiar with hardware connections and make a prototype setup to complete the milestones. We were waiting for PCB, which till the end was not completed and had some issues. It was a complete hassle to finalize our hardware in the end and test individual modules again. We got very less time for integration testing, our Geo navigation could have done much better if we would have done proper integration testing.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
*The most critical hardware connection is for motor node. We used the receiver , which we used to calibrate the ESC for Servo, DC and RPM power supply. We did that 1 week before our demo, and the motor node was fine. &lt;br /&gt;
* Do not overlook any software bug or hardware connection, It can cost you very badly. Be responsible for your node to send reliable data on bus. &lt;br /&gt;
* Can Transceiver: Do not trust what you read in the project reports , they might be lucky and have not faced the problems. Our Can bus data was not coming on Bus Master but every node was receiving the data, we were using same module which previous groups used. Later we found out the termination was the problem . Each Can transceiver had 120 ohm resistor. Debugging without Bus Master was a nightmare.&lt;br /&gt;
* It is always better to buy new and quality components. The RC Car performance depends on what components you are using. The better and reliable components makes your life easier.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=69003</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=69003"/>
				<updated>2022-05-28T07:37:22Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Checkpoints */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
The controllers for the project are divided in 5 parts. Each controller has different tasks and communicate with each other over CAN bus.&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
In real world, the source and destination are not on a straight line. The car has to find the best possible and smallest route to its final destination. In this project keeping that in mind we have used checkpoint algorithm. These waypoints are known coordinates which are given according to the destination and source path. The car needs to follow the route determined by the waypoints from source to destination.&lt;br /&gt;
&lt;br /&gt;
We choose 10 points over a known location and hardcoded these coordinates in GEO node logic. Once our car gets the destination coordinates from Bridge and Sensor controller, it starts giving Heading , Bearing and Distance values to Driver Node. This waypoint must satisfy the below conditions:&lt;br /&gt;
* It is the closest waypoint to the current location of the car.&lt;br /&gt;
* Waypoint to destination distance is less than the current coordinate to the final coordinate distance.&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
So when the algorithm finds the destination coordinates, then bearing is calculated with that particular coordinate, so that car can be further instructions to move towards that particular point. As shown in the figure below, our algorithm keeps finding new coordinates with time (orange ones) and at last go to the final destination coordinates. The algorithm is mentioned below in the form of flowchart and code:&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
* People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
* Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
* Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
* Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
We did our hardware setup much later, we wasted a lot of time in doing connections again and again. A better strategy would have been to get familiar with hardware connections and make a prototype setup to complete the milestones. We were waiting for PCB, which till the end was not completed and had some issues. It was a complete hassle to finalize our hardware in the end and test individual modules again. We got very less time for integration testing, our Geo navigation could have done much better if we would have done proper integration testing.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
*The most critical hardware connection is for motor node. We used the receiver , which we used to calibrate the ESC for Servo, DC and RPM power supply. We did that 1 week before our demo, and the motor node was fine. &lt;br /&gt;
* Do not overlook any software bug or hardware connection, It can cost you very badly. Be responsible for your node to send reliable data on bus. &lt;br /&gt;
* Can Transceiver: Do not trust what you read in the project reports , they might be lucky and have not faced the problems. Our Can bus data was not coming on Bus Master but every node was receiving the data, we were using same module which previous groups used. Later we found out the termination was the problem . Each Can transceiver had 120 ohm resistor. Debugging without Bus Master was a nightmare.&lt;br /&gt;
* It is always better to buy new and quality components. The RC Car performance depends on what components you are using. The better and reliable components makes your life easier.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68996</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68996"/>
				<updated>2022-05-28T07:32:19Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Checkpoints */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
The controllers for the project are divided in 5 parts. Each controller has different tasks and communicate with each other over CAN bus.&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
In real world, the source and destination are not on a straight line. The car has to find the best possible and smallest route to its final destination. In this project keeping that in mind we have used checkpoint algorithm. These waypoints are known coordinates which are given according to the destination and source path. The car needs to follow the route determined by the waypoints from source to destination.&lt;br /&gt;
&lt;br /&gt;
We choose 10 points over a known location and hardcoded these coordinates in GEO node logic. Once our car gets the destination coordinates from Bridge and Sensor controller, it starts giving Heading , Bearing and Distance values to Driver Node. This waypoint must satisfy the below conditions:&lt;br /&gt;
* It is the closest waypoint to the current location of the car.&lt;br /&gt;
* Waypoint to destination distance is less than the current coordinate to the final coordinate distance.&lt;br /&gt;
&lt;br /&gt;
So when the algorithm finds the destination coordinates, then bearing is calculated with that particular coordinate, so that car can be further instructions to move towards that particular point. As shown in the figure below, our algorithm keeps finding new coordinates with time (orange ones) and at last go to the final destination coordinates. The algorithm is mentioned below in the form of flowchart and code:&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
* People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
* Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
* Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
* Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
We did our hardware setup much later, we wasted a lot of time in doing connections again and again. A better strategy would have been to get familiar with hardware connections and make a prototype setup to complete the milestones. We were waiting for PCB, which till the end was not completed and had some issues. It was a complete hassle to finalize our hardware in the end and test individual modules again. We got very less time for integration testing, our Geo navigation could have done much better if we would have done proper integration testing.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
*The most critical hardware connection is for motor node. We used the receiver , which we used to calibrate the ESC for Servo, DC and RPM power supply. We did that 1 week before our demo, and the motor node was fine. &lt;br /&gt;
* Do not overlook any software bug or hardware connection, It can cost you very badly. Be responsible for your node to send reliable data on bus. &lt;br /&gt;
* Can Transceiver: Do not trust what you read in the project reports , they might be lucky and have not faced the problems. Our Can bus data was not coming on Bus Master but every node was receiving the data, we were using same module which previous groups used. Later we found out the termination was the problem . Each Can transceiver had 120 ohm resistor. Debugging without Bus Master was a nightmare.&lt;br /&gt;
* It is always better to buy new and quality components. The RC Car performance depends on what components you are using. The better and reliable components makes your life easier.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68994</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68994"/>
				<updated>2022-05-28T07:30:42Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Checkpoints */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
The controllers for the project are divided in 5 parts. Each controller has different tasks and communicate with each other over CAN bus.&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
In real world, the source and destination are not on a straight line. The car has to find the best possible and smallest route to its final destination. In this project keeping that in mind we have used checkpoint algorithm. These waypoints are known coordinates which are given according to the destination and source path. The car needs to follow the route determined by the waypoints from source to destination.&lt;br /&gt;
&lt;br /&gt;
We choose 10 points over a known location as shown in the image below. These waypoints form a grid of points (all black and orange dots). Once our car gets the destination coordinates from Bridge and Sensor controller, it starts giving Heading , Bearing and Distance values to Driver Node. This waypoint must satisfy the below conditions:&lt;br /&gt;
* It is the closest waypoint to the current location of the car.&lt;br /&gt;
* Waypoint to destination distance is less than the current coordinate to the final coordinate distance.&lt;br /&gt;
&lt;br /&gt;
So when the algorithm finds the destination coordinates, then bearing is calculated with that particular coordinate, so that car can be further instructions to move towards that particular point. As shown in the figure below, our algorithm keeps finding new coordinates with time (orange ones) and at last go to the final destination coordinates. The algorithm is mentioned below in the form of flowchart and code:&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
* People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
* Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
* Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
* Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
We did our hardware setup much later, we wasted a lot of time in doing connections again and again. A better strategy would have been to get familiar with hardware connections and make a prototype setup to complete the milestones. We were waiting for PCB, which till the end was not completed and had some issues. It was a complete hassle to finalize our hardware in the end and test individual modules again. We got very less time for integration testing, our Geo navigation could have done much better if we would have done proper integration testing.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
*The most critical hardware connection is for motor node. We used the receiver , which we used to calibrate the ESC for Servo, DC and RPM power supply. We did that 1 week before our demo, and the motor node was fine. &lt;br /&gt;
* Do not overlook any software bug or hardware connection, It can cost you very badly. Be responsible for your node to send reliable data on bus. &lt;br /&gt;
* Can Transceiver: Do not trust what you read in the project reports , they might be lucky and have not faced the problems. Our Can bus data was not coming on Bus Master but every node was receiving the data, we were using same module which previous groups used. Later we found out the termination was the problem . Each Can transceiver had 120 ohm resistor. Debugging without Bus Master was a nightmare.&lt;br /&gt;
* It is always better to buy new and quality components. The RC Car performance depends on what components you are using. The better and reliable components makes your life easier.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68991</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68991"/>
				<updated>2022-05-28T07:29:59Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Checkpoints */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
The controllers for the project are divided in 5 parts. Each controller has different tasks and communicate with each other over CAN bus.&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
In real world, the car the source and destination are not on straight lines. The car has to find the best possible and smallest route to its final destination. In this project keeping that in mind we have used checkpoint algorithm. These waypoints are known coordinates which are given according to the destination and source path. The car needs to follow the route determined by the waypoints from source to destination.&lt;br /&gt;
&lt;br /&gt;
We choose 10 points over a known location as shown in the image below. These waypoints form a grid of points (all black and orange dots). Once our car gets the destination coordinates from Bridge and Sensor controller, it starts giving Heading , Bearing and Distance values to Driver Node. This waypoint must satisfy the below conditions:&lt;br /&gt;
* It is the closest waypoint to the current location of the car.&lt;br /&gt;
* Waypoint to destination distance is less than the current coordinate to the final coordinate distance.&lt;br /&gt;
&lt;br /&gt;
So when the algorithm finds the destination coordinates, then bearing is calculated with that particular coordinate, so that car can be further instructions to move towards that particular point. As shown in the figure below, our algorithm keeps finding new coordinates with time (orange ones) and at last go to the final destination coordinates. The algorithm is mentioned below in the form of flowchart and code:&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
* People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
* Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
* Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
* Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
We did our hardware setup much later, we wasted a lot of time in doing connections again and again. A better strategy would have been to get familiar with hardware connections and make a prototype setup to complete the milestones. We were waiting for PCB, which till the end was not completed and had some issues. It was a complete hassle to finalize our hardware in the end and test individual modules again. We got very less time for integration testing, our Geo navigation could have done much better if we would have done proper integration testing.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
*The most critical hardware connection is for motor node. We used the receiver , which we used to calibrate the ESC for Servo, DC and RPM power supply. We did that 1 week before our demo, and the motor node was fine. &lt;br /&gt;
* Do not overlook any software bug or hardware connection, It can cost you very badly. Be responsible for your node to send reliable data on bus. &lt;br /&gt;
* Can Transceiver: Do not trust what you read in the project reports , they might be lucky and have not faced the problems. Our Can bus data was not coming on Bus Master but every node was receiving the data, we were using same module which previous groups used. Later we found out the termination was the problem . Each Can transceiver had 120 ohm resistor. Debugging without Bus Master was a nightmare.&lt;br /&gt;
* It is always better to buy new and quality components. The RC Car performance depends on what components you are using. The better and reliable components makes your life easier.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68982</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68982"/>
				<updated>2022-05-28T07:21:39Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Advise for Future Students */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
The controllers for the project are divided in 5 parts. Each controller has different tasks and communicate with each other over CAN bus.&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
* People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
* Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
* Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
* Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
We did our hardware setup much later, we wasted a lot of time in doing connections again and again. A better strategy would have been to get familiar with hardware connections and make a prototype setup to complete the milestones. We were waiting for PCB, which till the end was not completed and had some issues. It was a complete hassle to finalize our hardware in the end and test individual modules again. We got very less time for integration testing, our Geo navigation could have done much better if we would have done proper integration testing.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
*The most critical hardware connection is for motor node. We used the receiver , which we used to calibrate the ESC for Servo, DC and RPM power supply. We did that 1 week before our demo, and the motor node was fine. &lt;br /&gt;
* Do not overlook any software bug or hardware connection, It can cost you very badly. Be responsible for your node to send reliable data on bus. &lt;br /&gt;
* Can Transceiver: Do not trust what you read in the project reports , they might be lucky and have not faced the problems. Our Can bus data was not coming on Bus Master but every node was receiving the data, we were using same module which previous groups used. Later we found out the termination was the problem . Each Can transceiver had 120 ohm resistor. Debugging without Bus Master was a nightmare.&lt;br /&gt;
* It is always better to buy new and quality components. The RC Car performance depends on what components you are using. The better and reliable components makes your life easier.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68967</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68967"/>
				<updated>2022-05-28T07:09:11Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
The controllers for the project are divided in 5 parts. Each controller has different tasks and communicate with each other over CAN bus.&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
* People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
* Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
* Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
* Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
We did our hardware setup much later, we wasted a lot of time in doing connections again and again. A better strategy would have been to get familiar with hardware connections and make a prototype setup to complete the milestones. We were waiting for PCB, which till the end was not completed and had some issues. It was a complete hassle to finalize our hardware in the end and test individual modules again. We got very less time for integration testing, our Geo navigation could have done much better if we would have done proper integration testing.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68938</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68938"/>
				<updated>2022-05-28T06:55:21Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
The controllers for the project are divided in 5 parts. Each controller has different tasks and communicate with each other over CAN bus.&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
* People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
* Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
* Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
* Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68934</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68934"/>
				<updated>2022-05-28T06:52:35Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
* People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
* Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
* Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
* Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68933</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68933"/>
				<updated>2022-05-28T06:52:10Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This is not a project where only writing best code for our controller is not good enough. This project tests overall personality. As a team we were not prepared to spend more time on this and due to some mismanagement we were always falling behind. But we tried our best to complete the project with few team members. We learnt different aspect of a product development:&lt;br /&gt;
*1. People Management: We were more focused on our node but review is equally important. Well defined roles and responsibilities will contribute to the success and timely completion of the project.&lt;br /&gt;
*2. Finance Management: We bought components just by referring the previous years project. Before ordering we should have read the proper descriptions and then order according to requirement. There was another mistake which should have been avoided was we should have ordered some spare components like voltage regulators, batteries, SJ2 board. Few components got damaged and without figuring out problems we were only ordering and repeating the same mistake.&lt;br /&gt;
*3. Software skills: We learnt CAN protocol and Unit testing. The Unit tested modules gave us the confidence. The most important aspect that we learnt, don't trust the software which failed even one time out of hundred times, it has potential to bring you back to the starting point.&lt;br /&gt;
*4. Time Management: Well defined agenda for every week to test and develop could have made our tasks easier. Doing some home work before coming for the team meeting may have helped us to complete the project before time giving us time for more integration testing. Team meetings are meant to discuss problems and do integration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking back, we could have probably created a better plan earlier on.  Defining milestones for different nodes, and if they were not reached, shift our attention to get them done to progress the overall project.  We overlooked a lot of the mechanical aspects of the RC car and how it would impact the compass and accelerometer.  Improving our mounting and spending more time refining the process of determining heading would have likely helped a lot.  Refining driver logic to deal with some variability in steering, that we did not notice until integration testing near the final weeks, earlier on could also have helped in the performance of the car in the final demo.  These are learning points that we will keep in mind for future projects and add to the takeaways from the course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68900</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68900"/>
				<updated>2022-05-28T06:24:27Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&lt;br /&gt;
Bridge Sensor ECU&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
Motor ECU&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
Geographical ECU&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mobile Application&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68898</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68898"/>
				<updated>2022-05-28T06:23:30Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;br /&gt;
====Bridge Sensor ECU====&lt;br /&gt;
*[https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf HCSR-04]&lt;br /&gt;
&lt;br /&gt;
====Motor ECU====&lt;br /&gt;
* None used&lt;br /&gt;
&lt;br /&gt;
====Geographical ECU====&lt;br /&gt;
*[https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ Bearing Formula]&lt;br /&gt;
*[https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/ Haversine Formula] &lt;br /&gt;
*https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
*[https://www.pololu.com/file/0J434/LSM303DLH-compass-app-note.pdf Compass Heading Tilt Compensated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Mobile Application====&lt;br /&gt;
* https://developer.android.com/training/basics/firstapp&lt;br /&gt;
* https://www.youtube.com/watch?v=_xNkVNaC9AI&amp;amp;t=480s&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68895</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68895"/>
				<updated>2022-05-28T06:20:24Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;br /&gt;
https://cdn-shop.adafruit.com/product-files/1059/CD+PA1616D+Datasheet+v.05.pdf&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68893</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68893"/>
				<updated>2022-05-28T06:19:04Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Acknowledgement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
We want to express our gratitude to Professor Preetpal Kang for sharing valuable inputs and knowledge throughout the duration of the project. We would also like to thank the project groups of previous years, which helped us to avoid the mistakes made by them which that we saved some time to understand the concepts better.&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68892</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68892"/>
				<updated>2022-05-28T06:15:23Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Project Video */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/lGZTV-ZGHd8&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68890</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68890"/>
				<updated>2022-05-28T06:14:10Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Technical Challenges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68888</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68888"/>
				<updated>2022-05-28T06:13:48Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Technical Challenges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* ''Adafruit GPS''&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68887</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68887"/>
				<updated>2022-05-28T06:13:23Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Technical Challenges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* 'Adafruit GPS'&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68885</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68885"/>
				<updated>2022-05-28T06:12:25Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* GPS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GPGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68884</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68884"/>
				<updated>2022-05-28T06:12:00Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* GPS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GPGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GPGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Periodic Callbacks ===&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__initialize() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can__bus_initializer(can1);&lt;br /&gt;
  lcd__init();&lt;br /&gt;
  head_tail_lights_init();&lt;br /&gt;
  debug_led_init();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__1Hz() function calls the following function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler_tx_debug_messsages(can1);&lt;br /&gt;
  static uint8_t count = 0;&lt;br /&gt;
  if (count == 0) {&lt;br /&gt;
    lcd__communication_init();&lt;br /&gt;
  }&lt;br /&gt;
  count = 1;&lt;br /&gt;
  print_info_on_lcd();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period_callbacks__10Hz() function calls the following functions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  can_bus_handler__process_all_received_messages(can1);&lt;br /&gt;
  can_bus_handler__manage_mia();&lt;br /&gt;
  can_bus_handler_tx_messages(can1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
&amp;lt;li&amp;gt;The Designer page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Blocks page&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68799</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68799"/>
				<updated>2022-05-28T04:51:25Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Technical Challenges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GNGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GNGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the controller.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference with other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
The Designer page&lt;br /&gt;
The Blocks page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Make use of the holidays and spring break. If you have your basic framework of the software and hardware is complete by the end of spring break you can start testing ASAP.&lt;br /&gt;
* Start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68796</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68796"/>
				<updated>2022-05-28T04:50:20Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GNGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GNGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the RC car. It was swerving too much because of the stale data.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference by other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
The Designer page&lt;br /&gt;
The Blocks page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Best suggestion would be to start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68795</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68795"/>
				<updated>2022-05-28T04:50:01Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Technical Challenges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|300px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GNGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GNGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
* Adafruit GPS&lt;br /&gt;
** Problem: The data from the GPS was being refreshed every second which was causing issues for the RC car. It was swerving too much because of the stale data.&lt;br /&gt;
*** Solution: Send the command to the GPS module only send the SJ2 board GPGGA data.&lt;br /&gt;
** Problem: It would take way too long for the GPS to have a fix causing a 3-5 minute way when indoors and over 45 seconds when outside&lt;br /&gt;
*** Solution: Utilize the external antenna. It was able to get a fix inside in under a minute while outside within 25 seconds. Using separate battery can reduce the fix time. &lt;br /&gt;
&lt;br /&gt;
* Compass&lt;br /&gt;
** Problem: Standalone testing of the controller gave correct data but when integrated with all modules the data was inaccurate (not 0 to 360 degrees).&lt;br /&gt;
*** Solution: When mounting the compass module on RC car, mount it away from Motor controller and mount it on some height to avoid any interference by other nodes.&lt;br /&gt;
&lt;br /&gt;
*General&lt;br /&gt;
** Problem: The Geo node needs extensive testing with other nodes, if not unit tested and integration tested, it is not going to work properly.&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
The Designer page&lt;br /&gt;
The Blocks page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Best suggestion would be to start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68779</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68779"/>
				<updated>2022-05-28T04:32:16Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Technical Challenges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|300px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
*The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
*For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GNGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GNGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
The Designer page&lt;br /&gt;
The Blocks page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Best suggestion would be to start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68778</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68778"/>
				<updated>2022-05-28T04:31:22Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|300px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GNGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GNGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
The Designer page&lt;br /&gt;
The Blocks page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Best suggestion would be to start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68777</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68777"/>
				<updated>2022-05-28T04:30:55Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GNGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GNGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
The Designer page&lt;br /&gt;
The Blocks page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* The main challenge that we faced while integrating Bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location every time. Also it happened for start stop button as well. The problem was resolved by calling most of the Bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&lt;br /&gt;
* Another challenge we faced was that Bluetooth can only transmit float values so we had figure out a way to send latitude and longitude values as a string to the SJ2 board.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Best suggestion would be to start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68775</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68775"/>
				<updated>2022-05-28T04:30:31Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GNGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GNGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
The Designer page&lt;br /&gt;
The Blocks page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
The main challenge that we faced while intergrating bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location everytime. Also it happened for start stop button as well. The problem was resolved by calling most of the bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Best suggestion would be to start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68774</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68774"/>
				<updated>2022-05-28T04:30:02Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GNGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GNGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
The Designer page&lt;br /&gt;
The Blocks page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
The main challenge that we faced while intergrating bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location everytime. Also it happened for start stop button as well. The problem was resolved by calling most of the bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Best suggestion would be to start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68773</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68773"/>
				<updated>2022-05-28T04:29:44Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|400px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GNGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GNGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
The Designer page&lt;br /&gt;
The Blocks page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
The main challenge that we faced while intergrating bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location everytime. Also it happened for start stop button as well. The problem was resolved by calling most of the bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Best suggestion would be to start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68772</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68772"/>
				<updated>2022-05-28T04:29:29Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|center|400px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GNGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GNGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
The Designer page&lt;br /&gt;
The Blocks page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
The main challenge that we faced while intergrating bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location everytime. Also it happened for start stop button as well. The problem was resolved by calling most of the bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Best suggestion would be to start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68769</id>
		<title>S22: Firebolt</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S22:_Firebolt&amp;diff=68769"/>
				<updated>2022-05-28T04:28:59Z</updated>
		
		<summary type="html">&lt;p&gt;Proj user9: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:First_Image.JPG|500px|thumb|right| The RC Car]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Firebolt is battery powered autonomous RC car. The car uses four microcontrollers for communication between the nodes- driver node, motor node, bridge &amp;amp; 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 after performing calculations based on the bridge and sensor node's data.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The objective of this project is to get hands on experience of application of embedded systems in autonomous vehicles, have understanding of CAN bus communication, CAN database files, TDD and other related tools such as PCAN dongle and Busmaster.&lt;br /&gt;
&lt;br /&gt;
====Software side ====&lt;br /&gt;
* The car communicates with an Android application &lt;br /&gt;
* Receive coordinates from gps to drive itself to the destination while avoiding obstacles&lt;br /&gt;
* Display useful information on the LCD&lt;br /&gt;
* Take care of elevation and make correct speed decisions&lt;br /&gt;
* DBC file for all the nodes&lt;br /&gt;
&lt;br /&gt;
====Hardware side ====&lt;br /&gt;
* Design PCB for four controllers and other necessary components&lt;br /&gt;
* Choose good options for mounting the ultrasonic sensors on the car &lt;br /&gt;
* Make a good GUI Android application for interfacing with the microcontroller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:High_Level_Implementation2.png|600px|thumb|Center|High Level Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
Four Nodes of the RC Car are:&lt;br /&gt;
# Driver Node &lt;br /&gt;
# GEO Node&lt;br /&gt;
# Sensors and Bridge Node&lt;br /&gt;
# Motor Node&lt;br /&gt;
# Mobile Application&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_2.jpg|600px|thumb|Right|Team FireBolt]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Team_Photo_Final.jpeg|500px|thumb|Left|Team FireBolt]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Priyanka Rai   [https://www.linkedin.com/in/priyanka-rai-009ba975/  LinkedIn]''''''&lt;br /&gt;
*  Geo Controller&lt;br /&gt;
*  GPS and Compass Interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritu Patil     [https://www.linkedin.com/in/ritu-patil/  LinkedIn]''''''&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  RPM Sensor&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Ritika Beniwal  [https://www.linkedin.com/in/ritikabeniwal03/  LinkedIn]''''''&lt;br /&gt;
*  Driver Node&lt;br /&gt;
*  LCD interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Utsav Savaliya  [https://www.linkedin.com/in/utsav-savaliya-7383ab15b/ LinkedIn]''''''&lt;br /&gt;
*  Sensor Controller&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
*  Wiki Page Update&lt;br /&gt;
*  Bluetooth integration with Sensor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt; '''Dhanush Babu   [https://www.linkedin.com/in/dhanushsbabu/ LinkedIn]''''''&lt;br /&gt;
*  Bluetooth module interfacing&lt;br /&gt;
*  Motor Controller&lt;br /&gt;
*  Android App&lt;br /&gt;
*  Integration Testing&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=:col&amp;quot;| Completion Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 1 &lt;br /&gt;
|&lt;br /&gt;
* 03/06&lt;br /&gt;
* 03/08&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
|&lt;br /&gt;
* Study and discuss previous project reports&lt;br /&gt;
* Brainstorm on the requirements for the project&lt;br /&gt;
* Identify and order/purchase the required components &lt;br /&gt;
|&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/10&lt;br /&gt;
* 03/12&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 2&lt;br /&gt;
|&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/13&lt;br /&gt;
* 03/14&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
|&lt;br /&gt;
* Distribute initial roles among the team members&lt;br /&gt;
* Study the datasheets and manual of acquired components&lt;br /&gt;
* Create and setup Gitlab Repository&lt;br /&gt;
|&lt;br /&gt;
* 03/14&lt;br /&gt;
* 03/18&lt;br /&gt;
* 03/18&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 3&lt;br /&gt;
|&lt;br /&gt;
* 03/20&lt;br /&gt;
* 03/22&lt;br /&gt;
* 03/20&lt;br /&gt;
|&lt;br /&gt;
* 03/25&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/24&lt;br /&gt;
|&lt;br /&gt;
* Write basic driver for ultrasonic sensor&lt;br /&gt;
* Analyze and decide the hardware placement of the RC Car&lt;br /&gt;
* Create SENSOR and DRIVER nodes to transmit and receive data&lt;br /&gt;
|&lt;br /&gt;
* 03/26&lt;br /&gt;
* 03/23&lt;br /&gt;
* 03/25&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 4&lt;br /&gt;
|&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
* 03/27&lt;br /&gt;
|&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
* 03/28&lt;br /&gt;
|&lt;br /&gt;
* Create the GEO node to get coordinates and cardinal directions from GPS and Compass &lt;br /&gt;
* Create the MOTOR node to drive the RC Car&lt;br /&gt;
* Design DBC file and create CAN signals for every node&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/04&lt;br /&gt;
* 04/01&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 5&lt;br /&gt;
|&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
* 04/02&lt;br /&gt;
|&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
* 04/08&lt;br /&gt;
|&lt;br /&gt;
* Finalize the DBC file &lt;br /&gt;
* Design obstacle avoidance and steering logic on the DRIVER node&lt;br /&gt;
* Design motor driving logic on the MOTOR node with the encoder&lt;br /&gt;
* Start and design the Bluetooth app xml for destination. &lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 6&lt;br /&gt;
|&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
* 04/09&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
|&lt;br /&gt;
* Integrate GPS module with compass to get the current location.&lt;br /&gt;
* Write UART interface for Bluetooth integration on sensor node.&lt;br /&gt;
* Get raw sensor data from the ultrasonic sensor.&lt;br /&gt;
* Integrate GEO node to DRIVER node for navigation. Check whether the DRIVER node is receiving the coordinates.&lt;br /&gt;
* Backend development for android app. Should be able to scan BT devices and connect.&lt;br /&gt;
|&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
* 04/15&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 7&lt;br /&gt;
|&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
* 04/16&lt;br /&gt;
|&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
* 04/23&lt;br /&gt;
|&lt;br /&gt;
* Communicate to the GEO node over Bluetooth via Android app&lt;br /&gt;
* Complete Driver obstacle logic&lt;br /&gt;
* Design driving decision logic based on the navigation data&lt;br /&gt;
* Lay out basic PCB Board design for mounting the ECUs&lt;br /&gt;
* Filtering ultrasonic sensor data and sending processed data to Driver&lt;br /&gt;
* RPM Sensor logic and testing.&lt;br /&gt;
|&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
* 04/26&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 8&lt;br /&gt;
|&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
* 04/25&lt;br /&gt;
|&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
|&lt;br /&gt;
* Design a dashboard on the LCD to display the values&lt;br /&gt;
* Driver logic for sensor data and geo data on busmaster.&lt;br /&gt;
* Add functionality for pinning location on maps and extracting latitude and longitude&lt;br /&gt;
* Improve obstacle avoidance logic&lt;br /&gt;
* Break and ramp logic for the motor.&lt;br /&gt;
* '''Collective Test 1''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Drive the car to a hardcoded GPS destination'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 04/29&lt;br /&gt;
* 04/27&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 04/30&lt;br /&gt;
* 05/06&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 9&lt;br /&gt;
|&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/01&lt;br /&gt;
|&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/07&lt;br /&gt;
|&lt;br /&gt;
* Design individual architecture diagrams and algorithms for documentation&lt;br /&gt;
* Make any necessary improvements based on previous test results&lt;br /&gt;
* Complete the final version of the Android app&lt;br /&gt;
* Get the PCB printed&lt;br /&gt;
* '''Collective Test 2''':&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test the car driving with navigation data from the Android app'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* 05/10&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/01&lt;br /&gt;
* 05/07&lt;br /&gt;
* 05/11&lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;Green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 10&lt;br /&gt;
|&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
* 05/09&lt;br /&gt;
|&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
* 05/14&lt;br /&gt;
|&lt;br /&gt;
* Replace the circuits with their corresponding PCBs and assemble&lt;br /&gt;
* Complete the RC Car structure and assembly with the 3D printed parts - Prototype 1&lt;br /&gt;
* Refactor the code modules with necessary improvements&lt;br /&gt;
* '''Collective Test 3:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Test car on various terrains and slopes'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
* 05/20&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 11&lt;br /&gt;
|&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
* 05/16&lt;br /&gt;
|&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
* 05/21&lt;br /&gt;
|&lt;br /&gt;
* Revise and improve the wiki report to cover all the aspects of design and implementation&lt;br /&gt;
* Fix all the errors and make improvements&lt;br /&gt;
* Final testing of all the modules and car&lt;br /&gt;
* '''Collective Test 4:'''&amp;lt;font color = &amp;quot;DarkGreen&amp;quot;&amp;gt;''' Have the final version of the project tested with all the functionalities'''&amp;lt;/font color&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
* 05/22&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt;Completed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Week 12&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/25&lt;br /&gt;
|&lt;br /&gt;
* 05/27&lt;br /&gt;
* 05/27&lt;br /&gt;
|&lt;br /&gt;
* Demo&lt;br /&gt;
* Final Wiki Page Update with addition of all the problems faced during the development&lt;br /&gt;
|&lt;br /&gt;
* 05/25&lt;br /&gt;
* 05/26 &lt;br /&gt;
| &lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
*&amp;lt;font color = &amp;quot;green&amp;quot;&amp;gt; Completed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Price($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| RC Car &lt;br /&gt;
| Traxxas [https://www.amazon.com/gp/product/B07DFXN118/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
|280&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| CAN Transceivers MCP2551-I/P&lt;br /&gt;
| Comimark [https://www.amazon.com/Comimark-Transceiver-TJA1050-Controller-Schnittstelle/dp/B07W4VZ2F2/ref=sr_1_4?crid=L6PXVWD9BFTN&amp;amp;dchild=1&amp;amp;keywords=can+transceiver&amp;amp;qid=1621786818&amp;amp;sprefix=can+trans%2Caps%2C566&amp;amp;sr=8-4]&lt;br /&gt;
| 5&lt;br /&gt;
| 8.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| Ultrasonic Sensors&lt;br /&gt;
| Max Botix[https://www.amazon.com/gp/product/B07Q588SBP/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 4&lt;br /&gt;
| 24.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| GPS Breakout Board&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/746]&lt;br /&gt;
| 1&lt;br /&gt;
| 29.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| GPS Antenna&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/960]&lt;br /&gt;
| 1&lt;br /&gt;
| 19.95 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| RPSMA female to mhf4&lt;br /&gt;
| Superbat[https://www.amazon.com/dp/B08N6C7XGD/ref=cm_sw_r_cp_api_i_THK732JGSBBCCZFEPF58?_encoding=UTF8&amp;amp;psc=1]&lt;br /&gt;
| 1&lt;br /&gt;
| 7.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| HC05 bluetooth RF Transceiver&lt;br /&gt;
| HiLetgo[https://www.amazon.com/HiLetgo-Bluetooth-Transceiver-Integrated-Communication/dp/B07VL725T8/]&lt;br /&gt;
| 1&lt;br /&gt;
| 15.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Triple-axis Accelerometer&lt;br /&gt;
| Adafruit[https://www.adafruit.com/product/1120]&lt;br /&gt;
| 1&lt;br /&gt;
| 14.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| Traxxas RPM Sensor&lt;br /&gt;
| Traxxas[https://www.amazon.com/Traxxas-6520-RPM-Sensor-long/dp/B006IRXEZM]&lt;br /&gt;
| 1&lt;br /&gt;
| 13.76&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| Traxxas Battery and Charger&lt;br /&gt;
|Traxxas[https://www.amazon.com/Traxxas-Battery-Charger-Completer-2-amp/dp/B074FXXP5J/ref=asc_df_B074FXXP5J/?tag=hyprod-20&amp;amp;linkCode=df0&amp;amp;hvadid=312136795426&amp;amp;hvpos=&amp;amp;hvnetw=g&amp;amp;hvrand=9135382788468531733&amp;amp;hvpone=&amp;amp;hvptwo=&amp;amp;hvqmt=&amp;amp;hvdev=c&amp;amp;hvdvcmdl=&amp;amp;hvlocint=&amp;amp;hvlocphy=9032144&amp;amp;hvtargid=pla-493010666784&amp;amp;psc=1]&lt;br /&gt;
|1&lt;br /&gt;
|62.95&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| Voltage Regulator&lt;br /&gt;
|Valefod[https://www.amazon.com/dp/B076H3XHXP?ref_=cm_sw_r_cp_ud_dp_5HTAVWPZJ2QS6AMXTM93]&lt;br /&gt;
|6&lt;br /&gt;
|10.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| Headlights&lt;br /&gt;
|Hobbypark[https://www.amazon.com/dp/B01GY8VFIM?ref_=cm_sw_r_cp_ud_dp_PK32ZA2HM4DRWMGV55YC]&lt;br /&gt;
|1&lt;br /&gt;
|7.96&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printed Circuit Board  ==&lt;br /&gt;
&lt;br /&gt;
Initially we started our testing with mounting all our hardware on the breadboard (yes, it was messy and unstable!).&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Initial_Car.jpeg|400px|thumb|Centre|Initial_Hardware]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Schematic&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch.png|500px|thumb|Left|Schematic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_PCB.png|500px|thumb|Right|Final_Board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;PCB Board&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Top_Side.png|500px|thumb|Left|Top_Side]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Bottom_Side.png|500px|thumb|Right|Bottom_Side]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Challenges &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Since there are four controllers and a significant number of components (gps, sensors, can transceivers, volt regulator etc.) it was difficult for us to keep our hardware stable because every time we go for field testing some will get disconnected and we were kind of stuck up in the hardware setup.&lt;br /&gt;
* We decided to get the PCB printed but there were some issues and resolving them and getting a new PCB would take time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Solution  &amp;lt;/h4&amp;gt;&lt;br /&gt;
* Finally we decided to use the prototype board for mounting all the components and stabilizing our hardware.&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Hardware_Physical.jpeg|500px|thumb|Left|Protoype_Board]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CAN Communication ==&lt;br /&gt;
We used controller area network to communicate data between four nodes. All nodes are connected to each other through a physically conventional two wire bus CANH and CANL. The wires are a twisted pair with 120 Ω termination resistors at each end of the bus. 1s and 0s are transmitted as CAN High(0V difference) and Can Low(2v difference). &lt;br /&gt;
A CAN frame has the following contents:&lt;br /&gt;
* Data Length Code (4bits)&lt;br /&gt;
* Remote Transmission Request.&lt;br /&gt;
* ID extend bit.&lt;br /&gt;
* Message ID (11 bit or 29 bit)&lt;br /&gt;
* Data bytes( depends on DLC)&lt;br /&gt;
* CRC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Arbitration''': No two nodes will transmit at the same time because of arbitration. A lower Message-ID has a Higher priority on the CAN bus since 0 is the dominant bit.&lt;br /&gt;
&lt;br /&gt;
'''Bit Stuffing''': CAN bus stuffs extra bits when a long chain of multiple 1's or 0's occur to improve CAN integrity.&lt;br /&gt;
[[File:High level diagram.png|thumb|600px|middle|center|Project Can Bus Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DBC File ===&lt;br /&gt;
The DBC file is a simple text file that consists of information for decoding raw CAN bus data to physical values or in human readable form. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sr. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receivers&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver Heartbeat&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|100&lt;br /&gt;
|Driver Heartbeat&lt;br /&gt;
|Motor, Sensor, Geo&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Start Stop signal from Android app to Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|101&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Ultrasonic sensors data transmit&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|101&lt;br /&gt;
|Sensor sonars from front, back, left ,right sensor&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Destination Location &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|250&lt;br /&gt;
|Bridge Sensor&lt;br /&gt;
|Geo&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Driver to Motor Command&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|300&lt;br /&gt;
|Speed and steering direction for the motor&lt;br /&gt;
|Motor&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Geo Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|400&lt;br /&gt;
|Bearing, Heading and Distance&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|600&lt;br /&gt;
|Motor speed&lt;br /&gt;
|Driver&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| Debug messages&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|700&lt;br /&gt;
|Driver Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|750&lt;br /&gt;
|Geo Debug&lt;br /&gt;
|BRIDGE_SENSOR,MOTOR,DRIVER&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VERSION &amp;quot;&amp;quot;&lt;br /&gt;
NS_ :&lt;br /&gt;
    BA_&lt;br /&gt;
    BA_DEF_&lt;br /&gt;
    BA_DEF_DEF_&lt;br /&gt;
    BA_DEF_DEF_REL_&lt;br /&gt;
    BA_DEF_REL_&lt;br /&gt;
    BA_DEF_SGTYPE_&lt;br /&gt;
    BA_REL_&lt;br /&gt;
    BA_SGTYPE_&lt;br /&gt;
    BO_TX_BU_&lt;br /&gt;
    BU_BO_REL_&lt;br /&gt;
    BU_EV_REL_&lt;br /&gt;
    BU_SG_REL_&lt;br /&gt;
    CAT_&lt;br /&gt;
    CAT_DEF_&lt;br /&gt;
    CM_&lt;br /&gt;
    ENVVAR_DATA_&lt;br /&gt;
    EV_DATA_&lt;br /&gt;
    FILTER&lt;br /&gt;
    NS_DESC_&lt;br /&gt;
    SGTYPE_&lt;br /&gt;
    SGTYPE_VAL_&lt;br /&gt;
    SG_MUL_VAL_&lt;br /&gt;
    SIGTYPE_VALTYPE_&lt;br /&gt;
    SIG_GROUP_&lt;br /&gt;
    SIG_TYPE_REF_&lt;br /&gt;
    SIG_VALTYPE_&lt;br /&gt;
    VAL_&lt;br /&gt;
    VAL_TABLE_&lt;br /&gt;
BS_:&lt;br /&gt;
&lt;br /&gt;
BU_: DRIVER MOTOR BRIDGE_SENSOR GEO DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 100 DRIVER_HEARTBEAT: 1 DRIVER&lt;br /&gt;
  SG_ DRIVER_HEARTBEAT_cmd : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; BRIDGE_SENSOR,MOTOR,GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 101 DRIVE_STATUS: 1 BRIDGE_SENSOR&lt;br /&gt;
  SG_ DRIVE_START_STOP : 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 200 SENSOR_SONARS: 5 BRIDGE_SENSOR&lt;br /&gt;
 SG_ SENSOR_SONARS_left : 0|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_right : 10|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_middle : 20|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
 SG_ SENSOR_SONARS_rear : 30|10@1+ (1,0) [0|0] &amp;quot;cm&amp;quot; DRIVER&lt;br /&gt;
&lt;br /&gt;
BO_ 250 DESTINATION_LOCATION: 8 BRIDGE_SENSOR&lt;br /&gt;
 SG_ DEST_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
 SG_ DEST_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; GEO&lt;br /&gt;
&lt;br /&gt;
BO_ 300 DRIVER_TO_MOTOR: 2 DRIVER&lt;br /&gt;
SG_ DRIVER_TO_MOTOR_speed : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
 SG_ DRIVER_TO_MOTOR_direction : 8|8@1+ (1,-45) [-45|45] &amp;quot;degrees&amp;quot; MOTOR, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 400 GEO_CONTROLLER_COMPASS: 8 GEO&lt;br /&gt;
  SG_ HEADING : 0|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
  SG_ BEARING : 12|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
  SG_ DISTANCE_TO_DESTINATION: 24|32@1+ (0.01,0) [0|359.9] &amp;quot;meters&amp;quot; DRIVER,BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
BO_ 600 MOTOR_SPEED: 2 MOTOR&lt;br /&gt;
SG_ MOTOR_SPEED_info : 0|8@1+ (0.1,-10) [-10|10] &amp;quot;kmph&amp;quot; DRIVER, BRIDGE_SENSOR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BO_ 700 DRIVER_DEBUG: 2 DEBUG&lt;br /&gt;
  SG_ car_driving_status: 0|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
  SG_ car_steering_status: 8|8@1+ (1,0) [0|0] &amp;quot;&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
BO_ 750 GEO_CONTROLLER_DEBUG_MESG: 10 DEBUG&lt;br /&gt;
 SG_ CURR_LATITUDE : 0|28@1+ (0.000001,-90.000000) [-90|90] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ CURR_LONGITUDE : 28|28@1+ (0.000001,-180.000000) [-180|180] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
 SG_ RAW_HEADING : 56|12@1+ (0.1,0) [0|359.9] &amp;quot;degrees&amp;quot; DEBUG&lt;br /&gt;
&lt;br /&gt;
CM_ BU_ DRIVER &amp;quot;The driver controller driving the car&amp;quot;;&lt;br /&gt;
CM_ BU_ MOTOR &amp;quot;The motor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BU_ SENSOR &amp;quot;The sensor controller of the car&amp;quot;;&lt;br /&gt;
CM_ BO_ 100 &amp;quot;Sync message used to synchronize the controllers&amp;quot;;&lt;br /&gt;
CM_ BU_ GEO &amp;quot;To provide raw GPS and compass heading&amp;quot;;&lt;br /&gt;
CM_ SG_ 100 DRIVER_HEARTBEAT_cmd &amp;quot;Heartbeat command from the driver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
VAL_ 700 car_steering_status 2 &amp;quot;RIGHT&amp;quot; 1 &amp;quot;LEFT&amp;quot; 0 &amp;quot;STRAIGHT&amp;quot;;&lt;br /&gt;
VAL_ 700 car_driving_status 2 &amp;quot;BACKWARD&amp;quot; 1 &amp;quot;FORWARD&amp;quot; 0 &amp;quot;STOPPED&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* The CAN transceivers that we bought had inbuilt 120 ohm resistor each, which we didn't notice. And every time we interfaced all the four nodes the data won't show up in the busmaster software. We found this very late and until then we thought it's hardware/dbc file issue and wasted potential amount of time in debugging.So we de-soldered those termination resistors and we were able to see our data smoothly on busmaster.&lt;br /&gt;
* As an advice, make sure at the end of all four nodes after adding termination resistors of 120 ohm on both sides, the resultant resistance is 60 ohms. Only then all four nodes can communicate over CAN bus.&lt;br /&gt;
&lt;br /&gt;
== Sensor and Bluetooth ECU ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sensor_Node.png|left|600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultrasonic99.png|right|600px|thumb|Sensor Pins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The obstacle detection sensors used here are Ultrasonic sensors. The HRLV-MaxSonar-EZ1 sensors from MaxBotix are used here. In these sensors there is membrane which needs to be triggered in order to generate and send ultrasonic waves every few seconds. When ultrasonic waves collide and come back and strikes with this membrane a pulse is generated which is used for sensing.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Pin connections between board and sensor:&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJ2 board Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Ultrasonic sensor Pin No.&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1.&lt;br /&gt;
| ADC Pin 1.30&lt;br /&gt;
| AN(Front left sensor)&lt;br /&gt;
| Input to ADC channel 4&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2.&lt;br /&gt;
| ADC Pin 1.31&lt;br /&gt;
| AN(Front right sensor)&lt;br /&gt;
| Input to ADC channel 5&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3.&lt;br /&gt;
| ADC Pin 1.26&lt;br /&gt;
| AN(Front sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4.&lt;br /&gt;
| ADC Pin 1.25&lt;br /&gt;
| AN(Rear sensor)&lt;br /&gt;
| Input to ADC channel 3&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5.&lt;br /&gt;
| GPIO Pin 0.6&lt;br /&gt;
| Rx(Front left sensor)&lt;br /&gt;
| Triggering pulse for left sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6.&lt;br /&gt;
| GPIO Pin 0.8&lt;br /&gt;
| Rx(Front right sensor)&lt;br /&gt;
| Triggering pulse for right sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7.&lt;br /&gt;
| GPIO Pin 0.9&lt;br /&gt;
| Rx(Front sensor)&lt;br /&gt;
| Triggering pulse for front sensor&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8.&lt;br /&gt;
| GPIO Pin 0.7&lt;br /&gt;
| Rx(Rear sensor)&lt;br /&gt;
| Triggering pulse for rear sensor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the pin connections for the Sensor node the important thing is to mount the sensors at particular angles. The angle placement is critical for left and right sensor as we faced lot of problems while detecting the walls. We chose the angle by error and trial method by simply placing the sensors at different angles. We tried keeping the angle above the 45 degrees so that to provide wider angle for the obstacles to detect.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
The sensor node has to receive values from all the sensors and send the distance values on the CAN bus for the driver to run the obstacle avoidance logic. &lt;br /&gt;
&lt;br /&gt;
====== Receive sensor values ======&lt;br /&gt;
&lt;br /&gt;
Four sensors are used here. Three in the front and one at the rear side. We need four ADC channels to address the receiving from all sensors. In order to use four pins on the SJ2 board we need to set the pins to analog mode. In the adc.h file and adc.c file there are only three channels initialized, so one needs to add ADC channel 3 in these files. On how to use these sensors, the datasheet of helped a lot. It addresses every aspect of how to use this particular sensor and the solution to most of the problem that can arise. All the sensor raw values are digitally converted in the range of 0 to 1024( 10 bit ADC). These value is in inches as mentioned in the datasheet. So, one needs to convert it into centimeter by applying some formula. The formula can be different based on the configuration used to setup the ADC channel even if same sensor is used.&lt;br /&gt;
&lt;br /&gt;
====== Sending sensor values in terms of distance to CAN ======&lt;br /&gt;
&lt;br /&gt;
The raw values coming from the sensor needs to be filtered before sending on the CAN bus. The more information about filtering is mentioned in the techical challenges section. The below diagram shows the detailed flowchart of software design implemented for the sensor node.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:f8.png|center|6600px|thumb|Sensor Controller Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
The main challenge while using ultrasonic sensor with this particular project is of crosstalk. While detecting objects in the front all the front sensors waves are interfering with each other giving false values in the left or right sensor while the object is in the front only. The datasheet addresses this issues and what to do when multiple sensors are used in a system. It says that trigger each sensor are different time period in order to avoid crosstalk. So we triggered the front and rear at one particular time and left and right at one particular time. One sequence is triggered at  particular 10Hz and other sequence is triggered at another 10Hz. There is a division of callbacks counts in 100Hz and  a lock mechanism is used in order to used different 20Hz period out of 100Hz. &lt;br /&gt;
&lt;br /&gt;
For frequency noise measurements like when the values suddenly change or vary between certain range sometimes, a filter is implemented. The most common filter for this type of use is median filter where a series of values are stored in a array and median is taken of all the values stored in that array.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Motor ECU ==&lt;br /&gt;
The Motor ECU acts as an encoder for the DC motor (used for propulsion) and Servo motor (used for turning the axle and changing direction of the car). The car is a two wheel drive with DC motor connected to the rear wheels and the servo motor is connected to the front wheels. The DC motor is controlled by Electronic Speed Control. The ECU supplies PWM signal to the ESC and the ESC powers the DC motor. The Servo motor is powered by the car battery as well and gets its PWM signal from the ECU.&lt;br /&gt;
The RPM sensor sends its output to motor ECU by which the actual speed of the wheels is calculated.&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File: Motor_HW_design.jpg|center|600px|thumb|Hardware Schematic Diagram]]&lt;br /&gt;
==== ESC &amp;amp; DC Motor ====&lt;br /&gt;
&lt;br /&gt;
The DC motor is controlled by ESC using PWM signals provided by the motor controller for forward and reverse movements. We used the 9v NiMH battery to power up the ESC. The DC motor is powered by the ESC which has a dc-to-dc converter which converts 9v to 6v. The output from the ESC is used to power the  Servo motor. ESC has an ease set button which is used for calibration and setting different modes for the car.&lt;br /&gt;
&lt;br /&gt;
'''The car can be operated in the following 3 modes:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Sport mode(100% Forward, 100% Brakes, 100% Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Racing mode(100% Forward, 100% Brakes, No Reverse)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Training mode(50% Forward, 100% Brakes, 50% Reverse)&lt;br /&gt;
&lt;br /&gt;
As we desire to run the car at full throttle, Sport mode is being used. The frequency of the PWM signal fed to the servo motor is 100Hz. Based on the duty cycle set by the user, the car will go forward, reverse, or neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 10 to 14.9 for reverse. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for neutral. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for the forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+ESC Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.1)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Output&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:ESC.jpg|center|300px|thumb|Traxxas ESC]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:DCMotor.jpg|center|300px|thumb|Traxxas Brushless DC Motor]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Servo Motor ====&lt;br /&gt;
&lt;br /&gt;
We are using Traxxas 2075 for this project which came with the car and it is responsible for steering the car. It takes the 6V power directly from ESC. The servo motor is controlled directly from the SJ2 micro-controller board. The PWM signal is supplied at a frequency of 100 Hz. Based on the duty cycle of the signal sent to the servo, the direction of servo motor can be changed: &lt;br /&gt;
&lt;br /&gt;
PWM 10 to 14.9 for turning left. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15 for straight. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
PWM 15.1 to 20 for turning right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Servo Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| PWM(P2.0)&lt;br /&gt;
| Takes PWM input from SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(6V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
[[File:Servotrx.jpg|300px|centre|thumb|Traxass Servo Motor(2075)]]&lt;br /&gt;
&lt;br /&gt;
==== RPM Sensor ====&lt;br /&gt;
The RPM sensor is used as an input to maintain a constant speed of the vehicle. The sensor we are using is Traxxas RPM sensor which using hall effect to detect the movement of the DC motor. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Mounting the sensor:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are two parts to the RPM sensor - one is the trigger magnet and the other is the sensor. The sensor mounts on the inside of the gear cover, the trigger magnet mounts on the DC motor shaft. The gear cover and motor shaft need to be removed using the toolkit provided along with the RC car. The mounting process can be found on youtube. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''How the sensor works:'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The trigger magnet attaches to the spur gear. The sensor uses the DC voltage of the motor to trigger a pulse on the sensor for every rotation of the spur gear. These pulses are sent as hardware interrupt to the SJ2 board. The number of pulses are counted for every half second and that is converted into RPM and KMPH. The RPM sensor has 3 wires, the white wire is the output wire that provides the pulses to the SJ2 Board, and the other wires are Supply(3.3V) and GND. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+RPM Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wires on ESC&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Wire Color&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GPIO(P0.6)&lt;br /&gt;
| Provides pulses to Motor SJ2-Board&lt;br /&gt;
| WHITE&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| VDD(3.3V)&lt;br /&gt;
| Power Input&lt;br /&gt;
| RED&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| GND&lt;br /&gt;
| Ground&lt;br /&gt;
| BLACK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|[[File:Rpm_sensor.jpg|center|300px|thumb|Traxxas RPM Sensor]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:Trigger_magnet.jpg|center|300px|thumb|Trigger Magnet]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
At startup the motor is initialized by giving a neutral PWM signal for 3s and the interrupt for the rpm sensor input is setup as well.&lt;br /&gt;
&lt;br /&gt;
The motor receives angle for steering and speed in a single CAN message from the driver ECU. After receiving the command the speed value is converted into corresponding value of PWM by increasing or decreasing neutral PWM value in steps of 0.01. The physical value of the motor speed is compared to the speed received from the driver and it is reduced or increased to match with the desired speed. For reverse a PWM of 14.5 is given to smoothly reverse the car.&lt;br /&gt;
&lt;br /&gt;
The direction of the car is set according to the value of ENUM received from the driver ECU. For navigation the car takes soft turns and when and obstacle is detected it takes hard turns to avoid collisions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Motor_SW_design.jpg|center|700px|thumb|Speed Control Flowchart]]&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
* ESC calibration: The ESC controlling the DC motor goes out of calibration again and again. We had to connect it to the receiver of the RC car and re-calibrate it again. Finally I added a neutral signal in for the first 3 seconds in the initialization sequence of the motor so that the ESC can be calibrated every time the controller is reset or powered on.&lt;br /&gt;
* Changing PWM: PWM value of the motor will change sometimes and depends on the weight of the car and also a faster speed might not give enough time for the sensor to detect an obstacle. Hence keeping a slow and steady speed and relying on the RPM sensor is necessary to ensure the car keeps moving and doesn't stop on any inclines.&lt;br /&gt;
* Receiving steer commands at a higher frequency(50Hz) helped in reducing the response time in obstacle avoidance compared to previously when it was being received at 10Hz.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geographical And Bridge Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Geographical controller does the processing for compass data and GPS data. After processing the data for heading ,bearing and distance to destination , the controller sends these data over can bus to the Driver node. The GPS module is interfaced with SJ2 board using UART. SJ2 board gets the data (NMEA string) for GPS coordinates processing. The controller sends the command to GPS module to filter the string and only send GPGGA string. The Compass module is interfaced over I2C to find the heading for car navigation. The CAN transceiver uses port 0 (can1) of the SJ2 board. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Geo_Node_Schematic.jpg|500px|thumb|centre|]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:compass_Firebolt.jpg|300px|thumb|center|3 Axis Magnetometer (eCompass)]] &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:GPS_Firebolt.jpg|300px|thumb|centre|GPS Module]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;auto&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
|+Geographical Node Pinout&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| SJTwo Board&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| GPS/Compass Module&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| P0.15 (TX3)&lt;br /&gt;
| RX &lt;br /&gt;
| Adafruit GPS Breakout &lt;br /&gt;
|-&lt;br /&gt;
| P0.16 (RX3)&lt;br /&gt;
| TX &lt;br /&gt;
| Adafruit GPS Breakout&lt;br /&gt;
|-&lt;br /&gt;
| P0.10 (SDA)&lt;br /&gt;
| SDA &lt;br /&gt;
| Adafruit Magnetometer &lt;br /&gt;
|-&lt;br /&gt;
| P0.11 (SCL)&lt;br /&gt;
| SCL&lt;br /&gt;
| Adafruit Magnetometer&lt;br /&gt;
|-&lt;br /&gt;
| P0.1&lt;br /&gt;
| CAN transceiver (Tx)&lt;br /&gt;
| CAN transmit &lt;br /&gt;
|-&lt;br /&gt;
| P0.0&lt;br /&gt;
| CAN transceiver (Rx)&lt;br /&gt;
| CAN  receive&lt;br /&gt;
|-&lt;br /&gt;
| Vcc 3.3V&lt;br /&gt;
| Vcc &lt;br /&gt;
| Vcc &lt;br /&gt;
|-&lt;br /&gt;
| GND &lt;br /&gt;
| GND &lt;br /&gt;
| Ground &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The GEO controller consisted of 4 main parts which are: &lt;br /&gt;
&lt;br /&gt;
*1. GPS &lt;br /&gt;
*2. Compass &lt;br /&gt;
*3. Waypoints&lt;br /&gt;
*4. Geo Logic&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
These code modules, calculate compass heading degree, bearing, parse GPS coordinates, calculate the checkpoints the RC car has to go through when navigating to a destination, send distance to destination to driver node, and handle messages received on the CAN bus.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__initialize() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*can_bus_initializer__init(): initializes the CAN bus to handle MIA and messages(CAN). &lt;br /&gt;
*gps__init(): initializes the GPS interface(UART).&lt;br /&gt;
*geo_compass__setup_magnetometer(): initializes the compass interface(I2C).&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__1Hz() function calls the following function:''' &lt;br /&gt;
&lt;br /&gt;
* can_handler__handle_all_incoming_messages_1hz(): handles the incoming messages based on mesg ID. &lt;br /&gt;
* gps__setup_command_registers(): sends command to GPS module to receive only GPGGA string. &lt;br /&gt;
* can_handler__transmit_messages_10hz(): sends the heading ,bearing and distance to Driver controller.&lt;br /&gt;
&lt;br /&gt;
'''The period_callbacks__10Hz() function calls the following functions:''' &lt;br /&gt;
&lt;br /&gt;
*gps_run_once(): parses the NMEA string to get current coordinates&lt;br /&gt;
[[File:FlowChart_Geo_Logic.jpg|center|700px|thumb|Geo Logic Flowchart]]&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*In the initialization process of the GPS, the line buffer module is configured to parse the GPS messages, the GPIOs P0.15(Tx) and P0.16(Rx) are configured, UART interrupt queues enabled, and the UART is configured at a baudrate of 9600(GPS standard).&lt;br /&gt;
&lt;br /&gt;
*Configuration&lt;br /&gt;
 In the gps__run_once_10Hz() the GPS is initially configured once to disable all NMEA messages except GNGGA which is message chosen to parse the coordinates and GPS lock.&lt;br /&gt;
&lt;br /&gt;
*Parsing NMEA GNGGA messages&lt;br /&gt;
 The GPS module constantly transmits NMEA GNGGA messages over UART to the SJ2 MCU. These messages which come in the form of a string are stored character by character in the line &lt;br /&gt;
 buffer until a new line character which indicates the end of string. The stored string is then extracted from the line buffer. The extracted line is then tokenized to parse the &lt;br /&gt;
 latitude, latitude direction, longitude, longitude direction, and fix quality. South and West directions are also properly handled to make the latitude and longitude negative &lt;br /&gt;
 values.&lt;br /&gt;
&lt;br /&gt;
*GPS lock&lt;br /&gt;
 Although the GPS module has fix indication , but GPGGA string has field for FIX status also. Getting the Fix/Lock status using the string is much easier than using GPIO pins to get &lt;br /&gt;
 the Lock status using FIX led of the GPS module. The Lock status/flag was used as a condition to calculate the bearing and checkpoints only when the GPS had a lock meaning that the &lt;br /&gt;
 current coordinates were valid.&lt;br /&gt;
&lt;br /&gt;
====Compass====&lt;br /&gt;
&lt;br /&gt;
*Initialization&lt;br /&gt;
 The compass initialization configures the LSM303DLHC magnetometer and accelerometer registers over I2C bus to default settings using default gain and single mode.&lt;br /&gt;
&lt;br /&gt;
*Heading degree computation&lt;br /&gt;
 The compass heading degree is computed by using the tilt compensation algorithm and the pitch and roll values of LSM303DLHC accelerometer. The tilt compensation algorithm ensures &lt;br /&gt;
 that the values of the compass heading are precise. The formulae used to calibrate the compass are mentioned below:&lt;br /&gt;
&lt;br /&gt;
*Pitch and Roll:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  pitch = asin(-acc_x / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) &amp;lt;br/&amp;gt;&lt;br /&gt;
  roll = asin((acc_y / sqrt(acc_y * acc_y + acc_z * acc_z + acc_x * acc_x)) / cos(pitch))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tilt compensated magnetic sensor values:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  mag_x = mag_x * cos(pitch) + mag_z * sin(pitch)&lt;br /&gt;
  mag_y = mag_y * cos(roll) + mag_x * sin(roll) * sin(pitch) - mag_z * sin(roll) * cos(pitch)&lt;br /&gt;
  mag_z = -mag_x * cos(roll) * sin(pitch) + mag_y * sin(roll) + mag_z * cos(roll) * cos(pitch)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luckily our module had no offset but it might need to be compensated for the offset if there is any.&lt;br /&gt;
 &lt;br /&gt;
*Heading angle&lt;br /&gt;
&lt;br /&gt;
 heading = atan2(mag_y, mag_x) * r2d &lt;br /&gt;
 r2d is radian to degree conversion function&lt;br /&gt;
&lt;br /&gt;
 This heading is calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put &lt;br /&gt;
 it in the range from 0 to 360 degrees.&lt;br /&gt;
&lt;br /&gt;
====Checkpoints====&lt;br /&gt;
&lt;br /&gt;
The way point calculation determines the nearest way point continuously by computing the distance using Haversine formula and current location using GPS.&lt;br /&gt;
The heading and bearing is also computed using the Haversine formula and is sent over the CAN bus for heading correction.*&lt;br /&gt;
Alternatively, once the car is within the threshold distance, next way point is selected and the car heads to the next way point.&lt;br /&gt;
&lt;br /&gt;
To calculate the geographical distance between the two points the haversine formula was used which is called periodically from the waypoints.c module. Below is the formula used:&lt;br /&gt;
&lt;br /&gt;
 a = sin²(ΔlatDifference/2) + cos(lat1) * cos(lt2) * sin²(ΔlonDifference/2)&lt;br /&gt;
 c = 2 * atan2(sqrt(a), sqrt(1−a))&lt;br /&gt;
 d = R * c &lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**ΔlatDifference = latitude 2 - latitude 1 (difference of latitude)&lt;br /&gt;
**ΔlonDifference = longitude 2 - longitude 1 (difference of longitude)&lt;br /&gt;
**R = 6371000.0 meters = radius of earth&lt;br /&gt;
**d = distance computed between two points&lt;br /&gt;
**a and c are intermediate steps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bearing Angle computation&lt;br /&gt;
&lt;br /&gt;
The bearing which is the angle towards our desired destination is computed using the formulas below referenced at this [https://www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/ link].&lt;br /&gt;
&lt;br /&gt;
 X = cos θb * sin ∆L&lt;br /&gt;
 Y = cos θa * sin θb – sin θa * cos θb * cos ∆L&lt;br /&gt;
&lt;br /&gt;
 β = atan2(X,Y)&lt;br /&gt;
&lt;br /&gt;
*where:&lt;br /&gt;
**θa = current latitude&lt;br /&gt;
**θb = destination latitude&lt;br /&gt;
**∆L = destination longitude - current longitude&lt;br /&gt;
**β = heading degree in radians&lt;br /&gt;
&lt;br /&gt;
The bearing is also calculated in radians since atan2 returns a value between -π and +π. Therefore, before converting the heading into degrees the value needs to be normalized to put it in the range from 0 to 360 degrees. The calculated bearing is then sent to the driver node which use the compass heading degree and the bearing to align the car toward the target destination.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Driver Node ==&lt;br /&gt;
Driver Node is the master controller. It receives input from sensor and bridge node, processes it to make right decision for controlling the speed and steering direction of the car and then commands the motor node to drive accordingly. This node is also interfaced to the LCD, which acts as dashboard of the car and displays information such as car speed and distance to destination on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
LCD is interfaced with the SJ2 board and it communicates over UART. P4.28 and P4.29 which is UART3 on board is used.&lt;br /&gt;
Headlights and Tailights are also connected to the driver node using four GPIOs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:SJTWO.jpg|400px|thumb|Left|Sjtwo-board]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:LCD_DIS.jpg|400px|thumb|Right|LCD Display]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Final_Sch2.png|400px|thumb|Right|Pinouts]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Architecture Driver Logic===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Driver_logic.png|600px|thumb|Left|Basic_Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:OAL.png|600px|thumb|Center|Obstacle Avoidance Logic]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File:Reverse_func.png|600px|thumb|Right|Reverse Functionality]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obstacle Avoidance Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (obstacle_on_all_front_sides()) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_front())) {&lt;br /&gt;
          drive_forward();&lt;br /&gt;
        } else if (obstacle_on_left() &amp;amp;&amp;amp; (!obstacle_in_right())) {&lt;br /&gt;
          obstacle_on_right = false;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // right steer&lt;br /&gt;
        } else if (obstacle_in_right() &amp;amp;&amp;amp; (!obstacle_on_left())) {&lt;br /&gt;
          obstacle_on_right = true;&lt;br /&gt;
          get_steering_range(obstacle_on_right); // left steer&lt;br /&gt;
        } else if (obstacle_on_front() &amp;amp;&amp;amp; (!obstacle_on_left() &amp;amp;&amp;amp; !obstacle_in_right())) {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
          reverse_car_and_steer();&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
&lt;br /&gt;
        } else if (obstacle_on_rear() &amp;amp;&amp;amp; (!obstacle_on_all_front_sides())) {&lt;br /&gt;
          obstacle_on_right =&lt;br /&gt;
              (internal_sensor_data.SENSOR_SONARS_right &amp;lt; internal_sensor_data.SENSOR_SONARS_left) ? true : false;&lt;br /&gt;
          get_steering_range(obstacle_on_right);&lt;br /&gt;
          debug_values.car_driving_status = FORWARD;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          stop_the_car();&lt;br /&gt;
&lt;br /&gt;
          debug_values.car_driving_status = STOPPED;&lt;br /&gt;
          debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''Steer Left and Right'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (obstactle_on_right == true) {&lt;br /&gt;
    //steer left&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;lt;= 40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction + offset_to_angle&lt;br /&gt;
                                                 : max_angle_threshold;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_left);&lt;br /&gt;
&lt;br /&gt;
  } else {&lt;br /&gt;
    //steer right&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = (motor_signal.DRIVER_TO_MOTOR_direction &amp;gt;= -40)&lt;br /&gt;
                                                 ? motor_signal.DRIVER_TO_MOTOR_direction - offset_to_angle&lt;br /&gt;
                                                 : -max_angle_threshold;&lt;br /&gt;
&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = slow_speed;&lt;br /&gt;
    update_lights(10, headlight_right);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Reverse and Steer'''''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (!obstacle_on_rear()) {&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_direction = 0;&lt;br /&gt;
    motor_signal.DRIVER_TO_MOTOR_speed = reverse_speed;&lt;br /&gt;
    update_lights(10, taillight_left);&lt;br /&gt;
    update_lights(10, taillight_right);&lt;br /&gt;
  } else {&lt;br /&gt;
    stop_the_car();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Navigation to Destination ===&lt;br /&gt;
Driver receives raw heading and bearing from the Geo node and in order to calculate the turning direction, it first computes the difference between &lt;br /&gt;
heading and bearing. Then based on which quadrant the difference lies and where the destination lies, take navigation decisions to steer left, right or straight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if (heading_difference &amp;gt;= 350 &amp;amp;&amp;amp; heading_difference &amp;lt;= 10) {&lt;br /&gt;
    gps_navigation_direction = straight;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = STRAIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = 360 - heading_difference;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
&lt;br /&gt;
  } else if (heading_difference &amp;lt; 0 &amp;amp;&amp;amp; heading_difference &amp;gt; -180) {&lt;br /&gt;
    gps_navigation_direction = left;&lt;br /&gt;
    heading_difference = fabs(heading_difference);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = LEFT;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (heading_difference &amp;lt; -180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
    heading_difference = fabs(heading_difference + 360);&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  } else if (heading_difference &amp;gt; 0 &amp;amp;&amp;amp; heading_difference &amp;lt;= 180) {&lt;br /&gt;
    gps_navigation_direction = right;&lt;br /&gt;
&lt;br /&gt;
    debug_values.car_driving_status = FORWARD;&lt;br /&gt;
    debug_values.car_steering_status = RIGHT;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
* Driver receives data from sensor and geo node, so mainly the issue was sometimes not getting data accurate data from sensors or receiving late. This has made the obstacle avoidance quite slow. Make sure the sensor is transmitting data fast enough and driver is also receiving fast. &lt;br /&gt;
* Driver Node has the least hardware interfacing compared to other nodes, so there were not many challenges on hardware front. If the LCD communicates over UART, remember to connect the gnd of both lcd and board otherwise the data printed on LCD could be gibberish.&lt;br /&gt;
* High speed of car can also cause to problem for sensors, we noticed that they cannot accurately detect obstacles on high speed.&lt;br /&gt;
* Compass calibration was also issue sometimes, if not properly calibrated the car will have trouble navigating to gps location. &lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mobile Application ==&lt;br /&gt;
Through the app we first scan for available devices and connect to the Bluetooth present on the RC car. After the connection is successful the destination is pinned on the map and by clicking on the &amp;quot;Send Destination to Car&amp;quot; button and the car is notified of the destination. After this we can control the start and stop of the car with the two buttons present on the application. &lt;br /&gt;
&lt;br /&gt;
===User Interface===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File: App UI.jpeg|center|300px|thumb|App User Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
The MIT App inventor 2 is an open-source web application available for free use to develop basic android mobile applications. It circumvents the need to program and develop applications using Java or Kotlin by providing block-based coding and UI development features. It uses a Graphical user Interface (GUI) like the Scratch programming language. Anyone using the web-app would just need to drag and drop blocks to design the UI and use functional blocks to develop logic, functions and flow control.&lt;br /&gt;
&lt;br /&gt;
MIT App inventor for android was originally developed by Google and released in 2010. The development team was led by Hal Abelson and Mark Friedman. “In the second half of 2011, Google released the source code, terminated its server, and provided funding to create The MIT Center for Mobile Learning, led by App Inventor creator Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was launched in March 2012.”&lt;br /&gt;
&lt;br /&gt;
The Web app provides two important sections for mobile app development:&lt;br /&gt;
The Designer page&lt;br /&gt;
The Blocks page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor.jpeg|left|600px|thumb|MIT App Inventor]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: MIT_app_inventor_backend.jpeg|right|600px|thumb|Backend development]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt;[[File: App_flowchart.jpeg|right|300px|thumb|Flow of the App]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bluetooth===&lt;br /&gt;
	&lt;br /&gt;
We have used the HC05 bluetooth module for this project. This is interfaced using UART on the sensor node. It uses TX pin to transmit the messages received from mobile application. It provides approximately 5 meters range and is transmitting values at proper intervals without any disconnection.&lt;br /&gt;
&lt;br /&gt;
=== Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
The main challenge that we faced while intergrating bluetooth with sensor node is that it needs to be disconnected and reconnected again before sending new destination location everytime. Also it happened for start stop button as well. The problem was resolved by calling most of the bluetooth handler functions in periodic callbacks at 1Hz and some at 10Hz.&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
https://gitlab.com/ritupatil1/firebolt/-/tree/master&lt;br /&gt;
&lt;br /&gt;
=== Advise for Future Students ===&lt;br /&gt;
* Get started early and make your hardware stable as early as possible so that you have enough time for extensive testing of the software. Because without on field testing corner cases and potential problems in the code can't be determined. &lt;br /&gt;
* Best suggestion would be to start researching as soon as possible and collect all the information related to the module that has been assigned to you, as there is no single book or manual to refer to. Go through all the problems faced by previous teams as they are a treasure trove of information. If you are facing a problem, it is very likely that some team in previous semesters has faced it. It will save you some precious days. &lt;br /&gt;
*Make sure to get a power supply which gives a steady 5V and 1A current so you don't lose boards due to sudden power surge. When all the car's subsystems are running, the current draw may be higher than expected. Make sure to have a common ground for all the components related to a single ECU.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
http://socialledge.com/sjsu/index.php/Industrial_Application_using_CAN_Bus&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Proj user9</name></author>	</entry>

	</feed>