Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

39
Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos

Transcript of Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Page 1: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Knight Bright

Group #1:Robin Adams

Nathan Doran Tyler Hemp-Hansen

Shaun Sontos

Page 2: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

What is “Knight Bright”?

• Knight Bright is a 2-dimensional, 100 (10x10) pixel tabletop interactive LED (RGB) gaming system.

• The primary motivation behind this project is to develop a fun, easy to use, user-programmable interactive tabletop.

Page 3: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Project Goals• Use the MCU to control an array of LEDs through LED

drivers. • Transmit the output of an IR sensor circuit into the

microprocessor.• Successfully integrate Bluetooth capabilities into the

project.• Successfully integrate USB communication on both

the user and developer levels.• Develop a host programming GUI environment.• Develop an Android based peripheral application.

Page 4: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Specifications and Requirements

Dimensions 20” x 20” x 2”

Resolution 10 x 10

Color Depth 8-bit color or more

Communication Wireless to Android Device (range > 10 m)Serial for USB

Memory Must store at least 3 on-board games

Power < 200 W

Page 5: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

H/W Requirements

Component Name # of Components

8-bit MCU unit 3

RGB LED bulb 100

LED driver 20

IR emitter + IR detector 100 + 100

3-to-1 (3:1) AND gate 100

4-to-16 (4:16) Decoder 2

5-to-32 (5:32) Decoder 1

Bluetooth module 1

Android OS mobile device 1

Page 6: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Overall Project Design

Page 7: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Games: Tic-Tac-Toe

Page 8: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Games: Tetris

Page 9: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Games: Battleship

Page 10: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Game Programming

• Desktop programmer GUI can make games and upload them to the board

• Sent to microcontroller via USB serial communication

• Program stored in EEPROM as an assembly language type of program specific to this application

Page 11: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Microcontroller

• ATmega328P• 3 Microcontrollers

– Primary microcontroller – Fetches and executes instructions from EEPROM. Directs actions of the other microcontrollers.

– Display microcontroller – Executes commands related to LEDs and colors

– Input microcontroller – Monitors IR sensors and has a buffer for received input

Page 12: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Selecting the LED DriverModel Name TLC5941 TLC5940 STP16CP05MTR PCA9922

Current supply(max) 80 mA 

60 mA (< 3.6 V) 120 mA (> 3.6 V)

100 mA 

60 mA 

Voltage supply (input) 3 to 5.5 V 3 to 5.5 V 3 to 5.5 V 

3.3 to 5.5 V

Voltage supply(output)

17 V 17 V 20 V 6 V

Interface Serial Serial Serial Serial

Data Transfer rate 30 MHz 30 MHz 30 MHz 25 MHz

Channels 16 16 16 8

Cost $1.80/per unit $2.21/per unit $4.32/per unit $0.49/per unit

AdditionalFeatures

12-bit Grayscaling

6-bit Dot Correction

LED Open Detection

12-bit Grayscaling

6-bit Dot Correction (EEPROM storable)

LED Open Detection

   

Page 13: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

LED Driver ControlTLC5941 LED Driver

16 channels

80 mA current supply(max)

30 MHz data transfer rate

12-bit Grayscale PWM

6-bit DOT Correction

• TLC5941 (TI LED driver)- Low cost- Ease of use- Proliferated software support- EEPROM not necessary

Human eye only requires ~50-60 Hz, and ~33% duty cycle for indistinguishable pulses.

Page 14: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

5V

LED Driver (TLC5941)

1 2 34 5 6 7 8 9 101112 1314 15

5mm Common Anode Diffused RGB LED

Texas Instruments TLC5941 LED Driver

212 = 4096 levels

Page 15: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

LED Driver (TLC5941)

Texas Instruments TLC5941 LED Driver

MCU 3

x 20

Page 16: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

LED Driver (TLC5941)

Texas Instruments TLC5941 LED Driver

MCU 3

5:32

5

XLAT of Drivers

2-20

Page 17: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

LED Driver Addressing

MCU

5:32 Decoder

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

LED Driver

A0A1A2A3A4

5:32 Decoder selects 20 Addresses(0 – 19)

to XLAT pins

MODE,SIN, SCLK,

BLANK,GSCLK

All Common to MCU

LED Driver

Page 18: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Sensor Cell Design

• General requirements– Each sensor must detect an object in front of the cell to

provide input to the device– Each Cell must contain a RGB LED to provide output

• Primary Considerations– An intelligent design approach must be used to minimize

the number of microcontroller pins needed for user interfacing

– The group should also utilize cost efficient methods to meet the requirements

Page 19: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

4:16

4:16

MCU

2

4

4

S

X

Y

Page 20: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

4:16

4:16

MCU

2

4

4

S

X

Y

Read(3,5) = FALSE

Page 21: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

4:16

4:16

MCU

2

4

4

S

X

Y

Read(3,5) = FALSE

Page 22: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

4:16

4:16

MCU

2

4

4

S

X

Y

Read(3,5) = TRUE

Page 23: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Sensor Array Design

Page 24: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Sensor Circuit DesignQED123 Infrared Light Emitting Diode

λ 880nm

Material GaAsPackage type T-1 ¾ (5mm lens

diameter)Emission angle

16°

Output power HighMatched photo-sensor

QSD123

QSD123 SILICON INFRARED PHOTOTRANSISTOR (NPN)

Daylight Filter

Material SiliconPackage Type: T-1 ¾ (5mm lens

diameter)Reception angle

24°

Sensitivity HighMatched Emitter:

QED12X

Page 25: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Sensor Circuit Design74HC08 Quad 2-input AND Gate Philips SemiconductorHigh-speed Si-gate CMOS devicePackage DP14 Propagation delay 6ns 2 to 6 V 0 to Vcc – 1.5 V (Typical 1.6V) 0.8 (Typical 1.2) Vcc (Typical 4.4V) = 20mA

Page 26: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Pixel Circuit Design

Page 27: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Pixel Circuit Design• Innovative Solutions

– Jump output ‘A’ to input to ‘B’ for 3 input gate

– Move Row/Column pull down resistors to Decoder output

– Voltage divider

Page 28: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Wireless Method

• For use with an mobile device, the most prevalent methods are Bluetooth and Wi-Fi

• Other wireless technologies were tossed out because of the added cost of an adapter to the mobile device

• In the end, Wi-Fi is simply overkill for the application

Technology Bluetooth Wi-Fi

Range 20m 150m

Power Consumption ~30mA ~180mA

Data Rate 300Kbps ~30Mbps

Cost $15.95 $30.10

Page 29: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Bluetooth Module: RN42-XV

Manufacture Roving Networks

Price $20.95

Supply Voltage 3.0 – 3.6 V

Default Bluetooth Profile

Serial Port Profile(SPP)

Pins 20 pins (only 4 of which will be used)

Page 30: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Mobile Application (Platform)

• Android has a familiar environment with Java Eclipse

• Vast libraries, specifically one for Bluetooth usage

• Open source and many support tutorials and explanations

• Easy drag and drop style GUI creator

Page 31: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Mobile Application (Features)

• The user will be able to select what program is running on Knight Bright

• For certain programs the App will be used as a controller

• Text input from the App to the device

• Grid for one to one control

Page 32: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Mobile Application (Use Case Diagram)

User

Connect Device

Scan for New Device

Connect to Existing Pair

Access Menu

Select Prgram

Disconnect

Exit Applicaion

Touch Grid

Text Input

Controller Input

includeinclude

include

include

include

Page 33: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Mobile Application (Class Diagram)

+goToGrid()+goToCon()+goToText()+getState()+connect()

-Grid : Button-Con : Button-Text : Button-Menu : Button-connect : Button

Main+setState()+getState()+connect()+connected()+stop()+write(in out : byte)

-myAdapter : BluetoothAdapter-myState : int-myAccept-myConnect-myConnected

BluetoothChatService

+send()

-100 Buttons : Button

Grid

+send()

-Up : ImageButton-Down : ImageButton-Left : ImageButton-Right : ImageButton-Select : Button

Controller

+send()

-sendButton : Button-inputText : ListView-outputText : EditText

Text Input

Activity

«extends»

«extends»

«extends»

«extends»

«goToGrid()»

«goToCon()»

«goToText()»

«send()»

«send()»

«send()»

Page 34: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Power ConsumptionComponent Component

Max Current(mA)

Number present

Power consumption per device (mW)

Power Consumed (W)

Microcontroller 9 2 45 0.09

Led Driver ---------- 19 2456 46.66

Bluetooth Device 30 1 150 0.15

Decoders ---------- 3 TBD TBD

USB 21 2 105 .21

RGB LED 60 100 300 30.00

IR Emitter 20 100 100 10.00

IR Detector 20 100 100 10.00

And Gate ---------- 100 500 50.00

Total Power Consumed

147.11

Page 35: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

TDK-Lambda LS200-5

Note: Careful component selection lead to a need for only 1 voltage regulation device for the Bluetooth chip (.05 x 1.7 = .085 Watts)

Power Supply Type SwitchingInput voltage 85 – 263 VACInput Frequency 47-63 HzOutput voltage 5 VDCMax current 40 ATypical Efficiency 72- 75 %Enclosed fan YesOvervoltage protection 5.75 – 6.75 VDCOvercurrent protection 105% nominal peakOver Temperature Protection YesSize 7.8 x 3.9 x 1.6”Cost $49.52

Page 36: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

BudgetPart Price Quantity Total

Microcontroller $1.62 3 $4.86

TLC5941 $1.80 19 $34.20

RN-42(one with breakout) $21.50 2 $43.00

Power Supply $49.52 1 $49.52

Resistors $0.03 1000 $30.00

Decoders (4:16, 5:32) $1.52 3 $4.56

AND Gates $0.26 100 $26

IR Detectors $0.43 100 $43.00

IR Emitters $0.35 100 $35.00

RGB Light Emitting Diodes $0.24 150 $35.00

USB $10.34 1 $10.34

PCB $83.00 1 $83.00

Construction Supplies Donated - -

Wire (22 gauge) $5.00 / 100 ft 500 ft $25

Total     $421.86

Page 37: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Research

H/W Design

S/W Development

Prototyping(Final)

OverallProgress

Testing(Component)

~ 90-95%

~ 70%

~ 30%

~ 90-95%

~ 15-20%

~ 50-55%

Page 38: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Issues to Resolve

• Memory – Game memory storage

• Bluetooth– Reliably transmitting string of characters

• IR Sensor– Sensitivity to ambient light (sunlight, halogen)

• USB– Serial communication for game programming

Page 39: Knight Bright Group #1: Robin Adams Nathan Doran Tyler Hemp-Hansen Shaun Sontos.

Questions?