Inspiration
Our teammate Chris is a Type 1 Diabetic. He has expressed that what most Type 1 Diabetics fear, is "Dead in Bed Syndrome". Dead in Bed Syndrome happens when your blood sugar starts to go severely low at night while one is asleep leading to death. Chris wears a Dexcom, a device that tracks one's blood sugar throughout the day, when one's blood sugar number begins to drop below a set low number, the Dexcom will sound an alarm. However, many nights, the alarm will not wake him up, but luckily his parents would hear the alarm and wake him. If it wasn't for his parents being there for him during those low events, he may not be here right now. He has always wondered what would happen if one day when he is living on his own, the alarm doesn't wake him up, and nobody is there to help him. But not just that, during this hackathon, Chris's blood sugar started to go low rapidly, and he didn't have any food on him to bring his blood sugar up. He asked one of our teammates if he could accompany him while he went to look for a vending machine to get food. Before they left, Chris gave his teammate a Glucagon, an injection you give an unconscious diabetic who is experiencing an extreme low blood sugar, in case Chris went unconscious during his low. While walking, our teammate pointed out that the Glucagon was expired. Now luckily, Chris was able to get some food and raise his blood sugar before it went to low, but what if he didn't? These are only a small subset of the adversities Type 1 Diabetics face every day and night. That's why we made Irin. Irin is an Aramaic word that means, "The Watchers", referring to a group of angelic beings. Irin will always keep a watch over you in your most vulnerable moments as a Diabetic.
What it does
Irin is a bedside device for people with type 1 diabetes who take insulin by injection. It runs on a Raspberry Pi next to the bed, reads the person's glucose from their continuous glucose monitor, and uses a machine learning model to predict a low about 30 minutes before it happens. If one is coming, it wakes them with colored lights and alarms that get louder if nobody responds. A presence sensor tells whether they're in bed or out of the room. It won't make a prediction from old data, and it shows clearly when data is stale. Each morning, it writes a short, plain-language summary of the night.
The same system also serves three groups of people. For the patient's doctor, it turns what happens at home into short, encrypted summary cards. It never suggests insulin doses, and any change the doctor sends only takes effect after the patient confirms it. For other people with type 1 diabetes, Night Buddy pairs adults so they can watch out for each other overnight: if the patient's alarm goes unanswered, their buddy gets alerted and can call. For family, it sends a simple story of how the night went, with a short voice message, sharing only as much detail as the patient chooses.
How we built it
For software, we split the work three ways: one teammate took the frontend, one the backend, and one the machine learning. The frontend is built with React, TypeScript, Vite, and Tailwind CSS, with D3 for the charts and plain HTML, CSS, and JavaScript for the bedside display. The backend is Python with FastAPI, using SQLite on the Pi, MongoDB Atlas and TimescaleDB in the cloud, and Docker and Caddy on a Vultr server. For machine learning we used XGBoost, pandas, and NumPy.
For hardware, one teammate flashed the Raspberry Pi's SD card, set up SSH access, connected the screen, and built the case. They wired in the speaker and the LED strip, cut metal rods with a hacksaw to make the frame the LEDs mount on, and used electrical tape to hold everything in place.
Challenges we ran into
One challenge was cleaning the data we exported from Dexcom Clarity, which was full of infinity and null values. We also had to learn a lot of unfamiliar terminology, and cable management took more work than we expected. Getting the app connected to the web server during development took longer than we planned. With so many problems coming up at once, it was hard at times to stay motivated.
Accomplishments that we're proud of
We are proud that we built a working circuit and got our machine learning model to predict accurately. We are also proud of how we split the work across the team, and of the logo we designed for the app.
What we learned
We learned how to use a level shifter so the Pi’s 3.3V signal can control a 5V LED strip, why the strip needs its own power supply, how to configure the radar sensor to detect when someone is in the room, and how to integrate a machine learning model into the app so it can make predictions on new, unseen data.
What's next for Irin
We plan to keep working on it so it can handle load balancing, protect people's data by meeting established security frameworks, and connect with other services so diabetics get fast help when they need it.
Built With
- anthropic-claude-api
- backboard
- caddy
- docker-compose
- elevenlabs
- fastapi
- html/css/javascript
- httpx
- meta-model-api-(muse-spark)
- mongodb-atlas
- nightscout-api
- pydantic
- pynacl-(libsodium)
- pytest
- python
- raspberry-pi
- react
- sqlite
- tailwind-css
- tiger-cloud-(timescaledb/postgresql)
- typescript
- vite
- vultr
- whatsapp-cloud-api
- xgboost
Log in or sign up for Devpost to join the conversation.