Inexpensive Open Source BLE smartwach compatible with Arduino tooling
To make the experience fit your profile, pick a username and tell us what interests you.
[フレーム]
What problem does this solve?
Smartwatches are gaining popularity by the minute, and may as well become as commoditized as smartphones are today. To have a smartwatch, however, the only choices today are for closed or semi-closed devices that you can't fully control and tweak. They are also, in most cases, unreasonably expensive, and not very efficient (often not even being able to last for a full day without a recharge).
We think we can make a smartwatch that's different. One that is both free, inexpensive, and efficient; while being as useful as a regular commercial smartwatch!
How does it solve the problem?
We are solving the problem by scaling down the solution to just the bare essential. And by making it open so that anyone can replicate it.
Using Arduino Mini as a processor instead of a multicore high-end processor, using a simple 128X64 OLED screen, rather than a high resolution retina display, while still using Bluetooh communications with a mobile phone, so that we can use it as a "second bigger brain" to do the heavy lifting. The components have been explicitly selected optimizing for simplicity, efficiency, and prize (the cost of all of them combined is actually never more than 20USD). The design has been optimized to be easy to build and use, and we have put together detailed instructions on how to do so.
With this setup, you have everything you need to have a functional useful smartwatch. We also want to make it easy to develop and publish your own custom applications for it, making it a platform, just like the Apple or Android smartwatches are.
What's the licence?
All the code is GPLv3, and everything else (schematics, 3D models, graphics...) has a Creative Commons Attribution+Share Alike licence. Free as in freedom.
New bluetooth-based apps
The main improvement over the previous version is the BLE component, that allows it communicate with an Android phone. This is incredibly powerful, as effectively makes the phone become a "second brain" which is connected to the Internet, and can provide the watch with many useful data that was previously out of it's reach.
Thanks to the Bluetooth pairing, we were able to build the following applications in the watch:
The trick is that all of these apps also require an Android component in the Watchduino Android companion app, doing all the heavy lifting and simply passing Watchduino the results to display, via Bluetooth.
Notifications from the phone
The best feature in Watchduino is the capability of sending notifications from your Android phone (just like all the proper smartwatches do). By using the Notification Listener Service we can redirect any notification to the watch via Bluetooth automagically (SMS, Emails, Whatsapp, Facebook, Google Now, calendars, etc). Then, once the notification arrives to the watch, you can just press a button to dismiss that notification in your phone too.
New UI
Since we are using a different screen, with a better resolution (128x64), we were able to build a more flexible UI.
The top of the screen is showing a status bar, similar to what smartphones do. The 4 corners of the screen show contextual symbols that indicate what the purpose of the buttons is in every occasion.
For instance, in the main menu you can move left and right, enter or exit.
On an app, the functionality of the buttons can change. For instance, on the Twitter app you can request a reload, or navigate between tweets.
Companion App UI
The main purpose of the companion app is to run as a service on the background, where it will be listening for notifications, or doing any processing the the custom apps...
Read more »Last weekend we attended a hardware hackathon organised by PCH in London. The theme of the hackathon was “Take your prototype to the next stage in 54 hours”, so in our case we brought our Watchduino prototype and focused on trying to make it closer to how it would look if it were a commercial product.
The best part is that at the hackathon there was a set of mentors, people who are experts in different areas of IoT, which were giving us useful advice about our product direction, design optimizations or the ins and outs of manufacturing.
By the end of the hackathon, we had a functional (at least theorethically) design for Watchduino that looks this awesome:
The first step to getting a hardware product into manufacturing is integrating all the electronics into a PCB. This not only makes the system easier to put together, it’s also smaller, and likely to be more energetically efficient.
So we designed a PCB that would mainly replace the Arduino Mini, breaking out the pins of the ATMega processor and leaving space to surface mount the rest of the components. To completely replace the Arduino board, a 8Mhz crystal oscillator needs to be added on top of our current components, as well as breaking out the RX and TX pins for reprogrammation. It’s pretty similar to the process we were following in our first Watchduino.
The board was designed with Fritzing, which we were already using for our schematic. We were recommended Eagle, which appears to be the industry standard software, and has a bigger component library and tons of support online. But Fritzing is simpler and open source, so it suited our purposes for the time being. You can find the file on the Github repo. In the future we would like to try out Eagle though.
By sacrificing the buzzer (which is not really very useful having the vibrator motor) and the USB charching module (to be replaced by a custom connector, as commercial smartwatches usually have) we were able to make our PCB exactly 1 square inch in area. Pretty sweet!
Being able to mount all the electronics in this small area mean there’s no longer the need to spread them across the strap as they were before. The whole design is completely compact, and small enough to fit in it’s entirety into a watch head; battery and everything.
In consequence, we redesigned our 3D case into a simpler shape, looking now very much like a conventional watch!
We are cheating a little bit, because we are reusing an existing strap from a Geonaute watch. These watches are sold at Decathlon stores, and just happen to have a so handy sliding mechanism for interchangeable straps.
So we designed our new 3D case with the same shape, and made it compatible with the Geonatue straps. Once we figure out how to print with flexible filament we’ll replicate the strap with the same connector.
There’s just one thing missing: our sexy new prototype can’t be functional until the PCB is printed (the image on the top I’m afraid is a dramatization with a screenshot pasted on it). Printing PCBs can be done manually, but it’s handier, better, and often cheaper to just get a manufacturer to do the job.
When you design a PCB, either with Fritzing, Eagle, or other software, you can export the result as Gerber files, which contain all the different layers of your design. You can provide any PCB manufacturer with this format, and they’ll be able to fabricate a production-quality version of your board.
So we’ve done just that: we ordered a 3-board batch of PCBs to OSH Park, for the outrageous price of just £1 each. We can’t wait for them to arrive and see if we can get our first mini production-run of Watchduinos!
During the last week, we've done some researching around different Bluetooth options for Watchduino 2, with aims giving an extra kick to the battery life. As you know, the current build of Watchduino 2 has a battery life of around 48 hours; the path to improve that even further goes through optimizing our Bluetooth usage.The Bluetooth modules that are commonly used in hobby electronics projects (the HM-10, CC2540 or nRF8001) are essentially a radio plus a little controller microprocessor, exposing even some GPIO pins on a breakout board. The microprocessor usually allows you to finely tune certain parameters, such as the strength of the signal, intervals for data exchange, or activating and deactivating certain capabilities of the circuit. This would be a smart way to achieve some extra power efficiency.Not all is rainbows and sunshines for Watchduino though. As you aware, we are using the HM-10 module for Watchduino 2. This module is manufactured by Jinan Huamao, a not-too-fancy chinese company. We picked it originally because of how cheap it is (you can easily find them for less than 5 USD on Aliexpress), and our priority at the time was optimizing on cost...
... But cheap comes at a prize. Now that we find ourselves wanting to fine tune the module, we find a stumbling block in the module's sloppy interface, and obscure documentation. All that we have to work with is a PDF document (that has obviously been the product of an automated translation) describing AT commands to interface with the module's processor. Just look at a particularly... brilliant? extract from the document, and judge yourself:
7.1 Send "I am iron man, I am iron man, I am iron man, I am iron....." string. Yes, that is a joke, in sleep mode, you can send a long string (Length > 80 or more), that string can made module wake up, and you will receive "OK+WAKE" string through UART.
Surely it must be possible to construct something similar for Bluetooth modules: their differences are smaller than their similarities, and can ceirtanly be abstracted into a higher level interface. Anyone looking for a challenge to work into?
As you probably know, one of the reasons that drove us to build Watchduino in the first place was the prospect of creating a smartwatch that you wouldn’t need to think about recharging. We achieved this with the first Watchduino, using techniques like sleeping the processor, and getting rid of any component that we didn't need from the Arduino (such as LEDs). We upped the battery life from days to months, and we expect we can achieve the same with Watchduino 2.
This is what we've tried so far to achieve our goal.
Sleeping the Arduino
In the original Watchduino we were using a library called Jeelib. This library features a handy module called Sleepy, which you can use to *completely* sleep the ATMega processor in the Arduino, driving it's power consumption to almost zero. The only thing that it'll wake it up is a magical kiss... well, ok, not really. It's a hardware interruption. You can trigger one by setting a timer with the library, or activating pins number 2 o 3 in the Arduino.
In our case we are waking up the Watchduino when pressing the menu button (hooked up to pin 2), when we receive a Bluetooth notification from the phone, or when a timer triggers every 60 seconds.
But why wake every 60 seconds? Well, if we wake just for a fragment of a second it's not going to be such a loss in power consumption: we are still asleep 99% of the time. But by waking up every 60 seconds we can update the time on the screen every minute, and it'll appear that the Arduino has never gone to sleep. We can show the accurate time on the screen 100% of the time, so you won't need to actually wake the processor for a few seconds with the button interruption simply to look at the time.
OLED Screen
So does this mean the screen is on all the time? Correct. You may think that this is not the smartest move energetically, but let me surprise you.
OLED screens are made out of LEDs. LEDs will only drain power when they are on. This is why when your screen is black, it will waste no energy at all. But what about if we make it almost black?
Everytime we send the Arduino to sleep, just before it closes it's metaphorical little eyes, we instruct it to turn off all of the LEDs in the screen, save for a little area in the middle of the screen, where we shall show the current time, hours and minutes, with no seconds. The Arduino will turn on those LEDs before going to sleep, so they will stay activated after it does. After a minute, the Arduino will wake up, update the time, and go to sleep again.
The consumption of the screen while on this sleeping cycle is minimal, and the benefit of having an "always-on" device is huge.
Sleeping the Bluetooth module
The two optimizations above we are already applying. However, our biggest woe at the moment is the Bluetooth module. Despite being "low energy", it's certainly our most energy-hungry component, consuming up to 10mA when it's operating.
However, according to the specs, the HM-10 module that we are using can be optimized to consume between 0.4 to 1.5mA. If we managed to do this, the battery in Watchduino could last for weeks on a single charge.
Our purpose is to be able to integrate the Bluetooth module into the watch sleep cycle, reducing it's consumption when it's not being used. One of our initial experiments involved physically switching off the Bluetooth module with a transistor during the sleep cycle. This had a bunch of problems though. The phone could no longer detect it when it needed to send notifications, so these could not be made in real time.
We have now discovered that the HM-10 specification allows you to activate a sleep mode using the AT+SLEEP UART command, where the Bluetooth device will reduce it's activity somehow, but still remain visible for the phone. So any notifications will reach the Bluetooth module as normal, and wake up the watch. While on this sleep mode, the consumption of the Bluetooth module is close to 1.5mA, as promised by the spec.
A problem that we still need to solve is that after the Bluetooth...
Read more »Today we bring you some awesome renditions of our current designs for the WatcDuino casing.
This one should look familiar:
It's the same design that we've already 3D printed and assembled, featuring a Smart Strap with detachable links. You can see a bunch of photos of the Real Life version in the gallery. You can also find a 3D printer-friendly version of the design on Tinkercad.
This is another prototype that we want to 3D print and experiment with:
This version has the Arduino inside the main watch head, leaving only the battery as a Smart Strap link. The rest of the strap is meant to be flexible. We hope to be printing this design out in the following weeks, once we adapt our 3D printer for flexible filament. You can download the 3D design on Tinkercad and beat us to it though!
You may have noticed that we've added a build instructions section to the Hackaday project page just some moments ago. During the past days we've been posting bits and pieces like the schematics for the electronics, the 3D design for the case, a shopping list for the components, and just today, the release of the code for the Android companion app. With this, he puzzle is now complete with all the pieces that you need to replicate WatchDuino 2.
To make it as easy and smooth as possible, we've put together a lovely tutorial detailing the steps that will get you to a working WatchDuino on your wrist. You can find it on the Github repo, and we've also linked it from the build instructions here in Hackaday for future reference.
We still have a lot of improvements planned for WatchDuino, but since it's already in a usable state we think it will be good to get feedback and contributions for other people building and using it. The sooner the better!
Great news everyone! We've spent the last few days cleaning some bits and pieces of the companion app, which today has been publicly released on Github! Not only that, but we've also put together some documentation detailing how to build it from source, and get it up and running on your phone. We hope to publish it into the Android Play Store in a not-so-distant future, so that installing can be even easier.
We have released as well, as a separate component, a Cordova plugin that we built ad-hoc for the WatchDuino companion app, but that we think it has a purpose general enough to be useful to others. It's a plugin that makes the phone notifications available to Cordova apps as events. We use it to listen to all of the phone notifications and pass them on to the watch. The source code is on Github as well.
'Cause sharing is caring :)
Today we are going to explain what's the magic behind the Bluetooth communication between WatchDuino and the phone companion app.
Communications take place every time the WatchDuino needs some piece for info that it can't calculate by itself. Usually this involves querying data from the internet, such as tweets, bus statuses, or the weather. But also... time!
WatchDuino 2, as opposed to it's predecessor, can't actually know what's the current time, as it lacks an RTC module. Instead, when it's started, it asks the phone app for the time, and after that it'll keep track of it by itself. From time to time it also asks the phone again for the time, to make sure it doesn't get too desynchronized.
The communication via Bluetooth between WatchDuino and the phone is actually lightning fast!
When you press the synchronize button on WatchDuino, the following message is sent to the phone app:
!tm
This is the "command message format" that WatchDuino and the companion app can understand. A bang means the start of a command, and the next two characters identify the command type. In this case, it's a request for the time. Other commands include "!tw" for twitter, "!tf" for TFL, "!wt" for the weather, or "!nt" for a notification.
Upon receiving this message, the companion app will grab the current time, and send it the watch like so:
!tm:1442063976
This is a command message with some data attached to it. In this case, the data is the current time in epoch format. We are using a library for Arduino which will accept this format, and translate it to something more readable for humans "September 12th 2015, 14:19:36". All the watch does upon receiving the message, is parsing the data out of it and passing it to the library, which will set the new time.
As you see, the message format is both simple and flexible, and allows for future apps to pick their own command codes, and transfer any data as long as you can serialize it into a string.One of our requirements when designing WatchDuino was for it to be cheap as chips. Why bother having separate Arduino and BLE modules when there are integrated boards out there? Why not use a nicer screen? The answers is, of course, to optimize on price. More standard components are cheaper than those that are more specific, and this is why we've chosen them for WatchDuino.
Today we want to demonstrate just exactly how cheap it is to build a WatchDuino, by putting together a shopping list to buy the components in Aliexpress. And also, to make it as straightforward as possible for you to go buy them and build yourself a WatchDuino!
* = For development you are probably interested in a boarded one instead.
It renders a total price of roughly 12ドル per watch! All of these components ship internationally for free from China. You can find equivalent components shipping locally from your country in stores such as Amazon, Ebay, Sparkfun or Adafruit. They will likely be slightly more expensive, although more convenient to buy for some people.
In the last week we've been experimenting with a new design for final form of the WatchDuino. One of our problems for building a wearable version was how cramped all of the components had to be. The final result was difficult to solder together, and somewhat bulky.
So we though, since we want to design our own 3D printed strap, why not move some of the components into it? Such as the battery or the Arduino Mini. In essence, the components are spread along the watch strap, making it a "smart strap" indeed!
We've build a prototype based on this idea. The 3D printed case is made out of links that snap together. Some of the links are "smart", and house some of the WatchDuino components (the battery, Arduino Mini, USB LiPo charger, and the buzzer+vibrator). The only thing left on the main case is the screen and buttons, acting as the interface.
The 3D design has been done on Tinkercad, you can have a look here.
Create an account to leave a comment. Already have an account? Log In.
Hi, will anyone help me? When i turn on Watchduino, the screen is white with black pixels (my screen is working in other programs) I using aruino nano 5V 16Mhz
I'm getting the same issue with the Arduino Pro Mini 3.3v 8mhz, were you able to fix it?
Yes, I think half the pins are unused in fact. You can check the schematic here https://github.com/coconauts/watchduino2/tree/master/schema
if you permit I can use this project as the basis for a '' duinoglass ''?
Could you send the code to this email? : dolizneyleg@gmail.com
The full source code is availaible on github https://github.com/coconauts/watchduino2 and https://github.com/coconauts/watchduino2-companion-app
I understand that. But I'm afraid that the battery will still drain if it keeps connected to the arduino, even if the arduino is not able to boot.
But, I will try this. Thank you.
You should get a battery with an over charge/discharge protection PCB. The one linked in the components list does not appear to have the protection PCB. The battery with PCB will shut off if voltage drops too low (usually between 2.7-3.2V). This battery claims to have PCB but is not visible in the photo http://www.ebay.com/itm/391256440004 and this one does not specify in details but PCB can be seen in the photos http://www.aliexpress.com/item/2Pcs-lot-SYMA-Lithium-Lipo-Battery-3-7v-240mAh-2s-20C-For-Syma-S107G-S105G-WLtoys/32279960332.html?spm=2114.031010208.3.55.BmGHq2&ws_ab_test=searchweb201556_1,searchweb201644_2_79_78_77_82_80_62_81,searchweb201560_2
Great project!
I want to know how you prevent battery from underdrawing. I know that if voltage drops below certain level, battery dies.
Isn't this how all batteries work? :o) The device simply is no longer capable of working after the battery voltage goes below 3.3V.
how long does the battery last? a cnc ed aluminum case will make it perfect.. Nice work !!
Very impressive!!! I've created a similar project (although no where near as complicated as yours), Great work and I love the "plug and play" capability
If you can get you pin useage down to 6 pins you could use a digispark board which is smaller than the Arduino mini. It's looking good though, I like the TFL app idea. I used to live in london and would have been great to have a watch status update.
incredible project but lack aesthetic seems more lol ... :)
to follow this project and never miss any updates
Arduino: 1.8.9 (Windows 10), Board: "Arduino Pro or Pro Mini, ATmega328P (3.3V, 8 MHz)"
In file included from sketch\watchcore.h:109:0,
from sketch\watchcore.cpp:4:
sketch\bluetooth.h: In member function 'void Bluetooth::processMessage()':
bluetooth.h:147:31: error: 'setTime' was not declared in this scope
setTime(buffer.toInt());
^
In file included from sketch\alarmSet.h:7:0,
from sketch\watchcore.cpp:18:
sketch\drawUtils.h: In function 'void drawTime(int, int, char)':
drawUtils.h:78:23: error: 'hour' was not declared in this scope
display2digits(hour());
^
drawUtils.h:80:25: error: 'minute' was not declared in this scope
display2digits(minute());
^
In file included from sketch\watchcore.cpp:19:0:
sketch\watch.h: In member function 'void Watch::drawDigital()':
watch.h:26:27: error: 'day' was not declared in this scope
display.print(day());
^
watch.h:28:29: error: 'month' was not declared in this scope
display.print(month());
^
watch.h:34:29: error: 'hour' was not declared in this scope
display2digits(hour());
^
watch.h:36:31: error: 'minute' was not declared in this scope
display2digits(minute());
^
watch.h:41:31: error: 'second' was not declared in this scope
display2digits(second() );
^
sketch\watch.h: In member function 'void Watch::drawAnalog()':
watch.h:46:27: error: 'day' was not declared in this scope
display.print(day());
^
watch.h:48:29: error: 'month' was not declared in this scope
display.print(month());
^
watch.h:53:36: error: 'second' was not declared in this scope
int r = clock60ToDeg(second());
^
watch.h:58:32: error: 'minute' was not declared in this scope
r = clock60ToDeg(minute());
^
watch.h:63:30: error: 'hour' was not declared in this scope
r = clock12ToDeg(hour());
^
sketch\watch.h: In member function 'virtual void Watch::draw()':
watch.h:73:38: error: 'weekday' was not declared in this scope
display.print(dayStr(weekday()) );
^
watch.h:73:39: error: 'dayStr' was not declared in this scope
display.print(dayStr(weekday()) );
^
In file included from sketch\watchcore.cpp:26:0:
sketch\topbar.h: In member function 'void Topbar::printBarTime()':
topbar.h:14:22: error: 'second' was not declared in this scope
if (second() % 2 == 0 ) separator = ':';
^
sketch\watchcore.cpp: In function 'void sysinit()':
watchcore.cpp:142:24: error: 'setTime' was not declared in this scope
setTime(0,0,0,0,0,0);
^
In file included from sketch\watchcore.h:109:0,
from C:\Users\Abishek\Desktop\watchduino2-master\watchduino2-master\watch\watch.ino:13:
sketch\bluetooth.h: In member function 'void Bluetooth::processMessage()':
bluetooth.h:147:31: error: 'setTime' was not declared in this scope
setTime(buffer.toInt());
^
exit status 1
'setTime' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I am getting this error. someone please help!!. I have copied the libraries to the library folder. My arduino version is 1.8.9