Exploding Alarm Clock

41
Exploding Alarm Clock Group 10 David Baughman Branden Maynes Nathan Johnson

Transcript of Exploding Alarm Clock

Page 1: Exploding Alarm Clock

Exploding Alarm Clock

• Group 10• David Baughman• Branden Maynes• Nathan Johnson

Page 2: Exploding Alarm Clock

Motivations

• Create an alarm clock that would force the user to get out of bed

• Create a product that would have more functionality than a regular alarm clock

Page 3: Exploding Alarm Clock

Microcontroller Requirements

• Runs on 3.3V to coincide with our other peripherals.

• Has a built-in real time clock.

• Wanted to go with a MCU that had an established software repository

• Needs enough GPIO and Serial Communication ports

Page 4: Exploding Alarm Clock

MCU Options

• AT32UC3B• Offers a software package that included an

interface to USB/SD for an MP3 player• Operates on 3.3V• Has enough GPIOs for our needs• Was not chosen because we found a MP3

Decoder that interfaced better with another MCU

PIC24FJ256GA106• Has lots of examples online• Operates on 3.3V• Has enough GPIOs for our needs• Built in RTCC and Alarm Interrupt Handler

Page 5: Exploding Alarm Clock

Microchip PIC24FJ256GA106

• 53 Input/Output Pins, with 31 Remappable Pins

• Serial Communications Pins (4 UART, 3 SPI)

• Able to be programmed in C• More than enough program memory to

handle our needs (256KB).• 66 Built-in Interrupt Sources

Page 6: Exploding Alarm Clock

PIC24FJ256GA106: PicKit3

• Programmer & Debugger• Allows for step through debugging

of code• Connects through header pins to

the microcontroller• Allows for breakpoint

debugging

Page 7: Exploding Alarm Clock

MP3 Decoder: Requirements

• Need a MP3 Decoder that is affordable• Want a MP3 Decoder that can handle

USB and SD inputs• Want a decoder with ID3TAG ability• Want to run it off 3.3V• Want a MP3 Decoder that is simple to

interface with

Page 8: Exploding Alarm Clock

ROHM BU9438KV

• Is a AAC, WMA, and MP3 Decoder IC which contains USB host and SD card input function

• Has built-in audio DAC • Has sound effect function• Pin controllable• File name and folder name sorting for FAT

filesystems• ID3TAG, WMATAG, • AACTAG compatible• KEY matrix Controller

contained

Page 9: Exploding Alarm Clock

What happened?

• Plan was to use the Rohm MP3 decoder• Issues getting it to work• Talked to other SD groups using it• Communicated with company• Didn’t work out• Our next option, due to timing constraints

was the Somo 14-D.

Page 10: Exploding Alarm Clock

Somo 14-D

• .ad4 decoder• Outputs is 4bit mono• Uses an amplifier for proper

sound output• Runs on 2.7-3.6V (3.3 V)• Has mirco-SD slot built into it, so

no additional circuitry is needed• Simple interface• Has pushbutton and serial

interface• And then that didn’t work

(starting yesterday)

Page 11: Exploding Alarm Clock

Sandisk Sansa M240

• 1 GB• Plays MP3 files• Loaded via USB• Parts were scavenged out of it and

connected to the MCU

Page 12: Exploding Alarm Clock

Data Reading

USB• Part of MP3 system • Slot in alarm clock for MP3

cord

SD cards were originally planned to be implemented by current decoder does not support it

Page 13: Exploding Alarm Clock

Button Control

• Buttons are connected to the MCU (as opposed to the MP3 converter)

• The buttons send the necessary signals to the Sansa

• The Buttons are also used for the setting of the clock and alarm

Page 14: Exploding Alarm Clock

Alarm Clock Overview

• Software driven through built-in interrupts

• The built-in Real Time Clock uses external oscillator 32.768MHz to give accurate time

• Special assembly command to allow the oscillator to be used

for calculating the time

Page 15: Exploding Alarm Clock

Setting the Alarm Clock

• Setting the time and the alarm is done through exterior push buttons that are processed by the MCU

• These signals are processed by the MCU changing the time keeping registers

• The time registers are updated automatically, but the LCD screen needs to be continually updated

Page 16: Exploding Alarm Clock

Alarm Clock Interrupt

• The interrupt is handled by the built-in RTCC interrupt of the MCU

• Software allows the process of the interrupt to be programmed

• The interrupt enacts the launch sequence and plays the alarm sound

• A second interrupt is used to detect the reattachment of the speaker

Page 17: Exploding Alarm Clock

Alarm Clock Interrupt

Page 18: Exploding Alarm Clock

Software Flowchart

Page 19: Exploding Alarm Clock

Housing

• Decided on Starboard• Was easily accessible• Knew someone who was experienced

with using it• Spaces for LCD,

Buttons and Launcher

Page 20: Exploding Alarm Clock

Launching System: Overview

• The launching system is a combination of USB, a spring, and a solenoid.

• The solenoid is activated when the alarm goes off, releasing the platform. When the spring elongates, the speaker is launched. When the user goes to reattach the speaker, they reattach it to the platform via USB.

Page 21: Exploding Alarm Clock

Launching System: Solenoid

• Requires 12 V and 120mA.

• Pull Type: When activated, the solenoid will “pull in”.

• The solenoid is attached to a small wedge. The wedge is what is holds down the launching platform. When the solenoid activates, the wedge gets pulled in. This leaves nothing to keep the spring in place.

Page 22: Exploding Alarm Clock

Launching System: Spring

• Have had some bad experiences with springs so far. Either they’re not in stock, or we didn’t account for the load required to compress them or they were too thin

• One spring• Uncompressed Length= 8 cm = 3.15 inches• Compressed Length= .75 inches• Rate=3, meaning 3lbs of force required per

inch of compression.• 3.15-.75=2.4 inches. • 2.4 inches * 3 lbs/in= 7.2lbs of force required to

fully compress it

Page 23: Exploding Alarm Clock

Launching System: Platform

• Made out of Starboard, like the rest of the housing

• Spring is attached to the platform• Hole is drilled into platform to allow a

male USB cord to protrude• USB cord is “fixed” so that while it still

connects to send data, it is loose enough that it doesn’t snag while the speaker launches

Page 24: Exploding Alarm Clock

Display

• There are two main types of clock displays– Analog

– Digital

• Chose digital because it is easy to read and allows the displaying of all types of information

Page 25: Exploding Alarm Clock

Display Requirements

• Needed a display the was bright enough to read in a dark room

• Needed a relatively large screen area for easy visibility

• Needed multiple lines to display information for media tracks

• Needed to be easy to interface with our microcontroller and to display information on.

Page 26: Exploding Alarm Clock

SC2004

• We chose the SC2004 by Silicon Craft

• Features:– 4x16 Liquid Crystal Display– Powered by a standard 9 to 12V DC power

supply– All the instructions are preset to hex values– Has the ability to display 4 large numbers

Page 27: Exploding Alarm Clock

What happened?

• Screen was set up and initially working• During testing for logic level translation it

broke• Needed a new one fast

Page 28: Exploding Alarm Clock

Serial Enabled 16x2 Display

• Serial (UART)• Runs on 3.3V• 9600 bps• Backpack for easier

interfacing

Page 29: Exploding Alarm Clock

Bluetooth

• Chose bluetooth as means of connecting speaker to base for audio.

• Reason for choosing:– Good distance so the speaker can be

placed where ever you like when you are using the clock as an media player

– Mature technology with an established user base

Page 30: Exploding Alarm Clock

Bluetooth Module

• Chose to use the WT32 Bluetooth Audio Module by Bluegiga

• WT32 Features– 30 Meter Range– Intergrated DSP, Stereo

Codec, and Battery Charger

– Integrated antenna– “Plug n’ Play” Bluetooth solution

• Very simple interface just provide power and ground and its ready go.

Page 31: Exploding Alarm Clock

Speakers

• Chose to use pre-made speakers instead of designing our own

• Wanted to use a speaker that was simple and light since we needed to be able to launch it when the clock explodes.

• Wanted speakers that had a built in battery and easy interface with other devices.

Page 32: Exploding Alarm Clock

iHome iHM79

• Chose the iHome iHM79

• Key Features– Small Size– Robust Sound

– Simple USB interface

– Built in rechargeable battery

Page 33: Exploding Alarm Clock

iHome iHM79 Specs

• Weight– 1.92 Oz

• Dimensions (H X W X D)– (1.42 X 2.09 X 2.09

in)• LED Indicator Light

– Blue - ON– Orange - Charging

• Uses a single mini USB port for data and power

• Built in Lithium Ion Battery

• Speaker will be inclosed in 1/2 protection

– Nerf Ball

Page 34: Exploding Alarm Clock

Speaker Interfacing

• For connecting the speaker wirelessly, one module is set in source mode and one in sink

• The source takes in analog audio input• Sink outputs the audio to the speaker• Sink is powered by its own battery• When powered up the Bluetooth modules

automatically pair with each other and are ready to stream music

Page 35: Exploding Alarm Clock

Power

• Clock is poweredfrom a 9V DC powersupply

• Using a LM317 voltagewe created a DCadjustable power supply

• This provides the 3.3 volts for MCU, MP3 Decoder and Bluetooth Module

Page 36: Exploding Alarm Clock

User Flowchart

Page 37: Exploding Alarm Clock

Planned Milestone

January 2/2

February 1/2

February 2/2

March 1/2

March 2/2

April 1/2

April 2/2

Parts Acquisition

Circuit Design

Building

Software

Testing

Final Documentation

Page 38: Exploding Alarm Clock

Budget

$832.49Total

$0.571$0.57Phoenix EnterprisesPhoenix EnterprisesHWS10492USB Connector

$9.902$4.95Allelectronics.comPC USB AA CableUSB Cables

$49.951$49.95Apple IncApple Inc.iHome iHM79Speakers

$3.951$3.95SparkFun ElectronicsSparkFun ElectronicsPRT-00136SD Socket

$1.951$1.95SparkFun ElectronicsSparkFun ElectronicsCOM-08963Push Button PCB

$8.4511$0.77SparkFun ElectronicsSparkFun ElectronicsCOM-00097,COM-08996Push Button

$34.581$34.58MicrochipMicrochipPickit3Programmer

$71.431$71.43VariousVariousVarious PartsPower Supply

$30.501$30.50Digi-KeyRohm SemiconductorBU9438KVMP3 Decoder

$225.911$225.91VariousVariousShipping, etc.Miscellaneous

$18.423$6.14MicrochipMicrochipPIC24FJ256GA106Microcontroller

$2.981$2.98SkycraftGuardian ElectricSolenoidLauncher

$16.001$16.00McMasterCarrMcMasterCarrSpringLauncher

$5.001$5.00TargetNerfNerfFootball

$25.001$25.00SparkFun ElectronicsSparkfun ElectronicsSerial LCDDisplay

$141.901$141.90MicrochipMicrochipExplorer 16Demo Board

$4.001$4.00All Spectrum ElectronicsCitizenCFS206Crystal Oscillator

$132.003$44.00Semiconductorstore.comBluegigaWT32 Bluetooth® Audio ModuleBluetooth

$50.001$50.00SparkFun ElectronicsSomo14-DAd4 decoder

CostQuanityPriceVenderManufacturerPartFunction

Final Budget

Page 39: Exploding Alarm Clock

Percentage Done

100 100 100 100

0102030405060708090

100

R&D Parts Software Testing

% Done

Still to do:Finish Documentation

Page 40: Exploding Alarm Clock

Assistance

• Charles Lord, engineer at Siemens• QMS• Geoff Huston, student at UCF• Nathan, student at UCF• James Baughman, carpenter

Page 41: Exploding Alarm Clock

Questions?