RH-02 humidity.

Post any questions about our serial port products
Post Reply
petokyo
User
User
Posts: 4
Joined: Wed Jul 25, 2007 7:35 am
Location: Tokyo

RH-02 humidity.

Post by petokyo »

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?
=^x^=

markB
Site Admin
Site Admin
Posts: 83
Joined: Tue Mar 27, 2007 9:43 am
Location: Cambridgeshire,UK

Post by markB »

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.
Regards

Mark

petokyo
User
User
Posts: 4
Joined: Wed Jul 25, 2007 7:35 am
Location: Tokyo

absolute or relative. + error condition.

Post by petokyo »

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

It is, however, something people using the Dll's should be aware of.
=^x^=

markB
Site Admin
Site Admin
Posts: 83
Joined: Tue Mar 27, 2007 9:43 am
Location: Cambridgeshire,UK

Post by markB »

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: Select all

short int rh02_get_cycle(long * cycle, short int port);
I hope this is a little more helpful.
Regards

Mark

petokyo
User
User
Posts: 4
Joined: Wed Jul 25, 2007 7:35 am
Location: Tokyo

Humidity etc.

Post by petokyo »

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.
=^x^=

petokyo
User
User
Posts: 4
Joined: Wed Jul 25, 2007 7:35 am
Location: Tokyo

I like truckin'

Post by petokyo »

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 ^^;
Attachments
truck1.JPG
RH-02 is driving this truck display.
(84.08 KiB) Downloaded 894 times
=^x^=

Post Reply