代写辅导接单-Measurement system for indoor climate

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top

Measurement system for indoor

climate

Adarsh Pulimoottil Jolly, Emmanuel Ndagijimana, Mhd Anas Al Ebrahim,

Muntder Faeq Hadi, Davide Viggiani

Abstract

This project aims to design an indoor climate monitoring system capable of detecting

and analyzing various environmental parameters. The focus is on ensuring optimal air

quality and creating a comfortable indoor environment by monitoring factors such as CO2

levels, temperature, humidity, radon, and total volatile organic compounds (TVOCs). The

designed radon detection circuit utilizes a charge-sensitive preamplifier, shaping amplifier,

and peak detector to convert the radiation-induced charge into voltage signals, contributing

to the accurate measurement of radon levels. Additionally, it incorporates a Si7021 sen-

sor for temperature and humidity monitoring, recognizing their significance in creating a

comfortable and conducive indoor environment. The SGP30 sensor is employed to mea-

sure CO2 and TVOC concentrations, providing valuable insights into indoor air quality.

The mbed microcontroller continuously monitors these parameters, and real-time results

are displayed on a personal computer using MATLAB.

Mid Sweden University

ET106G

18-01-2024

Contents

1 Introduction 3

2 Project 3

2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.2 Task description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.2.1 Implementation of Radon Sensor . . . . . . . . . . . . . . . . . . . . . . . 5

2.2.2 Mbed interfacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.2.3 MATLAB data visualization . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.2.4 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Method of work 6

4 Radon sensing 7

4.1 Input Current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4.2 Preamplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4.2.1 Calculations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4.3 Pulse shaping amplifier. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4.3.1 A better signal-to-noise ratio . . . . . . . . . . . . . . . . . . . . . . . . . 9

4.3.2 Pulse pair resolution improvement. . . . . . . . . . . . . . . . . . . . . . . 9

4.3.3 The Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4.4 Peak detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4.5 Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4.5.1 Pre-amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4.5.2 Pulse Shaping amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.5.3 Peak Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4.5.4 Overall simulation of circuit . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4.6 The circuit implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4.6.1 Charge sensitive preamplifier . . . . . . . . . . . . . . . . . . . . . . . . . 16

4.6.2 The Shaping amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

4.6.3 Peak detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

4.6.4 Overall circuit implementation . . . . . . . . . . . . . . . . . . . . . . . . 18

5 TVOC and CO2 Measurement:SGP30 sensor 18

6 Temperature and humidity measurements-SI7021 19

7 The system implementation 20

8 Mbed LPC1768 Integration 20

9 MATLAB Integration 21

10 Results 22

10.1 Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

10.2 Humidity and radon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

10.3 Carbon dioxide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

10.4 TVOC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

11 Reference 24

12 Appendix 1 25

13 Appendix 2 28

1

List of Figures

1 Annual indoor radon concentration in ground-floor rooms. . . . . . . . . . . . . . 4

2 Process of measuring indoor air quality . . . . . . . . . . . . . . . . . . . . . . . 6

3 Vn103 is voltage and icin is the iput current which is around 24 micro Ampheres 7

4 A charge-sensitive preamplifier with feedback resistance . . . . . . . . . . . . . . 8

5 A charge-sensitive preamplifier with feedback resistance . . . . . . . . . . . . . . 8

6 Common DrainSource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

7 Pulse piling up and effect of pulse shaping . . . . . . . . . . . . . . . . . . . . . . 10

8 Active High Pass Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

9 output signal at each stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

10 Simulation circuit of Charge sensitive preamplifier (CSP) . . . . . . . . . . . . . 12

11 Simulationresults,outputvoltageandinputcurrentofthechargesensitivepream-

plifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

12 The simulation circuit of the shaping amplifier. . . . . . . . . . . . . . . . . . . . 14

13 Output voltage from the shaping amplifier. . . . . . . . . . . . . . . . . . . . . . 14

14 Simulation circuit of peak measurement . . . . . . . . . . . . . . . . . . . . . . . 15

15 Input and output voltage from the peak detector circuit . . . . . . . . . . . . . . 15

16 The full simulated circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

17 Output voltage from a CSP on oscilloscope . . . . . . . . . . . . . . . . . . . . . 16

18 Output voltage from the shaping amplifier . . . . . . . . . . . . . . . . . . . . . . 17

19 The Input and output voltage from the peak detector . . . . . . . . . . . . . . . 17

20 Radon detection circuit implementation . . . . . . . . . . . . . . . . . . . . . . . 18

21 TVOC and CO2 Measurement SGP30 sensor . . . . . . . . . . . . . . . . . . . . 19

22 Temperature and humidity sensor. . . . . . . . . . . . . . . . . . . . . . . . . . . 19

23 The total working of the system. . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

24 mbed code flow chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

25 Mbed and sensors connected together . . . . . . . . . . . . . . . . . . . . . . . . 22

26 The data from sensors visualized in MATLAB . . . . . . . . . . . . . . . . . . . . 23

List of Tables

1 People dying from air pollution each year . . . . . . . . . . . . . . . . . . . . . . 4

2

1 Introduction

A measurement system for indoor climate, considering the concentration of radon, total

volatile organic compounds, and carbon dioxide, as well as measurement of temperature and

humidity, allows for the maintenance of optimal conditions for a comfortable life in an office or

a household. The primary reason for detecting and measuring these conditions is the potential

harmthattheycancausetohumanswhenconcentrationsexceedtherecommendedlevels.Radon

exposure is the second leading cause of lung cancer in Sweden, accounting for 500 cases per

year[1]. The minimum radon concentration level should be 200Bq/mm3, but nearly 16% of

single-family homes exceed this level[3].

Prolonged exposure to TVO causes eye, nose, and throat irritation, and may even affect our

central nervous system.Organic volatile compounds can even be present in the body without

causing any symptoms.Anomalies in temperature and humidity values can be harmful to one’s

health at the same time increases the energy costs of the household.At high concentrations,

gaseous carbondioxide can be toxic, impairing consciousness and causing cardiac problems.

Given these concerns, a periodic check is advised, which can be accomplished through the

use of an indoor climate system.And implementing this would allow for data-driven decision

making in terms of issue concentration levels, energy efficiency of the heating, ventilating, and

airconditioningsystem,andcontrolofthesesystemstooptimiseahealthyindoorenvironment.

2 Project

The purpose of this project is to design a measurement system capable of monitoring the

indoor climate. Monitoring factors such as CO2 levels ensures that indoor spaces maintain

optimal air quality, preventing potential health hazards. Additionally, precise measurement

of temperature and relative humidity is vital for creating a comfortable and conducive envi-

ronment, especially in residential, commercial, and industrial settings. Monitoring radon and

total volatile organic compounds (TVOCs) becomes essential to identify potential pollutants

that could adversely affect health. The designed measurement system for this project includes

a Radon detection component, comprising an electronic circuit for detecting radon particles,

a Si7021 sensor for temperature and humidity, and an SGP30 sensor for measuring Carbon

dioxideandTVOC.Theparametersprovidedbythesecomponentsarecontinuouslymonitored

by the mbed microcontroller, and the real-time results are displayed on a personal computer

using MATLAB.

2.1 Background

Radon, a radioactive gas with no color, smell, or taste, is one natural radiation source

that can be dangerous. It emerges from the bedrock and travels through the earth. Radon

doesn’t pose a threat to human health outside because it tends to dilution in the atmosphere.

However, radon indoors is hazardous; multiple studies have shown that even low levels, which

are typically present in homes and workplaces, can be harmful to one’s health. High levels of

indoor radon are especially harmful since lung cancer risk grows dramatically with continuous

inhalation exposure [1].

Soil,water,andbuildingmaterialsmayincludeelementslikeuranium,thorium,andradiumthat

decomposeintoradon. ThemosthazardousisRadon-222,whichisproducedwhenuranium-238

or radium-226 decays. It is quite frequent because of the high quantities of Uranium-238 in

some areas of the ground and the fluctuating concentrations of Radium-226 in some construc-

tion materials. Because of its delayed decay rate, it can collect indoors. At times, Radon-222,

along with Radon-220, a byproduct of Thorium-232 decay, serve as the primary source of radi-

ation exposure for the general public.

The radon concentration typically measured in units such as picocuries per liter (pCi/L) or

becquerels per cubic meter (Bq/m³) has a maximum tolerable concentration of 200Bq/m3.

Monitoringandcontrollingradonconcentrationlevelsarecrucialforensuringindoorairquality

and mitigating potential health hazards associated with radon exposure. Below is an example

of European Indoor Radon Map reports done in 2021[2].

Many techniques and instruments have been developed for Radon detection. Active measure-

ments systems like scintillation cells, ionisation chambers and electrostatic collection of decay

products. Passive measurements instruments like Charcoal detectors, electret ion chambers,

etched track detectors have also been used traditionally [3].

3

Figure 1: Annual indoor radon concentration in ground-floor rooms.

Year Publication institute Deaths:air pollution Deaths:outdoor Deaths:indoor

2021 WHO 7million 4.2million 3.8million

2021 IHME 6.7million 4.5million 2.3million

Table 1: People dying from air pollution each year

Inthisprojectanelectroniccircuitcomposedbychargesensitivepreamplifier,shapingamplifier

andpeakdetectorcircuitswasusedforradonparticledetection. WhenRadon-222, alsoknown

asradonundergoesradioactivedecay,itemitsalphaparticles. Theenergyreleasedbyanalpha

particle during radioactive decay is specific to the decay process. It is typically around 5.49

MeV (mega-electron volts). This value is an average, and actual energies may vary slightly.

Referring to this energy helped to design the electronic circuit for radon detection.

The project also includes a sensor for monitoring temperature and humidity . The significance

of this sensor in indoor climate monitoring lies in it’s ability to offer a comprehensive under-

standingoftheindoorenvironment. Monitoringtemperatureiscrucialformaintainingcomfort,

as extreme temperatures can impact human health and well-being. Additionally, tracking hu-

midity is essential, as high humidity can lead to issues like mold growth and discomfort, while

low humidity can cause dryness and other health concerns.

The SGP 30sensor was also used in this project to detect concentrations of carbon dioxide

(CO2) and total volatile organic compounds (TVOCs), providing valuable information about

indoorairquality. TheSGP30sensoremploysmetaloxidesemiconductor(MOS)technologyto

detect TVOCs. MOS sensors respond to changes in electrical conductivity based on the pres-

ence of VOCs in the air. The sensor’s unique feature is its ability to compensate for humidity

levels, enhancing the accuracy of TVOC measurements. Additionally, it uses non-dispersive

infrared (NDIR) technology for CO2 detection, ensuring precise and reliable measurements.

ElevatedCO2levelsindoorscanindicatepoorventilation,whichmayleadtodiscomfort,drowsi-

ness, and reduced cognitive function. According to the ASHRAE standard, it is recommended

that indoor CO2 concentrations are below 700 ppm to ensure human health. Monitoring CO2

levelswiththeSGP30sensorallowsuserstoassessandoptimizeventilationstrategiestoensure

a healthy indoor environment. On the other hand, continuous exposure to high TVOC levels

can contribute to indoor air pollution, potentially leading to health issues. Below is the global

death toll due to indoor air pollution, as published in major recent studies[4].

4

Theprojectshowshowtheindoorairpollutantswillbedetectedwithmoreprecise,efficient,

and compact sensors for advancing in environmental sensing technology by using matlab. As

a result, intelligent home systems may soon use sensors like these to keep track of indoor air

quality and notify the ventilation system before dangerous levels are reached.

2.2 Task description

The project is divided into three sections: Radon sensor implementation with analogue cir-

cuits, generating mbed code and connecting TVOC, temperature humidity, and carbondioxide

sensors to the Mbed LPC1768, and finally Matlab data visualisation.

1. Radon sensor implementation with analog circuits:

Emmanuel Ndagijimana, Adarsh Pulimoottil Jolly

2. GeneratingmbedcodeandconnectingTVOC,temperaturehumidity,andcarbondioxide

sensors to the Mbed LPC1768:

Mhd Anas Al Ebrahim, Muntder Faeq Hadi

3. Matlab data visualisation:

Davide Viggiani.

2.2.1 Implementation of Radon Sensor

Theimplementationoftheradonsensorbeganwithcalculatingtheinputcurrenttothesen-

sorandthencreatingsimulationsinLTspiceforthecorrespondingchargesensitivepreamplifier,

shaping amplifier, and finally peak detector. The values of each component were determined

through calculations and confirmed through simulation work. Small adjustments were made

duringthecircuitimplementationonbreadboardusingthetrialanderrormethod, takinginto

account of the availability of component values.

2.2.2 Mbed interfacing

The microcontroller Mbed LPC1768 provides a function called AnalogRead from the Mbed

library, allowing us to measure the voltage from the circuit very accurately. If the measured

voltage is between 1-1.5V, it means there is a particle from radon decay, and we keep track of

such instances.Afterward, the circuit resets. Values outside this range also cause a reset.The

values from the co2,tvoc humidity and temperature are also acounted,The measured value and

the count of radon are send to the Matlab interface. Besides tracking radon particles,the mbed

device collects data from SGP30 and Si7021, sending it to Matlab for a detailed analysis.

2.2.3 MATLAB data visualization

IntheMatlabinterface,aspecialprogramcommunicateswiththembeddeviceusingaUSB

connection. It extracts and interprets various data points, including Total Volatile Organic

Compounds (TVOC), Carbon Dioxide (CO2) levels, temperature,humidity, particle count, and

a graph showing voltage readings from the mbed device. To make understanding easier, each

data point sent from the mbed includes a unique identifier. This identifier guides the Matlab

program, telling it which graph to use for the data. This careful organization ensures the

Matlab interface shows a complete and orderly representation of the diverse data, making it

easier to analyze the systems performance

2.2.4 Motivation

TheSuboptimalconditionswithinahouseholdcancausediscomfortandevenserioushealth

problems for the residents. Real-time data analysis of various factors such as radon, carbon

dioxide, and tvoc concentrations, temperature, and humidity can assist in creating ideal con-

ditions in the home atmosphere. Measurement of each relevant component using an indoor

climate measurement system can aid in obtaining the required data. The system’s primary

concern is the improved real-time presentation of data with accurate detection of radon parti-

cles. Accurate radon particle measurement via detection of decay particles aids in determining

5

concentrationlevelswithinthehousehold,whichcanhelpinlimitingitto200Bq/mm3,lowering

the risk of lung cancer.

3 Method of work

Mbed LPC1768 is the core of the sensor setup,where the microcontroller is able to handle

the input to the periphery sensors and receive output from the peripheral sensors.At the same

time provide the data to the MATLAB setup for data visualisation.

Figure 2: Process of measuring indoor air quality

6

4 Radon sensing

Radon sensing consist of a detector,preamplifier,pulse shaping amplifier and a peak detec-

tor.Instead of a detector the current pulse is simulated using a voltage source and a capacitor.

4.1 Input Current

Insteadofaradonparticledetectortodetectthedaughterparticleandprovideanelectrical

signal as output, we simulated that output using the generated current during the decay of

radon particle.

The radon emits 5.49MeV during alpha decay with a half life of 4 days. The detection of the

particles is using a semiconductor (ionization energy 3eV) whose conductivity is modulated

when irradiated. A 200V is applied to the chamber to direct the particle to the semiconductor.

The drift velocity of electrons is 5ns while it is 20ns for holes.

The radon particle generates approximately two million electron-hole pairs

(6 MeV ÷ 3eV = 2.106).

Let us take an average time of 13ns to calculate the current.

And the current generated is

2∗106∗1.6∗10−19

=24∗10−6A (1)

13∗10−9

Figure 3: Vn103 is voltage and icin is the iput current which is around 24 micro Ampheres

4.2 Preamplifier

Thechargesensitivepre-amplifierissensitivetothechargeloadingatitsinputandprovides

an output in terms of voltage by the charge of a capacitor which is proportional to the input

current.

The amplifier integrates the current at the input giving charge Q,which is proportional to the

voltage output V.

Q=CV

(cid:82)0

Idx = C.V

t

V∝Q

Theionizedparticledetectorgeneratesacurrentpulseofaverysmalltimeperiodandeach

pulse in a detection event generates charges in the detector that can be understood from the

total charge in the current pulse. The purpose of the preamplifier is to generate a voltage

output from this current pulse.

Thepulsecanbebroughtbacktothebaselinebyaddingresistorfeedbackastheinformation

required is only the peak of the voltage output which is proportional to the total charge at the

input.

7

Figure 4: A charge-sensitive preamplifier with feedback resistance

Figure 5: A charge-sensitive preamplifier with feedback resistance

4.2.1 Calculations

ThesignalcurrentofJ113wasinacommonmode. Hencetheinputvoltagetotheamplifier

AD817 is:

R R

V −V =−[R + A C ]∗g V =R g V (2)

+ − B R +R +R m i Eq m i

A C D

V+ is the voltage applied at noninverting input of the amplifier while V- is the voltage applied

at the inverting input.Req can’t load the drain of J113, the impedance load depends on the

Miller effect. Therefore.

R =R +R (R +R ) (3)

miller B A C D

WehavetwooptionsofselectingfourresistorsthatconnecttheamplifierwiththedrainofJ113.

The first option is that we can use them to determine the drain current IDS and the drain to

source voltage VDS of J113. This can be achieved by considering DC, with a large gain, which

makes [5].

This yields

R V

I = C CC (4)

DS R R +R (R +R +R )

A C B A C D

R R

V = B D (5)

DS R

C

Fromequation(2),(3),(4)and(5),resistorsareafunctionofDC,hencethedynamicconstraints:

V (R −R )

R = CC miller Eq (6)

A (R −R )I +V

miller Eq DS DS

R V

R = Eq DS (7)

B (R −R )I +V

miller Eq DS DS

V (R −R )I R 1

R = CC miller Eq DS Eq ∗ (8)

C (R −R )I +V V −R I −V

miller Eq DS DS CC miller DS DS

8

V (R −R )

R = CC miller Eq (9)

D V −R I −V

CC miller DS DS

By considering the datasheet of J113, the common drain-source graph shows the relation-

ship of drain current to drain source voltage [6].

We choose to use VCC=15V, RMiller=1k, REq=894, VDS=0.8V, IDS=5mA, when VGS(off)

Figure 6: Common DrainSource

=-0.6V as observed from the graph above.Therefore;

15∗(1000−894)

R = ≈1200Ω (10)

A (1000−894)∗5∗10−3+0.8

894∗0.8

R = ≈540Ω (11)

B (1000−894)∗5∗10−3+0.8

15∗(106)∗5∗10−3∗894 1

R = ∗ ≈580Ω (12)

C (1000−894)∗5∗10−3+0.8 (15−0.8−(1000∗5∗10−3)

15∗106

R = ≈173Ω (13)

D 15−0.8−(1000∗5∗10−3)

4.3 Pulse shaping amplifier

Pulse shaping is done for main two reasons

1. a better signal-to-noise ratio.

2. pulse pair resolution improvement.

4.3.1 A better signal-to-noise ratio

The method for increasing the signal-to-noise ratio is to increase the pulse width of the

preamplifieroutput. Thepeakismademoreroundedforabettermeasurementoftheamplitude.

Ifitisnotroundedthesuddenpulsecouldnotbeproperlyrecognised. Andsincethepeaklevel

does not change with the pulse shape change the information of radon particle is not lost.

4.3.2 Pulse pair resolution improvement.

The preamplifier circuits are provided with a long decay time of the pulse to include all

the charge collected from the detector. As the radon detection is random, sometimes two or

moreparticlesmaygetdetectedandtheresultistheoverlappingofthepulses,thatisthepulse

won’t decay properly. Increased multiple detections within the decay period can result in a

peak voltage value that the system can handle. This pile-up can also result in errors in the

voltagevalues. ThiscanbeovercomebyreducingthepulsewidthoftheGaussianpulseby1/3

times the original pulse width.

9

Figure 7: Pulse piling up and effect of pulse shaping

4.3.3 The Calculations

If an RC integrating stage follows the CR stage, the above-mentioned issues can be much

improved. OurtaskistodesignthenetworkgivenC1=500Pf,C2=500pF,Vin=180mVobtained

from the simulation, and Vout=1V. A first-order Active High Pass Filter was utilized. The

filter comprises a passive filter section followed by a non-inverting operational amplifier. The

frequency response of the circuit mirrors that of the passive filter but with an amplified signal

determined by the amplifier’s gain[7].

Figure 8: Active High Pass Filter

VoltageGainA =

V

out =

A f( ff c)

(14)

V V in (cid:113) 1+(f )2

fc

The target is to obtain the output voltage Vout=1V. From the simulation circuit in ltspice the

amplitudeofoutputvoltagefromchargesensitivepreamplifiercircuitisapproximately180mV.

The period of the signal was adjusted to 5millsecond. Given that C1 is 500pF and supposing

R3 to be 1MegaOhm , the remain parameters were calculated as below.

10

f=1/5ms=200Hz

1

f = ,cutofffrequencyofhighpassfilter. (15)

c 2πR C

3 1

1

=

(16)

2π∗1∗106∗500∗1012

= 318.3Hz

And the gain is given as

V A ( 200 )

VoltageGainA = out = f 318.3 (17)

V V in (cid:113) 1+( 200 )2

318.3

1V

=A ∗0.532 (18)

100mV F

A =18.79(pass band gain of the filter)

F

A =1+R /R

F 2 1

And by supposing R =1KΩ,then

1

R =17.79kΩ

2

The input to the low pass filter is Vin=1V, and the output must be 1V, hence a unity gain

for the low pass filter.

The gain’s formula of a low pass filter is:

1

A = (19)

L (cid:113)

1+(f )2

fc

In order to get AL=1, (f/fc) the ratio must be closer to 0. To satisfy this condition when C is

known to be 500pF, the resistance in series with a capacitor must be selected with a low value.

For resistance of 1000 ohm, the gain will approximately equal to 1, hence the output of the

shaping amplifier will have the desired voltage amplitude.

The shaping time of the pulse was conditioned to be in the range of 10 to 15 us. By changing

thefeedbackresistorto115kΩandtheresistorfromRCcircuitto27kΩwillmakeourcondition

possible.

4.4 Peak detector

Peak detector acts as a temporary analog storage for the peak voltage value. The transient

peak voltage from the pulse shaping section is converted to a persistent voltage and utilized in

generating the number of particle detections.

Figure 9: output signal at each stage

11

4.5 Simulations

Thesimulationofradondetectorwasachievedthroughdesigningelectroniccircuitcomposed

by 3 parts and being simulated using LTSPICE software.

4.5.1 Pre-amplifier

The primary function of a charge-sensitive preamplifier is to convert the charge released

by the radiation interaction into a voltage signal that can be further processed and analyzed.

The operation of a charge-sensitive preamplifier begins with the input stage, where the charge

produced by radon gas is initially collected by the capacitor. The current produced by radon

particles was calculated to be around 20µA which is a small electrical signal.

The capacitance was adjusted to 2.2pF with rise time and fall time at 11ns with input rectan-

gular wave signal with amplitude of 100mV to generate a current around 20A during rise and

fall of voltage pulse and zero current at steady state of capacitance.

Connecting the components together and getting resistor values was achieved by referring to

paper [5]. Utilizing a feedback capacitor Cf, which is connected between the detecting capac-

itor and J113 transistor, serves the dual purpose of storing the charge from the detector and

contributing to the stability and enhancement of the amplifier’s performance. To facilitate the

ongoing processing of input pulses, it is necessary to discharge Cf. Consequently, a feedback

resistor Rf is positioned in parallel with Cf to ensure its continuous discharge.

Below is the final circuit for CSP, AD817 operational amplifier was used for this stage.

A J113 transistor played a crucial role in amplifying and shaping the weak electrical signals

generated within charge detector. It acted as a voltage amplifier, converting the small charge

signals produced by the radiation events into corresponding voltage signals.

The simulation results are shown in the figures below. As shown in the figure the output of

Figure 10: Simulation circuit of Charge sensitive preamplifier (CSP)

the preamplifier and the current through the input capacitor were as expected.

12

Figure 11: Simulation results,output voltage and input current of the charge sensitive pream-

plifier

4.5.2 Pulse Shaping amplifier

This amplifier is particularly effective in converting the fast and narrow input pulses from

the preamplifier into more easily measurable and recognizable signals.

The CR-RC shaping process begins with the input pulse generated by the charge-sensitive

preamplifier. The fast-rising edge of this pulse contains val-uable information, but it may be

challenging to measure accurately due to its rapid nature.

Theresistorsandcapacitorsintheshapingnetworkformanactivehighpassandlowpassfilter

circuits. As the input pulse enters the shaping amplifier, the capacitor charges through the

resistor, causing the signal to rise more gradually. This shaping process effectively elongates

and smoothens the pulse, transforming the original fast pulse into a more manageable and dis-

cernible output signal.

The time constants associated with the resistor and capacitor values deter-mine the shaping

characteristics. These values were calculated in the previ-ous section and influences the rise

time and duration of the output pulse.

The amplifier serves the purpose of not just modifying the form of the output pulse generated

by the CSP but also amplifying its amplitude from 180mV to a range of 1V.

The simulation of the shaping amplifier circuit is shown below, and OPA604E was in between

a high pass filter and low pass filter. The op amp served to isolate the two individual networks

(impedance isolation) so that neither in-fluences the operation of the other.

The output voltage pulse is shown in the following figure.

The shaping time of the pulse is clearly achieved to be around 15 µs.

13

Figure 12: The simulation circuit of the shaping amplifier.

Figure 13: Output voltage from the shaping amplifier.

4.5.3 Peak Detector

The primary purpose of the peak detector is to retain the peak voltage level reached by the

signal,providingasteadyDCvoltagethatrepresentsthehighestpointoftheshapedwaveform.

The information held by the peak detector is valuable for several reasons. First, it allows for

the precise measurement of the peak amplitude, providing an accurate representation of the

energy deposited by the radiation event. Second, it helps in discriminating between different

types and energies of radiation, contributing to the identification and characterization of the

detected particles. The components required for peak measurement were selected referring to

thecircuitin[8]. ByemployingtheOPA604E/OPA604E,itispossibletocreateapeakdetector

with unity gain, enabling the capture of a 15µs pulse. This has the advantage of the low input

bias current and wide common mode input range.

By using two amplifiers, the difference between the peak and current input levels is directed

through R8 rather than the input pins of either amplifier. When there’s an upward pulse, the

initial amplifier compensates for the drop across D2 and D1, ensuring that the voltage at Node

3 matches Node 1. During this time, D3 is inactive, resulting in zero voltage drop across R8.

To expedite the loop, capacitor C6 supplies the necessary charge for the first amplifier’s input

capacitance, maintaining a minimal voltage drop across R8 during the sampling mode.

Onthecontrary,anegative-goingedgecausesD2andD1toturnoff,whileD3turnson,closing

the loop around the initial amplifier and forcing VOUT VIN across R8. R7 ensures that the

voltage across D2 is zero, preventing leakage current and kickback from D1 from affecting the

voltage across C5.

To prevent the output of the first amplifier from exceeding the peak value of 1Volts before

the second amplifier’s output provides negative feedback, it is essential to limit the rate of the

incoming edge. This limitation is achieved through the combination of resistor and capacitor

oflowpassfilter, whichallowsthevoltageatNode1tosettleto0.1%ofVINwithin15µs. The

selection of C5 and R5 takes into account factors like droop rate, settling time, and kickback.

R5 is employed to avoid overshooting at Node 3. Increasing C5 is an option to minimize droop

rate and kickback. The optimal droop rate is achieved by separating parasitic resistances from

Node3. Thiscanbeachievedbyemployingaguardbandconnectedtotheoutputofthesecond

amplifier, forming a protective enclosure around its summing junction (Node 3).

14

Below is the simulation circuit and the results from the output of the second amplifier. The

diagram discovered in[8] underwent alterations by the inclu-sion of an npn transistor, serving

as a switch for discharging the capacitor C5. To control the current originating from the mbed

microcontroller, a 20k resistor (R9) was introduced.

As seen in figure above the peak detector signal in blue detects the peak val-ues of the input

Figure 14: Simulation circuit of peak measurement

Figure 15: Input and output voltage from the peak detector circuit

signal (in green color) and then reset to initial value which is 0 Volts.

15

4.5.4 Overall simulation of circuit

The circuit which contains all the three parts(a charge sensitive preamplifier, a shaping

amplifier and finally a peak detector.) discussed above were simu-lated in LTspice and below

are the results.

Figure 16: The full simulated circuit

4.6 The circuit implementation

4.6.1 Charge sensitive preamplifier

After simulations, the circuits were assembled on the breadboard using the same compo-

nents as in the simulation. Due to unavailability of certain resistor values in the laboratory,

approximate values were utilized. The input voltage, a square pulse with a frequency of 100Hz

and amplitude of 700mV were used through a function generator to produce current detected

byachargesensitivepreamplifier. Astoimprovethesignaltonoiseratiowechangedtheinput

capacitancetobemorethanthepreamplifiercapacitance(Cin). Thecircuitunderwenttesting,

and the output from the CSP displayed on the oscilloscope was recorded. The corresponding

signalforthisoutputvoltageisdepictedinthefigurebelow. Itisclearlyseenfromfigureabove

Figure 17: Output voltage from a CSP on oscilloscope

that the signal shape and the output peak voltage is 154mV as it was desired.

16

4.6.2 The Shaping amplifier

After the successful implementation of the CSP, a shaping amplifier circuit was added.

The components used while designing the active high pass filter, low pass filter and amplifier

were connected and below is the desired output voltage amplitude of 1Volt displayed by the

oscilloscope from the shaping amplifier.

Figure 18: Output voltage from the shaping amplifier

4.6.3 Peak detector

The peak detector circuit simulated in the previous section was implemented through the

output of the shaping amplifier. Some components used in the simulation were not found in

the lab hence other components with the same working principles were utilized.

Figure 19: The Input and output voltage from the peak detector

The peak voltage values were detected as shown in the picture above and brought back to

initial values. This process was accomplished by applying a second rectangular wave through

anotherfunctiongeneratorandusesatransistorasaswitchtodischargethecapacitorC5hence

the falling of the peak detector signal. The reset circuit will be energized by mbed microcon-

17

troller during the full implementation of the project.

4.6.4 Overall circuit implementation

The radon detection circuit combining the charge-sensitive preamplifier, shaping amplifier

and peak detector was implemented on the breadboard as shown in the figure below. The full

circuit was achieved by implementing one part by one.

Figure 20: Radon detection circuit implementation

5 TVOC and CO2 Measurement:SGP30 sensor

The SGP30 sensor is a multipixel sensor based on a micro hot plate system.The sensor

followsI2Ccommunication. TheCO2andTVOCarecalculatedfromtheethanolandhydrogen

measurements[9]. ThesensorutilizesmetaloxideforgassensingwithTVOCoutputrangefrom

0 to 60000 ppb and CO2 output range from 400 to 60000ppm

18

Figure 21: TVOC and CO2 Measurement SGP30 sensor

6 Temperature and humidity measurements-SI7021

The sensor measures the relative humidity and temperature in the range of -10 to 85°C[10]

withhighaccuracy. ThesensorfollowsI2Ccommunicationandintegratesthetemperaturesen-

sor relative humidity sensor analog to digital converter and signal processing and conditioning

circuits in a single chip..

Figure 22: Temperature and humidity sensor

19

7 The system implementation

Figure 23: The total working of the system

8 Mbed LPC1768 Integration

The program interfaces three sensors ,the radon sensor,Si7021 and SGP30. The pin p16 is

utilisedforanaloginfromtheradonsensor,withpin18utilisedforanalogouttogeneratepulse

forMosfetduty,thatwillresetthepeakdetector.TheI2Ccommunicationisutilizedtoestablish

aconnectionbetweenmbedandSi7021throughpin9asserialdataline,andpin10fortheclock

signal.At the same time I2C is utilized forSGP30 communication through p28 for data and

p30 for clock.The readAndPrintData() function loop 5 times to collect data and take average

of the values.generateMOSFETResetSignal() function generates the mosfet duty cycle which

whenturnedonthepeakdetectorwouldbedischarged.Itgeneratesacontinoussinusoidalsignal

based on the input from the radon detector,the falling edge of the peak detector is cosidered to

generate the signal.pc.printf allows the data to be transfered to matlab from the sensor.

20

Figure 24: mbed code flow chart

9 MATLAB Integration

MATLAB code maintains a continuous communication with mbed and continously reads

data from it.The code utilizes real time plotting approach to display the collected data,in

multiple plots at the same time updating when new data arrives,the code runs for a time and

afterexecutionendsitsrunandgeneratesanoutputandrestartagain.Thehumidityismeasured

in milli percentage CO2 in ppm and TVOC in ppb.

21

Figure 25: Mbed and sensors connected together

10 Results

10.1 Temperature

The temperature for the brief 60 seconds where the temperature was mostly between 22

°C and 19°C, which is in the range of comfort. The values below 20°C may cause discomfort

to some people which should be considered. The temperature range for comfort changes from

person to person and location. The recommended temperature range in Sweden is from 20 to

23°C [12]

22

Figure 26: The data from sensors visualized in MATLAB

10.2 Humidity and radon

The values of relative humidity varied between 12 to 40 m%, which is in the range of

comfortable humidity. The values above 60m% should be uncomfortable for the inhabitants.

The values between 5 to 20m% is considered dry, which can cause irritation to some people.

The ideal range is between 30 to 60%[13]. The radon concentration is shown between 0.12 to

0.2, with a proper conversion factor the number of particles could be identified properly.

10.3 Carbon dioxide

The carbon dioxide concentration varied between 200 to 1200 parts per million. Values

above 1000ppm can cause discomfort and measures should be taken.The ideal concentration is

below 1000ppm in closed rooms[14].

10.4 TVOC

The TVOC concentrations where in the range between 0 to 79 ppb which were in the com-

fortablerange.Astheventilationsareclosed,thiscanincreasetheconcentrationstoadiscomfort

level.

23

11 Reference

[1]. International Atomic Energy Agency (2023:), What is radon

and how are we exposed to it? ,https://www.iaea.org/newscenter/news/

what−is−radon−and−how−are−we−exposed−to−it

[2].European commission(2020), Indoor

radon concentration , https://remon. jrc .ec.europa.eu/About/Atlas−of−Natural

−Radiation/Digital−Atlas/Indoor−radon−AM/Indoor−radon−concentration

[3].Jon Miles , Methods of Radon measurements and devices , National

Radiological Protection Board, Chilton , Didcot , Oxfordshire , OX11 ORQ, UK

[4].World Economic Forum (2022), Indoor air pollution : What causes it and

how to tackle i t , https://www.weforum.org/agenda/2022/07/

what−causes−indoor−air−pollution−sources−how−to−reduce/

[5]. Arnaboldi , C. , & Pessina , G. (2008). A simple charge−sensitive

preamplifier for experiments with a small number of detector channels . IEEE

Nuclear Science Symposium Record, 2008(1), 333−337.

[6]. https://apachepersonal.miun.se/˜gorthu/ASS/onsemi J113 eng tds.pdf

[7]. Electronics tutorials (2019), Active High Pass F i l t e r

\\https://www. electronics−tutorials .ws/filter/filter 6 .html

[8]. https://apachepersonal.miun.se/˜gorthu/ASS/peak.pdf

[9]. https://sensirion .com/media/documents/984E0DD5/61644B8B/Sensirion

\\Gas Sensors Datasheet SGP30.pdf}

[10]. https://www. silabs .com/documents/public/data−sheets/Si7021−A20.pdf}

[11]. https://www.stralsakerhetsmyndigheten.se/contentassets

/b27c66be9c79465aaa21b7d46b3bb14d/202128

−analysis−of−radon−levels−in−swedish−dwellings−and−workplaces.pdf

[12]. https://paxmongolicadotorg. files .wordpress.com/2018/03/1134.pdf

[13]. https://www.swegon.com/knowledge−hub/the−indoor−climate−guide/factors−

affectingtheindoorclimateandhumanbeings/humidity/#:˜:text=In%20Scandinavia

%2C%20indoor%20humidity%20is ,humidity%20of%2030%2D60%25.

[14]. https://www.co2meter.com/blogs/news/10709101−

what−is−carbon−dioxide#:˜:

text=1.000%20ppm%20%2D%20The%20American%20Society , countries

%2C%20i .e.%20Sweden%20and%20Japan.

24

12 Appendix 1

This the c++ code for the mbed microcontroller including the sensors.

#include ”mbed.h”

#include ”Si7021.h”

#include ”Adafruit SGP30.h”

// Analog input pin

AnalogIn analogInPin(p16);

// Analog output pin for the non−continuous MOSFET reset signal

AnalogOut mosfetResetPin(p18);

// Define serial interface

Serial pc(USBTX, USBRX);

const int baudrate = 115200;

// Define I2C interfaces

I2C i2c si7021(p9, p10); // Si7021 SDA, SCL

I2C i2c sgp30(p28, p27); // SGP30 SDA, SCL

// Define Si7021 and SGP30 objects

Si7021 si7021(p9, p10); // Si7021 SDA, SCL

Adafruit SGP30 sgp30(i2c sgp30 ); // SGP30 SDA, SCL

// Function to read and print data from both sensors

void readAndPrintData() {

//change the number into the number of samples to calculate the average of them

const int target = 5;

// Initialize SGP30 sensor

if (!sgp30.begin()) {

printf(”Error initializing SGP30\n”);

return;

}

// Initialize IAQ

if (!sgp30.IAQinit()) {

printf(”Error initializing IAQ\n”);

return;

}

while (true) {

float sumtemperatureSi7021 = 0.0;

float sumhumiditySi7021 = 0.0;

float sumeCO2 = 0.0;

float sumTVOC = 0.0;

float sumanalogread = 0.0;

for (int i=1 ;i

// Measure temperature and humidity

if (si7021.measure()) {

wait us(200000);

} else {

// Print an error message if measurement fails

printf(”Error measuring temperature and humidity\n”);

}

// Read from Si7021

25

uint32 t temperatureSi7021 = si7021.get temperature()/1000;

uint32 t humiditySi7021 = si7021.get humidity()/1000;

sumtemperatureSi7021 += temperatureSi7021;

sumhumiditySi7021 += humiditySi7021;

// Measure air quality

if (!sgp30.IAQmeasure()) {

pc. printf(”Error measuring IAQ\n”);

return;

}

// Get the measured values

uint16 t eCO2 = sgp30.eCO2;

uint16 t TVOC = sgp30.TVOC;

sumeCO2 += eCO2;

sumTVOC += TVOC;

wait us(10000);

}

uint32 t avg temperatureSi7021 = sumtemperatureSi7021/target ;

uint32 t avg humiditySi7021 = sumhumiditySi7021/target ;

float analogread = analogInPin.read();

uint16 t avg eCO2 = sumeCO2/target ;

uint16 t avg TVOC = sumTVOC/target ;

// Print the data

pc. printf(”%d,%u,%f,%u,%u\n”, avg temperatureSi7021 , avg humiditySi7021 , analogread , avg eCO2, avg TVOC);

// Wait for 2 seconds

wait us(200000);

}

}

// Threshold for peak detection

const float negativeThreshold = 0.2; // Adjust as needed

// Function to generate the non−continuous signal for MOSFET reset

void generateMOSFETResetSignal() {

const float amplitude = 0.5; // 0.5V peak amplitude

const float frequency = 200.0; // 200 Hz

const float period = 1.0 / frequency;

const float dt = period / 1000.0; // Time step in milliseconds

while (true) {

for (float t = 0.0; t < period; t += dt) {

float value = amplitude ∗ sin(2.0 ∗ 3.14159 ∗ frequency ∗ t);

mosfetResetPin.write(value + 0.5); // Offset by 0.5 to make it 0−1V

// Send the data in the required format to MATLAB

//∗∗pc. printf(”%f\r\n”,analogInPin.read()); // Simulated data

wait us(dt ∗ 1000000);

}

// Add a 2−second delay before generating the signal again

wait us(500000);

}

26

}

int main() {

printf(”wait .. measuring ...\n”);

//initialize the mosfet pin

mosfetResetPin.write (0.0);

// Set serial baud rate

pc.baud(baudrate);

// Start the readAndPrintData function in a separate thread

Thread sensorThread;

sensorThread. start(callback(readAndPrintData));

printf(”Waiting for falling edge of the input triangular signal ...\ r\n”);

while (true) {

// Wait for the falling edge of the triangular signal

if (analogInPin.read() < negativeThreshold) {

// Wait for the falling edge

// Falling edge detected , start generating the MOSFET reset signal

printf(”Falling edge detected. Generating MOSFET reset signal ...\ r\n”);

generateMOSFETResetSignal(); // This function will run once and then exit

// Reset analog output to avoid continuous signal after the falling edge

mosfetResetPin.write (0.0);

}

// Optional: Add a delay before waiting for the next falling edge

wait us(200000);

}

}

27

13 Appendix 2

% MATLAB code to read and plot data from serial

clc ; clear ; close all ;

serialPort = ’/dev/tty.usbmodem14102’;

baudrate=115200;

while baudrate==115200

% Set the COM port to the one used by your mbed board

% Change this to your specific COM port

% Open the serial connection

s = serialport(serialPort , 115200);

configureTerminator(s, ”LF”);

flush(s);

% Initialize variables

time = [];

temperatureSi7021 = [];

humiditySi7021 = [];

analogIn = [];

eCO2 = [];

TVOC = [];

% Set up the figure

figure ;

% Set the total duration for data collection

totalDuration = 60; % seconds

tic ;

% Loop to read data from serial and plot in real−time

while toc < totalDuration

% Read one line of data

data = readline(s);

% Extract the values

dataArray = str2double(strsplit(data , ’ , ’));

% Check if data is valid

if numel(dataArray) == 5

temperatureSi7021 = [temperatureSi7021; dataArray(1)];

humiditySi7021 = [humiditySi7021; dataArray(2)];

analogIn = [analogIn; dataArray(3)];

eCO2 = [eCO2; dataArray(4)];

TVOC = [TVOC; dataArray(5)];

% Update the time vector

time = [time; toc ];

% Plot the data

subplot(3, 2, 1);

plot(time , temperatureSi7021 , ’r ’);

title (’Temperature (Si7021) ’);

xlabel(’Time (s) ’);

ylabel(’Temperature (m C ) ’);

subplot(3, 2, 2);

plot(time , humiditySi7021 , ’b’);

title (’Humidity (Si7021) ’);

xlabel(’Time (s) ’);

28

ylabel(’Humidity (m%)’);

subplot(3, 2, 3);

plot(time , analogIn , ’g’);

title (’Analog Input ’);

xlabel(’Time (s) ’);

ylabel(’Analog Value ’);

subplot(3, 2, 4);

plot(time , eCO2, ’m’);

title (’eCO2’);

xlabel(’Time (s) ’);

ylabel(’eCO2 (ppm) ’);

subplot(3, 2, 5);

plot(time , TVOC, ’c ’);

title (’TVOC’);

xlabel(’Time (s) ’);

ylabel(’TVOC (ppb) ’);

% Pause for a short duration before reading the next data point

pause(0.2);

end

end

% Close the serial connection

clear s;

disp(’Data collection completed. ’);

end

29

51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468