Let's add to our room sensor - Part 3 - eCO2 and TVOC
Summary
TLDRIn this home automation tutorial, Pascal introduces viewers to the SGP30 air quality sensor, part of a multi-sensor series. He explains the importance of monitoring CO2 and TVOC levels for health and comfort, detailing the setup process, integration with Home Assistant, and coding for ESPHome. The tutorial also covers the significance of different CO2 levels and provides an introduction to the CCS811 sensor. Pascal thanks his supporters and invites viewers to follow along on GitHub and Patreon for more information.
Takeaways
- π The tutorial is part of a series on home automation and introduces the SGP30 air quality sensor for monitoring eco2 and TVOC levels.
- π The video includes chapters for easy navigation and is designed to help viewers skip to specific sections of interest.
- π For beginners, the tutorial suggests starting with the first video in the series that explains setting up an ESP32.
- π» The tutorial assumes viewers have access to Home Assistant software and provides a link for those who need to install it.
- π The presenter expresses gratitude to contributors and viewers, highlighting the importance of community support for channel growth.
- πΏ The importance of monitoring eco2 and TVOC is emphasized for health and virus transmission mitigation, especially in indoor environments.
- π The SGP30 sensor is introduced as a digital multi-pixel gas sensor with a focus on its capabilities and compact design.
- π The tutorial covers the hardware setup, including how to connect the SGP30 sensor to the ESP32 using I2C communication.
- π The video provides a step-by-step guide on integrating the SGP30 sensor with the ESP32, including code snippets and explanations.
- π The presenter discusses the significance of eco2 and TVOC levels, explaining the health implications of different concentration ranges.
- π¨ The tutorial concludes with a demonstration of how to visualize eco2 and TVOC data using the Horseshoe card in Home Assistant.
Q & A
What is the purpose of this tutorial?
-The purpose of this tutorial is to guide viewers on how to integrate an air quality sensor, specifically the sgp30, into their home automation system to monitor indoor air quality.
What is the significance of monitoring eCO2 and TVOC levels?
-Monitoring eCO2 (carbon dioxide) and TVOC (total volatile organic compounds) levels is crucial for indoor air quality and health. High CO2 levels can indicate poor ventilation, which can lead to a concentration of viral particles and affect cognitive performance. TVOC monitoring helps identify sources of harmful emissions and take necessary actions to improve air quality.
What are the potential health impacts of high CO2 levels?
-High CO2 levels can lead to dryness, reduced cognitive performance, headaches, and decreased concentration. In extreme cases, levels above 5,000 ppm can cause oxygen deprivation, leading to permanent brain damage or even death.
What is the recommended safe level for TVOC?
-The recommended safe level for TVOC is below 0.3 mg per cubic meter, at which the risk of adverse health effects is minimal.
What are the key components of the sgp30 sensor module?
-The sgp30 sensor module includes a digital I2C interface, a temperature-controlled micro hot plate, and two pre-processed indoor air quality sensors for detecting a wide range of VOCs and H2 (hydrogen).
How does the sgp30 sensor module integrate with other devices?
-The sgp30 sensor module integrates with other devices using a digital I2C interface, making it easy to connect to IoT devices for air quality monitoring.
What are the necessary hardware components for setting up the sgp30 sensor?
-The necessary hardware components include the sgp30 air quality sensor module, an ESP32 for the home automation system, and a connection to a power source (VCC) and ground (GND).
What software is required to use the sgp30 sensor with home automation?
-The required software includes Home Assistant for the home automation system and ESP-Home for configuring the ESP32 device.
How can viewers access the code used in the tutorial?
-The code used in the tutorial is available on GitHub, and the link can be found in the video description.
What is the address of the sgp30 sensor in the I2C interface?
-The I2C address of the sgp30 sensor is 0x58.
How often should the sgp30 sensor update its measurements?
-The sgp30 sensor should update its measurements every 30 seconds, as set in the tutorial's code.
What is the significance of using compensation in the sgp30 sensor readings?
-Using compensation, such as temperature and humidity from a DHT22 sensor, helps to improve the accuracy of the sgp30 sensor readings by accounting for environmental factors.
How can viewers customize their Home Assistant dashboard to display sensor data?
-Viewers can use the Horseshoe card in Home Assistant to customize their dashboard. This card allows for the display of sensor data with color-coded ranges indicating different levels of air quality.
Outlines
π€ Home Automation Tutorial Introduction
In this segment, Pascal introduces a new home automation tutorial focusing on integrating an air quality sensor. He apologizes for some technical difficulties and highlights the importance of time, adding chapters to the tutorial for easy navigation. The tutorial is part of a series, and viewers are encouraged to start with the first part if they are new. Pascal also mentions his GitHub for code and thanks his supporters, Steve and Steven, for their contributions. He invites viewers to his Patreon for more information about his channel and situation.
πΏ Understanding the Importance of Air Quality Sensors
Pascal explains the significance of monitoring indoor air quality, specifically eco2 (carbon dioxide) and TVOC (Total Volatile Organic Compounds). He discusses how high CO2 levels can indicate poor ventilation and potential virus transmission, emphasizing the health benefits of good air quality. TVOC monitoring helps identify harmful compounds and improve indoor environments. The SGP30 sensor, which uses ceramic sensor technology, is introduced as a key component for this tutorial, capable of detecting a wide range of gases and providing calibrated air quality signals.
π Setting Up the SGP30 Sensor with ESPHome
This paragraph delves into the technical setup of the SGP30 sensor with ESPHome. Pascal guides viewers on how to connect the sensor to the existing light sensor setup via I2C, detailing the wiring connections. He also provides instructions on how to define the I2C interface in the code and locate the SGP30 at address 0x58. The tutorial includes steps to add the sensor to the ESPHome configuration, including setting up the eco2 and TVOC sensors, and using temperature and humidity data from a DHT22 sensor for compensation.
π Viewing Sensor Data in the Dashboard
Pascal demonstrates how to view the sensor data in the Home Assistant dashboard. He discusses the CCS811 sensor as an alternative to the SGP30 and notes the differences in the ESPHome configuration. The focus then shifts to understanding the levels of CO2 and TVOC and their implications for health and comfort. Pascal explains the normal and potentially harmful ranges for these measurements, providing a clear guideline for interpreting the sensor data.
π‘ Customizing the Dashboard with Horseshoe Card
In this segment, Pascal shows how to customize the Home Assistant dashboard using the Horseshoe card. He guides viewers on how to edit the card to display eco2 and TVOC data, changing the data source from open weather map to the ESPHome device sensors. The tutorial includes steps to adjust the color scheme based on the eco2 levels, using hex values for a visual representation of the air quality. Pascal also discusses the need for a separate video to fully explain the Horseshoe card functionality.
π³ Outdoor Air Quality Monitoring
Pascal shares his personal setup, monitoring outdoor air quality with a weather station. He compares the CO2 and TVOC levels outdoors to the indoor environment, noting the high levels of CO2 in his city, Johannesburg. The discussion highlights the importance of monitoring both indoor and outdoor air quality and the potential health impacts of poor air quality. Pascal also mentions plans for future videos to further explore the Horseshoe card and other visualization options.
π Conclusion and Acknowledgments
In the final paragraph, Pascal thanks his supporters, Steve and Steven, for their donations and acknowledges his first Patreon, Steven Brard, for his contributions and inspiration. He encourages viewers to like, subscribe, and turn on notifications to stay updated with his channel. Pascal also invites viewers to check out his Patreon for more support and concludes the tutorial with a reminder of the importance of implementing eco2 and TVOC sensors for better air quality monitoring.
Mindmap
Keywords
π‘Home Automation
π‘SGP30
π‘Air Quality Sensor
π‘CO2
π‘TVOC
π‘I2C Interface
π‘Home Assistant
π‘ESP32
π‘Horseshoe Card
π‘Virus Transmission Mitigation
π‘Indoor Air Quality
Highlights
Introduction to a home automation tutorial series focusing on integrating an air quality sensor.
Apology for technical difficulties and assurance of resolving them promptly.
Inclusion of video chapters for viewer convenience to navigate through the content.
Overview of the SGP30 air quality sensor and its role in enhancing a multi-sensor system.
Explanation of how to set up an ESP32 for beginners in the series.
Invitation to follow the tutorial series on GitHub for code access.
Acknowledgment of community support with special thanks to contributors.
Importance of monitoring eco2 and TVOC for indoor air quality and health.
Discussion on the advantages of eco2 monitoring for virus transmission mitigation.
Link between high CO2 levels and potential health issues like headaches and reduced concentration.
Introduction to TVOC and its significance in creating a healthier home environment.
Technical explanation of the SGP30 sensor's capabilities and integration into IoT devices.
Detailed guide on setting up the SGP30 sensor with ESP32 using I2C communication.
Code demonstration for integrating the SGP30 sensor into the existing system.
Explanation of the need for temperature and humidity compensation in sensor readings.
Instructions on setting up the Home Assistant for sensor data integration.
Analysis of CO2 and TVOC levels and their impact on health and comfort.
Tutorial on creating a visual representation of sensor data using the Horseshoe card in Home Assistant.
Discussion on the CCS811 sensor as an alternative to the SGP30 with minor code adjustments.
Personal application of the sensor in the presenter's setup and real-world data sharing.
Final thanks to the community and call to action for likes, subscriptions, and notifications.
Introduction of Patreon and invitation for support, with acknowledgment of the first patron.
Transcripts
hey there I'm Pascal and welcome to
another home automator tutorial and I
want to up front to say I am very sorry
that I'm looking on this side that's
where my notes are right now I'm hoping
that I will be solving this shortly all
right so I know that your time is
valuable and because of that I've added
chapters to this tutorial you can access
them on the video timeline or in the
description if you want to skip to the
mey stuff go straight to about the
sgp30 air quality sensor linked below
this is part three of the series and
we'll continue to add to our room multi
sensor by adding this air quality sensor
so we are going to learn how to monitor
our rooms eco2 and T before I start
though
if you are new to the Channel please go
and start with the first of the series
where I explain how to set up an
esp32 and get the most out of it you can
go to the series right here in the card
and I'll leave a link in the
playlist if you want to follow me during
this tutorial my code is on GitHub I
will also leave that in the description
below before we go any further there are
a few thanks that I have to give I want
to thank Steve and step for their
messages and coffee
contributions the channel will grow
thanks to people like Steve and Steven
but all of you that have commented that
have liked that have watched my videos I
want to thank you too this is my 12th
video I want to go forward and do many
more lastly I'd love you to head over to
my patreon I'm not asking you to join
but there are news there that explain a
bit more about my situation and the
situation of this channel I think it's
important that you understand now that
I've got all of that out of the way let
me explain what eco2 and tiok is and why
we should monitor
[Music]
it
for today's tutorial we'll need a few
things Hardware wise we will need either
an sgp30 air quality sensor module or a
CSS
811 air quality sensor module also we'll
need some software home assistant and if
you don't have home assistant yet I will
leave a link in the description below so
that you can go and install it and ESP
home again I will leave the link in the
description now why do we want an eco2
and TVO
sensor why would we want to monitor air
quality monitoring eco2 and title carbon
dioxide offers several crucial
advantages particularly in the context
of indoor air quality and health firstly
virus transmission mitigation E2
monitors provide a valuable gauge on an
area's ventilation as people Excel they
release CO2 and individuals carrying Aon
viruses also emit tiny viral particles
so the one is linked with the other high
CO2 level indicates a potential
concentration of these particles
by monitoring CO2 we can identify poorly
ventilated space and take corrective
actions from mechanical ventilation or
ensuring that doors and windows remain
open this helps to reduce the risk of
virus transmission and keep indoor air
fresh and safe secondly it helps to have
a better comfort and higher productivity
Beyond virus control ecco2 monitoring
contribut Ed to a more pleasant
environment for occupants studies reveal
that elevated CO2 levels can lead to
driness Ander cognitive performance
headache and reduce
concentration now I'm going to just go
through the my notes on total volatile
organic compounds or deox offer several
crucial benefits for health and
well-being awareness and informed
decision tvok monitoring and empowers us
with the knowledge about the indoor air
quality by understanding tvok levels we
can identify sources of VO emissions
volatile organic compounds and take
informed action whether it's improving
ventilation or eliminating specific vo
sources this awareness helps to create
healthier home environment for our
families tvok encompasses a diverse
group of organic and chemical found in
both indoor and outdoor
air while some are harmful and naturally
occurring others like for
[Music]
mes and Benzene can be very harmful
monitoring tvok allows us to distinguish
between this variance and take necessary
steps to protect ourselves from adverse
health effects by keeping tvok levels in
check we contribute to our our overall
well-being and comfort I will discuss
the levels of these effects for both e
CO2 andok later in this
tutorial the
sgp30 is a digital multi-pixel gas
sensor designed for easy integration
into iot devices the techn ology
utilizes ceran
C seos technology which integrates a
complete sensor system on a single chip
it includes a digital i2c interface a
temperature controlled micro hot plate
and two pre-processed indoor quality
sensors the gas detection of the sgp30
can detect a wide range of T Vox or Vox
and H2
hydrogen it provides two calibrated air
quality signal for easy integration the
sgp30 comes in a very compact six pin
dfn package the typical accuracy is
within measured values of
15% the sensor we're going to be using
today is the
sgp30 it spin outs include the following
VCC for the sensor power from 1.8 volts
to 5 volts we'll be using 5
volts Common
Ground SC the clock pin for i2c SDA the
data pin for i2c and then the 1.8 volt
out which we will not be
using
e
so here we are we have the setup we did
in the previous tutorial where we
introduced the light sensor which is
over here we are going to bridge from
the light sensor straight into
our
sgp30 uh we can do that thanks to i2c
using addressing as its standard so we
can actually bring to here and then if
we want to to the next and to the next
and so forth okay so the yellow is SC
and the Orange is
SDA clock for yellow data for
orange that will be put into the
spg3 SDA and SC we will take from the
Common Ground Rail and put into the
ground of the
spg3 and we will take the uh the 5 volts
from the 5 volts common Rail and put it
into
VCC let's get into to the code but
before we get into the
code remember all of the code is
available on my GitHub page the link is
in the description
below if you not defined the i2c
interface yet you'll need to do so
before we even start touching the code
so please have a look at my previous
tutorial when I explain how to use i2c
and where we put light s
into the code again before we get into
the code since our
i2c part is already in the code we
should be able to find the
sgp30 at address 0x 58 so we're going to
go into the logs and we going to let the
logs run I will wait for one of the
sensors to give some data it's actually
more than that which is perfect we're
going to scroll back and right here we
found i2c device at address 058 exactly
where we thought it was going to be now
we can go into the code and for that
we're going to go into
edit and and first things first we are
going to scroll
down and we are getting into the area
where we should be adding our code you
can see right now the
dht22 you can see the
bh1750 which is our light sensor so now
we've got a little bit of space I've got
everything ready for us into the buffer
so I am just going to paste it and run
through it with
you firstly we have the Declaration of
the platform we are going to use this is
going to be the
sgp30 following that we are going to be
pulling the data from the eco2 sensor
which we're going to creatively name
eco2 the ID and I think you've got the
picture by now if you've been following
me that it's always device internal name
and the sensor name so in this case it
will be
eco2 the accuracy decimals we're going
to make one for now we're going to do
exactly the same thing for the TX
senser firstly we're going to call it t
I know very creative then the ID is
going to be our device internal name and
underscore T and the accuracy decimal is
going to be one now we are going to
store the Baseline and you're going to
tell me yes but isn't there a whole lot
of steps to get there and I'm going to
tell you yes there is however we are not
going to deal with the Baseline
today I will try to make a video about
how to set up a TVO sensor Baseline at
the later stage I just want us to be
able to use it right now the variances
are going to be very small and you're
going to understand why
shortly the address obviously is 0
x58 and the reason why our variances are
going to be low is because we are going
to use
compensation we are going to use the
temperat that we get from the dht22
Which is higher in the code and the
humidity from the dht22 which is also
higher in the code the update interval
is going to be at 30 seconds like we've
set everything
else and right now we are going to
install by clicking install clicking
wirelessly and patiently waiting that it
is going to rebuild our our firmware and
because I built the firmware a little
earlier it had cached it it is now
uploading it a few moments
later and here we are we are waiting for
the as to reboot a little longer than a
few minutes
later
ah here I here is our
initiation and now we have some data
coming through
and we can see that
um the t-o sensor is not giving us any
data at this point the eco2 is telling
us 400 we will talk about the limits and
what that data means shortly but right
now what I want to do is actually go
back a little up and you can see the s
gp30 is is a
long um a a long sensor to track it
starts here and it goes all the way down
to over
here all right we are going to stop here
we are going to close
here and I will see you inside the
dashboard
before we carry on I promised you that
we would look at the
ccs811 eco2 and TX sensor here we are on
the documentation of ESB home if we
scroll down a little bit we will end up
with this example and you will see that
outside of the CCS 811 there is not much
difference to the Cod that we have done
the difference and let me point it out
to you is over here now we do have
address like we've used in the
sgp30 and we have temperature and
humidity however temperature and
humidity are not nested and they are not
indented this is relatively important
you can't just take the code from the
one to the other it will
fail let's visit the
device and to visit the device we're
going to click on visit username is
admin password is
myet there we are and we can see the
logs on the one side
and if we go down we still don't have
any T data I am not
surprised and we have eco2 right here so
we've got it in the logs and in the
device
itself before we go and actually design
something for the dashboard there are
things that we need to know and these
are what are the levels and what they
mean so let's decipher the values
together and start with CO2 levels in
between 250 and 400 part per million
this is a normal background
concentration in outdoor ambient air
from 400 to 1,000 parts per minut
million the concentration is typical of
an occupied indoor space and there is
good air exchange from 1,000 to 2,000
parts per million people may start to
complain about D driness and poor air
quality from 2,000 to 500 parts per
million headaches sleepiness feeling
stagnant feeling that the air is stale
stuffy uh with poor with poor
concentration loss of attention
increased heart rate and slight Nosa may
be present from 5,000 parts per million
we've reached the limit that we can take
from 40,000 parts per million you are
then in oxygen deprivation resulting in
permanent brain damage comma or even
death now let's talk a bit about evok
and let's decipher those levels the
recommended safe level is below
0.3 mgram per cubic meter at this level
the risk of adverse health effects from
Vox is minimal from 0.3 to 0.5 mgram per
cubic meter is within range of indoor
air quality and remains acceptable from
0.5 5 to 1 mgam per cubic M we should
start getting
concerned from 1 to 3 mg per cubic M
it's becoming
serious anything beyond that will impact
health and comfort especially over the
long term now let's go and Implement
something like that inside of all my
system using the Horseshoe card if you
haven't seen my short tutorial on the
Horseshoe card please click on the link
above and come back here when you are
finished we've got on the right hand
side a very basic example of a whole
shoe card we are going to do something
far more complicated than that so again
if you haven't installed Hax if you
don't have the Horseshoe card yet please
click on the link above I will also
leave it in the description and go and
see that video and come back when you're
finished so we're going to open this
card and we're going to hit edit now
right now it's getting its information
from open weather map temperature we are
going to change that to change that we
need the sensors so we're going to
duplicate the tab we are on this tab
going to hit here to expand the menu and
we're going to go all the way down to
settings in settings we're going to go
to
devices espb one device and as you can
see we have eco2 and tvoc already to get
the sensor name you click on the sensor
that you
want on the Range and right here you can
copy it and we can go back here and we
are going to put
instead of sensor open weather map
temperature we are going to put sensor.
ESP room sensors eco2 we're going to
change this from temperature to
PPM and the
attribute does not exist so we are going
to take the attribute out and this is
where we're going to stop right now
we're going to save and you can see 400
PPM Johannesburg we're going to edit
again Control Alt
a so that we get the lot we're going to
copy
it we're going to cancel we're going to
add a card scroll all the way
down put a manual card in delete this
part and paste it
go back to the
settings close this and we are going to
go and and click the wrench card and
again click on copy go back here to the
top and we are going to do sensor we're
going to replace it with t t in parts
per
million and we should have if zero which
is
correct now this is not to show you
exactly how the Horseshoe card works I
will do that in a separate video right
now though what we are going to do is go
back to this one edit and we are going
to go all the way down now right now
what it does is that at about 10 it goes
from red to blue according to what we've
learned
earlier up to 400 we are pretty safe in
The Blue Zone so we can do 400
here from
400 to
1,000 we are in another Zone which is a
bit
more uh
dangerous if you don't want to use names
of colors you use use hex values for
colors how do you get hex values for
colors we go to a hex value Color Picker
so we're going to look for one Color
Picker there we
are okay we'll take the first one it
doesn't matter here we are I guess it's
this one yes does it work here as well
yes it does the first one I believe
should be a very light green so we're
going to take that color and we're going
to go back and the this should be in my
opinion a very light green now if you do
this it won't work I have to put the
hash before it let's see if it works and
it
doesn't
or doesn't it take oh it may need to
be this save
yes okay so we've got it
and
from then from 1,000 I would like to go
a little darker in fact I'll go
a Qui
there we are going to take
that
and
again
hash and now we have another color a
little longer than a few minutes
later and what we are going to do as
well is change
Johannesburg to
my
r
e
CO2 oops it's CO2 we are going to save
and this is basically what we're going
to get I don't know why it ends up there
so right now we are in the green if you
want to you can change one sorry you can
change
one
so yes so right now the Horseshoe scale
starts at minus 10 and goes all the way
to 40 this is why everything looks wrong
so the minimum is going to be my a Zer
and our maximum is going to be
6,000 okay so now that we've got all of
that sorted we're going to save and
we're going to see that we are only at
400 and it is pretty safe now I haven't
beautified it or anything of the kind I
will show you
quickly what it would look
like if we follow this but instead
of using the actual values I'm going to
take a zero out of here and I'm going to
put 400 here because that will show
us that should show us
oh I'm still up to 6,000 which is why it
doesn't
work okay this is what it would show us
as and you can see there is a
gradual uh from the green to the red
passing the other colors that we've
actually put in which are both here and
here okay let me go and put it back to
what it
was this is
400 1,00
2,000 and this is
5,000 okay and we are going to say that
this is at
6,000
save now because I'm not getting any
data out of the t-o sensor yet what I
will do is I will wait until tomorrow
and see if there is data coming through
and uh right now this is what the eco2
looks
like we can pretty it up and we can do
something quite nice to view to give you
an example let me hop directly into my
setup this is my setup this is directly
from my weather station so it's not
indoors but Outdoors you can see that
the CO2 is actually extremely high in
the moment you can also o see that uh
our lowest is at
407 which is equivalent to what it
should be outside and bordering onto
inside and the maximum is at
7,992 which is current I live in a city
where going outside at night is actually
a problem Johannesburg is airwise very
bad same thing go for tvok you can see
that at the point we were at one parts
per billion and if I look this was
probably around 2:00 and yeah this was
probably around 2:00 and right now he at
1,156 parts per billion so these are
things that you can get to do with the
Horseshoe card the bottom of it I will
also cover in a different video it is a
graph that comes from hack and uh this
is what we're looking at being able to
do it's something like this where you
have all of this data available to you
this is where we working towards slowly
but
surely I think we've covered
eco2 in quite some depth I hope that
you've enjoyed this tutorial and
explainer but before I leave you I'd
like to thank Steve and Steven for their
kind donation of coffee
again and I must mention my first
patreon a home automat manager Steven
brard who brya as you would say in
French uh who has been not only a
contributor but also a source of
inspiration during our discussions on
patreon and it is very very appreciated
the channel may be small today we do not
know where we're going to go tomorrow
I'm hoping that we're going to be able
to help a lot more people before my
goodbyes please don't forget to like
subscribe and smash that notification
button so that you never have to miss a
video if you want to support the
channel I have started my patreon you
can go and have a look at the patreon I
will leave the link below and um I wish
you the best with implementing a eco2
and TX sensor whether it is the
sgp30 or it is the CCS 811 this is
Pascal signing off and I'll see you in
the next
tutorial
Browse More Related Video
Let's add to our room sensor - Part 2 - Ambient Light Sensor
Let's build a room sensor - Part 1 - Temperature, Humidity, and Bluetooth
Let's add to our room sensor - Part 5 - Movement detection
This DIY mmWave Presence Sensor Changed Everything - LD1125H | digiblurDIY
DIY Guide: 8 Essential Sensors to Give Your Smart Home Superpowers
New Blynk IOT Smart Plant Monitoring System
5.0 / 5 (0 votes)