I see this as a "citizen" monitoring system.
The concept is to monitor Air Particles, VOCs (Volatile Organic Compounds), and Sound levels in real-time.
Five second data is averaged each minute. Sound is maximum for the minute and updated each minute.
The intent is to keep the driller and producer honest in their commitment to low air particles, noise, and VOCs.
Each system can be built for less than $200 and uses their router and internet connection.
The data is sent to a server each minute and displayed along with other monitors on Google Maps.
The markers shown on the maps display I (information), W (warning), or A (alarm) and are updated each minute.
When clicked they display the last known data for the System Inputs shown below.
A plot button displays the last 24 hours.
PM2.5 Air Particle Sensor
PM 0.3--1.0 um
PM 1.0--2.5 um
PM 2.5—10.0 um
BME680 Air Quality
Temperature Degrees F
Relative Humidity Percent
Quality Percent (function of Resistance, and Relative Humidity)
VOCs PPM (Function of Quality)
Sound maximum dB
Freq at maximum dB Hz
I don't attempt to read BTEX components. (Benzene, Toluene, EthylBenzene, and Xylenes)
They will need to be monitored by Broomfield using canisters near the well areas and analyzed using gas chromatography–mass spectrometry after the fact.
But BTEX is proportional to VOCs. Broomfield should be notified and one should stay indoors if VOCs rise.
Please see: https://www.modelsw.com/OilGasMonitor/OilGasMap.php or click Map under Contents on the left. (A work in progress.)
Only the marker in the South West Corner is operable (the rest are "fake news") and it is in development so it could / will be missing data depending on when you access it.
Click on the marker to see the above values. Click on Plot button to see the last 24 hours.
Not part of the system but needed to make it work:
Tools: (or a handy relative)
Software: Some perspective ...
The software consists of:
1) The Raspberry Pi operating system
2) The application: monitor.py that reads the hardware every 5 seconds, averages or finds the max each minute and transfers the data to the server.
Everything else is support: formatting the sd card, testing, viewing remotely.
Code exists on the server to do some calculations, store it in a database, and display it, but that is not running on your monitor.
This table is located here so when you run across logins and passwords later, it will give you some perspective.
It is not here to intimidate you. We will work through these one at a time.
Notes on Login, passwords, and connections
1) pi is assigned by Raspberry Pi when you install.
2) Routername and routerpass were assigned when you set up your router. Some routers are combined with modems.
3) yourlogin is your choice. A common one but not required is first initial last name. No dots please -- sftp in 6) can't handle them.
You can't change yourlogin.
4) yourpass1 can be the same as yourpass2. They typically use upper and lower case, numbers and special characters.
5) 192.168.0.yy assigned by router when Rasberry Pi connects. Used by VNC and FileZilla
6) xx is a number associated with your location, is part of yourlogin and part of yourpassword, and is assigned by modelsw.com when you register
7) The router has a Login and Password as well. The default on some systems is admin and password (all lower case)
8) What you need from of the router is its "Wireless Network Name (SSID)" (the name in the Wi-Fi dropdown -- Routername above)
and "Wi-Fi Security Key" (also called Router Password -- routerpass above). I found both in the Basic Setup Tab of the Router.
Not to be confused with 7) Router Admin Login and Password.
Status:This is a project in progress.
Inside the Monitor:
“BUILD” (below) can be at the persons home where the monitor will run, or at a business,
or anywhere there is a computer and Internet connection. The Builder will have their own Login, Password, and Location.
“INSTALL” has to be at the place the monitor is going to run.
When you get stuck with my description of connecting to the router because yours is different, Please look under "INSTALL" at the bottom.
Not that I will have the answer there, but that is where I will add different versions of routers.
The Install repeats items already done in Build that change the Login, Password, and Location to those of the final Install site.
If the Builder is the Installer those items are already done with the exception of Install on the house.
BUILD: Total 16 and 1/2 hours
1 hour -- Order Hardware -- Most of the time is spent entering address and credit card numbers.
if you use PayPal and if the site supports it, you can avoid those. You can buy as a guest and avoid the password.
1/2 hour -- Find your Location and Register.
This is a good time to do this -- You have committed by buying the hardware and can't work on it yet.
By registering now that gives me a week to set up your SFTP to the web page.
Login is required to enter your unique latitude / longitude, and direction for your monitor.
1 hour -- Load the Raspberry Pi Operating System on the SD card -- Using a PC (Windows 10) -- I can't help on Apple Macintosh.
1 and 1/2 hours -- Install the Operating System on Raspberry Pi
Note: If you will be using your existing monitor, keyboard and mouse on the Raspberry Pi,
You will be working without these instructions for the next 3 hours.
If finding your Wi-Fi Security Key (routerpass) is dependent on your monitor, keyboard, and mouse, this would be the time to find it.
If you have a smart phone and you want to read this Define page on it,
Open https://www.modelsw.com/OilGasMonitor/Define.php so you can read these instructions.
Else, Under Contents in the Left Pane, Right Click Define and choose Open link in New Tab. Select that tab and File > Print.
Use this same link from the Raspberry Pi when you are ready to download software. -- 2 minutes
pi@raspberrypi:~ $ sudo apt-get update
pi@raspberrypi:~ $ sudo reboot
1 and 1/2 hours -- wire up -- do this outside of the box -- work on the existing open system.
There is a cable (not shown) that connects from the Serial Port PM25 to the PM2.5 particle monitor box.
Solder: -- 10 minutes.
2 and 1/2 hours -- Load monitor software, and test.
pi@raspberrypi:~ $ git clone https://github.com/gerardgilliland/OilGasMonitor/
pi@raspberrypi:~ $ sudo pip3 install pyaudio
pi@raspberrypi:~ $ sudo nano ~/.asoundrc
pi@raspberrypi:~ $ sudo nano /etc/modules
pi@raspberrypi:~ $ sudo reboot
pi@raspberrypi:~ $ alsamixer
pi@raspberrypi:~ $ exit
pi@raspberrypi:~ $ sudo raspi-config
Would you like a login shell to be accessible over serial? No
Would you like the serial port hardware to be enabled? Yes
Would you like to reboot now? Yes
Would you like the camera interface to be enabled? Yes
Would you like to reboot now? Yes
pi@raspberrypi:~ $ curl https://get.pimoroni.com/bme680 | bash
pi@raspberrypi:~ $ sudo pip3 install pysftp
pi@raspberrypi:~ $ sftp u45596567-OilGasemail@example.com
pi@raspberrypi:~ $ sudo apt-get install python3-matplotlib
pi@raspberrypi:~ $ sudo apt-get install python3-scipy
pi@raspberrypi:~ $ pip3 install pyautogui
pi@raspberrypi:~ $ pip3 install python3-xlib
1 hour -- Install FileZilla, VNC
If you are working with one set of monitor, keyboard, and mouse, it is time to bring them back to your PC.
Before you leave the Raspberry Pi, check the Wi-Fi (quarter circles in upper right) and verify 192.168.0.yy remains the same,
and VNC shows in a box in the upper right.
Leave the Raspberry Pi and Monitor running. It's OK to remove the Mouse, Keyboard, and Monitor while it is running.
I do it in that order so I can still see the app running before I remove the Monitor.
Vnc Raspberry Pi
The holes are in the removeable bottom lid and front. The box is upside down. Top is inside the open box.
I recommend Operating System Installation, monitor software installation, and testing before you mount anything in the box.
6 hours -- Cut the Openings in the box
1 and 1/2 hours -- Mount the sensors in the box
INSTALL: Total 4 hours
Install VNC, Filezilla, Configure WiFi, Install box and test.
Completed Monitor and In-Use Cover:
On power outage:
pi@raspberrypi:~ $ chmod 744 monitor.py
pi@raspberrypi:~ $ ./monitor.py
pi@raspberrypi:~ $ mkdir /home/pi/.config/autostart
pi@raspberrypi:~ $ nano /home/pi/.config/autostart/monitor.desktop
Exec=lxterminal --geometry=100x30 -e './monitor.py' &
Comment=monitor autostart terminal
I DON'T HAVE ANY TIME ESTIMATES FOR CALIBRATION
Average electronics tech wages in Colorado $24 per hour.
($48,000 / 2000 hours = $24)
Build = 16.5 hours, Install 4 hours = 20.5 hours
20.5 hours x $24 = $492.
Total $692 as Turnkey or $200 Do It Yourself.