FREQUENCY KEYBOARD Braeden Lieberman Nathan West Project Overview • Goal • Use frequency to allow user to change the state of a digital system • Create characters based on the frequency • What we did • Take input signals from a function generator • Digitize the analog signals using band pass filters • Display characters based on digital value on LED matrix • Change the character by increasing the frequency Two Subsystems • Frequency Analyzer (MSGEQ7) • Analyze frequency and digitize the value from 0 to 7 • Increment character index if increase in frequency is detected. • Display (LED matrix) • Uses character index to display corresponding character on a cursor • If push button is pressed, LED matrix will save current character and increment the cursor. FREQUENCY SUBSYSTEM MSGEQ7 • Mounted on Sparkfun’s Spectrum Shield for Arduino • Contains 7 band pass filters • Uses a multiplexer to choose a band pass filter • Uses a strobe pin to change which band pass filter is in use • Outputs a DC value based on the input frequency and filter Block Diagram Schematic (Wiring to MSGEQ7) *schematic acquired from https://www.sparkfun.com/products/10306 Schematic (MSGEQ7 on Shield) *schematic acquired from https://www.sparkfun.com/products/10306 Frequency Response • Bandwidths are actually different for each band pass filter MSGEQ7 Timing Diagram Retrieving Data from MSGEQ7 Tmin = 72 usec PseudoCode for Frequency Subsystem • Strobe reset, i = 0 • While int i < 7 • Strobe strobe pin • Read DC ourput (store in variable val) • i++ • If val > val_old, assign character_index to I • val_old = val; • If character_index > old_index, increment character to be displayed on LED matrix • old_index = current_index; DISPLAY SUBSYSTEM LED Matrix • Matrix contains 8 shift registers • 80 bits of storage each • Data entered into a latch register • Data is shifted in 1 bit at a time • Latch register transferred into desired row • Only one row is displayed at a time • Used bit-banging instead SCI • Implemented in RTI system for precise and quick timing • Bi-color LEDs, had to choose one color due to memory constraints Schematic LED Timing Diagrams Shifting To LED Matrix • Active low logic for LED’s • To shift in red LED, R1 is low, G1 is high Latching data into a row • En must be low • Select Row with pins A, B, C using binary representation • To latch to row 3… • Pull Enable low • Set pins ABC = 011 • Pulse L pin • Pull Enable high LED Timing Diagrams Shifting To LED Matrix Latching data into a row Cursor • Divided matrix into 8 8X8 character matrices/cursors • Had to use char to decrease memory usage • Dropped memory usage of arrays by 1kB from integer array • Allowed LEDs to be selected based on row and column location • Used case statements to determine which cursor was selected • A pushbutton was used to increment the cursor PseudoCode for Display If time_index = 100, • Time index = 0 • Assign current block at cursor index to desired character. (i.e. if cursor index is 0 the far left block of LED matrix will display current character) • Load information stored in each block onto the LED matrix one row at a time • Select row and Latch information into corresponding row on LED for i = 0; i < 7; i++, Select Row Make En signal High Delay 50 microseconds time_index++ Project Status • Current State of Design • Will display characters on the matrix • Changes when frequency is increased • Problems Faced • Noise • Delay/timing • Future plans/implementation • Add a second function generator • Have it display characters based on music • Have the characters be sent to the computer Questions