27
ECE 445 Design Review Smart Window Responding System Team #8 TA: Zipeng Wang Oct. 14 th , 2016 Xuanzhen Cao Jiaxi Nie Zhichun Wan

Smart Window Responding System - University of Illinois

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Smart Window Responding System - University of Illinois

ECE 445

Design Review

Smart Window Responding System

Team #8 TA: Zipeng Wang

Oct. 14th, 2016

Xuanzhen Cao Jiaxi Nie

Zhichun Wan

Page 2: Smart Window Responding System - University of Illinois

1

Table of Contents 1. Introduction ............................................................................................ 2

1.1 Statement of Purpose ......................................................................... 2 1.2 Objectives .......................................................................................... 2 1.1 Features .............................................................................................. 2

2. Design ...................................................................................................... 3 2.1 Block Diagram ................................................................................... 3 2.2 Block Diagram Description ............................................................... 4

2.2.1 Sensing ....................................................................................... 4 2.2.2 Microcontroller .......................................................................... 6 2.2.3 Actuator ..................................................................................... 7 2.2.4 Power Supply ............................................................................. 9 2.2.5 Safety (IR Sensor) .................................................................... 12

3. Calculation ............................................................................................ 13

4. Tolerance Analysis ............................................................................... 15 4.1 Power Supply ................................................................................... 15 4.2 System Accuracy ............................................................................. 15

5. Requirements and Verification .......................................................... 16

6. Schedule and Cost ................................................................................ 20 5.1 Cost Analysis ................................................................................... 20

5.1.1 Labor ........................................................................................ 20 5.1.2 Parts ......................................................................................... 20 5.1.3 Grand Total .............................................................................. 20

5.2 Schedule ........................................................................................... 21

7. Safety and Ethics .................................................................................. 22 7.1 Safety Statement .............................................................................. 22 7.2 Ethics ............................................................................................... 23

8. References ............................................................................................. 23

Page 3: Smart Window Responding System - University of Illinois

2

1. Introduction 1.1 Statement of Purpose

People open windows to refresh air, appreciate the scenery, etc. However, unexpected weather changes could happen after people leave their rooms with windows open. As a matter of fact, rains, minor sand storms or abrupt air quality drops could severely undermine the indoor environment, leaving a mess for people’s return. As a result, people may find their rooms dusty or furniture soaked, deprived of comfort and peace if they leave the windows open.

In order to cope with problems mentioned above, we propose to design a smart window system that could automatically respond to outside changing environment, which could be significantly useful when users left their windows open behind them. The system would be able to detect unfavorable weather changes in the outside environment and make corresponding actions to prevent such weather changes damaging the indoor environment. We intend to include a rain sensor to detect unexpected rains; a temperature sensor to detect irritatingly hot or cold weather so that the indoor temperature may stay at a comfortable level; as well as a dust sensor that helps keep the room spotless, improving indoor environment quality comprehensively.

There are currently no mass productions of similar projects found. The novelty lies here in that it frees users from manual control of the window and automatically react to the outside changing weather in a timely manner. This system also distinguishes itself from mechanical automatic windows by incorporating a safety module, inspired by the mature application of sensors in automatic doors.

1.2 Objectives Goals and benefits to the end customer of the responding system include:

�Automatically close the window after detecting raindrops; �Automatically close the window after detecting a significant drop in air quality

(PM2.5) below a preset level; �Automatically close the window while detecting a temperature drop below a preset

undercooling level or rise above a preset overheating level; �Instantly stop the window from closing after detecting presence of human limbs or

pets resting on rails.

1.3 Features Major functions and features of the smart window responding system are:

�Prevent rooms and furniture from getting soaked by rains while window is left open;

�Maintain indoor air quality, specifically maintaining the Particulate Matter 2.5 (PM2.5) at a comfortable and innocuous level;

�Maintain indoor room temperature at a comfortable level, preventing overheating or undercooling.

Page 4: Smart Window Responding System - University of Illinois

3

This smart window responding system reflects novelty and uniqueness in that it incorporates an automation scheme that controls corresponding windows movements after detecting outside environmental changes, maintaining a comfortable indoor environment and saving a user the trouble of keeping an eye on the weather and having to close the window timely and manually. As we take the safety of this mechanical and electrical device seriously, a safety scheme is also incorporated in the system to prevent minor concerns, especially during the movement of the window.

2 Design 2.1 Block Diagram

Figure 1. High-Level Block Diagram

Page 5: Smart Window Responding System - University of Illinois

4

2.2 Block Diagram Descriptions 2.2.1 Sensing The sensing module is the key to this project, as an input to the entire window responding system. This high-level module is comprised of the rain sensor, temperature sensor, and dust sensor. By collecting data of outside raindrops, temperature, and particle level, these sensors feed analog (temperature, dust) and digital(IR, rain) signals to the microcontroller for further parsing and corresponding executions.

2.2.1.1 Rain Sensor Input: 5V DC voltage from power supply Output: Digital and Analog output to microcontroller

The rain sensor essentially detects raindrops and sends data to the microcontroller. We plan to use Uxcell FC-37 Rain Sensor for rain detection, which incorporates a collector board of 2-by-1.6 square inches and an interface board and runs on a DC power supply of 5V. After detecting a drop of water(resembling raindrops), collector board transmits an analog output to rain sensor driver, which consists of a comparator (LM393 Dual Comparator), power supply and a potentiometer(for sensitivity adjustment) [1], then produce a digital output(it also has analog output mode), which will drop from high to low, and rise from low to high when water is wiped off or vaporized.

2.2.1.2 Temperature Sensor Input: 5V DC voltage from power supply Output: Analog output to microcontroller

The temperature sensor module monitors outside temperature changes and

feeds temperature data to the microcontroller. The LM35 (sensor ICs) Centigrade Temperature Sensor runs on a 4~30V DC power supply and outputs a voltage signal to the microcontroller that’s linearly correlated to temperature calibrated in Celsius degree. Analog output voltage signal displays a 10mV/°C scale factor and is able to measure temperature variation of a range from -55°C to 150°C with an accuracy of 0.5°C (at 25°C) [2].

Page 6: Smart Window Responding System - University of Illinois

5

Fig 2. Centigrade Temperature Sensor Output Voltage-Temperature Relation[2]

2.2.1.3 Dust Sensor Input: 5V DC voltage from power supply Output: Analog output to microcontroller

The dust sensor, or particle sensor, detects fine particle with a diameter equal or smaller than a specific parameter. We will use dust sensor model GP2Y1010AU0F in our design. GP2Y1010AU0F requires 5V DC input and 20mA standby supply current to function properly. In the smart window responding system, the dust sensor detects Particulate Matter 2.5 (PM2.5), namely any particle with a diameter that’s less than 2.5 micrometers [3]. The sensor outputs sequences of 7 bytes, starting with 0xAA to 0xFF based on the measured density of PM2.5 and the output will be directly fed to the microcontroller [4].

Page 7: Smart Window Responding System - University of Illinois

6

Figure 3. Schematic of Sensing Module

2.2.2 Microcontroller Input: 5V DC voltage from power supply; Analog and digital signals from sensors Output: Digital signals to the motor module

In the data processing module, we will use microcontroller chip on Arduino (ATmega 328P) to process the input data collected from various sensors. The microcontroller will receive digital and analog signals from rain sensor, temperature sensor, dust sensor from sensing module, as well as IR sensor (detailed description in section 2.2.5) from the safety module. Correspondingly, the microcontroller will determine whether to close the window based on the received analog signals as well as the preset threshold of each environmental element.

I-O ports usage: the ATmega has 6 analog ports and 14 digital ports. The sensors will take 3 analog ports and 3 digital ports. The motor control will use 2 ports and communication channel with PC will take another 2 ports [5].

The overall decision criteria is described below: 1. The IR sensor from safety module has the highest priority. If the IR sensor

detects any presence of people or pets, the actuator should stop closing the window regardless of other signals sent from sensing module.

Page 8: Smart Window Responding System - University of Illinois

7

2. When the IR sensor does not detect any presence of people or pets, and any of the three environment sensors are inputting data that exceeds the decision thresholds according to respective criteria by the microcontroller, the motor will be triggered to close the window.

3. When the outside environment becomes normal again, the microcontroller will trigger the motor to re-open the window.

After input data are processed and the decisions are made, the microcontroller will send decision signals to the actuator for corresponding actions.

Figure 4. Schematic of Microcontroller Module

With threshold of each sensor determined and incorporated into the window responding scheme, the microcontroller will be programmed following the routine shown below:

Page 9: Smart Window Responding System - University of Illinois

8

Figure 5. Software Flowchart of the Microcontroller

2.2.3 Actuator Input: 12V power supply, digital output from microcontrollerOutput: None The Actuator module comprises a DC linear actuator running on 12V DC voltage supply and H-bridge circuit whose inputs are controlled by microcontroller. H-Bridge circuit will provide positive or negative current flow to the actuator depending on the signals from microcontroller (Open or Close) [6]. It is an interface between microcontroller and user end windows and significantly simplifies power distribution. Upon receiving action signals from the microcontroller, the actuator will close or open the window correspondingly (if safety is assured by the safety module mentioned below). A pulse signal due to safety concerns will stop the actuator from further action until a resume signal is received.

Page 10: Smart Window Responding System - University of Illinois

9

Figure 6. Schematic of Actuator Module

Figure 7. Circuit Diagram of H Bridge

Page 11: Smart Window Responding System - University of Illinois

10

Figure 8. Simulation for H Bridge Load Voltage for Close Signal is Off, Open is On.

Figure 9. Simulation for H Bridge Load Voltage for Close Signal is On, Open is Off.

The digital output from microcontroller falls within 3 to 5V. From the simulation,

we can see that when the Close Window Signal is off, and the Open Window Signal is 5V, we can provide 12V supply to the motor. And when Open Window Signal is off, and the Close Window Signal is around 3 to 5V, we can provide -12V supply to the motor.

2.2.4 Power Supply Input: none Output: 12V DC voltage to motor module, 5V DC voltage to microcontroller and

sensors

Page 12: Smart Window Responding System - University of Illinois

11

Power supply module provides DC voltage to the entire system, powering up sensing and safety modules as well as the actuator. Specifically, we plan to use an Energizer A23 12V alkaline battery to obtain a 12V DC voltage supply. The Energizer A23 12V alkaline battery has a typical capacity of 55mAh to 6V, and we will use 4 12V batteries in parallel, which gives us 440mAh capacity. The 12V DC voltage will be directly fed to the actuator to power it up. In addition, we will design a DC/DC converter to obtain a stable 5V DC voltage supply using LM317 3-Terminal Adjustable Regulator [7], which will be fed to all sensors and microcontroller.

A 12V alkaline Battery powers up the entire system, with an additional voltage converter implemented to output a 5V DC supply for sensors and microcontroller.

The voltage converter is based on LM317 Adjustable Regulator, which output a voltage of:

𝑉! = 𝑉!"#(1+𝑅!𝑅!)+ 𝐼!"# ∗ 𝑅!

Typically, 𝐼!"#=50uA, which can be neglected, and 𝑉!"#=1.25V, set by LM317 regulator.

With 𝑅!=250Ohm, 𝑅!=750Ohm, the converter outputs a voltage of:

𝑉!=1.25∗ 1+ !"#!"#

+ 0 ∗ 720=5V

Figure10.SchematicofPowerSupplyModule

Page 13: Smart Window Responding System - University of Illinois

12

Figure11.Circuit Schematic for 12V to 5V DC/DC Converter

Figure 12. DC Converter Simulation Result Using Multisim

Input voltage is the voltage source from battery and the output voltage is the voltage for microcontroller and the sensing modules. Since we are using 12V as an input to the voltage regulator, from the simulation result we can see that at the 12V input, we can get a stable 5V output.

Page 14: Smart Window Responding System - University of Illinois

13

2.2.5 Safety (IR Sensor) Input: 5V DC voltage from power supply Output: digital signal to the microcontroller

The safety module consists of PIR (infrared) sensor. HC-SR501 PIR sensor can

measure the infrared light radiating from objects in its induction range, the feature that we plan to utilize to accurately detect whether people or pets resting in its trajectory. The sensor outputs digital signal which is directly fed into the microcontroller. The sensing range is less about 100 degree, within 7 meters (as shown in Fig.12) [8]. Upon detection of human or pets, the sensor’s output signal will fluctuate dramatically, which will be fed into the microcontroller for further processing.

Figure 13. IR Sensor Induction Range Illustration

For the purpose of this project and minimize detection errors, we covered the sensor surface and left only the center intact to focus only on the trajectory ahead of the window. As shown in Figure.13.

Figure 14. IR Sensor with Most of its Surface Covered

Page 15: Smart Window Responding System - University of Illinois

14

Figure 15. Response Time of IR Sensor Measured with Oscilloscope

We did an experiment using our IR sensor to test its response time, from the figure above. The measured rise time is 1.2us which is fast enough for our safety requirement.

3. Calculation

In this section we calculate the standby power consumption of the entire system. The sensor block will be a major component of our system, and it will takes up most of the static power of the system. Hence we need to determine the power consumption of each sensor to decide on power source selection. Also, in standby condition, microcontroller and voltage converter also consume some power.

3.1 Rain Sensor According to the datasheet of Uxcell FC-37, the minimum driving current for

driver circuit is 15mA. Since the most of the power consumption for rain sensor is driver, we assume the maximum total driving current for rain sensor plus driver is

Page 16: Smart Window Responding System - University of Illinois

15

30mA. Since we are using 5V power supply, so its maximum power consumption is as follow:

𝑃!"#$=5V*30mA=150mW

3.2 Temperature Sensor We decide to use LM35 as out temperature sensor. According to its data sheet,

it could operate in the voltage range of 4-30V. Our sensor modules are intended to work under 5V power supply, so its operating voltage is 5V. Its maximum output current is 10mA. So its maximum power consumption is as follow:

𝑃!"#$ = 5V * 10mA= 50mW As shown above, the calculated maximum power consumption is not

non-significant while the actual consumption should be different since the sensor is unlikely to output maximum current all the time. However, this result shows that we need to do actual measurement of the power consumption of sensors.

3.3 Dust Sensor

From the datasheet of our dust sensor, we see the sensor itself and the internal LED will consume the power. The maximum LED terminal current is 20mA, and the maximum sensor consumption current is 20mA. The dust sensor could operate in the voltage range of -0.3 to 7V, and internal LED could operate in the range of -0.3 to 𝑉!! . Our sensor modules are intended to work under 5V power supply, so we can calculate the maximum power consumption for dust sensor as follows:

𝑃!"#$ = 5V*20mA + 5V*20mA = 200mW

3.4 Safety (IR Sensor) From the datasheet of HC-SR501, the maximum draw current is 50uA, and the

driving voltage range is 4.5 - 20V. Since we are using 5V power supply, its maximum power consumption can be calculated as follow:

𝑃!" = 5V*50uA = 250uW

3.5 Microcontroller From the microcontroller documentation of ATMEGA 328P, at the 8KHz

operating clock speed with 5V supply voltage, the maximum supply current for active mode is 9mA. We assume the worst case for power consumption that the microcontroller is always active, then the maximum power consumption for our microcontroller can be calculated as follow:

𝑃!"#$%= 5V*9mA = 45mW.

3.6 DC/DC Converter From the datasheet of LM317, the Power dissipation is calculated by the

following formula: 𝑃!"#$%&'(!= (𝑉!" − 𝑉!"#) ∗ 𝐼!

Page 17: Smart Window Responding System - University of Illinois

16

Where IL is the load current. From the datasheet, we know that the maximum load current to maintain voltage regulation is 12mA, and we are using 𝑉!"=12V and 𝑉!"#=5V. So, the maximum power consumption for voltage regulator is:

𝑃!"#=(12-5)*13mA = 91mW

In conclusion, total standby power can be calculated as 𝑃!"#$%&' = 𝑃!"#$ + 𝑃!"#$ + 𝑃!"#$ + 𝑃!" + 𝑃!"#$% + 𝑃!"#$%&'(!

= 150𝑚𝑊 + 50𝑚𝑊 + 200𝑚𝑊 + 250𝑢𝑊 + 45𝑚𝑊 + 91𝑚𝑊 = 536.25𝑚𝑊

3.7 Worst duration time approximation

From the data sheet of Energizer A23 alkaline battery, capacitance of thebattery is 55mAh to 6V. Sincewe are using 4 12V battery in parallel, the totalcapacitywouldbe:

55mAh*2*4=440mAhAt the meantime, sum of maximum current drawn for all sensors and

microcontrollerwouldbe:13mA+9mA+0.05mA+40mA+10mA+30mA=102.05mA

Andtheworstdurationtimewouldbe:440mAh/102.05mA=4.31h

Notethattheactualcurrentdrawfromeachelementaremuchsmallerthantheirmaximumcurrentdraw,sowecanexpectthebatterywilllastatleast4.31hours.

3.8 Analog Signal to Actual Data Conversion

TemperatureSensor:Fromthedatasheet,weknowthatBasicCentigradeTemperatureSensorhas

theoutputvoltageof:0mV+10.0mV/°C

Thus, from this relation, we can convert the output voltage to actualtemperaturedataasfollows:

C=10∗ 𝑉!"# .DustSensor:

Thedata sheetofourdust sensorprovides the followingOutputVoltagevsDustDensityplot.

Page 18: Smart Window Responding System - University of Illinois

17

Figure 16. Dust Sensor Output Voltage vs. Dust Density

Fromtheplot,wecanapproximatewhendustdensityissmallerthan

0.5mg/m3,theoutputvoltageanddustdensityrelationis:𝑉!"#=5.8*Density+0.6

Thus,thedustdensitycanbecalculatedasfollows:Density=5/29* 𝑉!"# –3/29

4 Tolerance Analysis 4.1 Power Supply

The 5V power supply from regulator is important for our design since it will be fed to all the sensors and microcontroller. All sensors and microcontroller have minimum operating voltage requirement, and IR sensor has the largest minimum operating voltage at 4.5V. Thus, we need to make sure the voltage regulator can guarantee 4.5V (90% accuracy) output to power the whole system. In our regulator design, we choose the 𝑅! and 𝑅! to be 250 Ohm and 750 Ohm, based on the following formula.

𝑉! = 𝑉!"# 1+𝑅!𝑅!

, 𝐼!"# is ignored

However, in actual setting, the register will have 5% inaccuracy. Consider the worst case that

𝑅!= 750*(1-0.05) = 712.5 Ohm 𝑅!=250*(1+0.05) = 262.5 Ohm.

Accordingly,

𝑉! = 𝑉!"# 1 + !!!!

= 4.643V, which meets our tolerance requirement.

Page 19: Smart Window Responding System - University of Illinois

18

4.2 System Accuracy

The sensor blocks consist of three sensors working independently. From the datasheet, the LM35 sensor has an accuracy of 0.5°C at 25°C, this gives an accuracy

level of (1- !.!!"

) = 98%. For safety estimation, we suppose the temperature sensor has

95% accuracy level. The Dust sensor and rain sensor’s datasheet does not specify the exact accuracy level. We assume the components meet our set requirements -- 90% accuracy. Suppose we value each of the three temperature conditions equally, the

overall accuracy of the sensor block is (!"%!!"%!!"% )!

= 91.67%.

According to the ATmega-328P data sheet, its output has accuracy of (1-!.!!

) =

90%. With that being said, the estimated accuracy of our system to the changing environment would be: 90% * 91.67% = 82.5%. The constraints on microcontroller and temperature sensor accuracies are specified by the datasheet. There could be possible improvements on rain and dust sensor accuracies to increase the overall system accuracy.

5. Requirements and Verification

Requirements Verification Pts 1. Power Supply a. The power supply (motor side)

should provide a voltage of 12 ± 1V when applied on a load of 10kOhm resistor.

b. The power supply (control side)

should provide a steady voltage of 5 ± 0.5V voltages for the microcontroller and sensors.

c. The DC/DC converter output has

higher than 80% power efficiency d. The battery provides at least

1. Power Supply a.

(1). Connect 10kOhm resistor in series with 12V power supply output.

(2). Measure voltage across the 10kOhm resistor with Multimeter.

b. (1). Connect DC/DC converter and all sensors

to the microcontroller (2). Measure voltage output from the DC/DC

converter using multimeter c.

(1). Use two multimeters to measure the currents and voltages at the input and output ends of the converter.

(2). Calculate power dissipation at two ends and then calculate the efficiency (output power/ input power).

20

Page 20: Smart Window Responding System - University of Illinois

19

102.05mA when it is connected to the component whose current draw is 102.05mA.

d. (1). Connect the battery to 115Ohm resistor in

series. (115Ohm connected to 12V power supply will draw approximately 102mA current.)

(2). Use multimeter to measure the output current of the battery.

2. Rain sensor (Uxcell FC-37) The rain sensor should detect water drops with higher than 90% accuracy for the following conditions a. No rain: sensor should output a

high voltage (2.5-5V)

b. Rain simulation: sensor should output a low voltage (0-1V)

c. Actual rain: sensor should output

a low voltage (0-1V)

2. Rain sensor a.

(1). Place the sensor in the lab room, connect rain sensor to power supply and microcontroller

(2). Measure sensor output voltage with multimeter when sensing board is left dry and clean

b. (1). Place the sensor in the lab room, connect

rain sensor to power supply and microcontroller

(2). Spread water droplets to cover 5%, 10%, 15%, 20%, 25% of the collector board and measure sensor output with multimeter. Repeat for 5 times and analyze accuracy.

c. (1). Place the sensor in the lab room, connect

rain sensor to power supply and microcontroller

(2). Put the sensor on ground to be exposed to actual rain (if possible). Measure sensor output with a portable multimeter. Repeat for 5 times and analyze accuracy.

10

3. Temperature Sensor (LM35) Temperature sensor should measure temperature with accuracy of ± 1°C within the range of interest

3. Temperature Sensor (1). Place temperature sensor in room (2). Adjust air conditioner (approximate) to

increase temperature by 2°C for each test condition for a total of 5 test, from 20 to 30°C

(3). Place the temperature sensor in the center of room

(4). Connect the sensor to the Arduino and get temperature reading from it (USB cable to PC)

(5). Measure the actual temperature with a thermometer

10

Page 21: Smart Window Responding System - University of Illinois

20

4. Dust Sensor (GP2Y1010AU0F) a. The sensor should detect air

quality change (PM2.5 level) with higher than 80% accuracy

b. The sensor should respond to a

blow of particle within 5s.

4. Dust Sensor a.

(1). Prepare and measure 0.5g of dust-like materials like flour or pollen.

(2). Prepare a cardboard or plastic box and measure its dimensions to calculate volume.

(3). Connect the sensor to microcontroller and place it in the box, and read the PM level from the Arduino (initial PM level)

(4). Pour dust into the box and shake it for uniform distribution of dust.

(5). Put sensor into the box again and read its output from Arduino. Check if the increase in PM level exceeds 0.3g/box volume.

(6). Repeat the test for 5 times b.

(1). Measure dust sensor output with an oscilloscope

(2). Prepare 0.5g of dust and pour onto sensor (3). Adjust oscilloscope time division to

500ms/div (4). Measure the rise time of output voltage with

cursors (5). Repeat the test for 5 times.

10

5. Microcontroller a. The microcontroller should be

able to read the digital output from rain and IR sensor without more than 5% error.

b. The microcontroller should be able to read the analog output from dust and rain sensor without more than 5% error.

c. The microcontroller should able to output High (2.5-5V) and Low(0-0.7V) output to motor.

d. The program should have a

response time less than 5s for normal operation and less than 1s for safety halt

5. Microcontroller a&b.。

(1). Measure the output voltage from sensors with a multimeter

(2). Write Arduino code to display the input voltage fed from sensors. Compare the two results to calculate accuracy

c. (1). Set microcontroller to output High/Low

signal. (2). Place multimeter in parallel with output pin

and measure corresponding output voltage. d.

(1). Connect microcontroller to PC (2). Write debug code that does the following:

trigger a timer when a sensor’s reading passed the decision threshold or when the safety module outputs high; timer stops when the program sets the motor output to be high.

30

Page 22: Smart Window Responding System - University of Illinois

21

(3). Calculate the elapsed time using the timer readings.

6. Actuator a. The actuator should have a stroke

speed greater than 5mm/s b. The actuator should be able to

overcome friction force of ≤ 100N

c. The H-bridge circuit should be

able to provide +12 ± 1V when Close Window Signal is on, and provide -12 ± 1V when Open Window Signal is on.

6. Actuator a.

(1). Connect a marker (a small block) to the actuator’s rod. Draw a starting line on table and align the marker to that line

(2). Measure a distance of 20 cm as the finish line

(3). Trigger the actuator and start a timer simultaneously.

(4). Measure the time it takes for the marker to reach the finish line and calculate speed.

b. (1) Place the actuator vertically and append a

load weighing 100N(approximate) to the moving rod.

(2) Start the actuator, see if the moving rod could move under such load weight

(3) Repeat the test for 5 times. c.

(1). Connect H-bridge output to 10kOhm. (2). Feed 3.3V DC signal from DC power supply

generator to one input of the H-bridge while keeping the other inputs to be 0.

(3) Measure voltage across the load with a multimeter.

10

7. IR Sensor (HC-SR501) a. The IR sensor should have a low

output voltage less than 0.5V when no source of infrared is placed ahead of it.

b. The sensor has higher than 95%

accuracy outputting a voltage above 3V when detecting objects.

c. The response time should be

within 1s.

7. IR Sensor a.

(1). Place IR sensor heading to an area with no source of infrared

(2). Measure sensor output voltage with a multimeter

b. (1). Place a hand in front of the IR sensor when

output voltage is low. (2). Repeat for 20 times. (3). Measure and record sensor output voltage

with a multimeter. c.

(1). Measure sensor output with an oscilloscope. (2). Adjust oscilloscope time division to

500ms/div (3). Measure rise time of the output from voltage

10

Page 23: Smart Window Responding System - University of Illinois

22

d. The detection range should be

within 30cm ahead of the sensor

low to voltage high with oscilloscope cursors

d. (1). Place sensor facing no source of infrared (2). Measure output voltage with a multimeter

and ensure its output voltage is less than 0.7V

(3). Place a hand at 5cm, 10cm, 15cm, 20cm, 25cm, 30cm ahead of the IR sensor.

(4). Measure and record output voltage changes with a multimeter.

6. Schedule and Cost 6.1 Cost Analysis 6.1.1 Labor

Name Hourly Rate Total Hours

Invested Total

Xuanzhen Cao 30 220 16500 Jiaxi Nie 30 220 16500

Zhichun Wan 30 220 16500 Total 660 49500

6.1.2 Parts

Item Unit Cost Quantity Total

Uxcell FC-37 Rain sensor $8 1 $8 LM35 Temperature sensor $5 1 $5

GP2Y1010 Dust sensor $15 1 $15 HC-SR501 IR sensor $5 1 $5

Linear Actuator $60 1 $60 ATmega-328P Microcontroller $25 1 $25

Energizer A23 12V Battery $8 1 $8 LM317 Regulator $2 1 $2 TIP41 Transistor $1 2 $2 TIP42 Transistor $1 2 $2 BC338 Transistor $1 2 $2

Page 24: Smart Window Responding System - University of Illinois

23

Resistor, capacitor $10 Total $144

6.1.3 Grand Total

Section Total

Labor $49500 Parts $144

Total $49644

6.2 Schedule

Week Task Responsibility

9/12 Finalize project proposal, research Arduino microcontroller Xuanzhen Finalize project proposal, explore sensor options Jiaxi Finalize project proposal, prepare for mock design review Zhichun

9/19 Design sensor-microcontroller interaction scheme Xuanzhen Finalize mock design review, prepare for design review Jiaxi Purchase microcontroller, sensors and other parts Zhichun

9/26

Test sensors and run sensor-microcontroller interaction test Xuanzhen Finalize design review and start schematic design of power supply system Jiaxi

Test external weather changes to determine preset threshold for sensors Zhichun

10/3

Finalize schematic design of power supply system (+12 V DC) and actuator module Xuanzhen

Design voltage converter of 12V-to-5V for powering up sensors and microcontroller Jiaxi

Develop control logic for microcontroller according to preset data determined earlier Zhichun

10/10

Test power supply and actuator module, start PCB design for power supply and actuator Xuanzhen

Start PCB design for sensor modules and safety module (IR sensor) Jiaxi

Start programming microcontroller based on preset data threshold Zhichun

10/17

Finalize PCB design for power supply and actuator modules , integrate all modules Xuanzhen

Finalize PCB design for sensor and safety module (IR sensor) Jiaxi Finalize microcontroller programming and debugging Zhichun

10/24 Connect sensors and actuator to microcontroller, run initial test Xuanzhen

Page 25: Smart Window Responding System - University of Illinois

24

on sensor functionality Integrate power system, revise PCB design for power supply and actuator modules Jiaxi

Revise PCB design for sensors, run initial test on actuator functionality Zhichun

10/31 Assemble and solder components (microcontroller) Xuanzhen Assemble and solder components (actuator driver) Jiaxi Assemble and solder components (sensors) Zhichun

11/7 Test module functionalities, prepare for mock demo Xuanzhen Finalize R&V table, prepare for mock demo Jiaxi Fix remaining issues of the system, prepare for mock demo Zhichun

11/14 Finalize mock demo and test corner cases (microcontroller) Xuanzhen Finalize mock demo and test corner cases (actuator) Jiaxi Finalize mock demo and test corner cases (sensors) Zhichun

11/21

Test system functionality, fix remaining issues, explore possible enhancement (microcontroller) Xuanzhen

Test system functionality, fix remaining issues, explore possible enhancement (power supply and actuator) Jiaxi

Test system functionality, fix remaining issues, explore possible enhancement (sensors) Zhichun

11/28

Debug the system, prepare for final demo (microcontroller) and presentation, prepare for final report Xuanzhen

Ensure functionality, prepare for final demo (power supply and actuator) and presentation, prepare for final report Jiaxi

Prepare for final demo (sensors) and presentation, prepare for final report Zhichun

12/5

Lab checkout and finalize final report (microcontroller) Xuanzhen Finalize presentation logistics and final report (power supply and actuator) Jiaxi

Finalize final report (sensors) Zhichun

7. Safety and Ethics

7.1 Safety Statement

The power source of our system will be a 12V Alkaline battery with a DC/DC converter -- 12V for motor and 5V for microcontroller and sensors respectively. For safety concerns, we will place the battery in a battery case holder inside the room and kept away from water. We will ensure that other modules and components are placed inside the room as well, except the sensing board of the rain sensor, which is coated with waterproof materials and place outside. Generally, in no circumstances will the maximum voltage of our system exceed 12V, which is within human skin’s tolerance

Page 26: Smart Window Responding System - University of Illinois

25

level. In addition, we will strictly follow instructions for the specific batteries that we’re using, and prevent drawing too much current from the batteries by using DC power supply generator provided in the lab first and measure the current drawn to the system.

The other safety concern of our project may rise due to the moving window, which might hit people or pet resting in the rail and cause injury. To cope with this, our system integrates a safety module that will detect people or pets by detecting infrared projected within its trajectory ahead, and stops the window from moving forward. On the other hand, the linear actuator will drive the window at a low speed, about 5-10mm/s. This speed ensures that even upon hitting, the window will not exert too much force on the object and cause injury.

7.2 Ethics

Applying IEEE code of ethics [9]: 1. “to accept responsibility in making decisions consistent with the safety, health,

and welfare of the public, and to disclose promptly factors that might endanger the public or the environment” To protect the users from accidentally hurting themselves, we incorporated the safety module to protect user’s safety.

2. “to be honest and realistic in stating claims or estimates based on available data” All the data the system uses are for its own decision making only. The data will be private and will not be disclosed to any third party.

3. “to improve the understanding of technology; its appropriate application, and potential consequences” Our project intend to explore the possibility of incorporating sensor technology and control to improve people’s home experience

4. “to maintain and improve our technical competence and to undertake technological tasks for others only if qualified by training or experience, or after full disclosure of pertinent limitations” All of our group members have undergone the required lab and electrical training for this lab.

5. “to treat fairly all persons and to not engage in acts of discrimination based on race, religion, gender, disability, age, national origin, sexual orientation, gender identity, or gender expression” We intend to distribute all the works and findings fairly among our group members and aim to promote better cooperation among us.

8. References

[1] “Rain Sensor Module,” Interactive Dynamics. [Online]. Available: https://www.openhacks.com/uploadsproductos/rain_sensor_module.pdf. [Accessed: 16-Sep-2016].

[2] "LM35 Precision Centigrade Temperature Sensors", Texas Instrument, 2016.

[Online]. Available: http://www.ti.com/lit/ds/symlink/lm35.pdf. [Accessed: 20- Sep- 2016].

Page 27: Smart Window Responding System - University of Illinois

26

[3] “Particle Pollution (PM),” Particle Pollution (PM). [Online]. Available:

https://airnow.gov/index.cfm?action=aqibasics.particle. [Accessed: 16-Sep-2016]. [4] "Application note of Sharp dust sensor GP2Y1010AU0F", Sharp, 2016. [Online].

Available: http://www.sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y1010au_appl_e.pdf. [Accessed: 20- Sep- 2016].

[5] “ATmega48A/PA/88A/PA/168A/PA/328/P Datasheet,” Atmel. [Online]. Available:

http://www.atmel.com/images/atmel-8271-8-bit-avr-microcontroller-atmega48a-48pa-88a-88pa-168a-168pa-328-328p_datasheet_complete.pdf. [Accessed: 18-Sep-2016].

[6] "Heavy Duty 12" 12 Inch Linear Actuator Stroke 200 Lb Lift 12V Volt DC Black",

Russopower.com, 2016. [Online]. Available: http://www.russopower.com/products/heavy-duty-12-12-inch-linear-actuator-stroke-200-lb-lift-12v-volt-dc-black/. [Accessed: 05- Oct- 2016].

[7] "LM317 3-Terminal Adjustable Regulator", Texas Instrument, 2016. [Online].

Available: https://www.ti.com/lit/ds/symlink/lm317.pdf. [Accessed: 20- Sep- 2016].

[8] “Motion Sensor,” MySensors. [Online]. Available:

https://www.mysensors.org/build/motion. [Accessed: 27-Sep-2016]. [9] “IEEE IEEE Code of Ethics,” IEEE. [Online]. Available:

http://www.ieee.org/about/ethics_code.html. [Accessed: 16-Sep-2016].