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 USB media slot
•
Tone buzzers
User detection
•
Sensing system for detecting when user is in bed
Objectives
•
For the alarm time span set by the user, if they are detected
by the sensor system, the alarm performs user chosen
actions and silences itself anytime there is no user
detected
•
The appliance module will use local on/off control and is
remotely controllable by the alarm clock
•
The alarm clock has a battery backup to prevent both clock
time loss due to power outage and snoozing by unplugging
•
Power usage is designed around efficiency
Specifications
•
System does not exceed 12”L x 9”W x 5”H
•
It displays time and date in U.S. standard format (HH:MM)
using OLED screen
•
Battery backup lasts through 8 hours
•
(4 hours is an average power outage)
•
Pressure sensors have 12 feet of wire for flexible placement
•
Wireless integration has a minimum range of 100 feet
System Overview
External Enclosure
Case Design
Chosen material: Wood
Top: Pushbuttons
Front: OLED and Speaker
Back: Power cable, and USB
media 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, USB thumb drive
• Enough memory for system logic and
device interfacing
• Low power
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
FM Tuner
External
Audio Jack
MP3
Decoder
Audio Amplifier
Speaker
Microcontroller
Buzzer
•FM Tuner and Buzzers are powered on through the microcontroller
only when in use.
•The MP3 audio is sent to an audio jack for external speakers.
•A common LM1458 Op-Amp is used to amplify the FM audio before
passing it to the internal speaker, and is controlled with an analog
potentiometer.
Buzzers
•Two buzzers are used, the CPE-503 and the WST1205S
•The WST-1205S is turned on using 5V and has a set
output of about 85dB, which is the softer buzzer.
•The CPE-503 has an audio output of 95dB, and is also
controlled with a 5V line from the microcontroller. 95 dB
is the loudest noise that should be used without the risk
of causing hearing damage over extended periods of
time.
FM Tuner
•TDA7000 chip chosen for
easy implementation on a
PCB
•Tuning is voltage controlled,
which is changed via a
variable inductor and
potentiometer, which is part
of the housing and connect
to the PCB with leads for
user tuning
USB Flash Drive Reader
•USB Flash Drive is used to play MP3 files using
the FAT16 file system on the VMusic2 module
•Socket will be externally accessible
•Interface to the microcontroller is Serial uART
MP3 Decoder
•VS1003 chip used to decode data from USB Host
Controller via SPI interface, subsequently sending data
to microcontroller and then to speaker output
•The data request pin is set high when the VS1003 is
capable of receiving data
•Plays different audio formats: MP3, WMA, and MIDI
•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
OLED 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
Pulsor Pressure Sensor
•
Pulsor is a motion / presence
detection device that responds to
the physical flexing of the material
on which it is mounted.
•
The flexing of the material varies
the resistance of the sensor
connected as R2 in a voltage
divider network
•
The voltage is measure in an ADC
converter to determine if the user
is in the bed.
Wireless Integration
Wireless Integration
The appliance module is capable of controlling any
appliance with a max of 20 amps. It has a
indicator light for current status and a push button
for local status control. The user can also choose
to enable the appliance module start time with
alarm time.
Xbee Series 2 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
• Highly accurate with support for daylight savings and
leap years
Power Supply
Power Supply
Battery
Back-up
AC Wall
Outlet
12V Wall Wart
5V Voltage
Regulator
Microcontroller
3.3V Step-Down
Zigbee
FM Tuner
Buzzers
OLED Screen
Clock/Timer
Pressure Sensor
USB/MP3
Op-Amp
-12V Line
•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
Voltage Req. (DC)
Microcontroller
FM Tuner
OLED Screen
Pressure Sensor
Buzzers
VMusic2
Clock/Timer
ZIGBEE
Op-Amp
Totals
2V – 5V
4.5V – 5V
4V – 6V
3V – 5V
4V – 6V
4V – 6V
2V – 5.5V
2.1V – 3.6V
+12V and -12V
2.4-3.6, 4-5, -12, 12
Current Req. (Active)
<10 mA
8mA
10-115 mA (typ. 40)
<100uA
30 mA
<90 mA
2 mA
40 mA
5 mA
260 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 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, and during
testing, supplied over 20 hours of
power to the device.
Schematics
1. A common 12V wall wart is used to
provide the power
2. The backup battery (12V) only activates
when there are power outages, and the
LED will only turn on if the battery is
failing
3. LM7805 voltage regulator is used as
step-down, with an LED for visible
confirmation of “power on”
4. LM11171 voltage regulator is used to
step the 5V line down to 3.3V for the
Zigbee
5. The Op-Amp is biased with the +12V
source and a -12V line from a DC/DC
converter (NKA1212SC from Murata
Power Solutions)
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
•
Available RAM is only 2 KB
•
•
Josh Rust
•
Philip Bell
Programming Languages
•
•
Arduino/C++
Development Environment
•
Arduino 0016
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
•
Printed Circuit Board
•Current Finalized Design
•Filled Ground plane
•Created with ExpressPCB
in conjunction with
ExpressSCH
Project Budget
Components
Total Cost
Components
Total Cost
uOLED-160-G1 Display
$159.98 (2)
Infrared Induction
Control
$2.70 (3)
Atmel ATmega644-20PU
$7.87 (1)
Amtel ATmega168
$10.00 (2)
Sanguino Dev Kit
$25.00 (1)
LP8072 PIR Sensor
$1.80 (3)
M7612 PIR Controller
$2.70 (3)
STA013 MP3 Decoder
$13.80 (2)
28 Pin SOIC Adapater
$1.60 (2)
LM7805 5V Regulator
$0.51 (1)
$15.00 (1)
Xbee Modules
Atmel ATmega168
Housing/Case Supplies
$46.00 (2)
$4.00 (1)
$25.00 (1)
MP3/USB reader
$58.00 (2)
DS1307 Clock Timer
$5.06 (1)
TDA7000 FM Tuner
$7.00 (1)
DE-SWADJ 3.3V
Regulator
PressureSensor
$29.00 (2)
WST-1205S Buzzer
$1.81 (1)
Directional Infrared
Sensor
$3.80 (2)
LM1458 Op-Amp
$0.50 (1)
Fresnel Lens
$1.75 (5)
EAS-4P15SA Speaker
$4.32 (1)
PIR Sensor Module
$7.40 (1)
TS5A23159DGSR MUX
$0.81 (1)
SD Card and socket
$22.95 (1)
Printed Circuit Board
$105.00 (2)
Logitech Speakers
$30.00 (1)
Miscellaneous
$50.00 (1)
Total: $643.36
Project milestones
Project Difficulties
•
Audio amplification with DC voltage and digital
potentiometer
•
Powering MP3 device through a relay
•
Insufficient amount of memory on ATmega644P for menu
system, minimization of code was performed.
•
SD Card communication over SPI
Project Difficulties
•
Implementation of a software serial system
•
Timing over an I2C connection
•
Keeping the complex menu system intuitive and easy to use
•
Integrating and testing with the Pulsor Pressure Sensor
Work Distribution
Andrew
•
•
•
•
•
Power Supply
Battery Backup
FM Implementation
PCB Design
Audio Output
•
•
•
•
Wireless Xbee Implementation
Software/Hardware Libraries
External Enclosure Design
Clock Implementation
Philip
Matt
•
•
•
Josh
OLED 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
Dr. Samuel Richie - Undergraduate Program Coordinator of EE/CpE
•
Supporting the project
Questions?
Comments?
Improvements?