Medical Design process basically exists (oversimplifying of course) because the engineers are not the users. It's entirely possible for one person to build something that far exceeds the quality and performance of an off the shelf device simply because they care to do a good job and have constant feedback on how it works.
There's a lot to be said for scratching your own itch!
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.
Feels like low risk unless the watch gets out of sync (but easy enough to change the code to stop the watch from showing old data if that happens).
> 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.
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.
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
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.
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.
That said, Pine64 does not do a whole lot of work on their platform and I guess a lot of people are wanting _more_. It's a simple watch and for what it does and costs it's great. If you think you'll get an open source Apple Watch, you're going to be disappointed.
Idk if this might be useful or not, but there is a smartwatch platform (bangle.js 2) that uses the NRF52840 chip (extremely low power, solid BLE support, works with Espruino, micro python, arduino, and other IDEs) battery life is around a week, depending on what you run, of course.
The watch includes an always-on color transflective display, GPS, accelerometer , barometer, haptic motor, compass, sound, touchscreen, etc.
You could do firmware from scratch or you could use the onboard OS and write the program as an App.
The watch isn’t distracting, unless you install stuff on it to be distracting. I think your program might be able to be written as a “watch face” so that it would not have to be launched from the launcher, but you could also write firmware for the watch so that it just does what it does period.
It seems to me like this does everything you want, maybe?
I bought a couple of these (2?) years ago for my kids to program on, they have been great!
The pebble might be a good option though, not only is the os now open sourced but there is apparently someone trying to build new watches.
Once you get out of the hobby space, Hardware is a tough business, and there are a lot of people that would benefit from a solid solution that won’t be up for tinkering.
You might also find that there are Chinese manufacturers with white-box watches that might be running common chips like the nrf52840/832. I certainly see a lot of apparently identical smartwatches around 30 dollars that are marketed under different brands. Those might be a better direction if you are looking at a broad market.
OTOH, once you get away from the supportive and nurturing maker environment most of the fun will leak out, so depending on your motives, you might want to stick to your solution - which looks pretty great to me, even if it might not be as simple to scale production.
Best of luck with whatever direction you are looking at. By the way, you might try a resin printer if you are going to be doing any production in house. For larger multiples of small parts they are crazy fast and the finish is pretty great.
Hate to be that guy, but was using something hackable like a PineTime (https://pine64.org/devices/pinetime/) and doing a direct BLE connection to the device using the Blood Glucose Profile (https://www.bluetooth.com/specifications/specs/glucose-profi...) not an option?
Another approach could be to hack one of those cheap fitness trackers (https://rbaron.net/blog/2018/05/27/Hacking-a-cheap-fitness-t...). I got a few off AliExpress a few years ago for $9 each.
Again, not to take away anything from the amazing accomplishment to build a device from scratch, but if anyone else wants to try making one, maybe they could start with less of a steep learning curve.
Valid question about the PineTime! I'd agree that it is an option, although with the dev kit out of stock, flashing a custom firmware would be tricky. I think that's probably what happened, I looked at this page back when I was first starting out on this and was scared off: https://pine64.org/documentation/PineTime/Further_informatio...
The DevKit is mainly there to allow easy access the SWD pins. It can be flashed via a Pi: https://wiki.pine64.org/wiki/PineTime_Devkit_Wiring
Aaron Christophel (go-to guy for hacking wearables) has a video on flashing them via an ESP32: https://www.youtube.com/watch?v=Iu6RoXRZxOk
For OTA flash, some folks have had good luck with https://gadgetbridge.org
For those interested in going the cheap-o activity tracker route, here's another old thread on Hackaday, featuring Aaron. More good info in the comments: https://hackaday.com/2019/02/20/custom-firmware-for-cheap-fi...
Also, one last tidbit: I know the idea was to stay away from the more expensive devices, but many Apple and Android watches have built-in BLE central capability so they can scan and connect to peripherals without having to go through the phone. In later models, they can even scan in the background and update complications.
Again, not remotely as cool as building one's own device!
Really an amazing project no matter what! I learned a lot reading your article and I don't think that using a PineTime as a base would have been nearly as cool
I love the texture of the enclosure. I guess that's not possible with an FDM printer, right?
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.
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.
I'd definitely recommend that if you're just assembling less than, say, 10 screens.
I point out to people that it's clear that Adafruit is noticeably more expensive than the cheap stuff on amazon, but the fact that you can buy something from them, follow the tutorial on it and basically expect everything to work right off the bat makes the cost worth it. Even as a professional embedded developer, I go straight to them when I need to build a prototype and don't want to waste time faffing around.
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!
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!
I see you are replying in the thread, in your closing notes you wrote:
> I would not have been able to get past the initial stages without ChatGPT.
One of the coolest uses of LLMs for me is indeed exploring a problem domain where I am not a subject matter expert.
The problem is if it leads you down a dead end or hallucinates a solution. Then, at the edge of your knowledge, you actually have a very small foothold with which to challenge these chat replies.
Did you also face this on the more HW 'heavy' part of your project? Any tips on how to navigate terra incognita with LLMs?
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.
Couldn't you just include a disclaimer that it isn't?
I chart the last 7 days of battery voltage in the companion iOS app, and it does look like they're drawing current differently. My son's watch can sit in deep sleep for days and lose very little charge, unlike the other watches which seem to continue to draw current even though the ESP32-S3 is in deep sleep.
Haha. Great read. And aesthetically it's sweet as well. I wish your son accurately tracked and lasting health. He has an amazing dad to lean on!
I have been working on software for the G1 headset to display glucose data without any audible alarms, just a visual notification.
The issues I run into are:
* Dexcom sensors have limited Bluetooth connections (with pump support), so I need to pull data from a phone.
* Battery life (I can get 9 hours maybe with a not always on display, a far cry from 6 days).
* xDrip gets readings slower than directly from dexcom.
* General UI edge cases for missed readings.
Thank you for sharing your work, it's validation that others are experiencing this problem and maybe my visual solution will be useful to others (and a watch/audible/haptic device also might be a good complement to what I have now, my solution is not supposed to be the only way to get CGM data.) https://github.com/ltomes/rel-a/tree/feature/xDrip
It feels like a bit of an under-served market. T-mobile has a smart watch that you can lock down completely during school hours, which we've done with one of my kids (we're avoiding smartphones for now, and she's strangely quite happy with that, I honestly expected more push back.)
Unfortunately, it wouldn't work for T1D situation. I've a relative with T1D and it's been exciting seeing the technology change over the ~10 years since they got their diagnosis.
Scott Hanselman has blogged[0] and spoken at some length on tech and living with T1D going back to 2002.
HAHA, I love this.
Awesome work!
Oh, Apple. You can't just not be annoying can you?
> 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?
Now there is a quote I should frame and hang in the company break room.
couple random nitpicks: - is the motor driver necessary? for simple vibrations, just a single Nch MOSFET between motor negative to ground(low-side switch) should suffice. - there are BLDC vibration motors, because you can(or to eliminate brush sparks) - that button cap doesn't look resistant against external water pressure, if that's a huge issue, but paradoxically waterproof without a drain hole = water container so I can't be sure anyway - color paints flake off. simple acrylic clear, or super ideally two-part urethane, top coat hides it well. I think it's just making flaking of clear layer impossible to notice but it works a lot better than color only. - I think I've seen people mentioning atrocious power saving of ESP32's entire Bluetooth sub-system. it has none or something. - entire watch being sealed from top is right choice, as it allows guts to simply pop out in an unlikely event of battery failure
but all aside that watch looks gorgeous.
Also sadly it'll get 10 times less upvote than making your own laptop from scratch because it's not done by a teenager.