Temperature data format
For the purpose of transmitting temperature data from the sensor to the receiver, a dedicated data format has been designed. There are several points which enable reliable and long lasting operation of transmitter-receiver pair worth mentioning:
-
Actual temperature data is, after analog-to-digital conversion, noise reduction and calculating its decimal representation inside a transmitting unit microcontroler, being sent as a three digit decimal number - the first two digits designate the whole while the third one designates the decimal part of that number. Measurement range of the remote thermometer is -20'C - +50'C. In order to avoid sending additional bit for the "-" sign, data is sent in range: 00.0'C - 70.0'C. The receiving unit is of course aware of this, so it automatically subtracts a fixed offset value of 20.0'C in order to recalculate the actual temperature in Celsius degrees. Should the user want to read the temperature value in degrees Fahrenheit, the receiving microcontroller is able to recalculate the displayed value with ease.
-
While designing data format, it has been concluded that sending any unnecessary bits should be avoided with the aim of preserving as much battery energy as possible. Although shortening the code by a bit or two might seam as skimping, a simple calculation shows that adding a signle additional bit to the code shortens battery operational range by approximately two weeks! With this in mind, and noting thet rarely, if ever, there will be more than four transmitting remote thermometer units inside a single room, address bits were shrinked to an absolute minimum - there are only two such bits.
-
A short checksum is added to address and data bits in order to ensure errors in reception. Because this is not a particularly critical application, checksum is relatively short and consists of 6 bits. But this is enough to shrink the possibility that a wrong bit is not recognised by the receiver to 1/64. As most errors are being dealt with by another layer of data protection, FEC coding, even a checksum this short ensures that there is virtually no chance that a wrong reception ever occurs.
-
In order to prevent false reception at the receiving unit due to interferencies caused by IR commands originating in standard home appliances IR remote control units, address, data and checksum bits are FEC coded. This procedure doubles the total number of bits being sent but its effectiveness in data protection makes it unavoidable in any quality telemetry coding scheme.
-
To combat data interruptions longer than a few bits, a so called "bit-interleaving" technique is added into the mixture. This means that code bytes are not being sent in seccessive order, but firstly all first bits of each byte are transmitted, then the second bits, then the third.. up to all eighth bits of each code byte. This technique works because FEC coding automatically corrects a single bit error in each code byte. As each byte is by interleaving process spread in time, even those interferences lasting several code bit intervals will harm not more than a single bit of each code byte - which is tollerable because of FEC decoding.
Putting all this together, a code word consisting of five 8-bit IR bytes emerges. At data rate of 1kbps, the complete emission lasts merely 1/25 second. One such short code word is emitted every 30 seconds which means that IR communications channel gets occupied 1/600th of overall time. That is good for two reasons: 1) Battery drain is very low. Despite IR LED conducting up to 500mA of current from batteries while emitting IR bits, average current consumption is barely 80ľA which leads to more than a whole year of uninterrupted thermometer operation from a single battery pack. 2) IR communication other than thermometer data transfer can take place in the same room inside which a remote thermometer operates. Therefore, using a TV remote control is as easy as usual even if more than one thermometer unit is active in the same room.
In order to enable using standard IR remote control receiver modules, IR bits are On/Off keyed at the rate of 38kHz. This means that each bit is transmitted as a short burst of 38kHz IR impulses. Most IR receiver modules put some constraints on bit duration which has been taken into account when designing the data format. There is a broad spectrum of cheap yet extremely high quality rceiver modules on the market. The most popular ones belong to TSOPxxxx family produced by Vishay (Siemens).