Designing a Cool/Heat Therapy Strap Using LabVIEW and NI USB DAQ

  Print Print

"With LabVIEW and the USB-6009 data acquisition device, the cool/heat therapy strap system can support the medical field with its flexibility to provide cooling and heating therapy instantly."

- Lee Thean Chai, UCSI University

The Challenge:
Applying both heating and cooling therapy under a strap that works to enhance human rehabilitation through therapy using the thermoelectric Peltier modules.

The Solution:
Using NI LabVIEW software and the NI USB-6009 DAQ device to control the cooling and heating properties of a thermoelectric device by acquiring the temperature of the thermoelectric surface, applying proportional integral derivative (PID) control to the VI, and using pulse width modulation (PWM) to achieve thermoelectric cooling and heating for therapy purposes.

Lee Thean Chai - UCSI University


The goal of our project was to design a therapy strap that can perform both cooling and heating using a thermoelectric module. The strap was designed based on controlling and retaining temperature. The temperature sensor voltage acquired through the USB-6009 DAQ device is processed using PID control and generates an output to perform PWM to control the thermoelectric temperature. We used LabVIEW to design a control panel GUI to show the temperature of the thermoelectric module.


Ice packs and warm water have been used to treat humans for centuries. These temperature applications are available without a prescription and are used as standard medical treatment throughout globe.

When someone sprains an ankle or pulls a tendon, the soft tissues at the affected area are injured. The blood capillaries that supply blood and oxygen to the tissues are broken. The broken capillaries then leak varying blood and serum into the tissues, which causes the affected area to swell. Accompanying the swelling are feelings of stiffness, pain, and tenderness as well as inflammation.

For the case described above, cold application is best because it limits the blood and serum flow rate to the area of the body where it is applied by causing the blood vessels to constrict. This constriction helps prevent further leakage of blood and serum and minimizes swelling and pain. Several days after the injury, when the tissue healing process starts to take place, the blood and serum leakage stops as the capillaries are naturally plugged by blood clots in the repair process. Heat application causes the capillaries to widen and recovery begins to occur. Heat application also helps relax the muscle and injured area.

Both the cold and heat application are best applied in time intervals. For example, a person should apply it for 20 minutes and then remove it for 20 to 40 minutes so the skin is not injured from icing or discolored from heating. We developed our heat/cool strap to control the temperature and the time it is applied.

System Overview

The system consists of a temperature sensor, a USB-6009 DAQ device, a laptop with LabVIEW installed, and a thermoelectric module. Figure 1 shows the basic system overview block diagram. The system has integrated PID control and PWM to control the thermoelectric temperature.

The temperature sensor measures the temperature on the thermoelectric surface. It generates up to 1 V, which is proportional to 0 to 100 °C. A one degree increase causes the output of the temperature sensor to rise to 0.01 V. The voltage is acquired through the analog input of the USB-6009 DAQ device. The voltage value is fed into the PID VI for processing. The voltage value is compared with the desired temperature value within the PID equation, which generates a value between -100 and 100 and. The value generated by the PID VI is converted into a percentage value between 0 and 100 percent so that it is suitable for PWM.

The processed percentage value is then converted into 100 high/low statement arrays. The high statement generates 2 V to 5 V while the low statement generates up to 0.5 V. The 100 statements represent a PWM duty cycle. The process is continuously generated through the digital output of the USB-6009 DAQ device. The output generated from the USB-6009 is connected to a transistor that acts as a switch that turns the thermoelectric module on and off. An additional power supply is needed to power the thermoelectric module.

Figure 2 shows the three-tab GUI. The first tab is the home user tab with simple operation modes. Users can choose from the options available in the list and the system delivers the preset temperature. The second tab is the medical personnel tab that contains more complex control than the home tab. This tab gives the user the option to choose between cool or heat therapy and the specific temperature level.

The third tab shows the value the temperature achieved by the thermoelectric module and the graph of the two temperature inputs against time. The two temperature inputs are the temperature of the thermoelectric module and the desired temperature.

Figure 4 shows the LabVIEW block diagram. The left part is the countdown timer system. The middle part is the case loop that makes up some of the GUI and it also contains the integrated PID controller and the PWM conversion. The right part has the VIs that complete the GUI in the temperature monitor tab.

Figure 5 features the complete system setup that consists of the laptop, the strap, and the USB-6009. The strap is placed on the user’s arm (Figure 6). The strap can also be place on the forehead, leg, hand, neck, or another joint.

Results and Discussion

The experiment was carried out to measure the range of temperatures achieved by the cool/heat therapy strap, which was 15 °C to 50 °C. Figure 8 shows the results of cooling and the time required. The strap requires 30 seconds to cool down from 30 °C to 20 °C


By integrating the LabVIEW and USB-6009 DAQ device with the cool/heat therapy strap, the overall system design provides a better GUI that is easier to use and more accurate for controlling the strap temperature. With LabVIEW and the USB-6009 data acquisition device, the cool/heat therapy strap system can support the medical field with its flexibility to provide cooling and heating therapy instantly.

Author Information:
Lee Thean Chai
UCSI University
Lot 12734, Taman Taynton View
Cheras 56000
Tel: 012-5335338

Bookmark and Share

Explore the NI Developer Community

Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.

‌Check‌ out‌ the‌ NI‌ Community

Who is National Instruments?

National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.

‌Learn‌ more‌ about‌ NI