Get Up Stay Up

Download Report

Transcript Get Up Stay Up

Get Up Stand Up
GuSu
Group 5
Summer 09
Andrew Leger
Joshua Rust
Matthew O’Morrow
Philip Bell
Problem
• Can’t
always wake up on time
• Most
alarms are more “annoying”
than waking
• Almost
all alarms allow the user to
go back to bed
Solution
•
Wake the user on time
•
Wake the user “gently”
•
•
Flexible and robust alarm clock allowing many
options in both timing and method of waking
the user
Make sure the user is awake
•
Detect user’s presence in bed and do not allow
snooze or off option during their waking time
Objectives
•
Timing
•
•
•
•
Internal clock
Flexibility
•
Full user control over “what” and “when”
•
Seven day alarm time programmability
Options
•
FM tuner integration
•
MP3 audio integration via SD card slot
•
Tone buzzers
User detection
•
Sensing system for detecting when user is in bed
Objectives
•
For thirty minutes after alarm time, if a user is detected by
the sensor system, the alarm will perform user chosen
actions and silence itself anytime no user is detected
•
The coffee maker will have local on/off control and will be
remotely controllable by the alarm clock
•
The alarm clock shall have a battery backup to prevent both
clock time loss due to power outage and snoozing by
unplugging
•
Power usage will be designed around efficiency
Specifications
•
System will not exceed 12”L x 9”W x 5”H
•
It will display time and date in U.S. standard format
(HH:MM) using LCD screen
•
Battery backup will last through 8 hours or at least 4 hours
(average power outage duration)
•
PIR sensors will have 15 feet of wire for flexible placement
•
Wireless integration will have a minimum range of 100 feet
System Overview
Philip
Matt - Philip
Josh
Josh
Andrew
Andrew- Matt
Josh
External Enclosure
Case Design
Chosen material: Wood
Top: Pushbuttons
Front: LCD and Speaker
Back: Power cable,FM tuning
knob, and SD Card slot
Side: FM tuning knob
9”
12”
5”
Microcontroller
Microcontroller Requirements
• Handles all communication and control
between external devices
• Must support USART, SPI, and I2C,
ADC
• Five push buttons, XBee, MP3 decoder,
FM Tuner, SD card
• Enough memory for system logic, device
interfacing and capable of implementing a
FAT16 file system (~14 KB)
ATmega644P Specifications
The ATmega644P is a 40 pin
Advanced RISC Architecture
microprocessor:
• 64 KB Flash memory
• 20 MIPS at 20 MHz
• 8 bit ADC
• Two UART ports
• SPI ports
• I2C port
• Adequate amount of digital I/O
pins for possible expansion of
functionality
Alarm Implementation
Block Diagram
Audio Amplifier
MP3
Decoder
Multiplexer
FM Tuner
Speaker
Microcontroller
Buzzer
SD Card
Reader
•A multiplexer (HI3-0509-5) will be controlled via the microcontroller to
determine which audio device will be powered and passed to the speaker
•A common LM1458 Op-Amp will be used to amplify the audio, controlled
with a digital potentiometer using I2C (AD5171)
Buzzers
•Two buzzers will be used, the CPE-503 and the WST1205S
•The CPE-503 will be controlled with ramping voltage to
slowly grow louder up to a maximum output of about 70
dB
•The WST-1205S will be turned on using 5V and has a
set output of about 85dB, which is just under damaging
sound levels from prolonged exposure
FM Tuner
•TDA7000 chip chosen for
implementation on a PCB
without special processing
hardware
•Tuning controlled via
variable inductor and
potentiometer, which will be
part of the housing and
connect to the PCB with
leads for user tuning
SD Card Reader
•SD Card will be used for playing MP3 files using
the FAT16 file system
•Socket will be externally accessible
•Interface to the microcontroller will be SPI with
only the option to read data
MP3 Decoder
•STA013 chip used to decode data from SD Card
through microcontroller SPI interface to speaker output
•When ready to receive data the STA013 sends a high
signal to the microcontroller, simplifying implementation
•I2C data interface used for control
•It can determine sampling frequency up to 48 KHz and
MP3 input rate of 320Kbit/sec, again simplifying
implementation work required
User Interface
Physical user interface
•
Five pushbuttons
•
Up, Down, Left, Right,
Center
•
Used to navigate menus
during setting
•
Used for audio controls
while running and not within
alarm time span
Liquid Crystal Display
• uOLED-160-G1
(Organic Light Emitting Diode)
• Resolution:
160x128 pixels with 256/65K true color.
Width: 1.81 in, Height: 1.26 in
• Chosen
for 5 pin UART interface and full graphical
display ability
Graphical user interface
Running Display
•
Current time
•
Day of the week
•
Next alarm time
•
Selected action and their order
Setting Display
•
What options can be changed
under current menu
• Current setting
• Highlight current selected
setting for changing
Sensor system
Sensor system
Hypothetical Implementation
Sensor system
•
Wall/Ceiling mounted
PIR sensor
•
Wooden housing protects
sensor and wires
•
Aimed at bed
•
•
Wired directly for analog
reading by GuSu system
Allows for painting to
match surroundings or
“decorative” style
•
Helps narrow sensing
range to prevent
detection of warm bodies
outside of bedding area
Wireless Integration
Wireless Integration
Coffee Machine
The coffee machine will be an off the shelf coffee
machine which can be controlled locally or
remotely by the alarm clock. The user can choose
to enable the coffee machine start time with alarm
time.
Xbee Series 1 Module
• Complete System on Chip module
• Provides wireless serial interface
• Zigbee Compliant
• AES 128 Bit encryption
• Out of the box solution for enabling wireless
communication between devices
Clock
Real Time Clock- DS-1307
• Using an external clock will prevent timing issues in
program execution.
• Communicates with microcontroller over I2C interface
• Stores HH:MM:SS and DD/MM/YYYY
• Microcontroller pushes the next alarm time to the clock
which in turn sends an interrupt back at alarm time
Power Supply
Power Supply
Battery
Back-up
AC Wall
Outlet
12V Wall Wart
SD Card
Reader
5V Voltage
Regulator
3.3V Step-Down
Mp3
Decoder
Microcontroller
FM Tuner
Buzzer
LCD Screen
Clock/Timer
Zigbee
Op-Amp
-12V Battery
PIR Sensor
•A 5V and 3.3V DC power supply is required. Also,
+12V and -12V is required to bias the Op-Amp
•A Power LED and battery replacement LED indicate
status
Device Requirements
Device
Microcontroller
FM Tuner
LCD Screen
PIR Sensor
Buzzers
Mp3 Decoder
SD Card Reader
Clock/Timer
ZIGBEE
Op-Amp
Multiplexer
Totals
Voltage Req. (DC)
Current Req. (Active)
2V – 5V
4.5V – 5V
4V – 6V
3V – 5V
4V - 6V
2.4V – 3.6V
3V
2V - 5.5V
2.1V – 3.6V
+12V and -12V
+12V and -12V
<10 mA
8mA
10-115 mA (typ. 40)
<100uA
30 mA
<30 mA
20 mA
2 mA
40 mA
5 mA
3 mA
2.4-3.6, 4-5, -12, 12
250 mA max
Main power supply is a wall wart that provides
12V DC, and allows for 1A of current
Backup Battery
•8 AA batteries in series will serve
as the backup battery
•These provide the most costefficient implementation, and are
easily replaceable for the user
•AA batteries store roughly 2800
mA*h of charge, so this would
provide roughly 12 hours of
supply to the clock, assuming
every device was active
Schematics
1. A common 12V wall wart will be used to
provide the power
2. The backup battery (12V) will only
activate when there are power outages,
and the LED will only turn on if the
battery is failing
3. LM7805 voltage regulator used as stepdown, with an LED for visible
confirmation of “power on”
4. DE-SWADJ is a variable voltage
regulator with built-in capacitances. It
will be used to step-down to 3.3V
5. The Op-Amp will be biased with the
+12V source and a 12V battery
Software
Software
•
Creation
Design
•
Software Engineers
•
Control all devices and
hardware connected to
microcontroller
•
Be complex enough to simplify
user controls and implement the
planned graphical user interface
•
Total code size must not exceed
64KB
•
•
Josh Rust
•
Philip Bell
Programming Languages
•
•
Arduino/C++
Development Environment
•
Arduino 0015
Software
•
Implementation
•
Global variables for all
user settings
Two “Main” functions
RunMode and SetMode
invoke all other functions
and decide behavior based
on user interaction
•
Current State
Printed Circuit Board
•Current Finalized Design
•Filled Ground plane
•Created with ExpressPCB
in conjunction with
ExpressSCH
Current challenges
•
Another microcontroller may be necessary to control MP3
decoder
•
Final software design for tree menu navigation
implementation
•
Completion of base requirements in time to make productive
attempts at “extra” features
•
Complete unit testing of software will be complex
Project Budget
Components
Total Cost
Components
Total Cost
uOLED-160-G1 LCD
Display
$79.99 (1)
Infrared Induction
Control
$2.70 (3)
Amtel ATmega644-20PU
$7.87 (1)
LP8072 PIR Sensor
$1.80 (3)
Sanguino Dev Kit
$25.00 (1)
M7612 PIR Controller
$2.70 (3)
Xbee Modules
$46.00 (2)
STA013 MP3 Decoder
$13.80 (2)
Coffee Machine
$20.00 (1)
28 Pin SOIC Adapater
$1.60 (2)
Housing/Case Supplies
$25.00 (1)
LM7805 5V Regulator
$0.51 (1)
SD Card/SD Card Socket
$8.45 (1)
DE-SWADJ 3.3V
Regulator
$15.00 (1)
DS1305 Clock Timer
$5.06 (1)
WST-1205S Buzzer
$1.81 (1)
TDA7000 FM Tuner
$7.00 (1)
LM1458 Op-Amp
$0.50 (1)
Passive Infrared Sensor
$3.80 (2)
EAS-4P15SA Speaker
$4.32 (1)
Directional Infrared
Sensor
$3.80 (2)
TS5A23159DGSR MUX
$0.81 (1)
Fresnel Lens
$1.75 (5)
Printed Circuit Board
$80.00 (1)
PIR Sensor Module
$7.40 (1)
Miscellaneous
$25.00 (1)
Total: $391.67
Project milestones
Project Progress
Work Distribution
Andrew
•
•
•
•
•
Power Supply
Battery Backup
FM implementation
PCB Design
Audio Output
•
•
•
•
Wireless Xbee Implementation
Software Libraries
External Enclosure Design
Clock Implementation
Philip
Matt
•
•
•
Josh
LCD Implementation
MP3 Implementation
Project Website
•
•
•
•
Physical User Interface
Graphical User Interface
Behavior/Control Software
Sensor System
Special Thanks
Michael Angell ~ UCF B.S.M.E.
•
•
External enclosure schematics for Solid Works
Construction of external enclosure
Questions?