Difference between revisions of "F19: Tower Defense in Space"

From Embedded Systems Learning Academy
Jump to: navigation, search
Line 161: Line 161:
  
 
|  
 
|  
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
  
 
|-
 
|-
Line 181: Line 173:
  
 
|
 
|
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
  
 
|-
 
|-
Line 202: Line 184:
  
 
|
 
|
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
  
 
|-
 
|-
Line 217: Line 195:
  
 
|
 
|
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
 
* <span style="color:#008000">Complete</span> <br />
 
  
 
|-
 
|-
Line 228: Line 205:
 
* <span style="color:#008000">Send out for fabrication</span>
 
* <span style="color:#008000">Send out for fabrication</span>
 
|
 
|
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
  
 
|-
 
|-
Line 241: Line 216:
  
 
|
 
|
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
  
 
|-
 
|-
Line 259: Line 227:
  
 
|
 
|
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
* <span style="color:#008000">Complete</span> <br />
 
  
 
|-
 
|-
Line 274: Line 239:
  
 
|
 
|
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
* <span style="color:#008000">Incomplete</span> <br />
* <span style="color:#008000">Complete</span> <br />
+
 
* <span style="color:#008000">Complete</span> <br />
 
  
 
|}
 
|}

Revision as of 03:34, 15 October 2019

Logo

Contents

ABSTRACT

My abstract goes here.

INTRODUCTION AND OBJECTIVES

RC CAR OBJECTIVES






TEAM OBJECTIVES







CORE MODULES OF TOWER DEFENSE

  • LED Matrix
  • User Input
  • Game Logic
  • Hardware


PROJECT MANAGEMENT ADMINISTRATION ROLES

  • Team Lead
  • Finance Manager
  • Git Repository Manager
  • Wiki Report Manager
  • Bill of Materials Manager


TEAM MEMBERS & RESPONSIBILITIES

Team Members

Administrative Roles

Technical Roles

  • [Ryan Zelek]
  • Team Lead
  • a role




  • [Zach Smith]



  • [Chong Hang Cheong]




  • [Polin Chen]




SCHEDULE

TEAM MEETING DATES & DELIVERABLES

Week#

Date Assigned

Deliverables

Status

1 10/15/19
  • Share team contact information
  • Create Git Repository
  • Set up Slack
  • Invite Preet to Slack
  • Establish Code Guidelines and Standards
  • Complete
  • Complete
  • Complete
  • Complete
  • Complete
2 10/22/19
  • Identify hardware components (BOM)
  • Begin purchasing major items
  • Finalize game architecture
  • Incomplete
  • Incomplete
  • Incomplete
3 10/29/19
  • Solidify individual roles and responsibilities
  • Begin implementing basic code structure
  • Incomplete
  • Incomplete


4 11/5/19
  • Interface the software with the hardware
  • Incomplete


5 11/12/19
  • First hardware design implementation complete


  • Incomplete


6 11/19/19
  • First implementation of individual subsystems complete
  • Send out for fabrication
  • Incomplete
  • Incomplete


7 11/26/19
  • Integration of major subsystems
  • Incomplete


8 12/3/19
  • Testing and Validation


  • Incomplete


9 12/10/19
  • Reserve time for debugging issues
  • Identify and fix critical bugs (hardware and software)
  • Finish any optimizations and visualization features
  • Incomplete
  • Incomplete
  • Incomplete



BILL OF MATERIALS (GENERAL PARTS)

MICRO-CONTROLLERS

PART NAME

PART MODEL & SOURCE

QUANTITY

COST PER UNIT (USD)

  • Micro-controller
  • LPC 1758 (Purchased from Preet Kang)
  • 5
  • $80.00


RC CAR

PART NAME

PART MODEL & SOURCE

QUANTITY

COST PER UNIT (USD)

  • RC Car
  • 1
  • $205.99
  • Lithium-Ion Battery
  • 1
  • $74.95
  • Battery Charger
  • 1
  • $47.95


HARDWARE INTEGRATION PCB

Hardware Design

RunDBC PCB


The hardware integration PCB was designed with two goals:

1. Minimize the footprint of the onboard electronics
2. Minimize the chances of wires disconnecting, during drives

To accomplish these goals,

The board consisted of 4 layers:

Signal
3.3V
5.0V
GND

Technical Challenges

Design

  • Balancing priorities between HW design and getting a working prototype


Assembly

  • Wireless antenna connector on master board not accounted for in footprint, it may have to be removed to avoid interference with one connector.

Bill Of Materials

HARDWARE INTEGRATION PCB

PART NAME

PART MODEL

QUANTITY

COST PER UNIT (USD)

  • CAN Transceiver
  • 5
  • $2.38
  • Buzzer
  • 2
  • $0.83
  • Buzzer Switch
  • 1
  • $0.15
  • 3.3V Regulator
  • 1
  • $0.46
  • 5V Regulator
  • 1
  • $2.36
  • Red LED
  • 1
  • $-.--
  • Diode
  • 1
  • $0.32
  • 100uF Capacitor
  • 1
  • $0.44
  • 10uF Capacitor
  • 1
  • $0.44
  • 4.7uF Capacitor
  • 1
  • $0.44
  • 1uF Capacitor
  • 1
  • $0.44
  • 10K Resistor
  • 1
  • $0.44
  • 5.1K Resistor
  • 1
  • $0.44
  • 1K Resistor
  • 1
  • $0.44


CAN NETWORK

In order


Hardware Design

During

Electrical Pinout
CAN Transceiver




We used

Design of Run DBC Autonomous Car


ANDROID MOBILE APPLICATION

Software Design

Development of the


Bluetooth Integration

the connection.


Google Maps Integration

After t

Technical Challenges

App Crash on Receiving NULL String

The softwar

INTERNET Permission not enabled

One issu

Broken Android Phone

During

Bill Of Materials

ANDROID MOBILE APPLICATION

PART NAME

PART MODEL

QUANTITY

COST PER UNIT (USD)

  • Android Mobile Phone
  • Samsung Galaxy S4
  • 1
  • N/A (Supplied by Nuoya Xie)


BRIDGE CONTROLLER

Hardware Design

The Brid



Bluetooth Module SJone connection

Bluetooth Module (HC-05) to SJone connection
Bridge Controller Schematic
Bridge Controller Schematic

Software Design

Periodic Callback: Init

Upon startup,


Periodic Callback: 1Hz

In order to verify


Periodic Callback: 10Hz

As stated before,

Bridge Module Flowchart


Path-finding

Because there


Checkpoint Diagram

Here we have

Populated Distance Matrix

The c

Path-finding sample code

After t


Technical Challenges

UART Receive While Loop

The pri

Interfacing Bridge and Geographic Modules

Another

Bill Of Materials

BRIDGE CONTROLLER

PART NAME

PART MODEL

QUANTITY

COST PER UNIT (USD)

  • Bluetooth Serial Communication Module
  • 1
  • N/A


GEOGRAPHIC CONTROLLER

Hardware Design

The geographical

Geographic Controller Schematic

Geographic Controller Schematic

GPS Module SJone connection

Geographic module pin connection

GPS Module

Adafruit Ultimate GPS module
Cirocomm GPS antenna






As


GPRMC Sentence Structure


The first 6

Compass Module

CMPS14 Compass Module

The compass modul

Read Compass Heading

Compass

Check Compass Calibration

The cw:

CMPS14 calibration register


Essential GPS Data

Bearing, Distance, and Deflection Angle Calculation

Software Design

The

Geographic Module Flow Diagram

Technical Challenges

Getting correct BAUD rate for GPS

  • When

Compass reading was not accurate and would deviate from initial calibration

  • The

Parsing NMEA sentences

  • When we

Bill Of Materials

GEOGRAPHIC CONTROLLER

PART NAME

PART MODEL

QUANTITY

COST PER UNIT (USD)

  • GPS
  • 1
  • $69.13
  • GPS antenna
  • 1
  • $8.79
  • Compass
  • 1
  • $33.99


MASTER CONTROLLER

Hardware Design

The master

Master Module Schematic
LCD Showing speed, steer and state information

Software Design

Master State Machine
  • LCD di

Technical Challenges

  • Qui


Bill Of Materials

MASTER CONTROLLER

PART NAME

PART MODEL

QUANTITY

COST PER UNIT (USD)

  • LCD
  • N/A
  • 1
  • Supplied by Preet Kang


MOTOR CONTROLLER

Hardware Design

The motor board
1 pin
1 pin f
1 pin

The ESC was included with the RC we purchased and it was interfaced with 3 pins:
1 pin fo

Manag

Managing wheel spin was a more complicated process. The ESC also requires a PWM signal in order to operate, but is not as simple as the servo's operation.
In or
S



Speed Control Timing Diagrams
Speed Timing Diagrams


Steering Control Timing Diagrams
Steering Timing Diagram


Motor Controller Schematic
Motor Module Schematic

Software Design


Periodic Callback: Init (beginning of program)

Periodic Callback: 1Hz (every 1sec)
- Che
Periodic Callback: 10Hz (every 100ms)
- Sen

Technical Challenges

SJOne PWM

W


Encoder

The

Bill Of Materials

MOTOR CONTROLLER

PART NAME

PART MODEL

QUANTITY

COST PER UNIT (USD)

  • Motor Encoder
  • 1
  • $63.16


SENSOR CONTROLLER

Hardware Design

Pin connection of Different sensors to SJOne Board
Placement of Sensors on RC Car

Sen


Sensor Controller Schematic
Sensor Module Schematic
CAD Design

We g

Sensor Guard to Minimize Interference
Sensor Guard Mount showing Vertical Adjustment



Placement for the Ultrasonic Sensors

We r

Sensor Value Conversion

In or

Sensor Graphical Representation

Software Design

Flowchart

The f

Flowchart of Sensor Module
Timing Diagram
Timing Diagram

Technical Challenges

Sensor Interference

We saw :

  • Higher
  • Instead of l
Power Deficiency

At first

Unstable HR-04 Readings

At fi

ADC Supply Voltage

The mid

Slow car response to obstacle due to large queue size (running average)

During

Bill Of Materials

SENSOR CONTROLLER

PART NAME

PART MODEL

QUANTITY

COST PER UNIT (USD)

  • Infrared Sensor
  • 1
  • $13.95
  • Front-left-right Distance Sensor
  • 2
  • $29.95
  • Front-middle Distance Sensor
  • 1
  • $29.95


CONCLUSION

This pr


Project Video

RUN-D.B.C project video

Project Source Code

RUN-D.B.C project source code

Advice for Future Students

  • FORM YOUR TEAM AS EARLY AS POSSIBLE AND START WORKING ON THE PROJECT AS EARLY AS POSSIBLE (WEEK 1 IF POSSIBLE)
  • If you are