The SX19 sensor is an accurate probe for temperature and humidity measurement accessible directly from the Ethernet:
it allows having measurement nodes of the environmental parameters in any place where the Ethernet is available.
The optional extension with the ZigBee module cancels also this last limit, allowing a wireless measurement and so it may be placed almost everywhere.
Hardware description
The SX19 sensor consists in a compact PCB, only 55x66mm, based on the very accurate and small temperature probe SHT75 (Sensori di umidità e temperatura monolitici con uscita digitale).
It allows to retrieve temperature and humidity measurements in a very quick way and directly via LAN,
without the need of wiring anything and, especially, allowing to interface almost any existing system.
The (optional) possibility to equip the probe with a radio transceiver built with ZigBee technology (The Xbee and Xbee Pro modules: the wireless Zigbee transmissions made easy)
makes it even more versatile and it allows also to place it in those places where it is difficult or impossible realizing a network cabling.
The power supply of the probe is 5V DC and it can be simply provided by standard power adapter.
The protocol for reading sensor measurements
The communication protocol with the probe is very simple and implements a single command for simultaneous
reading of temperature and humidity measurement. It is also available a second command to get the probe firmware version.
The communication is executed by opening a TCP/IP socket and sending a 6 bytes packet. The 6 byte composing the packet have the following meanings:
Byte 0 |
Byte 1 |
Byte 2 |
Byte 3 |
Byte 4 |
Byte 5 |
SOH |
CMD |
VAL1 |
VAL2 |
VAL3 |
VAL4 |
Header (0x66) |
Command |
Data 1 |
Data 2 |
Data 3 |
Data 4 |
The response sent by the probe will be composed again of 6 bytes packet with the following meanings:
Byte 0 |
Byte 1 |
Byte 2 |
Byte 3 |
Byte 4 |
Byte 5 |
SOR |
CMD o ERR |
VAL1 |
VAL2 |
VAL3 |
VAL4 |
Header (0x55) |
Command or Error Code |
Data 1 |
Data 2 |
Data 3 |
Data 4 |
Command for sensor reading
Reading the probe temperature and humidity measurements is carried out simply sending the following command:
Byte 0 |
Byte 1 |
Byte 2 |
Byte 3 |
Byte 4 |
Byte 5 |
0x66 |
0x01 |
0x00 |
0x00 |
0x00 |
0x00 |
The probe will respond with a 6 bytes packet composed as follows:
Byte 0 |
Byte 1 |
Byte 2 |
Byte 3 |
Byte 4 |
Byte 5 |
0x55 |
0x01 (o 0xFF) |
Tmp1 |
Tmp2 |
Hum1 |
Hum2 |
In the probe response, Byte 1 will be the replication of the command sent (0x01) in the successful case
and it will have the value 0xFF in case an error occured. In the latter case, the error code will be reported in Byte 2.
Error codes are:
0x01 |
Missing SOH |
The command packet misses the header |
0x02 |
Unknow command |
The commant sent does not exist |
0x03 |
Sensor error |
It was impossibile to read sensor state |
On the other hand if the command is successful, then the Byte 1 is set to the value 0x01 and Bytes from 2 to 5 will contain
the temperature and humidity measurements. To calculate the final values of the two parameters just apply the following formulas:
Temperature = (0.01 * ((Tmp1*256)+Tmp2) - 40)
Humidity = (-4 + (0.0405 * ((Hum1*256)+Hum2)) + (-0.0000028 * (((Hum1*256)+Hum2))^2) ))
Version serial number reading
The second command of the protocol allows to retrieve the serial number of firmware version of the probe.
To achieve it, just send the command:
Byte 0 |
Byte 1 |
Byte 2 |
Byte 3 |
Byte 4 |
Byte 5 |
0x66 |
0x03 |
0x00 |
0x00 |
0x00 |
0x00 |
The probe will respond with a 6-byte packet as follows:
Byte 0 |
Byte 1 |
Byte 2 |
Byte 3 |
Byte 4 |
Byte 5 |
0x55 |
0x03 |
Ver Major |
Ver Minor |
0x00 |
0x00 |
The number of firmware version will be contained in Byte 2 and 3, as "Major Ver”."Ver Minor".
Probe configuration
The only required configuration of the probe is the one related to the network parameters that must fit the LAN where it is placed.
To configure these parameters, you can use the Web interface inside the Microserver hosted on the board.
To access it, open a Web browser and type the URL http://192.168.0.101/ then enter the user name admin without any password.
The configuration page will be displayed, form here you can access the Network section:
Using this interface, you can configure in a very simple way the parameters fit for your network and start using the probe.
ZigBee wireless extension
On demand, you can have the probe equipped with the extension ZigBee.
This way you can access the sensor directly from the wireless link, allowing installation where the Ethernet network is not available.
Large networks of sensors can also be set up, all of them can be accessed and read from a single central master board placed
Inside the coverage range of ZigBee modules transmission.
For the probe communication from the central master board you need a converter ZigBee / LAN or similar interface that can be requested to Area SX.
The test software
To speed up the development and the test of probe functions, a simple test software was developed and it is provided in VB6 source code.
A screen shot is shown below:
The software allows you to get the firmware version and of temperature and humidity values every few seconds.
Download
Test Software in Setup version
Test Software VB6 source code version
Segnala questo articolo:
Tags: - Monitoraggio Ambientale - Schede Area SX - Telecontrollo - ZigBee -
|