Gesture-Controlled LED Coffee Table with B.L.O.X. Final Presentation Josh Pack | Esther Kim | Ryan Dwyer Project #16 December 7, 2012 ECE 445 Fall 2012 TA: Lydia Majure
Introduction Our goal is to have a fully functional coffee table with an LED matrix display surface that can play BLOX using motion sensors. Features of the LED BLOX Coffee Table include: Rows are removed when full Randomize next piece Game ends when a piece reaches the top row Drop, move, and rotate are controlled with motion sensors
Block Diagram Controller 1Controller 2 Row / Column Drivers LED DisplayIR Sensors Controller 1: Arduino Uno microcontroller to run BLOX Controller 2: Arduino Uno microcontroller to render the display
Engineering and Design 1.LED Display 2.LED Driver Circuit 3.Multiplexing 4.Table and Grid Construction 5.Arduino Uno Programs 6.IR Sensor Circuit
LED Matrix Wiring Diagram
Engineering and Design 1.LED Display 2.LED Driver Circuit 3.Multiplexing 4.Table and Grid Construction 5.Arduino Uno Programs 6.IR Sensor Circuit
Driver Circuit Design –Components –Display Multiplexing Build –Protoboard –Vector Board
Design: Components Low-side current-sinking LED drivers –Connected to RGB cathodes (columns) –Each controls a 4x5 matrix section High-side current-sourcing switches –Connected to anodes (rows) –Each supplies current to 5 rows of 10 columns
Column and Row Driver Layout LED Matrix Anode Rows Low-side LED Drivers (Column Drivers) High-side Current Switches (Row Drivers) RGB Cathode Columns
Low-Side LED Drivers Texas Instruments TLC5940NT –16-channel, constant-current sink –Output current determined by single R REF Up to 120mA/channel; using 20mA/channel –12-bit/channel grayscale control –Two clocks: data shift (SCLK), grayscale (GSCLK) 30MHz each; limited by 16MHz clock of Arduino 120µs to shift in grayscale data for 10 drivers (1920 bits) 256µs to complete one PWM period
Low-Side Driver Schematic (for 4x10 matrix section)
High-Side Current Switches Motorola MTP2P50E –P-channel MOSFET –2A 500V Texas Instruments SN74F138n –3:8 Decoder Arduino Uno (Controller 2) –Analog outputs A0, A1, A2
High-Side Switch Schematic
Testing and Verification of LED Drivers calculated needed time to shift new grayscale values to make sure it is less than PWM cycle tested continuity of control signals from controller 2 to low-side drivers 1 through 10
Engineering and Design 1.LED Display 2.LED Driver Circuit 3.Multiplexing 4.Table and Grid Construction 5.Arduino Uno Programs 6.IR Sensor Circuit
Design: Display Multiplexing Power one matrix row at a time Switch rows fast enough that all appear ON –Shift new grayscale data well within PWM cycle –Latch new grayscale values and switch rows simultaneously Used TLC5940Mux library by Alex Leone –Simple commands for setting grayscale values for each channel –Interrupt Service Routine handles data shift timing
Build: Protoboard 2x5 LED Section4x5 LED Section
Build: Protoboard 4x10 LED Section Column drivers Row drivers
Build: 8006 Pad-per-hole Vector Circbord TM Column drivers Row driver MOSFETs 3:8 Decoder
Engineering and Design 1.LED Display 2.LED Driver Circuit 3.Multiplexing 4.Table and Grid Construction 5.Arduino Uno Programs 6.IR Sensor Circuit
LED Matrix Wiring Diagram
LED Driver Section Diagram
LED Matrix Wiring Wiring Process 1.Drill 200 holes spaced 5cm by 5cm apart in 2x4ft, 5mm thick plywood board 2.Insert 20 LEDs in one column 3.Solder red, green, and blue cathodes to respective wire 4.Tape connections 5.Repeat for remaining columns 6.Repeat for anodes of 10 LEDs per row in series 7.Clip wires to segment into driver sections
Construction
Test and Verification of LED Matrix Tested each led to make sure each color works at visibly same brightness
Grid and Hole Measurements Hole Cross Section Diagram Short Grid Piece Diagram
Engineering and Design 1.LED Display 2.LED Driver Circuit 3.Multiplexing 4.Table and Grid Construction 5.Arduino Uno Programs 6.IR Sensor Circuit
B.L.O.X Game Logic (Controller 1) Tetris clone Code from Javier López –Free to copy, adapt work Challenges: –Replacing input –Changing color scheme –Change output for display controller
Game – Display Communications 2 Arduino UNO boards as controllers Uses Bill Porter’s Easy Transfer library for Arduino Share common data structure –2D array of characters –Colors for LED matrix
Display (Controller 2) Arduino library TLC5940mux Writes grayscales for drivers Color grayscale RGB (0-4095): 0 – blank (0,0,0) r – red (4095,0,0) g – green (0, 4095, 0) b – blue (0,0,4095) c – cyan (0,4095,4095) y- yellow (4095,4095,0) p- purple (2730,0,4095) o – orange (4095,2730,0) g g g y y 0 r c g y y g r c p p p g g c b p r r g
Engineering and Design 1.LED Display 2.LED Driver Circuit 3.Multiplexing 4.Table and Grid Construction 5.Arduino Uno Programs 6.IR Sensor Circuit
Original Game input Passive Infrared Sensors Detects presence of Infrared After verification, bad delay Meant for room detection delay scale of seconds-minutes needs to be <200milliseconds
Infrared LED and Detectors
Questions and Comments