Just run this once. It will create a relational database
for log entries. The database table is named “GAS.”
In GAS, the entries are sampletime, COVOLTS,
COPPM, LPGVOLTS, LPGPPM, VOCVOLTS, and
VOCPPM
• SQLITE_LOG_INSERT.PY. This code takes the
current log file and loads its contents into the
database.
• SQLITE_EXAMPLE_QUERY.PY. This is a query
example to be run against the database once you
have updated it with some log file data. It queries all
COVOLTS>0. This is run independent of all other
files, and serves as an example of what the
database query can do for you (but does not
represent the complete functionality). Please refer
to Python SQLITE for a more complete set.
• The entire application launches under IDLE as the
Python module GASGUIVER11.PY.
*The ISaAC board needs to be integrated with the
Raspberry PI GPIO serial port. The process is
straightforward and appears in the August 2014 article
mentioned earlier. It’s detailed in the freely downloadable
ISaAC Tech Manual.
SYSMAIL.PY needs to be updated with your
personal email address and password. Placement variable
definitions are provided in code.
Current Prototype
Figure 10 shows our current bench implementation.
As you can see, our version
of the sensor board and its
connections to ISaAC
(sitting on top of the
Raspberry Pi) uses a
solderless breadboard.
Again, simple enough. Since
ISaAC implements an
Arduino compatible form
factor, one may choose a
more compact
implementation that could
be realized by integrating all
the sensor board electronics
onto an Arduino shield.
The present
configuration has been
successively moved around
my house and gas
measurements have been
collected. A substantial
database of these
recordings is now in place.
One area remaining to
be addressed is calibration. That will be an additional
project. The literature indicates a number of ways in which
this can be accomplished, so given that the entire design
is open and readily modified, I’ll leave that up to you. For
my purposes, this current configuration captures what I
need for now in terms of gas indications.
What’s Next?
In this article, we introduced you to tools and
techniques to understand and apply gas sensors within an
indoor environment. The hardware and software for this
open implementation can serve as a model for your own
DIY system. It is expandable, so you can first start with a
single sensor and then add on the others. Our discussion
on gas sensors should also help you apply other sensor
types in your design.
Until next time, happy air monitoring! NV
FIGURE 10. Prototype air quality system.
August 2015 59