HUGS: Helpful Undergarment for Getting rid of Stress


HUGS was a year-long capstone project sponsored by the MEAM department that I worked on with Matt Caltabiano, Anna Estep, Erica Higa, John Killoran, and Sean Trahan. The goal of our project was to create a wearable device for children aged 4-6 with Autism Spectrum Disorder that autonomously applies Deep Pressure Therapy when given signs of over-stimulation. The device is a vest with biometric and environmental sensors that can be configured and managed by a mobile application. The project won the Judges' Choice award at the culminating department-wide competition. I was responsible for the software development and electrical integration, including the on-board code, pressure sensor testing set-up, iPhone App, and electronic integration.

Embedded System

HUGS runs on an Adafruit Feather 32u4 Bluefruit LE micro-controller, which was selected for its light weight and small size, large number of analog IO pins, Bluetooth module, and ability to run on low voltage. However, the Feather has limits with respect to processing speed (8 MHz) and space (32 KB flash, 8 KB RAM). Compilation of the standard Arduino libraries uses almost one-third of the on-board storage, so HUGS runs in C++ with a subset of the Arduino library compiled with a custom makefile; this compilation uses only 7% of the on-board space. The reduced Arduino library can be publicly accessed here.

The core processes occur in a single loop, which handles communication, reading/writing, and decision making on the device. If the device is connected to Bluetooth, it reads incoming settings data from the application and sends its current state using the UART protocol. The on-board acceleration, noise, light, temperature, and internal pressure readings are analog inputs and the device activates in 5 seconds, given constant input signaling potential over-stimulation. Additionally, a 2 kHz timer measures a 5-minute interval for an inflation and to gather readings from the heart rate sensor at a rate of 400 Hz.

Since the Feather lacks space and multi-threading, the heart rate tracking algorithm had to be online, low memory and highly efficient. Since no existing algorithms perform well given these constraints, the HUGS device uses a novel algorithm which stores the four previous readings alongside the current and determines if the middle value is a peak.

The code for the embedded system can be found here.

Mobile Application

The mobile application was written in Swift for iOS devices (I taught myself Swift for this project!). It allows the user to set the child (and thus device's name), as well as threshold sensor readings for device activation. If connected to the device via Bluetooth, it also displays current readings and allows for system overrides and variations in applied pressure.

The code for the app can be found here.

Test Set-Up

Since validation could not legally be done on children, tests were performed on a plastic mannequin the size of a 4-6 year old child. 20 thin filament force sensitive resistors (FSRs) were spaced around the torso and the pressures were monitored throughout the inflation, hold, and deflation processes. The goal was to establish response times, uniformities, and values of the pressure distribution. The sensors were connected to an Arduino Uno managed by a MATLAB script available here.

Mechanical Design

While I mostly handled the software, I also helped the rest of my team tackle the many mechanical challenges. Some of these included compression mechanisms, pressure application, bladder sizes, spacing between bladders to maximize heat/sweat transfer and minimize feeling of bladders, comfort testing, material tensile strength testing, design, and manufacturing.


For more technical detail, you can read our 80 page report! Click here to open in a new tab or scroll away for some graphs, pictures, and more than you ever wanted to know about HUGS.

Pressure Distribution

System Architecture

Mobile Application Workflow