Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Introduction You are tasked to use an M5Stack Fire module to implement an intelligent home automation system for an apartment. The required automation features

1. Introduction You are tasked to use an M5Stack Fire module to implement an intelligent home automation system for an apartment. The required automation features are: (a) Automated Environment Control for a Living Room based on humidity, ambient temperature, and ambient light intensity. Light, Exhaust Fan and Air-Conditioner are automatically controlled (ON/OFF) when a tenant is present/absent in an apartments Living Room. (b) Television Usage Supervisor that are used to limit the television usage duration and to enforce safe viewing distance for young children. (c) User Interface.

The suggested MCU hardware, sensors and actuators are: 1. M5Stack Fire 2. Pa.HUB Unit 3. Pb.HUB Unit 4. HUB Unit 5. ToF Unit 6. ENV.II Unit 7. PIR Unit (Optional) 8. LIGHT Unit 9. Dual-BUTTON Unit 10. TSA Module 11. RGB Unit 12. 4RELAY Unit

2. Design Specifications 2.1 Automated Environment Controller An apartments Living Room is fitted with LED lamps, an exhaust fan, and an air-conditioner to ensure certain level of comfort for the tenants. You observed: a) Living Room can become quite hot and humid during certain time of the day due to direct sunlight heating the room walls. The exhaust fan helps to reduce the rooms temperature and humidity when it is switched ON to vent away the trapped hot air. This will help to speed-up the air-conditioners cooling process when it is switched ON. b) Tenant using the living room has the habit of turning on both lamps and air-conditioner even though the rooms ambient lighting is adequate, and the ambient temperature is low. This inappropriate habit contributes to electrical power wastage. You are tasked to design an Automated Environment Controller (AEC) for a Living Room to minimize electrical power wastage by automatic control of lamps, exhaust fan and air-conditioner usages. AEC contains the following input modules: (a) Thermopile Sensors (TSA) Array module measures human body temperature, (b) Light Intensity sensor measures brightness, and (c) Temperature and Humidity sensor measures ambient temperature and humidity level. AEC determines a tenant presence/absence in the living room by using a TSA to measure the human body temperature within its field of view. TSA can be used to determine if a tenant is present (32 C) in the living room or absent (<32 C). Relays are used as output modules for controlling LED lamps (Relay 1), exhaust fan (Relay 2), and air-conditioner (Relay 3). Operational Logics of AEC: 1. Upon AEC powering up, LED Lamps (LIGHT) and Air-Conditioner (ACON) are switched OFF. Exhaust Fan (EFAN) is switched ON when rooms Temperature or Humidity is above the threshold. Otherwise it is switched OFF. 2. Default Humidity Threshold is set at 60%, default Intensity Threshold is set at 160, default Ambient Temperature Threshold is set at 28 C, and default Human Body Temperature Threshold is set at 32 C. Threshold values can be changed by the tenant. 3. When a tenant is detected, EFAN is switched OFF without the need to check for rooms Humidity level or Temperature. For a detected tenant: a. AEC checks for rooms ambient light intensity: If Intensity Intensity Threshold, LIGHT is switched OFF. If Intensity < Intensity Threshold, LIGHT is switched ON. b. AEC checks for rooms ambient temperature: If Temperature Temperature Threshold, ACON is switched ON. If Temperature < Temperature Threshold, ACON is switched OFF. 4. When no tenant is detected, LIGHT and ACON are switched OFF after 60 seconds. In the event a tenant is detected before the 60 seconds timeout, Step 3 is repeated. EFAN ON/OFF control is dependent on rooms Temperature or Humidity level after the 60 seconds timeout. 2.2 Television Usage Supervisor You are tasked to modify the living rooms existing television in-order to implement a Television Usage Supervisor (TUS) that includes: (a) a Usage Duration Timer (UDT), and (b) a Viewing Distance Monitor (VDM). These two monitoring functions are used to limit the television usage duration and to enforce safe viewing distance for young children. 3-hours per day UDT is activated and starts counting down once television is switched ON. UDT halts counting down when television is switched OFF, and countdown continues from the last known timer value when television is again switched ON. When UDT is 0, TUS emits an audible warning alert (Speaker beeps at 100ms interval) for 20 seconds and switched television OFF. Once UDT is 0, television cannot be switched ON until the next new day where the UDT resets and reinitialises its 3-hour usage duration. This 3-hour usage duration can be modified by an adult user. VDM is activated when television is switched ON. TUS is silenced (does nothing) when VDM detects a child at a safe distance 2m from television screen. TUS emits an audible reminder alert (Speaker beeps at 800ms interval) when VDM detects a child at a distance 1.5m and < 2m from the television screen. TUS emits an audible warning alert (Speaker beeps at 200ms interval) and starts a 180 seconds TV Power-off Timer (OFF_TMR) when VDM detects a child at a distance < 1.5m. TUS disables the alert and OFF_TMR when VDM detects the child moves further away to a safe distance 2m away. In the event OFF_TMR expires, TUS disables the alert and switches OFF the television. Once powered-off, television can only be switched ON when VDM detects the child moves to a safe distance 2m away (and UDT > 0). TUS determines a child presence/absence by using a TSA to measure the human body temperature within its field of view. TSA can be used to determine if a child is present (32 C) or absent (<32 c). tus contains the following input modules: (a) thermopile sensors (tsa) array module measures human body temperature, (b) tof sensor distance between a child and television screen, (c) push-button switches to detect user on off television. relay isused as output (relay 4) for controlling off. operational logics: 1. when first poweredup, udt reset initialised with 3-hour per day usage duration, tv switched a. an adult tenant can enable or disable monitoring functions, change re-start udt. b. functions (step 2, 3 are disabled, blue red push-buttons still respectively. 2. keeps track of time (time). resets back 3-hours duration new detected. 3. standby> 0. TUS switches ON TV when a Blue Push-Button is pressed, and OFF when Red Push-Button is pressed. o When a child is not present while TV is ON, TUS switches OFF TV after 60 seconds, and repeats Step 3. 4. When TV is switched ON, UDT starts counting down, and VDM monitors DISTANCE between the child and TV screen. a. When UDT > 0 and DISTANCE 2m, TUS is on standby and Speaker is disabled. b. When UDT > 0 and DISTANCE 1.5m and < 2m, TUS controls Speaker to beep at 600ms interval (reminder). c. When UDT > 0 and DISTANCE < 1.5m, TUS controls Speaker to beep at 200ms interval (warning). o TUS activates 180 seconds TV Power-Off Timer (OFF_TMR) and starts counting down. TUS switches OFF TV and disables Speaker when OFF_TMR == 0. o When DISTANCE 2m, TUS disables Speaker and OFF_TMR (with reset). TV (if not OFF) can remains ON, or TV (if OFF) can be switched ON by pressing the Blue Push-Button. Step 3 is repeated. d. When UDT > 0, and TV is switched OFF by pressing the Red Push-Button, UDT stops countdown. o When TV is switched ON again (by pressing the Blue Push-Button), UDT countdown continues from the last known timer value, and repeats Step 4. e. When UDT == 0, Speaker beeps at 100ms interval for 20 seconds, TUS switches OFF TV, and repeats Step 2. o TUS prevents the child from switching ON TV (Blue Push-Button is disabled). o An adult tenant can choose to override and restart TUS (Step 1). 2.3 User Interface User Interface (UI) consists of graphical and text representation of information (on M5Stack Fire LCD screen), RGB LED Bars, RGB LEDs, Speaker, and Push-Buttons (internal and external). You are required to design a UI that: (a) delivers relevant and vital information, and (b) allows modification of operating parameters (or threshold values). 3. Deliverables Elderly friendly smart home solution contains the following deliverables (with grades): (a) Automated Environment Controller (25%). (b) Television Usage Supervisor (40%). (c) User Interface (25%). (d) Documentation of application program (10%). Please complete and demonstrate the workings of the application program in-order to earn the relevant grades listed.

Please help to create a python programme to show the different scenarios.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems X Special Issue On Database And Expert Systems Applications Lncs 8220

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2013th Edition

3642412203, 978-3642412202

More Books

Students also viewed these Databases questions

Question

What do you think of the MBO program developed by Drucker?

Answered: 1 week ago