Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #566500 > unrolled thread

AGP30, issues with CO2 VOC sensor

Started byWinfield Hill <winfieldhill@yahoo.com>
First post2019-11-14 09:14 -0800
Last post2019-12-13 09:18 +0200
Articles 8 on this page of 28 — 10 participants

Back to article view | Back to sci.electronics.design


Contents

  AGP30, issues with CO2 VOC sensor Winfield Hill <winfieldhill@yahoo.com> - 2019-11-14 09:14 -0800
    Re: AGP30, issues with CO2 VOC sensor Winfield Hill <winfieldhill@yahoo.com> - 2019-11-14 12:13 -0800
      Re: AGP30, issues with CO2 VOC sensor Klaus Kragelund <klauskvik@hotmail.com> - 2019-11-14 13:30 -0800
        AGP30, absolute humidity conversion Winfield Hill <winfieldhill@yahoo.com> - 2019-11-15 14:37 -0800
          Re: AGP30, absolute humidity conversion klaus.kragelund@gmail.com - 2019-11-18 05:00 -0800
          Re: AGP30, absolute humidity conversion Przemek Klosowski <przemek@tux.dot.org> - 2019-12-12 11:55 +0000
            Re: AGP30, absolute humidity conversion Winfield Hill <winfieldhill@yahoo.com> - 2019-12-12 05:23 -0800
              Re: AGP30, absolute humidity conversion DecadentLinuxUserNumeroUno@decadence.org - 2019-12-12 14:27 +0000
                Re: AGP30, absolute humidity conversion Winfield Hill <winfieldhill@yahoo.com> - 2019-12-12 06:56 -0800
                  Re: AGP30, absolute humidity conversion DecadentLinuxUserNumeroUno@decadence.org - 2019-12-12 15:52 +0000
                    Re: AGP30, absolute humidity conversion Winfield Hill <winfieldhill@yahoo.com> - 2019-12-12 08:55 -0800
                      Re: AGP30, absolute humidity conversion DecadentLinuxUserNumeroUno@decadence.org - 2019-12-12 17:12 +0000
                        Re: AGP30, absolute humidity conversion Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-12-12 10:05 -0800
                          Re: AGP30, absolute humidity conversion DecadentLinuxUserNumeroUno@decadence.org - 2019-12-12 18:26 +0000
                            Re: AGP30, absolute humidity conversion Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-12-12 10:48 -0800
                              Re: AGP30, absolute humidity conversion DecadentLinuxUserNumeroUno@decadence.org - 2019-12-12 23:55 +0000
                                Re: AGP30, absolute humidity conversion Jasen Betts <jasen@xnet.co.nz> - 2019-12-13 03:12 +0000
                        Re: AGP30, absolute humidity conversion Winfield Hill <winfieldhill@yahoo.com> - 2019-12-12 10:22 -0800
                    Re: AGP30, absolute humidity conversion Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-12-12 09:59 -0800
                      Re: AGP30, absolute humidity conversion DecadentLinuxUserNumeroUno@decadence.org - 2019-12-12 18:24 +0000
                        Re: AGP30, absolute humidity conversion Winfield Hill <winfieldhill@yahoo.com> - 2019-12-12 11:13 -0800
                          Re: AGP30, absolute humidity conversion Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2019-12-12 21:49 +0200
                            SGP30, absolute humidity conversion Winfield Hill <winfieldhill@yahoo.com> - 2019-12-12 12:24 -0800
                          Re: AGP30, absolute humidity conversion DecadentLinuxUserNumeroUno@decadence.org - 2019-12-12 23:57 +0000
                          Re: AGP30, absolute humidity conversion Klaus Kragelund <klauskvik@hotmail.com> - 2019-12-12 16:49 -0800
                            Re: AGP30, absolute humidity conversion Winfield Hill <winfieldhill@yahoo.com> - 2019-12-12 18:10 -0800
              Re: AGP30, absolute humidity conversion Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2019-12-12 20:30 +0000
                Re: AGP30, absolute humidity conversion upsidedown@downunder.com - 2019-12-13 09:18 +0200

Page 2 of 2 — ← Prev page 1 [2]


#569216 — Re: AGP30, absolute humidity conversion

FromWinfield Hill <winfieldhill@yahoo.com>
Date2019-12-12 11:13 -0800
SubjectRe: AGP30, absolute humidity conversion
Message-ID<qsu3g402c3p@drn.newsguy.com>
In reply to#569206
DecadentLinuxUserNumeroUno@decadence.org wrote...
> Lasse Langwadt Christensen wrote
>>
>> you want to replace a $1 M0 mcu with a $100 A9 running linux?
>> in what way does that make any sense?
>
>  How is a Pi a "$1 MO mcu"?

 The Feather we are using has an Atmel ATSAMD21G18,
 ARM Cortex M0+, which is about $2.50 on Octopart.
 But I have seen Atmel's ARM Cortex M0 under $1.


-- 
 Thanks,
    - Win

[toc] | [prev] | [next] | [standalone]


#569219 — Re: AGP30, absolute humidity conversion

FromTauno Voipio <tauno.voipio@notused.fi.invalid>
Date2019-12-12 21:49 +0200
SubjectRe: AGP30, absolute humidity conversion
Message-ID<qsu5jm$q6p$1@dont-email.me>
In reply to#569216
On 12.12.19 21:13, Winfield Hill wrote:
> DecadentLinuxUserNumeroUno@decadence.org wrote...
>> Lasse Langwadt Christensen wrote
>>>
>>> you want to replace a $1 M0 mcu with a $100 A9 running linux?
>>> in what way does that make any sense?
>>
>>   How is a Pi a "$1 MO mcu"?
> 
>   The Feather we are using has an Atmel ATSAMD21G18,
>   ARM Cortex M0+, which is about $2.50 on Octopart.
>   But I have seen Atmel's ARM Cortex M0 under $1.
> 
> 

Win,

Can the programming specifications of the sensor be
found somewhere?

-- 

-Tauno

[toc] | [prev] | [next] | [standalone]


#569221 — SGP30, absolute humidity conversion

FromWinfield Hill <winfieldhill@yahoo.com>
Date2019-12-12 12:24 -0800
SubjectSGP30, absolute humidity conversion
Message-ID<qsu7ml02jna@drn.newsguy.com>
In reply to#569219
Tauno Voipio wrote...
>
> Can the programming specifications of the
> sensor be found somewhere?

 Yes, it's on the datasheet, plus more info
 at Sensirion,  https://www.sensirion.com
 Sorry, the correct p/n is SGP30.


-- 
 Thanks,
    - Win

[toc] | [prev] | [next] | [standalone]


#569234 — Re: AGP30, absolute humidity conversion

FromDecadentLinuxUserNumeroUno@decadence.org
Date2019-12-12 23:57 +0000
SubjectRe: AGP30, absolute humidity conversion
Message-ID<qsuk65$end$4@gioia.aioe.org>
In reply to#569216
Winfield Hill <winfieldhill@yahoo.com> wrote in 
news:qsu3g402c3p@drn.newsguy.com:

> DecadentLinuxUserNumeroUno@decadence.org wrote...
>> Lasse Langwadt Christensen wrote
>>>
>>> you want to replace a $1 M0 mcu with a $100 A9 running linux?
>>> in what way does that make any sense?
>>
>>  How is a Pi a "$1 MO mcu"?
> 
>  The Feather we are using has an Atmel ATSAMD21G18,
>  ARM Cortex M0+, which is about $2.50 on Octopart.
>  But I have seen Atmel's ARM Cortex M0 under $1.
> 
> 

  But that is not the only component.

[toc] | [prev] | [next] | [standalone]


#569240 — Re: AGP30, absolute humidity conversion

FromKlaus Kragelund <klauskvik@hotmail.com>
Date2019-12-12 16:49 -0800
SubjectRe: AGP30, absolute humidity conversion
Message-ID<12282787-4670-4a60-b6f0-0eaa50725a1b@googlegroups.com>
In reply to#569216
On Thursday, December 12, 2019 at 8:13:27 PM UTC+1, Winfield Hill wrote:
> DecadentLinuxUserNumeroUno@decadence.org wrote...
> > Lasse Langwadt Christensen wrote
> >>
> >> you want to replace a $1 M0 mcu with a $100 A9 running linux?
> >> in what way does that make any sense?
> >
> >  How is a Pi a "$1 MO mcu"?
> 
>  The Feather we are using has an Atmel ATSAMD21G18,
>  ARM Cortex M0+, which is about $2.50 on Octopart.
>  But I have seen Atmel's ARM Cortex M0 under $1.
> 
If you can settle for 32kB Cortex M0+, they can be had below $0.3, but then you need to take significant quantity

Cheers

Klaus

[toc] | [prev] | [next] | [standalone]


#569253 — Re: AGP30, absolute humidity conversion

FromWinfield Hill <winfieldhill@yahoo.com>
Date2019-12-12 18:10 -0800
SubjectRe: AGP30, absolute humidity conversion
Message-ID<qsurua0eo0@drn.newsguy.com>
In reply to#569240
Klaus Kragelund wrote...
>
> On Thursday, December 12, 2019, Winfield Hill wrote:
>> DecadentLinuxUserNumeroUno@decadence.org wrote...
>>> Lasse Langwadt Christensen wrote
>>>>
>>>> you want to replace a $1 M0 mcu with a $100 A9 running linux?
>>>> in what way does that make any sense?
>>>
>>>  How is a Pi a "$1 MO mcu"?
>> 
>>  The Feather we are using has an Atmel ATSAMD21G18,
>>  ARM Cortex M0+, which is about $2.50 on Octopart.
>>  But I have seen Atmel's ARM Cortex M0 under $1.
> 
> If you can settle for 32kB Cortex M0+, they can be had
> below $0.3, but then you need to take significant quantity

 My RIS-788 beehive monitor is a complex instrument: more
 than 250 parts on its mobo, many more on plug-in boards.
 It had more than 75 sensors in total.  More than $150 in
 parts costs, $100 of machine-assembly costs, plus $100 of
 engineer/technician final-assembly costs.**   Controller
 expenditure was in the noise level.  The plug-in Feather,
 with its program, $18, ended up being a huge convenience.
 The low cost of the ATSAMD21G18 was an important aspect.

 ** Total quantity made: 30 pieces.  Total bees monitored,
 about 1 million.  About $0.01 per bee.  But they worked
 their asses off, that's worth 1 cent.  Well, OK, maybe for
 scientific purposes, too expensive for commercial purposes.
 For that the cost/bee has to be well under 0.05 cent.


-- 
 Thanks,
    - Win

[toc] | [prev] | [next] | [standalone]


#569223 — Re: AGP30, absolute humidity conversion

FromMartin Brown <'''newspam'''@nezumi.demon.co.uk>
Date2019-12-12 20:30 +0000
SubjectRe: AGP30, absolute humidity conversion
Message-ID<qsu810$o6h$1@gioia.aioe.org>
In reply to#569170
On 12/12/2019 13:23, Winfield Hill wrote:
> Przemek Klosowski wrote...
>>
>> On Fri, 15 Nov 2019 14:37:14 -0800, Winfield Hill wrote:
>>
>>> It's a painful to do the absolute humidity conversion
>>> formula in an ARM M0 processor, without floating point.
>>
>> Just table-lookup it to death? You should have a lot
>> of flash for detailed data, no?
> 
>   Alan Stern, the Institute mathematician, who did all
>   the programming for the beehive monitor, including
>   the 14-sensor TH-stick, which includes the AGP30,
>   tells me the floating-point libraries work just fine,
>   but it's just slower.  We do have the time, but maybe
>   with all the huge masses of code he's written, he's
>   running out of motivation to add more complication.

How large a dynamic range do you have to do the humidity correction 
over? It may well be possible to devise a scaled integer implementation 
for the correction provided that you only want say 0.1% accuracy.

Rational polynomials will get you quite good approximations to arbitrary 
functions which in the case of humidity corrections I suspect is fairly 
close to exp(x) or log(1+x) depending on how you have cast the problem.

-- 
Regards,
Martin Brown

[toc] | [prev] | [next] | [standalone]


#569266 — Re: AGP30, absolute humidity conversion

Fromupsidedown@downunder.com
Date2019-12-13 09:18 +0200
SubjectRe: AGP30, absolute humidity conversion
Message-ID<f9c6ve929e179f8e86mo4ef6hg08rgfctn@4ax.com>
In reply to#569223
On Thu, 12 Dec 2019 20:30:19 +0000, Martin Brown
<'''newspam'''@nezumi.demon.co.uk> wrote:

>On 12/12/2019 13:23, Winfield Hill wrote:
>> Przemek Klosowski wrote...
>>>
>>> On Fri, 15 Nov 2019 14:37:14 -0800, Winfield Hill wrote:
>>>
>>>> It's a painful to do the absolute humidity conversion
>>>> formula in an ARM M0 processor, without floating point.
>>>
>>> Just table-lookup it to death? You should have a lot
>>> of flash for detailed data, no?
>> 
>>   Alan Stern, the Institute mathematician, who did all
>>   the programming for the beehive monitor, including
>>   the 14-sensor TH-stick, which includes the AGP30,
>>   tells me the floating-point libraries work just fine,
>>   but it's just slower.  

There are a few things that make floating point libraries lower
compared to integer implementations. One is the adherence to IEEE
"oddities", such as NaNs, infinities, non-normalized small values etc.

In a small system, in which the majority of operations are done with
integers (or fixed points) and only some library functions such as
log(x) is called, you first have to convert the argument to floating
point and the result back to integer.  These conversions are nasty,
which requires normalization and denormalization, which is quite slow,
if no hardware support is available. Floating addition and subtraction
also suffer from the same problem.

Floating multiplication and division are simpler which are no worse
than integer mul/div.


>>  We do have the time, but maybe
>>   with all the huge masses of code he's written, he's
>>   running out of motivation to add more complication.
>
>How large a dynamic range do you have to do the humidity correction 
>over? It may well be possible to devise a scaled integer implementation 
>for the correction provided that you only want say 0.1% accuracy.
>
>Rational polynomials will get you quite good approximations to arbitrary 
>functions which in the case of humidity corrections I suspect is fairly 
>close to exp(x) or log(1+x) depending on how you have cast the problem.

In a floating point implementation, these functions are typically
implemented by first normalizing the value between 0.5 to 1.0 and a
3rd or 4th order polynomial is used to approximate the result to 6 or
7 significant digits. Of course a floating point argument has already
been normalized in the floating point format. 

It should be noted that doing the polynomial in a floating point
library, multiple slowish floating point adds are also required.

Doing for instance log2(x) entirely in integers first requires
checking the input range and flagging "impossible"  values before
going further, thus no need for infinities.

The argument is then normalized, requiring 4-5 instructions/bit. The
polynomials are then done with integer multiplications and additions,
(with possible shifts when fixed point values are used). There are
only one normalization compare to several when floating point
libraries are used.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | sci.electronics.design


csiph-web