ECE 477 Design Review Team 03 - Spring 2013 Robert HarrisSpencer JulianRyan PawlingJosh Hunsberger.

Post on 12-Jan-2016

215 views 1 download

Tags:

transcript

ECE 477 Design Review

Team 03 - Spring 2013

Robert Harris Spencer JulianRyan Pawling Josh Hunsberger

Outline

• Project Overview

• Project-Specific Success Criteria

• Block Diagram

• Component Selection Rationale

• Packaging Design

• Schematic and Theory of Operation

• PCB Layout

• Software Design and Development Status

• Project Completion Timeline

• Questions and Discussion

Project Overview

• What is "Hackers of Catron"?o An electronic Settlers of Catan® board. Settlers of Catan® is

a resource gathering and trading board game in which players compete to build the largest economy.

• What we will improve upon?o The game is really fun, but it takes too long to set up. This

project will shorten the setup process.o This design will make resource gathering and spending

automatic. o Hackers of Catron also intends to simplify the execution of

Catan without adding more complexity.

Project Specific Success Criteria

• An ability to generate a random Catan board and represent the resources and their relative scarcity visually.

• An ability to detect the placement of pieces on the board and update game status accordingly.

• An ability to display game status (current scores, resources, etc.) via a web interface.

• An ability to enforce correct turn based gameplay via the board lighting and web interface.

• An ability to handle resource trading between players via the web interface.

Block Diagram

USB

llRaspberry

Pi

Web Server AVR32 UC3 B

Microcontroller

(8) Hall Effect

Sensors

Economy Control Logic

RGB LED Driver

Single Hall Effect Sensor

Game Control Code 7

Segment LED

Display Driver

Wifi Acces

s Point

(8) 7 Segs

5 sets (daisy-chained)

(3) RGB LEDs

7 sets (daisy-chained)

Hall18

2

3

8:1 MUX

18 Sets

Addr - 3

SPI

2

I2C

Load Enable

Seg 8

Dig 8

RGB 3

Hall

TWI

Microcontroller Selection Rationale

Selected Microcontroller: Atmel AT32UC3B064/0128

• Supply Voltage: 3.3 Vo Min for RGB Driver is 3.0 Vo Max for hall Effect is 3.6 V

• Number of I/O Pins: 44o 22 GPIO (Hall Effect Sensor Array)o 2 GPIO (RGB Driver)o 1 SPI (7-Seg Driver)o 1 I2C (Raspberry Pi)

• Cost: Free, samples provided

• Speed: 60 MHz

Peripheral Selection Rationale

• Raspberry Pio Good support for running a web server over an access pointo Can use python for cgi web application codingo Cost $35 vs BeagleBone at $89

• RGB Driver Omron W2RF004RMo Operates at 3.3 Vo Can address individual LEDso Daisy-chain several driverso Drives 3 RGBs per driver

• Seven Segment Driver AMS AS1116o Operates at 3.3 Vo SPI compatibleo Daisy-chain several driverso Display 8 digits per driver

Packaging Design

• Hexagon shapeo Each side is 9 incheso 18 x 15.5 inch dimensionso Internal structure 15.56 x 14.4 incheso 2.58 inches tall, ~.25 inches from top of package to PCB

• 19 Internal Hexagonso Each side is 1.8 incheso 3.61 x 3.13 inch dimensionso ~.25 inches tall

• Frosted Acrylic top surfaceo Diffuse LED lighto Smooth playing surface

Packaging Design - Measurements

Packaging Design - 3D Drawing

Schematic - Hall Effect Sensor Array

18 Parallel Modules

Theory of Operation - Hall Effect Sensor Array

• Purposeo Detect presence and position of playing pieces

• Modeo Hall Effect sensor detects magnetic pieces, changes outputo Hall Effect outputs grouped into sets of 8, go to input of

multiplexero Multiplexer output controlled by Microcontroller via 3 select pinso Multiplexer outputs go to Microcontroller, total 18 return lines

• Operationo Supply: 3.3V (all)o Hall Effect: Active low, open draino Multiplexer: 8:1, complementary output

Schematic - Hexagon RGB LED Array

7 Serial Modules

Chip Address

Data In

Data Out

LEDs

Theory of Operation - Hexagon RGB LED Array

• Purposeo Distinguish hex resources

• Modeo Microcontroller sends commands via two wires to seven RGB

drivers

o Chips echo data and clock input, so they can be daisy-chained

o Commands set RGB color, brightness, and transition speed

• Operationo Supply: 3.3V (IC)

o LED control outputs can be powered by the 5V rail since they are

open-drain o RGB LED: 5V 15mA, parallel

Schematic - Seven Segment Rarity Display

SPI Bus

Seven Segment Displays

5 Serial Modules

Theory of Operation - Seven Segment Rarity Display

• Purposeo Display Rarity, Dice Roll, and Likelihood of roll for each resource

• Modeo Microcontroller sends commands to AMS AS1116 Seven Segment

Drivero Chips echo data, so data can be daisy chained.o Commands set numbers, brightness, digit, among other thingso Rarity, Dice Roll, or Likelihood determined by user or board

location

• Operation

o Supply: 3.3 V (all)o 160mA / drivero SPI

Schematic - Microcontroller

Reset Switch

Programming

Raspberry Pi Communication & Power

Row Select

Rarity Display

Hex Display

Column Return

Column Return

Column

Return

External Clock

Theory of Operation - Microcontroller

• Purposeo Scan sensors, control display, enforce game rules, communicate

with Raspberry Pi

• Modeo PLL controls operating frequency (external oscillator)

o GPIO to scan the Hall Effect Sensors

o GPIO to control the RGB driver

o I2C to communicate with the Raspberry Pi

o SPI to control the seven segment driver

• Operationo Supply Voltage: 3.3V

o Clock Speed: 60MHz

Schematic - Power

Isolation Jumpers

3.3V Regulated Output

5V Unregulated from Wall Adapter

Theory of Operation - Power Supply

• Purposeo Supply power to IC's, Raspberry Pi, and LEDs.

• Modeo AC wall adaptor supplies 5V unregulated voltage to board

o Unregulated voltage powers Raspberry Pi and RGB LEDs

o 5V regulated down to 3.3V to power ICs and seven segment displays

o Jumpers isolate each power stage from rest of board is required

o 5.3V Zener Diode to help protect against over-voltage

• Operationo Supply: 5V, 4A

Raspberry Pi: 0.7A RGB LEDs: 1.7A Voltage Regulator: 1A

PCB Design Considerations

• Large PCB size due to number of sensors and LEDs over a large area. o Approximately 15"x17"o 145 hall effect sensors, 20 7-seg displays, 38 RGB LEDs

• Wide traces needed for 5V power rail to RGB LEDso At peak must provide ~1.7A, need 20mm trace

• LEDs and hall effect sensors must be on top layer

• Headers for communication and programming

• Will need to use auto routing for the some of the board

RGB LED Layout• 6 RGB LEDs per

driver• 7 total drivers• Hexagons

grouped appropriately

• Driver placed near "center" of group

7-segment Display Layout• 8 7-segment

displays per driver

• 5 total drivers• Hexagons

grouped appropriately

• Driver placed near "center" of group

Hall Effect Sensor Layout• 145 total

sensors• 8 sensors per

multiplexer• Organized so

that ever hex (except middle hex) has 8 sensors

• Each hex (except middle hex) has 1 multiplexer

• 18 total multiplexers

• Single sensor in middle hex connected directly to microcontroller

Full PCB

Full PCB

PCB Layout

PCB Layout

Zoom of Hexagons

Zoom of Hexagons

PCB Layout

PCB Layout

PCB Layout

PCB Layout

Software Design

• Boot Timeo Randomize rarities and

resource locationso Self-test LEDs and LCDso Animate board while waiting

for raspberry pi

• After boot, before gameo Get player informationo Additional network setup, if

necessaryo Set starting settlements (in

turn)o Assign players starting

resources

• Post Gameo Ask for new game. If no,

shutdown.

• During Gameo Roll Dice, assign resourceso Check if player wants to

trade If yes, trade selected

resources with selected player

o Check if player wishes to purchase If yes, remove resources

necessary to purchase selected object

Wait for placement on board

Confirm placement (visual notice on board as well)

o If invalid piece placement, pause game until piece removed (visual notice on board as well).

Software Development Status

• Raspberry Pi Testingo Successfully communicating via I2C running Raspbiano Web server running and serving a preliminary interfaceo May switch to Arch due to boot time.

• mbed Testingo RGB LED Driver working correctly, as is the RGB LED.

Uses 40-bit custom protocolo Seven Segment Display Driver also working correctly, as is the

Seven Segment Display.o Hall Effect Sensor responding to various magnets as expected.

• Microcontroller Testingo Microcontroller starting and blinking LEDo Currently working to communicate via I2C, SPI, and RGB Driver

protocol.

Project Completion Timeline

• March 22o PCB obtained, Power

populated, Micro populatedo Micro communicating with

some drivero Web interface ready to

communicate

• March 29o PCB 50% populatedo Micro communicating with

1 other driver and hall effect sensors

• April 5o PCB Fully Populatedo Micro communicating with

all drivers

• April 12o Micro communicating with

Raspberry Pi

• April 19o All game code completeo Animations, sensing, etc.

complete

• April 26o Testing completeo Full game working

Summary

• Hackers of Catron is an electronic version of Settlers of Catan®.

• The game uses a Hall Effect Sensor array to sense pieces and locations.

• A bank of RGB LEDs is used to display resources and provide real-time board status. The drivers are interfaced with using SPI.

• Seven Segment Displays are used to display resource rarity. The drivers are interfaced with using SPI, again.

• A Raspberry Pi running a web server and an access point can be connected to using a smartphone, which will display player status and interface with the board. It is interfaced with using I2C.