Saturday, February 6, 2010

Wireless Skin Temperature Detector Printer Port

Skin Temperature Radio Telemetry: A Case Study of How to Design and Make Your Own System

Jan Cocatre-Zilgien


Adapted with permission from the author's web page.

Any parent who has had to take care of a feverish child at home knows what a source of emotional stress and anguish it can be. This is magnified at night, as fever often tends to get higher then. Unchecked fever may create complications of its own, such as dehydration and febrile convulsions in infants. The lack of sleep resulting from periodically monitoring the child can be very tiring for the parents, especially if the fever spans several days.



When small single-chip transmitter and receiver modules became publicly available, it was an invitation to design a skin temperature telemetry system for those parents. I used the very robust modules from Linx Technologies, with 418 MHz chosen over 315 MHz because of the slightly shorter antenna. Essentially, if the transmitted child skin temperature gets too hot (fever peak) or too low (malfunction), an alarm is triggered at the receiver. The version whose receiver is integrated with an alarm clock was patented in the USA under patent number 5,844,862, which shows variants and other complementary information. Figure 1 is a sketch of the completed device.
 
 
 
 
 
 
 
Figure 1. The skin temperature radio transmitter.






Design Fail-safe requirement


The first requirement is that the system be fail-safe, so that the parent can fall asleep and be certain that an alarm will be triggered in case of a problem. By design, an alarm is triggered when the skin temperature exceeds some threshold, which would be a "true positive" event. However, an alarm can also be triggered for "false negatives." If the transmitter is damaged or made inoperable by impact, fluid contamination, a broken or folded antenna, or a low-voltage or dead battery, or if there is excessive radio interference or any other cause interrupting the transmission of temperature data, the condition is detected at the receiver end, and an alarm is triggered. Purists will note that an absolute fail-safe design would require two independent receivers monitoring the same transmission.


Child-safe requirement

You do not want a simple solution to become a dangerous problem.

It is wireless, in the "radio" sense, meaning that the risk of strangulation and electrocution is eliminated.

The temperature transmitter is generally flat with rounded and smooth edges. The discrete "teardrop" tantalum capacitor used in the prototype would be replaced by a surface-mount (SMT) version, like all other components, in the final product.

The antenna is a flexible wire that is too short to present a strangling hazard.

The battery is purposely a diameter too large to reduce the choking hazard should it be accidentally released from its holder and put in the infant's mouth before the parents are warned by the loss of transmission alarm.

The transmitter may be coated with an hypo-allergic finish.

The radio-frequency irradiation of very short pulses of less than 1 mW, every half-minute or so, is an insignificant biohazard, several orders of magnitude less than the irradiation from a cellular phone.

Interface requirement

The receiver module provides a single output logic bit. Practically all computers, including the portable, laptop, palmtop, types (and now also cell phones), possess some form of parallel or serial port that can be configured to acquire the data from the receiver.
 
Legal requirement




The system aims to be compliant with the rules and regulations of the FCC (Federal Communications Commission) for license-free operation in private home settings. A first condition for such operation is that the "device may not cause harmful interference" (47 CFR 15.19a3). The practical range of the transmitter is about 30 meters (100 feet), which is within the boundaries of most houses or apartments. Also, the transmission of a short pulse separated by long periods of about 30 seconds will not interfere with the operation of a neighbor's garage door opener operating on the same frequency, for example. A second condition for operation is that the "device must accept any interference received, including interference that may cause undesired operation." Unlike hospital telemetry systems, the device shares frequency with remote controls, wireless alarms, or other telemetry systems. However, a special technique of data smoothing eliminates out-of-bounds readings. As a result, the system is relatively immune to interference.





The Receiver



Receiver Hardware



Before starting, one must have an idea of the "landscape" of radio activity on 418 MHz. Frequency usage evolves with time, and if one frequency becomes too cluttered with unwanted signals, other "FCC Part 15" frequencies should be investigated.



The first task is building a receiver that plugs into the parallel port of a computer (Fig. 2). This receiver is extremely easy to build, and can be assembled on a breadboard. Later, it can be made to fit within the housing of a DB-25 plug, except for the short antenna. If the antenna is a rigid wire, don't forget to terminate it by a loop at least 2.5 cm (1 inch) diameter to protect your eyes; the only important factor is that the overall length about 15.9 cm (6.25 inches).


Figure 2. Receiver schematic, parallel port version
 
 
 
 
 
 
 
 
 
 
 
Receiver Software




The original software was essentially a simple DOS program, written in Turbo C, running on a Windows 98 laptop computer. However, current Microsoft operating systems do not allow direct access to parallel or serial ports anymore, for computer security reasons. As a result, access to the parallel port needs the addition of a dedicated driver. Such drivers may be found on the Internet, (see, for example, ePanorama,Parallel Port Central, or Inpout32.dll). The programs can be written in any language, but they must be fast enough to poll a receiver bit at least every millisecond.



The next step is writing a "shake-down" program that does two things:



(1) It sets all eight pins of the parallel port high (Power from Parallel Ports). These are summed together through the eight diodes, which are germanium types because of their low voltage drop. Not all computers provide the same oomph on their parallel ports. After the diodes, some computers provide 4.6 volts and others only 3.3 volts, which is insufficient to power the Linx 418 receiver module. In this case, a separate battery should be used to provide the power.



(2) It reads in the status of the receiver bit, takes note of the time at which it transitions high-to-low and low-to-high, calculates the duration of any detected pulses, and sorts them into bins, to create a pulse width spectrum, to later display in graphical form.
 
han 10,000 pulses, the results show that nearly half of the pulses are in the 1 ms bin, and that overall the 418 MHz airwaves are quite active below 10 ms. These are probably bit-streams from garage door openers. The unexpected finding are periodic spikes at 11, 27, 43 ms, etc. of unknown origin. Nevertheless, valleys of low activity in between are clearly seen; a pulse duration of 20 ms was therefore selected for the transmitter. The final program will later follow a single logic loop (see Fig. 4).



Figure 4. Synoptic flow-chart of final program with 2 alarms.






Based solely on the time of occurrence of the low-to-high and high-to-low transitions, the duration and the period of the pulses are analyzed. There is a first alarm if the time elapsed between pulses is too long. This happens if interference prevents the recognition of any pulses, or if the transmitter has failed. There is a second alarm if the recognized 20 ms pulses occur too frequently (fever) or too sparingly (sensor too far from skin).


The Transmitter

The transmitter (Figs. 5 and 6) is a single-layer printed circuit board measuring 44.5 mm x 38 mm (1.75" x 1.5"), with all the components surface-mounted on the copper "top side," except for the temperature sensor on the "skin side." The transmitter module is a Linx TXM418LC. Since this transmitter chip is a SMT (surface mount technology) device, most other components are, too. There are small holes at the corners so that it may be sewn to a garment.
 
 


Figure 5. Transmitter seen from the top, antenna in top right corner; obviously a hand-made first SMT project!





Figure 6. Transmitter seen from the skin side, with the thermistor in the center.






The transmitter uses two cascaded LMC555CN timers (Figs. 7 and 8). The first timer controls the period of the pulse through a 100 microfarad tantalum capacitor and a 1 megohm thermistor (large time constant). The second timer controls the duration of the pulse, set by its own RC combination (short time constant) to obtain 20 ms.
 
 

Figure 7. Transmitter schematics, with all the negative pins of TXM creating a ground plane under the chip.




Figure 8. Rough topological layout of transmitter; don't forget jumpers J1 and J2.






Only draw the copper traces (Fig. 9) after all the components have been collected. The negative trace circles all around to provide a ground-plane; there are two jumpers J1 and J2 needed to complete the circuit.
 


Figure 9. Hand-drawn printed circuit board.




The relatively huge battery can provide months of continuous operation.





Calibration



All the individual components of the system were chosen as standard, cheap, off-the-shelf types. Because of the scatter in their characteristics, the period of the pulses that encodes skin temperature cannot be pre-calculated to the degree of precision needed for an alarm device. Especially since it is a medical instrument, each and every device needs to be tested for correct operation.. It is during this testing that the calibration is performed. This provides the parameters subsequently used in the software that converts the pulse period to skin temperature.



For the prototype, a toy inflatable balloon was filled with hot tap water and left to cool for 2 hours while recording the period of pulses from a transmitter strapped against it (Fig. 10). The actual "skin" temperature of the balloon was measured with a certified thermometer. A factory process would need only 3 measurements in temperature-controlled enclosures to accomplish the same calibration.
 
 


Figure 10. Transmission period over cooling time, used for calibration.




With the 555, thermistor resistance is proportional to pulse period. The relationship between temperature and resistance of the thermistor is all but linear (1/T_K = a + b Log(R) + c Log(R)3). Make a 2nd-order approximation valid only in the relatively small span of temperatures to be monitored, for example, between 94 and 108 deg F, with 3 measurement points (T_F = a + b PER + c PER2) and again compare the telemetered and real temperatures (see Fig. 11).
 


Figure 11. Telemetry temperature vs. thermometer temperature.




The small deviations of the telemetry data were probably due to spike or data-loss noise, well within the tolerances. The time response also needs to be evaluated. The thermal properties of the transmitter were measured by applying it from an ambient temperature of 70 deg F to a 110 deg F water balloon, then, after stabilization, doing the opposite (see Fig. 12).
 

Figure 12. Time response to a step stimulus.




Temperature equalization is much faster with physical contact than in open air (as expected), and its time constant is less than the period of the measurement pulses. For a commercial product, further testing would be necessary, for example to study the effects of decreasing battery voltage.





Trials



Now comes the time of the "clinical trials", which involved calling parents and asking endearingly, "Is your kid sick, yet?" I found one, but the mother told me I was too late. Her 19-month old daughter had just recovered from her infection. I convinced her to do a night monitoring, which triggered an alarm at 10 PM and provided the raw data in Fig. 13.
 

Figure 13. Overnight raw data, 19-month old girl.






Because of the "spike noise," the data are filtered using a Median Filter. This requires a couple of minutes of warning time, which is acceptable in the dynamic of a fever (see Fig. 14).
 

Figure 14. Median-filtered temperature data.






At 9 PM there was a diaper change and a temperature drop of 10 deg F. At 10 PM there was a totally unexpected fast-onset fever peak reaching more than 105 deg F (more than 106 deg F of core temperature), which triggered the alarm, set at 103 deg F. At 5 AM the diaper belt probably gaped open somewhat, and temperature dropped accordingly (there was no low-temperature alarm set for that trial); it could have masked another temperature peak. Finally, 7:30 AM was the wake-up time. Twice overnight, 4 consecutive pulses were missed by the receiver, and could not be ignored by the data filtering.





Epilogue



This skin temperature telemetry system works, but bringing the product to market takes more work--and funds. I discovered after the fact that the FCC Part 15 compliance must be done by a certified engineering firm at a cost of $20,000 for the transmitter, plus $20,000 for the receiver. Then you need very expensive product liability insurance (imagine a child dying of the poorly explained Sudden Infant Death Syndrome, while wearing the telemetry transmitter). As a result, I have only tried to convince established manufacturers to market the system, including those making wireless outdoors temperature sensors for weather monitoring, but this was not successful.



One day I got a frantic phone call from a mother who had tracked me down from the Patent Office records. Her son had repeated ear infections and high temperatures, and she was desperate to find where she could buy the device. I still feel bad having had to tell her that it is not for sale anywhere.



But this is where you come in, to improve the system and develop it further. Be the first to make an USB version.



Source:

http://www.sas.org/tcs/weeklyIssues_2007/2007-04-06/project1/index.html

No comments:

Post a Comment