Hello,
I am currently researching ideas involving ppm of CO2 in a small dwelling. I think the square footage is 1728. Now, with the basics of a small dwelling and eight foot ceilings, 1728 * 8
gives a reasonable volume of living quarters to deduce the ppm of CO2 in the home.
So, from what little research I have completed so far, I have noticed that ppm can be configured like so:
ppm = grams of solute / grams of solution * 1000000
- So, in my case here with measurements intact
a. Grams of Solute is molecular weight of CO2 which is about 44.009.
b. Grams of solution from what I think it is currently is the volume of the interior of the measured space or 13824.
c. 1000000 is the part of the solution I do not fully understand.
Either way, more research will take place…
So, if I was to use a BeagleBone Black with the 32-bit processor to measure via i2c and a module for gas sensing, could this be a simple program or is it more in depth than you all know I can handle?
I found a good article on the docs.beagleboard.org pages under The BeagleBone Cookbook for i2c and smbus
.
So far, this is all I have currently:
#!/usr/bin/python3
# from docs.beagleboard.org and the BeagleBone-Cookbook
import time
import smbus
ms = 1000
bus = smbus.SMBus(1)
addr = 0x28
while True:
data = bus.read_byte_data(addr, 0)
print("Gas per ______ " + str(data))
time.sleep(ms/1000)
The output is 80. Now, when I change the addr of the hexadecimal value, I get 128.
This is what I was going to do…
#!/usr/bin/python3
# from docs.beagleboard.org and the BeagleBone-Cookbook
import time
import smbus
ms = 1000
bus = smbus.SMBus(1)
addr = 0x28 # Could be 0x50
while True:
ppm = 44.009 / 13824 * 1000000
print("The ppm of CO2 is...: " + int(ppm))
data = bus.read_byte_data(addr, 1)
print(" " + str(data))
time.sleep(ms/1000)
Does anyone see issues or nonacceptable referencing?
Seth
P.S. I guess I am missing where to place the address alongside my PPM valuing.