Archived: Using the Vaisala HMM 22D Humidity Sensor with NI Wireless Sensor Networks (WSN)

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.


Note: NI WSN products are not supported beyond LabVIEW 2015. If you have questions on migrating products, contact technical support at

This document describes the use of the Vaisala HMM 22D sensor with the NI Wireless Sensor Networks (WSN) system for wireless humidity monitoring. This document is one in a series of documents describing how to use specific sensor products with the NI WSN system to enable a variety of applications, such as environmental monitoring, climate studies, and resource monitoring. For more information on using other sensors with the NI WSN system, please refer to the WSN Sensor Solutions document.


Vaisala HMM 22D Humidity Sensor

The HMM 22D is part of Vaisala’s humidity transmitter line for Original Equipment Manufacturers (OEMs), utilizing Vaisala’s HUMICAP® humidity sensor technology.

As the HMM 22D is a humidity transmitter, it relies on an internal sensor to take the measurements.    The HMM 22D utilizes the Vaisala HUMICAP® 180, a capacitive thin-film polymer sensor.  The thin-film polymer either absorbs or releases water vapor as the relative humidity of the ambient air rises or drops. The dielectric properties of the polymer film depend on the amount of water contained in it: as the relative humidity changes, the dielectric properties of the film change, and so the capacitance of the sensor changes. The electronics of the instrument convert the capacitance into a current output which indicates the humidity.


Figure 1: Vaisala HMM 22D

As is, the HMM 22D can be integrated into equipment to work with the NI WSN in integrated monitoring systems.


Wireless Humidity Measurements

By combining the Vaisala HMM 22D with the NI WSN, complete remote humidity monitoring is capable.  The NI WSN voltage node can source the power required by the HMM 22D to operate, eliminating the need for an external power supply.  The data collected remotely using the HMM 22D can be transmitted wirelessly back through the NI Wireless Sensor Network for observation and analysis.

Expanding the number HMM 22Ds used with WSN-3202s enables expansion of the remote humidity monitoring system.  Now an entire network of sensors and nodes can communicate between multiple locations, over larger areas if needed, acquiring more data for concurrent analysis.


Connecting  the HMM 22D to NI WSN-3202 Node

Physically connecting the HMM 22D to the NI WSN-3202 Node is very straightforward.  A precision resistor is required to turn the 4-20 mA output signal of the HMM 22D into a voltage signal readable by the NI WSN-3202.  For example, you can use a 249 Ω resistor from the NI SCXI Resistor Kit to convert the 4-20 mA signal to a 1-5 V signal.   The positive reference terminal of an external power supply should be connected to the positive RH terminal on the HMM 22D, and the negative reference terminal to the AI GND of the WSN 3202.  The power input requires 10-35 VDC with an average current draw of 100mA.  The analog input ground should be connected to one end of the 249 Ω precision resistor, and the other end should be connected to one of the analog input channels.  This analog input channel should also be connected to the negative RH terminal on the HMM 22D.

Figure 2.  Connecting HMM 22D to WSN-3202


Programming NI WSN for use with the HMM 22D

Using LV on a host PC with the NI WSN-3202 and the HMM 22D

 Facilitating communication between the NI WSN and HMM 22D can be accomplished through the node properties, accessible from the LabVIEW Project Explorer Window.  Under the channels tab, configure all channels for Type 0: Analog Input and the range for -5 to 5 Volts, as the 4-20 mA signal from the HMM 22D, when dropped over the 249 Ω resistance, maps to an analog signal of approximately 1 – 5 V (0.996 – 4.98 V).  Furthermore, under the node tab, set the sensor power attribute value to 25 ms Before Sampling.  Also under the node tab, set the node sample interval (seconds) hardware configuration setting to an interval appropriate for your application.  The higher the sample interval value, the less often the WSN-3202 will take a reading from the HMM 22D.  A typical sample rate might be one sample every second.

Taking readings from the HMM 22D in LabVIEW is accomplished by reading the shared variables available from the NI WSN-3202.  Simply read the analog input channel that the precision resistance is physically wired to, and then scale the acquired analog signal.  Since the voltage drop across the 249 Ω resistor of 0.996 V to 4.98 V maps linearly to 0-100% relative humidity, multiply the voltage acquired by 25.1 and subtract 25% relative humidity to achieve proper scaling.  Then route this scaled value to a chart to view the values as they are acquired.  In this particular example, the charts are updated only when a difference in the timestamps of the sampled date on the analog input is seen.

hmm 22d.jpg

Figure 3: Reading HMM 22D Data in LabVIEW

Using LabVIEW WSN Embedded Programs on the NI WSN-3202 with the HMM 22D

With LabVIEW WSN, you can download and run LabVIEW VIs on a programmable WSN-3202 node for local data processing and control.  For example, you could perform the data scaling to engineering units locally on the node itself, returning humidity directly.