TVOC Reminder With Raspberry PI
by Lan_Makerfabs in Circuits > Raspberry Pi
1161 Views, 9 Favorites, 0 Comments
TVOC Reminder With Raspberry PI
Do you spend about 70 percent of daily life indoor like me?
Do you pay attention to the air quality of the room? If the TVOC level is too high indoor, it will be bad for your health.
For health, I wanted to make an indoor TVOC monitor with a voice reminder by raspberry PI, to remind me to open windows.
What Is TVOC
TVOC means Total Volatile Organic compounds. Volatile organic compounds are organic chemicals that become a gas at room temperature. There are many kinds of VOCs and they can be at the same time present. Some VOCs are bad for the health, they will cause eye, nose irritation, shortness of breath, headaches, and so on. Higher concentrations may cause physical irritation even damage. Most people are not affected by short-term exposure to the low levels of VOCs found in homes. But for the health, it suggests avoiding the exposure at high levels.
VOC’s come from many sources, even you can be a polluter! The Cleansers, disinfectants, Pesticides, air fresheners, construction materials, new furniture and so on are the VOC sources. They may increase the indoor concentration of VOCs due to off-gassing that may cause serious threats to your well-being. To stayed the room at low levels, try to open the window frequently for changing the Air.
How to Measure TVOC
The VOCs are no color, no taste, and it required a specified sensor for measuring them. As the previous project showed, the SGP30 is an air quality sensor for measuring the VOC and eCO2. Using the SGP30 senor is the best option that I have been familiar with it. For SGP30 to work, it is required to set up the I2C bus in the configuration.
Making Monitor
I have designed a sketch for this project. For getting the TVOC reading, the SGP30 sensor was connected with raspberry PI via I2C. For controlling and computing, I used the Raspberry platform instead of the single-chip that Raspberry has more strong computing ability. Besides I had to prepare the speak and the audio coding part for voice reminder. Raspberry PI has to convert the text to audio what the speaker play. I also had to prepare an LCD to display the TVOC reading. I spent a long time looking for a platform that is suitable for this project.
Raspberry Pi Embedded System Development Kit is designed by Makerfabs and based on Raspberry Pi Zero W to develop. The mainboard of the kit has a 3.2inch SPI display with touch for display something, and it has an audio coding part with WM8960 and a speaker for the audio output. Besides, the mainboard also provides many kinds of ports, such as UART, I2C, ADC, GPIO, that are very suitable for this embedded project. The kit also provides the SGP30 module that was no need to prepare the sensor twice.
I have an idea about displaying the TVOC measuring, that is showing the SGP30 reading history. The history of the SGP30 reading can help us to find the cause of the TVOC changing.
Connect
Connected sensor with the I2C port of the main board via jump lines.
Program
The code is available and you can obtain it from Github.
1. For working with the SGP30 sensor, Raspberry Pi Zero has to install the specified library for driving the SGP3O. Use the following command to install.
sudo pip3 install pimoroni-sgp30 sudo pip3 install smbus2
2. Get the TVOC measuring.
sgp30 = SGP30() result = sgp30.get_air_quality() co2 = result.equivalent_co2 tvoc = result.total_voc print("SGP30:") print(co2) print(tvoc)
def request_tts(TEXT,Result_name):
Show
Running the program, the TVOC reminder can work. Place it on the desk in the living room, kitchen or official. When you open the air freshener or cleanser that something will increase many VOCs, the TVOC reminder will remind you the TVOC is too high, and you have to open the window for changing the air. When the TVOC concentration is at a low level, the TVOC reminder also will remind you the level is normal.