Smartwatch built from scratch, both hardware and software. Built on the Zephyr™ Project RTOS, hence the name ZSWatch - Zephyr Smartwatch.
Synced remote control over BLE
remote_control.mp4
Watch my presentation at Zephyr Developer Summit 2023
I have received quite some requests regarding building or getting the ZSWatch, the hardware is done and you can now build it yourself. However I may do some smaller changes before I call it done and officially "release" it. If you want to get notified when I'm "releasing" it, then simply press the Watch
button (next to Fork and Star) -> Custom -> Releases
and you will see in your feed when it's released.
Or you can fill in your mail here (Google form) and I'll send a reminder when it's ready (or if I decide to make a few kits, who knows).
- Building or getting one
- Hardware features
- Charger/Dock
- Enclosure/Casing
- Software Features
- Watchfaces
- Android phone communication
- PCB
- ZSWatch v1 in action (Note old, not updated for latest HW and SW).
- Environment, Compiling and running the code
- Writing apps for the Application Manager
- Other tools
- Licence GPL-3.0
- nRF5340 BLE chip (u-blox NORA-B10 module).
- 128 MHz Dual core.
- 512 KB RAM.
- 1 MB Flash.
- 30 MHz SPI for display.
- 240x240 round display with touch screen.
- IMU Bosch BMI270, with this one it's possible to do many fancy things such as navigation using gestures and the typical smartwatch wakeup by moving the arm so the display is viewable.
- Bosch BME688 Environmental sensor with AI.
- Bosch BMP581 High performance pressure sensor accuracy in units of ~20cm's.
- ST LIS2MDLTR Magnetometer.
- Analog Devices MAX30101 Heart-Rate Monitor and Pulse Oximeter Sensor.
- Renesas AT25SL128A 16 MB external flash.
- Option to not mount some sensors to save BOM cost.
PCB done, casing to be designed. Idea is that watch will sit on top. Built in debugger. Will be an option without debugger also (requires licence).
3D printed casing with 3D printed buttons. Does it's job, but would like to do something else, maybe CNC. Buttons are not 100% perfect right now.
- Bluetooth LE communications with GadgetBridge Android app.
- Also support Bluetooth Direction Finding so the watch can act as a tag and is trackable using any u-blox AoA antenna board
- Watchface that shows:
- Standard stuff as time, date, battery
- Weather
- Step count
- Number unread notifications
- Heart rate (not implemented yet however)
- ...
- Pop-up notifications
- Application picker and app concept
- Step counting
- Gestures
- And much more ...
There are almost endless of posiblities for features that could be implemented, see here for full progress and my current ideas.
Alternative watch faces can be chosen by selecting one or many of the appropriate Kconfig.
Swiping left to right will change the watchface.
for something else, and can then be disabled.
CONFIG_WATCHFACE_ANALOG=n
CONFIG_WATCHFACE_DIGITAL=y
CONFIG_WATCHFACE_MINIMAL=y
To select watchface background see below config in prj.conf:
CONFIG_WATCHFACE_BACKGROUND_SPACE=y
CONFIG_WATCHFACE_BACKGROUND_FLOWER=n
CONFIG_WATCHFACE_BACKGROUND_PLANET=n
CONFIG_WATCHFACE_BACKGROUND_NONE=n
Fortunately there is a great Android app called GadgetBridge which handles everything needed on the phone side, such as notifications management, music control and so much more... The ZSWatch right now pretends to be one of the supported Smart Watches in Gadgetbridge, following the same API as it does. In future there may be a point adding native support, we'll see.
- In the watch go to Settings -> Bluetooth -> Enable pairing
- Now go reconnect to the watch from Gadgetbridge app.
- You should now be paired.
A 4 layer board which measures 38mm in diameter designed in KiCad.
Music control | Accelerometer for step count and tap detection |
---|---|
Notifications from phone (Gmail here) | Settings |
toch_demo.mp4
I recommend watching this part of my presentation at Zephyr Developer Summit where I build a sample app.
Check out the sample application for the general app design. The main idea is each app have an <app_name>_app.c
file which registers the app, chooses icon and drives the logic for the app. Then there should be one or more files named for example <app_name>_ui.c
containing pure LVGL code with no dependencies to Zephyr or the watch software. The idea is that this UI code should be runnable in a LVGL simulator to speed up development of UI, however right now that's not set up yet. The <app_name>_app.c
will do all logic and call functions in <app_name>_ui.c
to update the UI accordingly.
Each application needs to have a way to close itself, for example a button, and then through callback tell the application_manager.c
to close the app:
When user clicks an app in the app picker:
application_manager.c
deletes it's UI elements and calls theapplication_start_fn
.<app_name>_app.c
will do necessary init and then call the<app_name>_ui.c
to draw the app UI.- User can now navigate arund and the application and do whatever.
When user for example presses a close button in the application:
- Typically a callback from the UI code in
<app_name>_ui.c
will call<app_name>_app.c
to tell that user requested to close the app.<app_name>_app.c
will notifyapplication_manager.c
that it want to close itself.application_manager.c
will then call<app_name>_app.c
application_stop_fn
and<app_name>_app.c
will tell UI to close then do necessary de-init and return. application_manager.c
will now draw the app picker again.
The application manager can also at any time close a running application by calling it's application_stop_fn
.
- Visit https://jakkra.github.io/ZSWatch-Web-Dashboard to connect and view sensor data in a browser that supports Web Bluetooth (Source code)
Main difference from MIT is now that if anyone want to build something more with this, then they need to also open source their changes back to the project, which I thinks is fair. This is so everyone can benefit from those improvements. If you think this is wrong for some reason feel free to contact me, I'm open to change the LICENCE.