RH-02 humidity.

 
Post new topic   Reply to topic    Pico Technology Forum Index -> Serial Port Products
Author Message
petokyo
User
User


Joined: 25 Jul 2007
Posts: 4
Location: Tokyo

PostPosted: Wed Jul 25, 2007 8:29 am    Post subject: RH-02 humidity. Reply with quote

rh-02 v1.1 manual, latest version as of yesterday.
(The humidiprobe USB isnt available at such short notice here. Nor is your custom usb<->cereal dongle. I have found that some of them just don't meet the requirements to drive the rh-02!)
vc++ crt application, home grown by yours truly, totally noddy.


page 12
rh02_get_value

can I assume that it returns absolute humidity and that I should
apply black magic as per page 19 for relative humidity.

I can find no illumination as to the nature of the low-pass filter used.

is there a way to ask for the cycle time without rolling my own driver?
Back to top
markB
Site Admin
Site Admin


Joined: 27 Mar 2007
Posts: 80
Location: Cambridgeshire,UK

PostPosted: Thu Jul 26, 2007 3:24 pm    Post subject: Reply with quote

There is no need for the 'black magic' that you described. The temperature is returned in hundredths of a degree Celsius, and the humidity in hundredths of a percent.

The filter is simply a rolling average filter.

There is no way to get the latest cycle time rolling your own driver.
Back to top
petokyo
User
User


Joined: 25 Jul 2007
Posts: 4
Location: Tokyo

PostPosted: Fri Jul 27, 2007 3:26 am    Post subject: absolute or relative. + error condition. Reply with quote

I am afraid that you didn't answer the question.

humidity is returned as absolute or relative. It doen't make much
difference around 25'c, but its 33'c in the shade today.

So, it's a rolling average, over how many cycles?

--------------------------
Error conditions:

open port, read from it once every 10 seconds.
the serial cable becomes unplugged, or someone chops through it with a machete.

rh02_get_value hangs forever, it never realises that nobody is talking to it and keeps sending "0x04" or "0x05"

replug in the cable, replace it, whatever.
rh02_get_value continues as if nothing has ever happened.
indeed, the cycle returned by rh02_get_cycle has not noticed either.

this means that unless you engage in black magic like putting an alarm around all calls with a timeout, you are never going to notice an equipment failure.

Unfortunately I don't have time to roll my own, as these go live at the beginning of next week driving around Tokyo extorting you to drink <insert large well known brand here>

It is, however, something people using the Dll's should be aware of.
Back to top
markB
Site Admin
Site Admin


Joined: 27 Mar 2007
Posts: 80
Location: Cambridgeshire,UK

PostPosted: Fri Jul 27, 2007 7:18 am    Post subject: Reply with quote

Humidity is returned as relative.

The rolling average filter is performed of 16 cycles.

It is not possible to get the last cycle time from the dll but is is possible to get the cycle number. Your application could detect any hardware errors that you describe if the cycle number has not incremented in a given time.

Code:
short int rh02_get_cycle(long * cycle, short int port);


I hope this is a little more helpful.
Back to top
petokyo
User
User


Joined: 25 Jul 2007
Posts: 4
Location: Tokyo

PostPosted: Fri Jul 27, 2007 9:46 am    Post subject: Humidity etc. Reply with quote

markB wrote:
Humidity is returned as relative.
The rolling average filter is performed of 16 cycles.

It is not possible to get the last cycle time from the dll but is is possible to get the cycle number. Your application could detect any hardware errors that you describe if the cycle number has not incremented in a given time.


Thank you very much, I shall try that.

However, it should be pointed out that rh02_get_value never return in an error situation, they just keep trying (verified by an rs232 port monitor.) as they never come back, the cycle doesnt increase until the rh02 returns, whereupon the cycle starts counting again as though nothing has happened.
Back to top
petokyo
User
User


Joined: 25 Jul 2007
Posts: 4
Location: Tokyo

PostPosted: Thu Aug 02, 2007 7:02 am    Post subject: I like truckin' Reply with quote

This is the RH-02 in action.

Traffic rules state that the display can't be changed while moving,
so the driver has a button to press whenever he stops.

The RH-02 sensor thingie is under the window shade on the very left
of the photo,

the program writes the temperature as an integer to a file IFF it changes.
The display application picks it up and creates the glorified 7 segment
display. below 30'c its yellow, what you see there is orange ^^;



truck1.JPG
 Description:
RH-02 is driving this truck display.

Download
 Filename:  truck1.JPG
 Filesize:  84.08 KB
 Downloaded:  847 Time(s)

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> Serial Port Products
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group