Live data from Hacker News

Building a T1D smartwatch for my son from scratch

andrewchilds.com

31–40 of 88 posts

Re: Building a T1D smartwatch for my son from scratch

#31
post #27

Great project! 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,…

Thank you! I did actually buy a Bangle 2 early on in the project; I was impressed by the Espruino project and by how small the watch is, but it seemed slow to wake, and the screen was tiny, dim and had a lot of light bleed. But you’re making me think I should take another look. Very cool that your kids are programming their own watches!

Re: Building a T1D smartwatch for my son from scratch

#32
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.

Re: Building a T1D smartwatch for my son from scratch

#33

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 wi…

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!

Re: Building a T1D smartwatch for my son from scratch

#34

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 wi…

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!

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.

Re: Building a T1D smartwatch for my son from scratch

#35
post #27

Great project! 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,…

Thank you! I did actually buy a Bangle 2 early on in the project; I was impressed by the Espruino project and by how small the watch is, but it seemed slow to wake, and the screen was tiny, dim and had a lot of light bleed. But you’re making me think I should take another look. Very cool that your kids are programming their own watches!

Yeah, the transflective display is not great, but the power usage is nil when the backlight is off, which is nice. E-ink might be even nicer.. but the price is a major stumbling block for most form factors.

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.

Re: Building a T1D smartwatch for my son from scratch

#36
post #20

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…

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

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)

Re: Building a T1D smartwatch for my son from scratch

#38

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 wi…

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

Re: Building a T1D smartwatch for my son from scratch

#40
post #27

Great project! 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,…

Another interesting watch is zswatch. It uses a nrf mcu as well. https://github.com/jakkra/ZSWatch

https://www.youtube.com/watch?v=MmCzV0jV9hs

Post reply on HN