Researchers at the University of Massachusetts Medical School are testing a wearable device that may help track drug addiction relapses.

The E4 Empatica wristband device measures temperature, heartbeat, motion and skin electrical conductance, according to Business Insider. The measurements are taken 30 times per second.

Knowing the time addicts tend to relapse, and the effect the relapse has on their bodies, can help doctors improve their methods of intervention, according to researcher Stephanie Carreiro. She has led two studies on the device.

Carreiro and colleagues are searching for physiological symptoms picked up by the device that may indicate a person is about to relapse. Once these symptoms are defined, the researchers say the device could be programmed so that when it picks up these symptoms, it will send an alert to a doctor or sponsor, who can reach out before the relapse occurs.

“Substance abuse happens when patients are out of our reach… often when folks go back into their environment,” Carreiro said. “This gives us a way to get contextual information and figure out what the triggers around them are.”

Last year Carreiro published a study that tracked 15 people using cocaine who wore the wristband to see if they would be willing to wear it for a month. All participants kept the wristband on. The device was able to detect when a person used cocaine 100 percent of the time, the article notes.

Carreiro said when a person takes cocaine, their skin temperature drops and their skin electrical conductance soars. They are also more agitated, and the device can detect excess movement.

She is studying whether the device can track and predict relapses with opioids, which slow a person’s movement and increase their skin temperature.

The wristband can store 60 hours of data and upload it to the cloud over Bluetooth. It charges in less than two hours.