me425/525: advanced topics in building science€¦ · me425/525: advanced topics in building...

29
ME425/525: Advanced Topics in Building Science Sensors and the built environment: Lecture 10 Dr. Elliott T. Gall, Ph.D.

Upload: vokhanh

Post on 04-Jun-2018

236 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

ME425/525: Advanced Topics in Building Science

Sensors and the built environment: Lecture 10

Dr. Elliott T. Gall, Ph.D.

Page 2: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Lecture 10

• Today’s objectiveso CO2 Sensor

─ principles of measurement

─ practical considerations

o Arduino, part II─ functions,

─ feedback loops

o Start building photoresistor circuit

o Start on CO2 sensor (if you finish photoresistor)o Next week: What do we do with CO2 measurements?

• HW2 overview

Page 3: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Hands-on class project

• In-class project goalso Big Picture: Consider emerging role of sensors and

controls in “smart buildings”o Develop basics microcontroller-based sensors

─ From “black box” to “grey box”… ─ Three circuits

i. Blink an LED (outputs only)ii. Photoresistor LED (inputs and outputs)iii. CO2 sensor (inputs and outputs)iv. Stretch goal (responsive CO2 sensor)

o Apply sensors for CO2 measurements in buildings─ Air exchange (w/ mass balance models)─ Personal exposure (w/ exposure models)─ Disease transmission (a bit of both…)

Page 4: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

CO2 sensor background

SenseAir K30• Around $80 each• Measures 0-5000 ppm• ± 30 ppm or 3% of the reading

What is the uncertainty at 500 ppm? 2000 ppm?Output: Voltage scales with reading

The SenseAir K30 sensor is used in many commercial CO2 sensors:

$225 $400

Display only

CO2 data logger

Page 5: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Carbon dioxide sensors

• Non-dispersive infrared (NDIR)o Non-dispersive: waves propagate without deformationo IR (infrared), 700 nm to 1 mm)

• Most HVAC applications use this methodo Low-cost, relatively low-maintenance, long-lived

─ As much as 15 years advertised operation

• Essential componentso IR radiation sourceo Detectoro Optical band-pass filtero IR detectoro A simplified spectrophotometer!

Limits IR to a specific wavelength

Page 6: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Measurement principle

Limits IR to a specific wavelength

The emitter is simply an IR

LED and the detector is

simply an IR photodiode

which is sensitive to IR light

of the same wavelength as

that emitted by the IR LED.

When IR light falls on the

photodiode, The resistances

and these output voltages,

change in proportion to the

magnitude of the IR light received

Or in the form of a circuit…

Page 7: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Infrared absorption

• Why does this work?o All molecules vibrate (unless at absolute zero) according to their

structure (very fast, one vibration per 10-15 so Nature of vibrations depends on structure of molecule, or what

“functional groups” are present, e.g.:

o Bombarding molecules with IR radiation, molecule absorbs photons, it moves from ground vibrational state to excited vibrational state

o This energy is stored in the form of ,for example, changes in length of bonds, or bending angle

o Absorption wavelength and magnitude depends on features (functional groups) of specific molecule, creates “fingerprint”

Page 8: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Infrared absorption

The dipole moment of a molecule must change for vibration to be “infrared active”

• Dipole refers to charge differential• Electromagnetic process – change in

dipole creates electric field• Electric field can then interact if

frequency (wavelength) of radiation matches that of frequency of molecule

Molecules such as O2, N2 do not have a changing dipole moment when they undergo rotational and vibrational motions and therefor do not absorb IR radiation.

Antisymmetric stretching leads to dipole moments

Page 9: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Spectrophotometry

• This principle can help in two wayso Compound identification

─ Requires more complex spectrometer that works over broader range of wavelengths, may separate compounds

─ Compare to known spectra

─ Identify new compounds based on markers of known functional groups

o Compound quantification─ Amount of absorbance is proportional to concentration of

compound

• Our CO2 sensor is “tuned” for CO2

o Only focuses on quantification

Page 10: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

IR spectra

• How is the sensor “tuned”?

NIST has a repository of IR spectra for many compounds!

Page 11: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Infrared absorption of CO2

Wavelengths where CO2 absorbs IR radiation Where should we measure?

• The higher one?• The broader one?

• Most low-cost CO2 sensors opt for the higher, narrower peak (4.3 μm). Why?• More specific• Stronger signal

• What else should we consider?

Page 12: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Air is a complex matrix

There are many constituents in air. Your CO2 sensor looks at only one wavelength

• Note how close water-vapor is to CO2

• This plot only separates 4 compounds

• What about…• VOCs?• Particles? • Inorganics, i.e.,

NO/NO2?

Page 13: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

At a global scale

• CO2 IR absorptivity at global scales…

Page 14: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

From absorption to concentration

• Relate absorption to concentration using the Beer-Lambert Law

𝐴 = 𝑙𝑜𝑔𝐼𝑜𝐼= 𝜀𝑐𝑙

Where:A = “decadic” absorbance (meaning on a log base 10 scale)Io = IR radiation intensity in the absence of absorbing media (CO2) [W/m2]I = IR radition intensity in the presence of CO2 [W/m2]𝜀 = molar absorption coefficient [L/(mol-cm)]c = concentration of CO2 [mol/L]l = beam path length [cm]

Page 15: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Measurement principle

𝐴 = 𝑙𝑜𝑔𝐼𝑜𝐼= 𝜀𝑐𝑙

If the molar absorptivity of CO2 at 4.3 micron is 30 × 104

cm2/mol, what is the concentration of CO2 if A is 0.7 and

the length of your cell is 2 cm?

0.1 = 30 × 104𝑐𝑚2

𝑚𝑜𝑙× 𝑐 × 2 𝑐𝑚

𝑐 = 8.33 × 10−8𝑚𝑜𝑙

𝑐𝑚3 = 3.7𝑔

𝑚3 = 2000 𝑝𝑝𝑚

How can we increase the sensitivity of the system?

Page 16: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Measurement principle

• Environmental conditions, other factors may degrade measurement accuracyo IR light source degrades (wear and tear)o Dust, aerosols, chemicals may accumulate on the

detector optics

o Beer-lambert law allows us to measure the number density in a fixed volume (our measurement cell)

─ Must be corrected for pressure, and temperature

Page 17: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Measurement principle

• Beware the low-cost sensor!o Companies present certaintyo Especially in advertising to the public

• Know the principle of operation o Can critically assess what you are seeingo Trouble-shoot, modify, etc.

• E.g., you notice a high CO2 levels (>>400 ppm) in a newly built, pre-built manufactured home that has never been occupied. You suspect VOC interference. How might you test this hypothesis and potentially improve your sensor reading?

Page 18: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Automatic baseline correction

Know your sensor!• Most HVAC CO2 sensors include a “feature” – ABC: Automatic

baseline correction

Details vary, but typically, the lowest concentration over an 8-day period is monitored and automatically assumed to be = 400 ppm. Why might this be helpful? What might be the issue?

Page 19: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Measurement principle

Some approaches to improve CO2 sensor accuracy:a) Single-lamp, single-wavelength rely on ABCb) Dual lamp : the second lamp is pulsed infrequently (every 24 h or less) used to

correct other lamp, to preserve the lamp and reduce error due to degraded lamp) c) Dual-wavelength: can either

i) Set second wavelength to be a known “zero”, to address driftii) Set to another known absorption band of CO2.

Page 20: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Measurement principle

Shrestha et al. 2009 tested 3 sensors each of 15 different models None of the 15 met the manufacturer’s own stated accuracy for all 3 tested!

Do not take a spec sheet at face value!

Page 21: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Sensor calibration

• External calibration

Page 22: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Sensor co-location

Generally a co-location is less-robust• Place sensors in common location• Compare output of one sensor to that of a trusted monitor

• Ideally, K-30 sensor is responding linearly, but with offset (z) and slope (m) correction that can be determined from linear regression

• We will do this for your K30 Arduino sensor! HW3!

Place adjacent in same space, record data

Assume this has been externally calibrated

Page 23: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Today’s Arduino build

Goal 1 for today’s build: Photoresistor LED

• Create a feedback loop:Reading from the photoresistor dictates the light intensity of the LED

Common building science application: control LED based on environment (in this case, ambient light)

https://learn.sparkfun.com/tutorials/sik-experiment-guide-for-arduino---v32/experiment-6-reading-a-photoresistor

Page 24: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Photoresistor circuit concepts

• Consider the following in building your circuit:o Input vs. output

─ How does Arudino deal with each?i. Analogread, analogwrite, digitalread, digitalwrite

ii. What distinguishes these?

iii. How does analogwrite actually work, and why is it relevant to building science?

─ What pins are appropriate for inputs vs. outputs in this circuit

o Conditional statements─ Perform an action only if a condition is (or isn’t) met.

o Functions, user-defined vs. built-in

Page 25: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Analogread

Page 26: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Arduino for sensor build

Page 27: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Voltage divider

Your Arduino measures voltage, so we need a way to relate change in resistance to measurable voltage.

Z are resistances of some component

Page 28: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Considerations…

• Evaluate the effectiveness

• Compare the energy consumption (i.e., W-h) of your LED over a year for the following: o No dimming, runs at full brightness continuously

o Dimming, assuming 12 hours of high ambient light and 12 hours of low ambient light per day

o For your current circuit design, how do the savings compare to the energy used by your photoresistorvoltage divider?

o How might you make this build more efficient?

Page 29: ME425/525: Advanced Topics in Building Science€¦ · ME425/525: Advanced Topics in Building Science ... ─principles of measurement ... •Note how close water-

Goal 2 for today

• Rework the circuit

• Imagine you have two lighting systemso One for daytime operationo One for safety during nighttime (e.g. lighted

walkway)

• Change your circuit and code to switch between two LEDs based on ambient lighting level