240 likes | 443 Views
Super Team 12. Brett Dunscomb David Howden Kevin Bedrossian Chris Clary. NEED. D evelop a simple application that utilizes a sensor and a microcontroller Take a user input from sensor to generate visual stimulus C ustom 8 ball messages Fun to build!. Super. Motivation.
E N D
SuperTeam 12 Brett Dunscomb David Howden Kevin Bedrossian Chris Clary
NEED • Develop a simple application that utilizes a sensor and a microcontroller • Take a user input from sensor to generate visual stimulus • Custom 8 ball messages • Fun to build! Super
Motivation • Take a 50 year old toy and modernize it. • In an era where kids have tablets and cell phones in kindergarten, their toys should share similar excitement. • Keep it recognizable to those that grow up with the original toy. • An upgraded version of the current toy Super
Objective Design a prototype for a digital version of the popular children’s toy “Magic 8 Ball” originally conceived by Mattel and improve upon it. Super
Alternatives • Current Magic 8 ball uses a plastic icosahedral (20 sided) die to display one of twenty possible messages • Stuck with the same boring messages • Custom 8 balls cost $2000 for mold http://www.ginifab.com/gift/custom_magic_8_ball.html Super
Requirements • Acknowledge shaking motion to deploy message • Have at least as many messages as are in the original toy • Low power consumption • Insure product is easy to use for all ages Super
Our Approach • Use accelerometer to acknowledge user input (shaking motion) • Display random messages on LCD screen • Use familiar “Magic 8 Ball” casing to house system Super
State Diagram Mode selected Display Mode Switch mode Wait for interrupt Time delay expired Free fall interrupt Sleep Time delay expired Double tap interrupt Pick Message Display Message Message chosen Super
Design Interrupts Accelerometer Microcontroller Display Message Motion SPI I2C DC Voltage 3.3 Power 9 Volt battery Super
Accelerometer • 3-axis measurement • Two configurable interrupt pins • Multiple low power modes • Capable of threshold detection while in sleep mode • Vin of 3.3V with 3.3V logic Analog Devices ADXL345 Breakout from Adafruit Super
Accelerometer Implementation • I2C bus communication • Threshold activity interrupt • Low power state Super
Microcontroller Atmega 328p • 8 bit processor • 8 MHz clock • 32K of flash memory • 2K of Ram • TQFP package 32 pins • Inexpensive Super
Display • Nokia 5110/3310 monochrome LCD • from Adafruit • 84 x 48 pixel count • Backlit • Runs off 3.3 volt • Uses a SPI bus Super
Display • Implementation: • Display all 20 original 8 ball messages • Readable in dark rooms • Displays Bitmaps Super
Power Implementation • 9V battery supply • LM 317 voltage regulator steps down to 3.3V • Low power mode draws 5mA down from 30mA when displaying a message Super
Implementation Super
Implementation Super
IP and Prior Work • Atmel TWI_MASTER Library • Adafruit Library • SparkfunLibray • Display code http://pastie.org/1332371 • Mattel for the 8 ball shell and idea Super
Testing • BREAD BOARD TESTS • Tested power circuit output • Tested random message display • Tested accelerometer output levels • IMPLEMENTATION TESTS • Tested power to components • Tested sleep mode • Tested shake response Super
Results • Initially tried powering the 8 ball with a shake generator but was unable to make it work • 9V battery with single regulator was able to power all components • System goes into sleep mode shortly after message is displayed • System wakes up when shaken • Display was clear and easy to read Super
Costs • Nokia 5110/3310 LCD $ 10.00 • ADXL345 Accelerometer $ 19.95 • Atmega328p $ 2.50 • Header pins $ 1.25 • Board $ 8.00 • 8 Ball housing $ 8.00 • Resistors, caps, etc $ 7.00 • 9V battery $ 2.50 $ 59.20 Super
Lessons Learned • Proper time management is important • Setting documentation standards early and following them throughout is necessary • Proper communication is key • Have all the surface mount components ready to go at once, don’t try adding one later • With access to reflow oven, the breakout board was an unnecessary cost Super
Contributions • Brett Dunscomb: display coding, breadboard testing, and microcontroller pin assignment for display • Chris Clary: schematic design, passive component setup, and board layout • David Howden: power system design, power system test and board layout • Kevin Bedrossian: accelerometer coding, breadboard testing, and microcontroller pin assignment for accelerometer • Group: documentation, final construction, component research, and implementation testing Super