Upload
duongtruc
View
216
Download
2
Embed Size (px)
Citation preview
The Digital DoormanThe Digital Doorman
ECE 511, Group 5
Jeremy TrimbleRussell LovellRussell Lovell
Douglass GliddenMahmoud El Ali
The Digital Doorman
• Allows user to unlock a door with a
Never again be locked out of your home!
• Allows user to unlock a door with a special "knock rhythm."• Keeps door locked otherwise.
• System is invisible from the outside.• Alerts after three failed entry attempts. • User programmable knock pattern
• Echoes knock pattern after programming
• Inside:o Microphone detects knockso Solenoid deadbolt secures door
Block Diagram
Wall WartWart
SchematicPower Regulation
Signal Conditioning
Output
Test Platform
PCB Layout Fit Check
Printed Circuit Board
Final Design
Final Design
Firmware (Timers)
• Written in C• Timer A0• Timer A0
• delay_microseconds(unsigned int duration_usec)– Block code execution for input duration
• delay_milliseconds(unsigned int duration_milliseconds)– Calls above function repeatedly if necessary
• Watchdog timer• Interval mode
– Used for the delayed alarm– Used for the delayed alarm– Used to reset recognition after a period of silence
Firmware (Detection)
• Detection algorithmo Receives ADC interrupts with microphone voltage o Receives ADC interrupts with microphone voltage
samples at a constant frequency (based on the ADC clock)
o Determines when an actual knock has occurredo Compares against threshold
o Knock de-bounce is implemented in softwareo Notifies recognition algorithm of each knock and its timingo Notifies recognition algorithm of each knock and its timing
o Between ADC samples the microcontroller goes into low power mode 0o CPU is disabledo Clocks are enabled
Firmware (Recognition)
• Recognition algorithmo Determines if each detected knock matches the knock
pattern, within tolerance (Delta)pattern, within tolerance (Delta)o Provides feedback outputs
o Pattern Acceptance: Door unlocks, happy sound playso Pattern Denial: Red LED lights, Alarm sounds after three failures
o Provides lock control outputs
o Tempo independence o Measure the time between the first two knocks and compute a
fixed-point scaling factor which we apply to subsequent knocks
Firmware (Pattern Learning)
• Learning Mode• External toggle switch places microcontroller in a “learning mode”• External toggle switch places microcontroller in a “learning mode”
– Used edge triggered port interrupts to detect switch – #include “skynet.h”
• Knock pattern can consist of up to 64 knocks– Allows creation of very complex patterns.
• Buzzer plays programmed knock pattern when exiting programming mode.– Allows user to confirm intended pattern
Firmware (Diagnostics/Outputs)• Back Channel UART
• Implemented in software• 9600 8-N-1 • Outputs status and debugging information to virtual COM port• Outputs status and debugging information to virtual COM port• bc_printf();
– Prints text and simple integers (decimal or hex)• bc_getchar();
– Allows reception of characters from attached PC (unused, but works)
• Buzzer• Interfaced to GPIO• Implemented in software• Implemented in software
– Run_buzzer()» Specify the half-period in microseconds» Specify the duration in half-periods» Toggles the output once per half-period» Utilizes delay functions
Software Development
• Subversion.• Is a revision control system used to maintain current and
historical versions of Digital Doorman source code.historical versions of Digital Doorman source code.• Kept a track record of versions and bugs.• Current revision is #83• 1158 lines
• Google's Repository and file sharing.• http://code.google.com/p/ece511-fall2011-group5/
• Divided project into tasks and assigned them to members.• Determined issues and assigned them to members.
– 14 issues/enhancements defined in the tracker (all resolved)
Questions?
Demonstration