Searching \ for '[PIC]:Measuring the Dew Point' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Measuring the Dew Point'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:Measuring the Dew Point'
2003\02\20@052101 by cdb

flavicon
face
I wonder if any one has come across a quick and dirty way of
calculating dew point.

All the meteorological websites I've been to, offer formulae with
high precision resolution, something I don't think I really need. I'm
also trying not to use floating point maths. The main sticking point
is the log10 function all the other constants I can convert to whole
numbers.

I'm using the SHT11 sensor from Sensirion and have solved the
temperature and RH maths, just the dew point is causing me problems.

Sensirion's and others offer the following formula

logEx = 0.66077+(7.5 * t_C) / (237.3 + t_C) + (log (RH) -2)

DewPoint = (logEx - 0.66077) * 237.3 / (0.66077 + 7.5 - logEx)

Where t_C = temperature in celsius
            RH = true relative humidity

I'm hoping to make this into a greenhouse controller, so I assume
that the frost point would need to be known - gardening ain't my
thing :)

Colin




--
cdb, spam_OUTcdbTakeThisOuTspambarnard.name on 31/03/2002

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu>

2003\02\20@073024 by Scott Touchton

picon face
How about just using a look up table?
----- Original Message -----

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu>

2003\02\20@073229 by Spehro Pefhany

picon face
At 08:19 PM 2/20/2003 +1000, you wrote:
{Quote hidden}

If you have a program such as MATLAB, plot the 2-D function in 3-D
so you can get some insight into the nonlinearity compared to where
the dew point number is important, and the range of each variable- such
as logEx. You may be able to use a 2-D LUT with interpolation
to give you DewPoint(t_C, RH).

Implementing log10 isn't that hard either- one general approach is to
transform to reduce the range, then use a series or polynomial to
evaluate the log and correct the result.

I don't know why the frost point would be important in a greenhouse.

Dew point is a good indication of the absolute dryness of the air, since
it is independent of the temperature of a given sample of air , whereas
RH varies with the temperature of that sample.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffspamspam_OUTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestKILLspamspammitvma.mit.edu>

2003\02\20@081132 by Spehro Pefhany

picon face
At 08:19 PM 2/20/2003 +1000, you wrote:

>  You may be able to use a 2-D LUT with interpolation
to give you DewPoint(t_C, RH).

P.S. do a search on "bilinear interpolation" if you want to pursue this
approach.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
KILLspamspeffKILLspamspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu>

2003\02\20@083036 by Olin Lathrop

face picon face
>  All the meteorological websites I've been to, offer formulae with
> high precision resolution, something I don't think I really need. I'm
> also trying not to use floating point maths.

Why?  Speed certainly can't be an issue when adjusting climate controls in
a greenhouse.  Otherwise, 24 bit floating point probably saves memory over
using 32 bit fixed point, and is certainly easier to program because you
don't have to worry about where the fixed point is.  The 16 bit precision
of 24 bit floating point numbers is usually plenty when dealing with real
world measurments, as certainly seems the case here.

> The main sticking point
> is the log10 function all the other constants I can convert to whole
> numbers.

It might be easier to implement a Log2 function.  Log10 is then just one
multiply away, although you can probably adjust some other constant in the
equation to eliminate the extra multiply.  There are lots of ways of
calculating "complex" functions like Log, Sine, etc.  Most envolve some
iterative techniques, but you've got lots of cycles.

If you start using floating point on the PIC, you might want to check out
my PREPIC MPASM preprocessor at http://www.embedinc.com/pic.  It has a
bunch of inline functions for doing floating point operations on
constants, then converting the result to hex notation that the assembler
can understand.  This makes the source code much more readable.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspamBeGonespammitvma.mit.edu>

2003\02\20@100813 by Jai Dhar

flavicon
face
Quoting Scott Touchton <TakeThisOuTScott.TouchtonEraseMEspamspam_OUTCOMCAST.NET>:

> How about just using a look up table?

This might be a stupid question, but what exactly is a lookup table. Recently,
I have been reading a lot of posts dealing with lookup tables. Is it just a
table basically stored in RAM/EEPROM that can be used to obtain a value from a
calculation instead of coding math routines? At the expense of code space of
course...

Correct me if I'm wrong please.

Jai

> {Original Message removed}

2003\02\20@101855 by Spehro Pefhany

picon face
At 10:07 AM 2/20/2003 -0500, you wrote:
>Quoting Scott Touchton <RemoveMEScott.TouchtonspamTakeThisOuTCOMCAST.NET>:
>
> > How about just using a look up table?
>
>This might be a stupid question, but what exactly is a lookup table. Recently,
>I have been reading a lot of posts dealing with lookup tables. Is it just a
>table basically stored in RAM/EEPROM that can be used to obtain a value from a
>calculation instead of coding math routines? At the expense of code space of
>course...

Yes, that's all it is. In this case the function is of *two* variables, so
you need an n x m LUT, and it's probably necessary to use two dimensional
interpolation.

For example, he might have temperature from 0 to 40 degrees C in 2' steps,
and RH from 0 to 100% in 5% steps. That would require 400 values. If
dew point was represented as a single byte (+/-63 degrees C with 0.5'C
resolution) then it would require 400 bytes or words depending on the part.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffEraseMEspam.....interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspammitvma.mit.edu>

2003\02\20@101904 by Olin Lathrop

face picon face
> This might be a stupid question, but what exactly is a lookup table.
Recently,
> I have been reading a lot of posts dealing with lookup tables. Is it
just a
> table basically stored in RAM/EEPROM that can be used to obtain a value
from a
> calculation instead of coding math routines?

Yup.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestEraseMEspamEraseMEmitvma.mit.edu>

2003\02\20@102113 by Wouter van Ooijen

face picon face
> Is it just a
> table basically stored in RAM/EEPROM that can be used to
> obtain a value from a
> calculation instead of coding math routines? At the expense
> of code space of
> course...

Data stored in code space. Some PICs can read the code space (some
recent 16F's, all 18F's), so for those data can be stored 'as is'. For
others it must be in the form of RETLW instructions, with suitable code
to jump to the desired one. This last form is what is often called a
lookuptable, although the first (data stored 'as is') could be called so
too.

I am a software professional, not a hobbyist (or at least I don't have
much time left to be a hobbyist). It is not entirely clear to me whether
you want professional assistance or just free advice. If you want
professional assistence you are of course welcome, otherwise I must
decline your request for free assistance.

Note that there are mailing lists for Jal (see the Jal page at
http://www.voti.nl/jal) and for general PIC questions (see http://www.piclist.com).
There might be people on those lists who can and have the time to help
you.

regards,
Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspam_OUTspamKILLspammitvma.mit.edu>

2003\02\20@113459 by

flavicon
face
If I'm not completly wrong, he *was* using the Piclist
mailing list, or ?

Jan-Erik Söderholm


Wouter van Ooijen wrote :
>Note that there are mailing lists for Jal (see the Jal page at
>http://www.voti.nl/jal) and for general PIC questions (see http://www.piclist.com).
>There might be people on those lists who can and have the time to help
>you.

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspamspammitvma.mit.edu>

2003\02\20@174328 by cdb

flavicon
face
Thanks for the replies, looks as though I'll go back to FP maths.
The  reasons I was trying to avoid FP maths was, space -if I do it in
'C' my compiler bloats the size  to something awful (so yes I'll ASM
it), and as I won't be displaying fractions I thought the loss of
precision in this application wouldn't be that important.

And I was only going to do it in 'C' so that I could use it in an
16F873 and just change the header file and use it in an 18F252.

Colin
--
cdb, EraseMEbodgy1spamspamspamBeGoneoptusnet.com.au on 21/02/2003

I have always been a few Dendrites short of an Axon and believe me it
shows.

Light travels faster than sound. That's why some people appear bright
until they speak!

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestKILLspamspammitvma.mit.edu>

2003\02\21@104117 by Dale Botkin

flavicon
face
Is that an I2C device?  I had a very quick look a the data sheet and see
it's a 2-wire, it looks like I2C, but they seem to carefully avoid calling
it that - which suggests that it is "I2C compatible" but perhaps not
officially licensed for using that term from Philips?  I haven't compared
all of the protocol to make sure.  Are yo just using I2C routines to talk
to it?

Dale
--
It's a thankless job, but I've got a lot of Karma to burn off.


On Thu, 20 Feb 2003, cdb wrote:

> I'm using the SHT11 sensor from Sensirion

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\02\21@155349 by cdb

flavicon
face
No it's not an IC2, but is like a subset of it with a bit of Dallas
1Wire thrown in for good measure.
.
All devices have a fixed address of 000, data is valid on the rising
CLK edge.

If you order the sample, be aware you get the SMD not the SIL
version.
Also Farnell don't stock it as a standard line as shown on the
distributor page, which might account for the changed ordering page
and prices.


Colin
--
cdb, bodgy1STOPspamspamspam_OUToptusnet.com.au on 22/02/2003

I have always been a few Dendrites short of an Axon and believe me it
shows.

Light travels faster than sound. That's why some people appear bright
until they speak!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...