You might feel like your shoulders haven’t left your ears since 2019. Not only has COVID-19 totally obscured our concept of time, it has also led to a widespread increase in chronic stress and anxiety across the population. But technology can help you learn how to relax again.
Long-term, our responses to stress can have serious physical and mental effects on our bodies, including cardiac issues, cancer, diabetes, weight gain, insomnia, and changes in appetite. That’s why this Hackster project is one of the practical uses of at-home IoT technology I’ve seen in a while. As a human who has been riding the rollercoaster of stress and anxiety during the pandemic, I would find this health monitor as necessary as my streaming services or meditation app.
All of these physiological, emotional, and behavioral side effects can eventually end up making someone pretty sick. And we all know that illness is costly. In fact, it’s estimated that between legal, healthcare, insurance expenses, and loss of productivity, stress costs the United States about $300 billion each year.
How Does It Work?
The IoT stress monitor tracks health and environment data like heart rate, temperature, and ambient noise. You can set up a dashboard to track data in real time and set up alerts indicating when you’re experiencing high levels of stress. In time, the alert becomes a Pavlovian reminder to abandon your computer or phone and go outside, pet your dog, meditate, or do any other offline stress-relieving activity. Bing bong! You’re freaking out man, step away from the computer.
Creating healthy stress responses can be challenging to learn, but you can improve your physiological response to stress by practicing relaxation methods. Having a monitoring and alert system to understand your triggers, receiving prompts to initiate relaxation techniques, and being able to see your metrics before and after all lead to improved stress management.
Who Is It Good For?
This particular Hackster build was for the many folks who are now working from home during the pandemic and experiencing new sources of stress, but literally anyone can use a device like this. In a much more serious application, it could be helpful for people with chronic health conditions like anxiety, or even post-surgical patients.
Imagine someone who just had coronary artery bypass graft surgery (CABG), for instance. Researchers have shown that “anxiety, depression and stress are associated with greater morbidity after cardiac surgery”. If patients can track their own health data at home with an IoT health monitor, they can modify their environment and behaviors to potentially improve their chances of recovery.
When we experience stress, our body senses a threat that puts us into fight or flight mode. It’s an inflammatory response that releases a hormone known as cortisol. Cortisol increases glucose in the bloodstream, boosts your brain’s use of said glucose, and increases the availability of reparative substances – it provides resources necessary to fight or flee. But cortisol also limits other functions that we wouldn’t require or would be harmful in that type of situation. Your body is basically preparing for a shark attack while you’re sitting in your ergonomic office chair.
How Can You Make It?
I know what you’re thinking. I can barely program the clock on my microwave, how am I supposed to build an IoT device? Luckily you have a cheat sheet. We’ll briefly go over the components and steps to making your own IoT stress monitor.
Health and Environmental Sensors:
- Heart rate and battery level with the Polar Verity Sense band.
- Adafruit Feather Blueprint Sense
- Temperature and pressure from the onboard BMP280.
- Humidity from the SHT31D.
- Sound Level from the PDM microphone.
- Blues Wireless Feather Starter Kit.
- Blues Wireless Notecard.
- Blues Wireless Notecarrier.
- Adafruit ESP32 HUZZAH Development Board in the Feather form-factor.
- Adafruit Feather nRF52 Bluefruit BLE board.
Overview of The Build
Now that you understand the parts, let’s get into how it’s built. At a high level, the steps sound relatively simple – although this project is aimed at people with intermediate experience in building component systems:
- Procure the hardware
- Connect and configure the hardware components to read the right data
- Encrypt the data
- Route encrypted data to the cloud
- Decrypt the data and store it
- Build a dashboard
- Program alerts and set individual stimulus thresholds
Diving down a bit deeper, let’s look at how to work through the steps above to build the monitor:
- Add external Bluetooth sensors to any project with the help of the Adafruit feather nRF52840 Sense and CircuitPython.
- Use the Blues Wireless Notecard to encrypt your health and environment data before sending that data to Notehub.io.
- Create Routes in Notehub.io to send encrypted data to Azure Serverless Functions, and alerts to Twilio’s SMS service.
- Decrypt health data and store it in an Azure CosmosDB database.
- Build a simple Svelte-based web application for showing health data, and alerts in real-time.
- Use Blues Wireless Environment Variables to dynamically update alert thresholds for heart rate, temperature and sound levels.
You’ll notice that the project shows you how to encrypt and decrypt your data. This is an important part of the project that should not be overlooked. Always protect your personal information! Luckily the Blues Wireless Notecard supports data encryption, and you can program it into your Notehub.io project.
Stress is abundant these days, so this project has never been more relevant! A recent survey from the APA found that during the pandemic, the average person is experiencing a stress level of 5.6 out of 10. Time to chill out and bring that number way down. If you want to build your own stress monitor, check out the full write-up on Hackster.