Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!

There's Something ESPecially Impressive About the OpenSmartWatch Project

@pauls_3d_things' slick, open source smartwatch strikes the right balance between high-tech and hand tooling. DIY your own digital sundial!

Tom Fleet
4 years ago β€’ Wearables / Internet of Things / Clocks

It's no overstatement that we certainly have a thing or two for timepieces over here at the Hackster news desk. Whether beautifully crafted Bluetooth notification devices or Wi-Fi-enabled wristwatches, there's a certain statement that comes from a maker having designed, or built their own watch.

Designing a watch that the user will want to wear around their wrist can often feel like a bit of a balancing act. Beyond the usual things that we will consider in a drafting a design spec β€” functionality, battery life, perhaps some consideration for the UX β€” a watch will require far greater consideration to things such as the look, and even feel, of its enclosure, not to mention the robust design that will be required for something that gets exposed to the wide range of human activity and movement.

Indeed, the previous, casual consideration of the UX is suddenly finds itself promoted to paramount importance when figuring out how to fuse function with the implicit simplicity that one expects from such a device β€” even with additional functionality offered, a watch shouldn't be a challenge to use β€” heck, some smartwatches even look like... watches!

When this very watch-looking smartwatch build popped up from @pauls_3d_things on Twitter, it immediately caught our eye β€” there's a lot of very neat looking parts that have gone into the design, and perhaps we should take a peek at the most striking β€” arguably one of the most important features of any watch β€” the glorious 1.3" circular IPS TFT LCD display panel, sitting proudly within the 3D-printed bezel.

While the part number doesn't exactly roll off the lounge, the STP240240_R130B from the confusingly named Surenoo Tech Co, Ltd is one to keep written down somewhere.

You don't get rid of corners by... cutting... corners...?

With its unique formfactor boasting 240 x 240 pixels (at the widest points, of course), and a fast SPI interface, for little over $5, it is certainly something to keep in mind for next years Halloween projects. These would work very well with a port of the Uncanny Eyes Project, from Adafruit's Phil Burgess, maybe with a substitute of the Adafruit_ILI9341, driver for this handy port, Arduino_GC9A01, from Z-Lab. It might need a little coaxing, but that's a very solid starting point!

With a simple SPI interface, and low pinout FPC connection, this sort of display is a game changer! It allows any maker who can solder a ZIF connector (or direct solder the slightly odd 0.7mm pitch FPC ribbon connector...) access to a rich, colorful screen, in the sort of form factor that opens up many project possibilities beyond watches β€” such as instrument gauges, cosplay costume eyes, or even enchanted magic 8 balls?

The beautifully designed casing looks simply wonderful, and does a really great job of hiding just how much tech Paul has managed to cram into onto the PCB sandwiched inside the watch housing!

If we check out the bird's eye view of the rear face of the PCB, we can see that there really is very little in the way of free space β€” there's something neat crammed into every corner of this board!

Honey, I shrunk the WROVER...

Don't panic, we're not talking about the pet pooch of Rick Moranis, but it's worth pointing out just how small the TTGO T-MICRO32 β€” seen top left of the board β€” actually is when compared to size of the WROOM and WROVER ESP modules that we usually see in a large number of projects.

For a sense of scale, it sits somewhere between the SparkFun Artemis module and an ESP-WROOM-32.

Smaller than a postage stamp, the T-MICRO32, from TTGO. This is pretty much the smallest functional version of the ESP32 chipset that you can buy β€” and even populates the u.FL connector, handy if the default selection of the chip antenna doesn't work well with your case design. Just shift a resistor, and you can snap on the antenna of your choosing.

When we say "functional," we really do mean in a "plug-and-play" sense.

With the recent number of projects we've featured that make use of the ESP32-PICO-D4 SiP, many of you might suggest that variant would be more worthy of the title, but it still requires peripheral components β€” decoupling capacitors, I/O strapping resistors, and of course, an antenna of some form!

Whereas the MICRO32 can very much hang of the end of 3.3V supply, and function without any further fuss, because β€” you guessed it β€” it is pretty much a module-level implementation of the PICO-D4, with all core components needed, in a nicely shielded RF can. KISS, right?

Finally, a final favorite point of mine to mention when musing on the use of a pre-made module. The FCC ID that has been granted to the module means that the FCC will certainly feel more friendly when you finally feel you're ready to figure out how to sell your fun new product! It won't let you bypass the necessary radio compliance testing needed to bring a wireless product to market, but it will make the process far less onerous, that's for sure β€” something you don't get when rolling your own PICO-D4 layout.

Going places, with GPS!

With one module already featured on this PCB that can handle both Wi-Fi and Bluetooth wireless connectivity, you might be wondering what the even smaller module, sat snugly between the ESP and the uSD receptacle, might be doing on this PCB.

Well, a mainstay feature of nearly every smartwatch is their general ability to track GPS locations, a feature that any outdoor activity enthusiast will agree is pretty handy!

Whether you're laying out waypoints for your next wonder in the wilderness, or tracing out your tracks and trips around town, it's fair to say that GPS is a pretty useful function for you to have at your fingertips!

Again, whereas you can buy chip or SiP level GPS receivers β€” ones that can also receive and decode data from the other satellite positioning systems (GLONASS, BeiDou and Galileo), the same set of pros and cons (perhaps with the exception of FCC) apply here.

So, rather than playing with strip-line feeds and other finnicky RF layout 'fun,' critical to getting a good GPS lock, it makes sense to again make use of a module β€” Quectel's miniature-sized L96-M33.

It's nice to hear from Paul that the Quectel FAE team are pretty engaged with the maker scene, having themselves reached out with the offer of design feedback β€” just from having seen Paul's Instagram feed.

Loosely paraphrased, Paul recalled his feedback of the teams suggestion that the RF path of the optional external GPS antenna u.FL connection on the M96... 'could be better.' With further feedback, Paul now has a better understanding of how to get the desired performance from the part. Nice.

That's the sort of engagement that many of us long for, and will have struggled to achieve with some vendors β€” despite far larger MOQs.

That sort of proactive customer focus is worth pointing out, when convention says your EAQ of "well... maybe a tray?" wouldn't even get a "no-bid" response...

I, too, see what's going on here!

Bottom right of the PCB, as pictured below, sits a whole suite of I2C peripheral parts, and for the space of barley more than a SOIC-8 package, this set of components adds a significant amount of functionality to the OpenSmartWatch, and, dare I say it includes the actually somewhat rather important "watch" functionality too!

Starting top left of the highlighted component block, we have a small, square SMD package, barely large enough for its laser-etched package markings. This rather meager looking, minuscule 2mmΒ² bead of plastic hides surprising function: Bosch's ultra-low power BMA400 triaxial accelerometer.

Consider the BMA400 as Bosch's direct offering against parts such similarly sized and specified parts as the LIS3DH, from competitors such as STMicroelectronics, but with an even smaller package β€” not even the length of an 0805 resistor in each axis!

Needing only 2mmΒ² of board area, and only two pins in its simplest, polled I2C communications mode, there's very little overhead in adding this accelerometer to your design.

With an accelerometer able to determine and report the orientation of the PCB it is mounted to, the watch is now able to sense things like which way up it is β€” useful for the often overlooked fact that some people wear watches on either arm!

Excuse me, do you happen to have the hPa?

Sat to the right of the BMA400, is a slightly larger, metal-domed package, but with a tell-tale sign that indicates it's function β€” the neat little hole in the top of the package suggests that this part senses something to do with the ambient air.

If we check our list of candidates from the checklist of parts hidden previously in this article, we can see that this is likely the BME280 MEMS atmospheric pressure sensor, another Bosch part!

Again, another mainstay feature of many a smartwatch on the market, being able to barrel around with a barometer below your bezel can potentially give you the ability do get the drop on any incoming droplets β€” without needing a dodgy knee to play up.

Both of these parts can support either I2C, or SPI communication, configured by the strapping of the SDO/CSB pins on each device. You might ask why not just stick them on the SPI bus, as with the display?

Well, in keeping the SPI bus dedicated to the display data, some smooth screen update rates can be achieved, without needing to pause pixel data to interleave bursts of traffic to the sensors.

What's more, there's one part we've not yet discussed that only supports I2C communications, so if you already need to use the bus, why not stick the accelerometer and pressure sensor on there also?

A tiny little timekeeper

When you think about a real-time clock (RTC) implementation, you typically expect to see an IC package, laid out with a crystal oscillator of some format neatly located in proximity.

Usually paired with a crystal of a specific frequency, often 32.768kHz, it's an easy circuit to spot. 32,768 Hz might seem an awfully odd number to count against, but it makes a lot of sense when you think in binary terms β€” 32,768 is two to the power of 15 β€” 15 bits that represent 32,768 possible states, e.g. a range of 0 - 32,768.

The buffered output from the crystal oscillator circuit is fed into a 15-bit counter, that overflows every second, which I hope might shed some light on what may have always seemed like a bit of a "magic number" to some!

If we squint just right, we can make out a DS-marking on the SOIC-8 package within the trio of I2C devices we're discussing.

DS indicates an IC of Dallas Semiconductor origin, who originally specialized in RTC chips, before being acquired by Maxim IC. Maxim continue offering these invaluable chips, leaving the DS part numbering intact.

Knowing that, we can be pretty sure that this is an RTC device, but why can't we can't see is a crystal oscillator of any sort connected to it β€” what's going on?

If we take a look at the DS family product range, we can take a look for anything with a SOIC-8 package, to try and gain some insight as to what's going on here. Perhaps with a pinout, we might spot if there are some VIAs visible, that could perhaps suggest some sneaky oscillator placement, over on the other side of the board?

As it happens, the leading hit from the family tree would be the DS3231M β€” an eight-pin, SOIC-packaged I2C RTC device, which contains its own MEMS resonator!

We can stop looking for the crystal package on the PCB β€” it's right there in front of us, integrated directly into the silicon of the DS3231M chip itself!

Whereas we've touched on the appeal of modules earlier in the article, this takes things to the next level... down? MEMS technology allows chip designers to form microscopic, intricate mechanical assembelies using semiconductor fabrication techniques.

Below, an accelerometer mechanism is implimented as a set of comb capacitors. As the device is moved, the large mass of the anchor will flex the thin spring linkages, and the capacitance measured will vary.

Similar structures can be used to form a resonant oscillator, and without the intentional mass of the accelerometer Anchor, seen above, these structures won't see much effect from the typical movements experienced by a (living) human!

Compensation is the name of the game

The thing is, with oscillators, compensation is the name of the game. Quartz crystal oscillators are well known for their non-linear temperature coefficient, which is further compounded by the various crystal types, cut at different angles from the quartz stock.

With such frequency drift over the entire expected temperature cycle of something like a watch, you could be expecting something like +40 / -20ppm of error in the measurement of your timekeeping! 20ppm would be optimistic, requiring a very well laid out and compensated crystal circuit, free from contaminations such as flux, and even this figure would still work out at nearly a minute a month, despite a textbook implementation.

The only way around that β€” as far as a quartz crystal based oscillator is concerned, is to apply a known offset, often supplied (at cost) by the crystal manufacturer, as a table of measurements at given temperatures. So, that's often not done with something like an RTC. There's usually an acceptable amount of drift before the clock is adjusted by an external source, say, NTP, or someone poking some tactile switches.

Maxim, like other vendors, makes full use of the hybrid nature of the design of these devices. They, and other vendors, are free to implement everything they need to do this compensation, calibration correction on one single chip.

Having the temperature sensor formed in the same substrate as your oscillator allows for some pretty tight temperature compensation - the quoted 5ppm of the DS3231M, working out at ~12 seconds a month, means you'd likely never see an error in the six months of counting that occurs between daylight savings updates.

A well rounded design, rounded up.

With the most notable elements of the OpenSmartWatchdiscussed in detail, we can take a quick overview of what remains on this rounded PCB.

Right on track

Just like any locomotive will always fare better when riding on rails that have been carefully considered and correctly constructed, the key to the success of this project β€” with its multiple radio modules and plentiful peripherals β€” or indeed any other similarly complex project lies in taking time to ensure the quality of design and construction of the voltage rails that it will run on!

There's quite a bit going on to account for in the power budget of this feature packed PCBA.

While slinging a few bytes over Bluetooth on the ESP32 might nibble away at battery life, HTTP or such over Wi-Fi is far hungrier, can chug away at the precious coulombs contained within our battery cell β€” with significant peak current requirements potentially posing a problem for the products power supply to keep up with.

With Bluetooth, and even Bluetooth "LE" modes already biting at around 100mA in Rx mode, before any bits are being broadcast, and chowing down up to 130mA to chat back in, Tx mode, your power budget is considering weight watchers, even without Wi-Fi.

With 802.11b, at worst, costing you a whopping 250mA, you can see that optimizing your applications radio access will likely be the focus of many of your power optimization efforts!

Depending on the Global Navigation Satellite Service that covers your geographical region, you might be looking to catch a glimpse of the constellations of satellites that form the GPS, Galileo, GLONASS (or one of a few more) GNSS services. Getting a fix while gallivanting about will run you anywhere from 20-25mA, but that's pretty incredible when you consider this glob of silicon and fiberglass is listening to multiple, whisper quiet signals, originating from satellites orbiting 20,180 km at some 14,000 km/h. Reasonable, I'd even suggest.

And what use is any of this data, if you're not showing this data on that 1.3", LED back-lit display?! Thing is, unlike OLED, or MemoryLCD technologies, TFT pretty much needs some backlighting to be readable. If you've ever had the backlight fail on a TV or LCD monitor, you will know it's pretty much game over. That's 40mA for on β€” practically any time you're outside! β€” though PWM can round that average down for you in less illuminated environments.

So, accounting β€” roughly β€” for the other the other tidbits, like the micro SD card, we could be seeing a realistic 200 - 300mA current consumption, with the display illuminated, and Wi-Fi transmitting. It's worth noting that Wi-Fi (and other radios) can be very noisy, with high instantaneous peak requirements in amongst a reasonable average current consumption.

VBATT to 3V3, with a little chip starting 'LTC...'

While a lithium polymer cell can certainly deliver that current, there is a little finesse needed before just feeding VBATT into your 3.3V friendly system!

With 3.3V sitting somewhere in-between the usable voltage range of a Li-Ion cell, 4.2V fully charged, down to 3.0V - with any lower than that potentially damaging the cell β€” you will need to not only down regulate the voltage supplied by the cell, but also need to jack it back to up 3.3V later on, towards the end of it's discharge curve.

Doing this can net you approximately 20% of the remaining capacity that would be otherwise unavailable!

If we for a second, forget about batteries, and look at externally supplied, less portable projects, you find that you usually do one, or the other as needed.

With many circuits happy to operate at 3.3V, most of our projects would suffice with an LDO, fed from a handy USB port. That's fine, up to a point. Why is that, you say?

It's worth knowing that an LDO is a linear device, and when it has to deal with more than a little difference between the input and output terminals, it will dissipate a noticeable amount of power under even a small load,

So while you can likely live with that loss when looking at a tethered, externally supplied design, that wasted power can be a bit harder to swallow when you're balancing the capacity of a battery that's barely bite-sized!

You can get around that with a type of DC/DC switching converter, known as a buck converter β€” it bucks a higher voltage down, in a far more efficient way than an LDO can mange.

The cool thing about these active, switching converters, is that unlike linear regulator designs, with a bit of a topology tweak, they can also turn things around β€” enabling a designer to boost a lower voltage up to a higher one, trading current for voltage as they go.

A common application for such a converter has recently been to get the 5V supplied to a USB-powered Nixie display clock, up to the (approx.) 170V AC the tubes require for operation!

While that's not the sort of voltage most of us want to wear on a daily basis (most of us β€” there's alwaysat least one though...), we can see that we'll still want a bit of both buck and boost to bolster our battery, in order to get the most wear time out of this wristwatch.

Thankfully, getting 3.3V out of a lithium cell is quite understandably, a problem that has been solved many, many times, from many different manufacturers. Don't let the old name fool you, Linear Technologies β€” now Analog β€” are no strangers to some very capable, active DC/DC converters, so something like the LTC3440 is going to be a safe bet here.

It's designed for this exact scenario, and gives a generous safety net with it's 600mA current capability, and when compared against the efficiencies for the various other solutions, looks like a solid choice for a Li-ion-powered device!

Cheap and cheerful USB-Serial conversion!

The ESP32 doesn't do much without being programmed, and the accepted way to flash your latest firmware build has commonly been to chuck it over to the chip, usually with a USB-Serial converter chip of one's choosing.

We've seen FTDI previously as a favored fixture for this task, but after FTDI Gate, it's fair to say that perhaps they fell from favor...

Since then, the commonly found CP2104N, from Cypress Semiconductor could be considered the new champion of the converter market, if not for a newly-emerged converter IC, the cheap-as-chips CH340, which is continuing to crop up in ever more circuits, where the CP2104N would once be seen.

Like we said, it's cheap, and cheerful, but it doesn't provide any ESD protection for those D+/D- pins of the USB connection, so perhaps that could be something to consider when the GPS gets fixed in revision 2!

Speaking of, when's that happening?

Well, the project β€” as we've documented it here β€” is now ready for you to dig into, as Paul has thankfully released the sources over here, in the project's GitHub repo.

With many of us also bound by the constraints of the nine to five, we can sympathies with other, more pertinent activities perhaps taking taking priority from the progress we all nevertheless want to see on this project!

I can't possibly predict when we'll see Paul pushing out the next prototype, or even pre-production PCB, but you've got a good chance of catching it when it happens if you get him on your "following" list over on Twitter: @pauls_3d_things.

Tom Fleet
Hi, I'm Tom!I create content for Hackster News, allowing us to showcase your latest and greatest projects for the world to see!
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles