Joe Beach
CSM Physics Department
1523 Illinois Street, Golden CO 80401-1887
Fax: 303-273-3919

Joe Beach CSM Physics logo


Corrections or extensions to this document can be emailed to Joe Beach.

I have been using a Vaisala HM70 humidity meter to measure the humidity and temperature in an environmental enclosure in a research laboratory. The unit was purchased with the MI70 Link software, which can download data from the HM70 or display it in real time. It does this through a serial port interface. However, I am using the unit along with other instruments, and I wanted a single program that could read the data from the separate instruments, display it in a real time plot, and write it all to a single data file.

The manual for the HM70 didn't include the commands to send over the serial port to get data from the unit, or the format of the data that it would send back to the computer, so I called Vaisala to ask about it. They told me that what I wanted to do couldn't be done, there weren't any commands that could be sent to the HM70 to retrieve the data, and the MI70 Link software was the only possible way to get the data. I thought that was a strange thing to say. Basically, they were telling me that there was no way to retrieve the data from the HM70 with a computer, but if I were to use their MI70 Link software, I could retrieve the data from the HM70 with a computer. Sort of contradictory. My interpretation was that they didn't want me to use the HM70 in this way, they wanted me to buy a more expensive instrument instead. I don't think I'm going to buy anything from Vaisala again.

Since I already had the MI70 Link software, I tried monitoring the serial port traffic to figure out the data format and such. It turned out to be relatively straightforward. Within a day or two, I was able to write and debug a program that did what I wanted. I am going to list the commands and data formats that I have learned so that other people will be able to use their HM70 humidity meters more effectively.

Establishing communication with the HM70.

I used the following serial port configuration to communicate with the HM70:

Termination: \n, (LF, line feed)
Timeout: 100 (unfortunately, I didn't check if this was seconds or ms.)
Baud: 19200 (I think the HM70 can be set to different rates, too)
data: 8
parity: none
stop bits: 1
flow control: Xon/Xoff

The HM70 doesn't actively listen to its serial connection by default. The computer must first get its attention by sending a series of hexadecimal 0D FF, or extended ASCII CR and SM (carriage return and segment mark) to it. Just for reference, the visible character for an extended ASCII SM is this symbol: ΓΏ . For the illustrations of computer input and HM70 output below, I will denote non-printing ASCII codes in square brackets. For example, a carriage return will be [CR]. To get the HM70's attention, the computer might send:


It generally takes between 10 and 200 sets to get its attention. Once the HM70 realizes the computer is trying to communicate with it, it responds with:

  [CR][LF]line opened for operator commands[BEL][CR][LF]  

I found it effective to make a loop that sends [CR][LF] to the HM70 and checks the serial port for a response, repeating until the HM70 sends a response. If the computer sends more [CR][SM] after the HM70 gives the " line opened..." response, the HM70 will reply with a command prompt:

  1> [SUB] 

For any further communication, the HM70 will terminate its transmissions with a [SUB], or 0h1A. You may want to change the computer's serial port configuration to recognize that. The HM70 will expect all commands to it to be terminated with a [CR].

Once the HM70 sends a command prompt, its default setting is to echo all commands it is given. Although this can be useful for making sure that the HM70 is receiving what you think you are sending, it can also be a nuisance. The rest of this description will assume that command echoing has been turned off, which is done with the the ECHO OFF command:


 Echo is:[TAB]OFF[CR][LF]

I haven't checked to see if there is a corresponding ECHO ON or ECHO command to turn command echoing back on.

Getting temperature and humidity data from the HM70.

Once the user turns on the HM70 and responds to any prompts it may display on its screen, it starts measuring temperature and humidity and recording them in its memory. I have found no way to make the HM70 only take measurements when requested and send them to the serial port. However, it can still be used in a way that mimics that.

The initial command to get data from the HM70 is SEND n[CR], where n is an integer number of seconds. In response to this command, the HM70 will to the serial port two header lines followed by a line for each temperature and humidity measurement it has made for every nth second since it was turned on. If the unit has been on for 100 seconds, SEND 10 will cause the HM70 to send two header lines and then the data for time={0,10,20,30,40,50,60,70,80,90,100} seconds. The interchange in such a case would look something like this:

 SEND 10[CR]

 05-05-25 15:15:47[TAB]34.08[TAB]21.72[TAB][CR][LF]
 05-05-25 15:15:57[TAB]34.00[TAB]21.72[TAB][CR][LF]
 05-05-25 15:16:07[TAB]34.19[TAB]21.73[TAB][CR][LF]
 05-05-25 15:16:17[TAB]34.07[TAB]21.72[TAB][CR][LF]
 05-05-25 15:16:27[TAB]34.03[TAB]21.72[TAB][CR][LF]
 05-05-25 15:16:37[TAB]34.12[TAB]21.71[TAB][CR][LF]
 05-05-25 15:16:47[TAB]34.13[TAB]21.72[TAB][CR][LF]
 05-05-25 15:16:57[TAB]34.06[TAB]21.72[TAB][CR][LF]
 05-05-25 15:17:07[TAB]34.01[TAB]21.73[TAB][CR][LF]
 05-05-25 15:17:17[TAB]34.20[TAB]21.72[TAB][CR][LF]
 05-05-25 15:17:27[TAB]34.11[TAB]21.72[TAB][CR][LF]

The data is in a " spreadsheet" format: the rows are delimited by [CR][LF}, and the fields within the rows are tab delimited. The first line of the transmission will contain the number of measurements and the type of data being sent. In this case, there are 11 measurements, each of which give relative humidity (RH) and temperature (T). The second line will give the units of the measurements. In this case, the relative humidity is in percent (%), and the temperature is in degrees Celsius (°C). The data lines have three fields: date/time, RH, and T. The date and time are given in the format: YY-MM-DD HH:MM:SS . The relative humidity and temperature are both given to 2 digits of precision. The transmission is ended with a [SUB].

Once a SEND n command has been given to the HM70 and its output has been read, further data can be obtained using a SEND command. In this case, there is no number n after the SEND. This tells the HM70 to send all of the data it has acquired since the previous SEND or SEND n command, with the data interval set by the previous SEND n command. So, if the HM70 had been on for 100 s, then received a SEND 10 command causing it to send measurements for t={0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100}, then received a SEND command 20 s after that, the unit would send data for time={110, 120}. Unlike the case for SEND n, there will be no header to the transmission; the transmission will only include the data lines. The data lines are as for the SEND n command. For example:


 05-05-25 15:17:37[TAB]34.02[TAB]21.73[TAB][CR][LF]
 05-05-25 15:17:47[TAB]34.09[TAB]21.76[TAB][CR][LF]

In practice, I collect " real time" data from the HM70 by first using a SEND 1 and then SEND commands. After the initial SEND 1, the data collection program reads the HM70 output and throws away everything except the most recent measurement, which is the last data line. Then the program waits for whatever interval the user prescribed (for example, 10 seconds) and gives another SEND command. It again reads the output from that, and throws away everything except the most recent measurement, which is the last data line. This works well for data intervals ranging from around 3-60 seconds. For longer intervals, it may be good to increase the n in the initial SEND n to 10 or more to reduce the number of data lines that get transmitted for each measurements. As the measurement interval approaches 1 second, a problem can arise in which the computer program issues a SEND command before the HM70 has made a measurement 1 second or more later than for the previous SEND, so it won't give any output. I have no need for measurement intervals less than 5 s (and really even that is overkill for my application), so it hasn't been a problem for me.

Ending data collection.

Once the data collection is finished, the HM70 can be told to stop listening to the serial port by giving it the EXIT command. The command and the HM70's response are:


 line closed[CR][LF]

However, the HM70 can be made to start listening to the serial port again as described in the section " Establishing communication with the HM70."

Other Commands.

Here are some other commands I have seen work over the serial port on my HM70.

The VERS command gives version numbers, apparently for the MI70 Link software and the HMP70 firmware. In the response, I have given in square brackets the hexadecimal extended ASCII codes for some odd non-printing characters.


 HMP70[02]B[01] 3.07[CR][LF]

The SNUM command gives the serial numbers for the HM70 and the probe it is using.


 Serial nr:[TAB]A0140054[CR][LF]
 Probe snr:[TAB]A0420005[CR][LF]

The CAL command gives information about the probe calibration (the date and who performed the calibration, apparently).


 Probe cal:[TAB]2005-01-25 (Vaisala/HEL)[CR][LF]

Via its keypad, the Vaisala can be made to store data points or time series in a file in the instrument memory. I don't know if there is a way to make this happen via the serial port. However, the DIR command will give a listing of stored files on the instrument. If none are stored, the command and response are:



If, however, there are data files on the instrument, the command and response are:


 2005-05-26 12:19[TAB]05-05-26 12:19:54[TAB]60[TAB]0201[CR][LF]
 2005-05-26 12:19[TAB]05-05-26 12:19:15[TAB]1[TAB]0000[CR][LF]

Each line is a data file description. The fields for each record are tab delimited. I haven't spend much time figuring them out because I haven't needed to use them, but it looks like the first field is the YYYY-MM-DD HH:MM that the measurement was started, the second field is the YY-MM-DD HH:MM:SS that the measurement ended, and the third field is the number of measurements in the file. I'm not sure about the fourth field.

The PLAY n command can be used to have the HM70 send the contents of a data file over the serial port. The integer n designates which file in the DIR list to send. I think that the first line is number 0, the second is number 1, and so on. For the directory listing above, the command and output are:


 2005-05-26 12:19[TAB]05-05-26 12:19:15[TAB]1[TAB]0000[CR][LF]
 05-05-26 12:19:15[TAB]25.18[TAB]23.05[TAB][CR][LF]

The first line of the output is the DIR information for file 1, the second line lists the type of information being sent, the third line lists the units for the measurements, and subsequent lines give the measurement data in the same format as the SEND and SEND n commands. In this case, the file only had one measurement.

Files can be deleted from the HM70 with the DEL n command. The integer n is the number of the file to be deleted in the DIR list. The command and output to delete file 1 from the above DIR list are:

 DEL 1[CR]


The UNIT command lists all of the possible measurement units that the HM70 can use. I presume there is also some way to set them via the serial port, but I haven't tried to do that yet. The output is a bit cryptic, and I haven't consulted the HM70 manual to figure out all of the abbreviations. The UNIT command and its output are:



Square brackets denote non-printing extended ASCII characters either by name or hexadecimal code.

PDF summary.

I have had several people working with Vaisala HM70 units contact me about this web page. One of them, James Brooks, provided a very detailed description of the HM70 commands he has been able to use. I have included a pdf file of his description here.