home security and lighting system western washington university jonathon ross 28 april, 2009
TRANSCRIPT
![Page 1: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/1.jpg)
Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009
![Page 2: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/2.jpg)
MCU – MC9S12DP512 MCU Bus Frequency
• 25MHz Memory Requirements
• 3kB Ram• 10kB Rom
Kernel Choice • MicroC/OS-II
![Page 3: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/3.jpg)
Start Task Light Sense Task User Interface Task Light Adjust Task Motion Sensor Task Alarm Task
![Page 4: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/4.jpg)
Description• Creates tasks and displays startup
message.• Task Priority - #4 • Task Period - Once (Startup)• Estimated Task Execution Time - ~1s• Task CPU load - Not Applicable
![Page 5: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/5.jpg)
Description• Senses and adjusts light according to a
predetermined level set by the user.• Task Priority - #5 • Task Period - 10ms (Periodic)• Estimated Task Execution Time - 1ms• Task CPU load
Average - .5/10 = .05 Peak - 1/10 = .1
![Page 6: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/6.jpg)
Description• Interfaces between user and product as well
as controls states and other tasks• Task Priority - #6 • Task Period - 10ms (Periodic) • Estimated Task Execution Time - .1ms• Task CPU load
Average - .05/10 = .005 Peak - .1/10 = .01
![Page 7: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/7.jpg)
Description• Allows user to adjust the lighting level with
a 4 button array. Options available - on, off, up, down
• Task Priority - #7 • Task Period - 10ms (Periodic)• Estimated Task Execution Time - .25ms• Task CPU load
Average - .1/10 = .01 Peak - .25/10 = .025
![Page 8: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/8.jpg)
Description• Senses outside motion and activates a light
when movement is detected outside the front door.
• Task Priority - #8 • Task Period - 20ms (Periodic)• Estimated Task Execution Time - 1.5ms• Task CPU load
Average - 1/20 = .05 Peak - 1.5/20 = .075
![Page 9: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/9.jpg)
Description• Detects open windows and doors and
activates an alarm when necessary.• Task Priority - #9 • Task Period - 50ms (Periodic)• Estimated Task Execution Time - .1ms• Task CPU load
Average - .05/50 = .001 Peak - .1/50 = .002
![Page 10: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/10.jpg)
L max= (10%) + (1%) + (2.5%) + (7.5%) + (.2%)
L max= 21.2%
L average = (5%) + (.5%) + (1%) + (5%) + (.1%)
L average = 11.6%
![Page 11: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/11.jpg)
![Page 12: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/12.jpg)
Keypad I/O
Key.c()
KeyCodeTableKey
KeyFlag
Keypad ModuleApplication
KeyPend()UserInterfaceTask
LightAdjust()
StartTask()KeyInit()
KeyPend()
![Page 13: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/13.jpg)
LCD I/O
Lcd.c()
LCD ModuleApplication
UserInterfaceTask()
LightAdjustTask()
StartTask()Lcd_init()
LcdClrDisp()LcdMoveCursor()LcdCursor()LcdBackspace()LcdForwardSpace()LcdDispChar()LcdDispDecNum()putstrg()
![Page 14: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/14.jpg)
LightSensor
Application
LightSenseTask()TRIAC/Bulbs
LightSensor I/OLight Bulbs/Output
LightAdjustTask()
Level
Level.flag
![Page 15: Home Security and Lighting System Western Washington University Jonathon Ross 28 April, 2009](https://reader035.vdocument.in/reader035/viewer/2022062519/5697c0211a28abf838cd3013/html5/thumbnails/15.jpg)
Alarm 1Alarm 2Alarm 3Alarm 4Alarm 5
Application
AlarmTask()Buzzer
Alarm Groups I/OAlarm
MotionSensorTask()TRIAC
Light
Motion Sensor
Motion Sensor I/O