INTRODUCTION
In an era where indoor air quality (IAQ) significantly impacts our health and well-being, understanding and monitoring pollutants like carbon dioxide (CO2) and formaldehyde has become crucial. Our latest interactive exhibit combines cutting-edge sensor technology with data visualization to provide a compelling display of these invisible threats. By leveraging CO2 and formaldehyde sensors, we've developed a system that continuously records environmental data and converts it into intuitive line graphs, offering visitors an instant snapshot of their surroundings' air quality.
HARDWARE CONNECTION
KEY INFORMATION
Before coding, please shift the switch the Formaldehyde(HCHO) Sensor to DAC mode.
The relation between voltage(V) and concentration(PPM) are linear. 0.4V -> 0ppm 2.0V -> 5ppm So the function diagram is shown as the following:
CORE CODE
Multiply the read analog signal by the operating voltage of the AREF pin (3.3V) to obtain the voltage signal. Then, convert the voltage coefficient through calculation into formaldehyde concentration (ppm), and finally multiply it by a coefficient of 0.746 to obtain the formaldehyde concentration in mg/m3.
DISPLAY