This DIY Smartwatch Gives Users Nearly Full Control

Unable to find a smartwatch to suit his needs, Matthew James Bellafaire decided to make his own ESP32-based device.

The Purpose

A little while ago, Matthew James Bellafaire was reading an article about what would be considered the perfect smartwatch. In it, the author advocates for an open platform that lets users hack and tinker with both the hardware and software, allowing for it to be used with many devices and apps for a variety of applications. One example of this goal being somewhat attained was the Pebble, which was a brand of semi-open watches with simple and easily programmable interfaces, although it has now nearly died off completely after being acquired by Fitbit.

The primary inspiration of this project was from the Pebble, as Bellafaire wanted a watch that provided full control of everything to the user. This aspect could be used to add other features, such as integrations with other IoT devices and phones.

Internal Hardware

The brain of this device is the ESP32, which is in its WROOM module configuration. The ESP32 module has a dual-core processor clocked at 240MHz and it comes with either 4, 8, or 16 MBs of flash, which is plenty for storing large programs and simple graphics. But perhaps its most important specification is its support for both WiFi and Bluetooth at the same time.

Currently, Bellafaire is on the fifth revision of his PCB, which is feature-rich and pretty well designed. It has onboard battery charging and power management modules, an ADXL337 accelerometer, LCD controller, and a touch controller. In order to save power, each module is connected to a MOSFET, meaning power can be toggled on or off depending on when it's needed rather than always being on.

Communication with a Phone

For now the watch can only communicate with Android phones via a custom-built app. It acts as a go-between for the watch with the outside world. The Android app handles the sending of notifications via BLE. It does this by waiting for the watch to connect, then sends over 16-character chunks of text in packets, with the end of the message being denoted by three asterisks at the end. There is a function called updateText() that gets called when there is a GATT characteristic write request, and it stores the text.

Builtin Features

Perhaps the most useful feature of the watch is its ability to communicate with the Spotify API over Bluetooth to control media playback. The watch can be sent the current song name and then it displays various controls below it, including Play/Pause, Next Track, and Previous Track.

There is also an onboard accelerometer, which can come in handy when implementing fitness tracking.

Watch Program

The device's firmware is meant to be simple, modular, and expandable, so users/developers can add their own features with ease. The file MainLoop.ino gets run each UI update cycle and it switches to a given screen based on the value of the currentPage variable. Time is stored on the ESP32's internal RTC, and is first updated by connecting to an NTP server.

Ongoing Development

This project is still very much a work in progress, and I personally look forward to seeing where it ends up. The firmware could be improved by better following encapsulation principles and using C++ paradigms to help with readability and portability. Make sure to go check out the code and design files on Bellafaire's GitHub repo.

gatoninja236

IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.

Latest Articles