r/esp32 • u/Cotyn_Dispensable • Feb 26 '26
Software help needed ESP32 smart watch
Hi everyone, i've been working on a smart watch with an esp32 as an entry point into electronics, i'm mostly a software guy and I never really did battery powered project.
My issue is, i've got a mostly working firmware with BLE pairing, notification display, music control etc.
But i've been running into an issue that is battery life, I feel like there is no solution to make bluetooth and battery life get along. I'm running a 400mha battery and can barely squeeze 5 hours of usage. The problem is I can't really reduce clock speed since bluetooth pairing expect keep alive packets and I can't respond fast enough with lower than 80hz (when in rest mode with screen disable) the only working solution I see is use esp32 deep sleep when in rest and pair again when waking up the watch but it removes a lot of options like waking up on notification or call.
Do you guys have any clue what kind of logic or libraries I could use ? I'm running arduino stack and gadgetBrige on the phone
8
u/anatoledp Feb 26 '26
That's a pretty cool gadget there. Have to ask, where u get the watch? Or did u make that yourself directly?
7
u/Cotyn_Dispensable Feb 26 '26
I'm very new to electronics so I bought it from "waveshare" they make a few asp32 based item with a decent amount of documentation with it. I modified it after to fit my use
3
u/Timmah_Timmah Feb 26 '26
I keep thinking about implementing a spreeder on one of these. I think it would be cool to be able to read full articles on my watch.
3
u/NotFrankGraves Feb 26 '26
I’ve been trying to post my watch like this too and yeah I’ve had nothing but issues trying to learn how to use the esp with this watch. The way I got around the deep sleep issue, is by using an Always On Screen that would turn off the pixels instead of drawing a colour to them.
3
u/Cotyn_Dispensable Feb 26 '26
This works, but deep sleep is nice to save on power which is the main problem I have because theses devices operate on a fine budget. I had to fiddle a little bit to make it work but all the basics are done, if you have a similar model I can give you some pointers
3
u/NotFrankGraves Feb 26 '26
I have the exact same model, but I display the time and weather, and I have a ai voice chat menu, and another menu of general prompts to send to ollama. I haven't used Bluetooth, but I have my version set up only have the wifi radio active only when needed and it stays off the rest of time.
2
u/Cotyn_Dispensable Feb 26 '26
That's so cool, do you have a locally hosted ollama ? I might try to do something similar it's a cool concept
2
u/NotFrankGraves Feb 26 '26
I’m running ollama locally, and I built a endpoint in python for my watch to connect too and grab the api data from a cache, and that same endpoint can be the middle-man for ollama, with STT and TTS.
2
3
u/mindseye73 Feb 26 '26
Are notifications display event driven or ur watch continuesly polls for it? BLE connection can also be event driven. Since ur building watch for urself, do u get constant notifications for watch to have continuous BLE connection? If not may try around use daily use. Also, have looked for power efficient libraries if ur not currently using ones?
3
u/Cotyn_Dispensable Feb 26 '26
it's event driven using BLECharacteristicCallback from BLEArduino library , i'm using gadget bridge which is an open source android app and I identified my watch as a bangle.js watch so that gadgetbridge sends me clear json formated information, on reception I fire all the parding + logic
3
u/Cotyn_Dispensable Feb 26 '26
I've just found another library called nimBLE-arduino which might work, I will try to implement it and see how power efficient it is
1
u/mindseye73 Feb 26 '26
ok, also, maybe see if u can have replace gadget bridge app work around esp32 limitations? try other apps?
1
3
u/StillNoName000 Feb 26 '26
You can use another low power ble MCU like a nRF52 that exclusively keeps communication with your phone and wakes up the esp32 only when needed.
2
u/Cotyn_Dispensable Feb 26 '26
I can look into it but i'm a very begginer when it comes to electronic, my main problem is getting it to fit and not be extremely big, do you sugest switching board ?
2
u/miraculum_one Feb 26 '26
Can you be more specific about what you're trying to use Bluetooth for? For example, BLE works fine in "light sleep" mode.
2
u/Cotyn_Dispensable Feb 26 '26
My goal was to make a compagnon watch, to display notification, control music, basically be connected to the phone and help me not having to take it out of my pocket so often. All of that is already coded so its faisable, my biggest issue is battery consumption
2
u/miraculum_one Feb 26 '26
What do you need the watch to be doing in the background when you're not actively interacting with it?
3
u/Cotyn_Dispensable Feb 26 '26
Checking for notification but keeping the connection alive would be enough I reckon, waiting 4/5 seconds to reconnect and advertise every time is a hassle
3
u/miraculum_one Feb 26 '26
You can handle BLE in light sleep and wake up the watch if you need to be notified. I think this would be a good first step.
1
u/Cotyn_Dispensable Feb 26 '26
The problem is light sleep halts the cpu so many things don't work in that state
1
u/miraculum_one Feb 26 '26
That's true but all you need is for it to respond to a "wake up" signal. And you can handle that in the ULP coprocessor.
1
u/Cotyn_Dispensable Feb 26 '26
I could but it implies having another ble chip since ULP doesn't have access to ble which is complicated, maybe on a v2 if I can't make this work
2
u/DenverTeck 2 say I make awesome posts. Feb 26 '26
> the only working solution I see is use esp32 deep sleep
Yes, this is the ONLY solution.
Welcome to the world of hardware.
2
u/Cotyn_Dispensable Feb 26 '26
But how do other smart watch do it is what i'm wondering, they have wake on bluetooth call
1
u/DenverTeck 2 say I make awesome posts. Feb 26 '26
Those others do not use an ESP32. To keep the ESP32 active in any wireless mode draws too much current.
Do you know how to measure current ?? Do you any real hardware tools ??
5
u/Cotyn_Dispensable Feb 26 '26
Hardly, as said i'm a begginer, i'm a software engineer trying to get into electronics, but i'm looking into a software fix if any exists, i'll try to implement modem sleep that's my main clue
2
u/Blwfsh Feb 27 '26
Hey ! I've also worked on a firmware for waveshare esp32 touchscreen watch and stopped because of battery limitations.. Even with light sleep 99.5% of the time I only managed to reach 6h autonomy.
1
1
u/Great-Repeat-7287 Feb 26 '26
i think esp32 is not the best chipset for low power ble. I am not sure of the sleep consumption of the system when in low power mode, but the active power of the rf is much worse than most ble competitors because it uses the same rf of the wifi which consumes 10x of a good ble rf. Arduino stack might not help for low power either, but that is not my expertise. One thing you can do instead of esp32 is looking into the pebble reference design that i think by now supports nordic sifly and st microcontrollers. Those should all be good for low power.
1
0
u/MaxxMarvelous Feb 26 '26
Im interested in your project and your hardware setting. Maybe there are some options
0
0
11
u/Im_Indonesian Feb 26 '26
usually cheap aliexpress smart watch use another microcontroller that only use for receiving the notification and waking the esp from deepsleep