Building a T1D smartwatch for my son from scratch
45 comments
·January 28, 2025verytrivial
392
Plenty of folks out there can't afford any treatment. This kid has it seems every form of treatment known to man and his dad is trying to make it more convenient for him, with the added benefit that this may make it cheaper/easier for the rest of the world. His level of risk tolerance improves the world and will cause his son no problems, while also avoiding learned helplessness.
tronicdude
You have no idea what you’re talking about.
For T1Ds, you pretty much constantly have to monitor your blood glucose level. I used to use a Pebble for this, now I use an Apple Watch. The Apple Watch backgrounds the monitoring all the damn time, so I have to click multiple buttons and wait to see my blood sugar, when the number is immediately available on my phone (the watch didn’t used to be this bad). The entire point of this hardware project is eliminating that latency.
coder543
Wow! This is some phenomenal engineering!
> Another area that stumped me is how to shut the power off 100% on the device, so that it can remain “off” for weeks or months.
This is actually a pretty solvable problem...
https://circuitcellar.com/resources/quickbits/soft-latching-...
Then the microcontroller can choose at any time to completely shut off the entire circuit (including itself), and extremely little power will be consumed until something (like a button) completes the power-on circuit again.
For ease of prototyping, there are off-the-shelf units you can play with: https://www.sparkfun.com/sparkfun-soft-power-switch-jst-2mm....
Some more advanced soft power switch circuits (like the SparkFun switch) also include the ability to forcibly power down a misbehaving device by holding down the button.
The design used in the SparkFun switch also allows your microcontroller to know if the button is pushed while the device is running, so you could imagine repurposing your existing button to also restore power to the device if the device is off, and still retain the existing functionality for cycling through watch faces. Then, either the device could automatically shut itself off after a period of inactivity or when the battery gets too low, or the user could click and hold the button for some number of seconds to turn the device off completely that way.
bbayer
Another alternative is to use ESP32's deep sleep mode. You can tell ESP to sleep until some event occurs. There are many options for waking up the microcontroller.
https://docs.espressif.com/projects/esp-idf/en/stable/esp32c...
It uses little power, so standard 18650 battery could last years with single charge.
https://www.programmingelectronics.com/esp32-deep-sleep-mode
andrewchilds
This is exactly what I was looking for! I had a foggy idea of using a MOSFET and the button to close/open the circuit but I needed something like this to show how it all fits together. Thank you!
coder543
No problem. I haven’t had a chance to do anything hardware related for a long time, so it’s fun to think about hardware problems again.
On the topic of extending battery life mentioned in the article, one relatively straightforward thing to investigate is simply reducing the processor clock speed. Your application probably doesn’t need to run at full tilt. I think there is a function called setCpuFrequencyMhz — I think it only works with a few specific frequencies, but the lower the frequency you can pick (while still keeping up with your application’s needs), the less power the system should consume while awake.
Of course, you want to be putting the processor to sleep between updates anyways, and there is a trade off between sleeping more (which means running the processor faster so it can sleep sooner, “race to sleep”), versus the inefficiency caused by running a processor higher on the frequency/efficiency curve, so there might be an optimal frequency that isn’t the lowest or the highest possible option. It’s something that would need to be measured.
Just some thoughts! It might not make a big difference if the processor is already sleeping most of the time, but I figured I would mention it as something to try.
wanderingmoose
First of all -- awesome!
Second, if you aren't aware or in case others are interested, the main dev from the xdrip project released a custom watch as well: https://bluejay.website/ There are some posts on reddit from the dev. (for others -- the watch is available for purchase, and allows integration w/ xdrip).
Third --> we've come a long way in a short time. When I was diagnosed I had to collect urine samples and drop chemical tablets in them to see how much glucose was present. And now you are building an custom solution tailored to your and your son's needs...wow. I really applaud you.
Fourth --> I'm hoping the new discoveries in the synthetic signaling w/ insulin will finally give us a biological solution and the tech will no longer be necessary. Here's to hoping!
andrewchilds
Yes! The BlueJay watch project is amazing, very encouraging to see that he was able to connect directly to the sensor from the watch with the latest version. Totally agree with you - one of the biggest sources of hope for us in those first few weeks after he was diagnosed was knowing how far the tech had come, and how many huge advancements were in the pipeline.
mattboyle
This is really really awesome. I applaud you.
I had my own project trying to achieve a similar outcome to you, I wrote about it here: https://www.bytesizego.com/blog/keeping-alive-with-go. Your approach is much more hardcore. I hope you find a path to make them available to more folks.
If there is anything I can do to assist you please let me know!
andrewchilds
Thank you! I remember reading your article! Even though you have to maintain it, it’s actually way better than what’s commercially available since you actually have control over _how_ you’re alerted, not to mention when to escalate to friends or family. I’ve heard Type 1 kids going away to college is a huge source of stress for parents/caregivers for this reason - Sugarmate and the SugerPixel help with this but it still feels like a huge problem (a Type 1 sleeping through a low).
1f60c
The number of skills one has to master for a project like this is just mind-boggling, and the part about the tortilla press made me laugh out loud. A labor of love in the most literal sense!
That said, I would feel pretty nervous about actually selling these, as I wouldn't be surprised if it is legally considered a medical device.
summermusic
> I learned that One Does Not Simply put glass in front of a TFT display. It will look like a first-generation, low-budget Android phone if you do.
Do you happen to have any before-and-after photos of what this looked like, and more details on how your tortilla press DIY method works? I recently received a little hackable music player device with a TFT display that looks kind of bad and I wonder if this is something I can do to make the display look good.
andrewchilds
The process was applying steady pressure to the TFT display -> OCA film -> glass, sandwiched between soft rubber, for about a minute. However you need to do a decent job applying the OCA film in the first place - there are youtube videos that show how to do it.
I probably wouldn't recommend what I did in your case - it's easy to go too far and break the glass, and I'm not sure if what's wrong in your case is due to the OCA film in between the display and the glass.
grahar64
My T1D son is 4.5yo, I book marked this page so that in a couple years I can read it a build him something that is (hopefully) just as cool. Unless I can buy it off the shelf...
bluesounddirect
Andrew : Amazing i always love to see the creative T1D projects. i home one day we have a biological cure . Back when the pebble watch was still a relatively new product. someone had an app for it to be a remote display for the dexcom. it required an external nodemcu based microcontroller to be a middleman, but what it did well was run for days off the battery. my wife used one for a long while; the take aways were black and white e-ink displays saved tons of power . pebbles os was good a power mgmt and it's limited features made devs stick yo core functionality not look for new cool extraneous add ons .
bdcravens
This is great. I do watch my Dexcom on my Apple Watch, but there's times I just want the number, ASAP. I was hoping it'd talk about eliminating the need for the iOS app ("...where he shouldn’t have to run around with a phone strapped to him...") but it sounds like it's just not possible to avoid at least periodic polling.
Reading through the product development, I'm curious why you didn't use a dev kit like the Pine Time? (https://pine64.org/devices/pinetime/) I bought one a few years ago and it's just been sitting in the box, waiting for a project to build on it. I may take a stab at something similar.
nknealk
The G7 pairs directly with an Apple Watch and acts as the primary sync device. Unlike the G6, you don’t get null readings displaying on the watch until you open the app. I have the dexcom widget on my Apple Watch series 10 with a G7 paired with direct to watch and it always displays the current reading
bdcravens
I wore the G7 briefly, but switched back to the G6 because the long-awaited iOS integration for my pump (Omnipod) only supports the G6 at this time. (otherwise I have to carry around a separate device, which is essentially a dumbed down Android phone)
andrewchilds
That's great to hear that direct-to-watch pairing leads to a reliable reading. That's a big improvement over where things were a year ago. I am surprised that the watch becomes the primary sync device instead of the phone, but maybe that's not actually a problem in most situations.
andrewchilds
Thank you! It should be possible now with the G7 to have the watch pair directly with the sensor. We’re still on the G6. Agreed that would be much better than having to go through the iOS app and up to the cloud.
Honestly I don’t remember why I ruled out the PineTime. I purchased a Bangle.js and while it’s very small, it seemed very limited in what I could do with it. Of course with the Pebble announcement yesterday, that might change things.
djyde
Wonderful. I'm interested in learning about circuit and PCB design. What would you recommend as the best introductory resources to get started?
the_arun
This is a great project.
> They don’t fund consumer products like this, but we agreed that the most plausible path to market is the open-source route, potentially turning it into a more general-purpose Pebble successor.
Do you mean Kickstarter?
martyz
Incredible work - so cool to see Dad being a tech and health champion for their kid. T1D is so tough and to have such incredible support is great to see.
I'm going to buck the trend and say this is an excellent idea, but it should absolutely NOT be used for its indended purpose. If OP wants to track his own insulin levels, fine, but to put DIY, uncertified, learn-as-you-go medical monitoring device on someone else, let alone your own son is f*cking bonkers.