From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out-224.synserver.de ([212.40.185.224]:1090 "EHLO smtp-out-200.synserver.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750812AbbHaIGW (ORCPT ); Mon, 31 Aug 2015 04:06:22 -0400 Message-ID: <55E40AF7.8040707@metafoo.de> Date: Mon, 31 Aug 2015 10:06:15 +0200 From: Lars-Peter Clausen MIME-Version: 1.0 To: Matt Ranostay CC: Jonathan Cameron , "linux-iio@vger.kernel.org" Subject: Re: [RFC] iio: ppm: Add IIO_PPM channel type References: <1440657930-14871-1-git-send-email-mranostay@gmail.com> <55DF2F67.3000209@metafoo.de> <55DF33BF.7080808@metafoo.de> <55E000F2.9000403@metafoo.de> <55E026FD.80107@metafoo.de> In-Reply-To: Content-Type: text/plain; charset=utf-8 Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org On 08/28/2015 06:27 PM, Matt Ranostay wrote: > Ah true but we could add a few IIO_MOD* modifiers for CO2, tVOC, VOC, > etc, etc. I think Jonathan was suggesting that. What I meant was CO2 measured in what unit per what unit. Like is it weight per volume or volume per volume or weight per weight or molecules per volume ... - Lars > > Thanks, > > Matt > > On Fri, Aug 28, 2015 at 2:16 AM, Lars-Peter Clausen wrote: >> On 08/28/2015 11:05 AM, Matt Ranostay wrote: >>> On Thu, Aug 27, 2015 at 11:34 PM, Lars-Peter Clausen wrote: >>>> On 08/27/2015 11:40 PM, Matt Ranostay wrote: >>>>> On Thu, Aug 27, 2015 at 8:58 AM, Lars-Peter Clausen wrote: >>>>>> On 08/27/2015 05:40 PM, Lars-Peter Clausen wrote: >>>>>>> On 08/27/2015 08:45 AM, Matt Ranostay wrote: >>>>>>>> There are air quality sensors that report data back in parts per million >>>>>>>> of VOC (Volatile Organic Compounds) which are usually indexed from CO2 >>>>>>>> or another common pollutant. >>>>>>>> >>>>>>>> This patchset adds an IIO_PPM type because no other channels types fit >>>>>>>> this use case. >>>>>>> >>>>>>> Hm, I'm not sure if parts-per-million is a good channel type. It's more of a >>>>>>> scale. The type would be concentration.[...] >>>>>> >>>>>> Reading a bit more[1], concentration doesn't actually seem to be the right >>>>>> term in this case, the correct term is mole fraction. Maybe we can use that >>>>>> as the type. That also makes it clear that the unit is molecules per molecule. >>>>>> >>>>> Actually we can't use mole fraction for this because we aren't in a >>>>> chemistry lab, and know the other compounds that make up the local >>>>> atmosphere. Besides you'd have to include some insane lookup table for >>>>> molar mass of carbon or whatever VOC being measured :) >>>> >>>> I don't think you'd need that. Mole fraction tells you the number of >>>> molecules of something per total number of molecules. You don't need the >>>> mass for this. >>>> >>>> But what exactly is the sensor measuring? CO2 (or VOC) molecules per total >>>> number of molecules or number of CO2 molecules in a particular volume? >>>> >>> CC'ed my Swiss colleague on this because he knows much on the >>> interworkings of VOC sensors than I could hope to. >>> So simply these sensors are finding VOCs (which the sensor in question >>> does CO2 and tVOC indexes.. probably not too independent of each >>> other) >>> >>> But molecules are not parts.. think of taking an X volume of air and >>> figuring what is precent of oxygen is verses nitrogen, argon, etc, >>> etc. Sure the highest is nitrogen at atomic weight 14.01 with ~78% of >>> the "air", oxygen is ~20% at the weight of 16.00, and etc. >>> >>> Think about cutting cube into a millions of pieces and figuring an X% >>> is Y substance which you can detect, but can't detect X, Y, and Z >>> (think any particles in 'air' that aren't bonded with carbon). So mole >>> fractions are impossible here, and you could only take a parts in a >>> known volume. >>> >>> Most VOCs (if not all, bit of newbie here) use UV LEDs to ionize >>> particles, and with some maths calculate the parts-per-million. >> >> But what per what? PPM is a completely ambiguous unit if you don't specify >> parts of what per million of what. >>