Make a DIY Smartwatch Using ESP8266

11
instructables Make a DIY Smartwatch Using ESP8266 by the Technowright Smartwatches are extremely fascinating because of the numerous features provided by them with tiny body. The Smartwatch craze began when Pebble released their first Smartwatch. Since then, many companies are constantly working on designing the most utilitarian smartwatch. But, What really makes a Smartwatch cool? It is definitely its looks and features. The best way to get personalized features on a Smartwatch is to design and build one on your own. In this project, I will show you how to make a DIY smartwatch using an ESP8266 chip, ESP-12E. I have documented all the steps, but I recommend you to watch the video to get a better understanding of the process. https://youtu.be/BjgFC0M3iMk Step 1: Project Overview The main features of this Smartwatch are to display time, weather and most importantly you can control other appliances by pressing the buttons on the watch. The watch receives all the data through the internet, so it has to be connected to the internet to function. Here's how it functions: 1.Time: The watch connects to the nearest NTP server to get the time and date. 2.Weather: The temperature data is obtained from Yahoo Weather API. 3.Controlling other Appliances remotely: The watch connects to the Blynk server and uses its bridge function to directly control the other ESP8266 Relay module that I made in my previous project. You can watch the video Here . Make a DIY Smartwatch Using ESP8266: Page 1

Transcript of Make a DIY Smartwatch Using ESP8266

Page 1: Make a DIY Smartwatch Using ESP8266

instructables

Make a DIY Smartwatch Using ESP8266

by the Technowright

Smartwatches are extremely fascinating because ofthe numerous features provided by them with tinybody. The Smartwatch craze began when Pebblereleased their first Smartwatch. Since then, manycompanies are constantly working on designing themost utilitarian smartwatch.

But, What really makes a Smartwatch cool? It isdefinitely its looks and features. The best way to get

personalized features on a Smartwatch is to designand build one on your own.

In this project, I will show you how to make a DIYsmartwatch using an ESP8266 chip, ESP-12E. Ihave documented all the steps, but I recommend youto watch the video to get a better understanding of theprocess.

https://youtu.be/BjgFC0M3iMk

Step 1: Project Overview

The main features of this Smartwatch are to displaytime, weather and most importantly you can controlother appliances by pressing the buttons on thewatch. The watch receives all the data through theinternet, so it has to be connected to the internet tofunction.

Here's how it functions:

1.Time: The watch connects to the nearest NTP

server to get the time and date.

2.Weather: The temperature data is obtained fromYahoo Weather API.

3.Controlling other Appliances remotely: Thewatch connects to the Blynk server and uses itsbridge function to directly control the other ESP8266Relay module that I made in my previous project. Youcan watch the video Here.

Make a DIY Smartwatch Using ESP8266: Page 1

Page 2: Make a DIY Smartwatch Using ESP8266

Make a DIY Smartwatch Using ESP8266: Page 2

Page 3: Make a DIY Smartwatch Using ESP8266

Step 2: Preparing the Stuffs

For this project, Here are the components required:

Amazon.com:

1 x ESP-12e: https://amzn.to/2q5lxee

1 x OLED display: https://amzn.to/2Sghhp6

3 x SMD buttons: https://amzn.to/2Sghhp6

1 x 3.3V Voltage Regulator: You can get from anarduino uno or pro mini; https://amzn.to/2DbnwpI

1 x TP4056 (Charger circuit): https://amzn.to/2Sghhp6

2 x Small SMD buttons(buttons present on theNodeMCU); Assorted buttons kit: https://amzn.to/2Sghhp6

2 x 0603 LED: You can get from the charger circuitabove.

2 x 0603 Resistor: You can get from the chargercircuit above.

1 x SMD Slide Switch: https://amzn.to/2Sghhp6

8 x 0805 10K Resistors: https://amzn.to/2Sghhp6

2 x 0805 10uF Capacitor: https://amzn.to/2Sghhp6

1 x 0603 112 Resistor: You can get it from Charger

circuit.

Amazon.in:

1 x ESP-12e: https://amzn.to/2JmDC09

1 x OLED display: https://amzn.to/2StEEeY

3 x SMD buttons: https://amzn.to/2CQNCxB

1 x 3.3V Voltage Regulator: You can get from anarduino uno or pro mini; https://amzn.to/2CPSDq9

1 x TP4056 (Charger circuit): https://amzn.to/2yCnN1a

2 x Small SMD buttons(buttons present on theNodeMCU); Assorted buttons kit: You can get it froma nodeMCU

2 x 0603 LED: You can get from the charger circuitabove.

2 x 0603 Resistor: You can get from the chargercircuit above.

1 x SMD Slide Switch: https://amzn.to/2yHgPI8

8 x 0805 10K Resistors: https://amzn.to/2COzKUn

2 x 0805 10uF Capacitor: https://amzn.to/2yE1hVQ

1 x 0603 112 Resistor: You can get it from Charger

circuit.

Most of the Components can be bought alone butsome of them have to be salvaged from othermodules. I had taken the 3.3V Voltage Regulator from

an arduino uno, the 2 buttons from nodeMCU and theLED's, resistors along with TP4056 were from the3.7V LiPo Battery Charger circuit.

Make a DIY Smartwatch Using ESP8266: Page 3

Page 4: Make a DIY Smartwatch Using ESP8266

Step 3: Order the PCB's

I didn’t want the watch to be clunky and heavy so Ithought the best way to reduce the usage of wires isto make a PCB. I designed the Schematic andPrinted Circuit Board using EasyEDA: https://easyeda.com , then I ordered the PCB’s from JLCPCB.

To order a PCB, visit www.jlcpcb.com and uploadyour gerber file.Here is the PCB gerber file: https://github.com/theTechnowright/DIY-Smartwatch...

The PCB’s arrived after two weeks, they were ofpretty good quality for only $2.

Github link to circuit schematic, PCB gerber file andarduino code:

https://github.com/theTechnowright/DIY-Smartwatch-...

Make a DIY Smartwatch Using ESP8266: Page 4

Page 5: Make a DIY Smartwatch Using ESP8266

Step 4: Solder All the Components!

Then solder all the components to the PCB. I used asoldering to solder the THT components and a hot airSoldering gun for the SMD components. Using theHot Air soldering iron I was able to solder all the SMDparts without difficulty. But it is not impossible tosolder them without it.

After soldering the components, I found out that theGPIO pin 9 cannot be used as an input. So I had tocut the copper trace using an Xacto knife andsoldered a thin wire from the button to the GPIO 14pin. You don't have to worry about it because I have Ialready corrected the PCB's and the schematics.

Make a DIY Smartwatch Using ESP8266: Page 5

Page 6: Make a DIY Smartwatch Using ESP8266

Make a DIY Smartwatch Using ESP8266: Page 6

Page 7: Make a DIY Smartwatch Using ESP8266

Step 5: Programming the Watch...

Before we upload the code, we have to get theWeather API from Yahoo Weather API. Visit thepage, under the YQL query click on the green textand scroll all the to the end till you find the text“nome, ak”. Here you should add your city’s nameand country code. For example, I placed “Bengaluru,IN” where ‘Bengaluru’ is a a city and ‘IN’ for India. After doing that, click on the “Test” button below andcopy the link given under ‘Endpoint’ from “/v1” till theend of the link.

Then download the arduino code from here: https://github.com/theTechnowright/DIY-Smartwatch-...

In the code, first insert the Blynk Authentication codewhich will be emailed to you after creating a newBlynk Project. Then type in the WiFi SSID andpassword. Paste the copied Yahoo API link in the place where itsays ‘const String url = “” ‘ And then under theBLYNK_CONNECTED, Insert the authenticationcode of the other ESP8266 which controls theRelays. Finally scroll down till you find“TimeChangeRule”, Here add or subtract minutesfrom UTC according to your time zone.

I had previously done a DIY Weather Station projectwhich gives a step-by-step tutorial to use BLynk. Andhere is the link to the DIY WiFi Relay project:

Then install all these arduino libraries :

//www.youtube.com/embed/kPblG4l4gEs

Time.h & TimeLib.h: https://github.com/PaulStoffregen/Time

Timezone.h: https://github.com/JChristensen/Timezone

SSD1306.h & SSD1306Wire.h: https://github.com/JChristensen/Timezone

NTPClient.h: https://github.com/JChristensen/Timezone

ESP8266WiFi.h & WifiUDP.h: https://github.com/JChristensen/Timezone

Download latest Blynk library here: https://github.com/blynkkk/blynk-library/releases...

Now wire the 4 pin serial communicator to the USB-TTL convertor accordingly;

ESP-12eUSB-TTL Convertor

GND - GND

RST - RTS

RX - TXD

TX - RXD

On the arduino IDE, select your device as NodeMCU1.0 and choose the correct COM port and upload thecode. While uploading the code make sure to press

and hold the flash button on the watch.

Make a DIY Smartwatch Using ESP8266: Page 7

Page 8: Make a DIY Smartwatch Using ESP8266

Make a DIY Smartwatch Using ESP8266: Page 8

Page 9: Make a DIY Smartwatch Using ESP8266

Step 6: Make the Straps for the Watch!

To make the watch straps, I used an elastic band from an old Safety goggles and attached it to the watch. You cantake a look at the pictures above to get a better understanding.

I first thought of placing the battery right underneath the watch, but it was too bulky and uncomfortable. So Isandwiched it between the straps to keep the watch thin.

Make a DIY Smartwatch Using ESP8266: Page 9

Page 10: Make a DIY Smartwatch Using ESP8266

Step 7: Test the Watch and You're Done!

Now, turn ON your watch by sliding the switch. Thenit should show a message saying " Connected toWiFi". If it does,then You Have successfully Made aSmartwatch! Congratulation!

On pressing the middle button, the watch will displayTemperature, Time and date. And the other twobuttons control the two relays of the WiFi Relay module. You connect the relay to any electrical applianceand that can be controlled by the watch. The bestthing to do is to connect it to an extended poweroutlet. And Make sure to connect the Relay switch tothe live wire and not the neutral.

*WARNING: This project involves handling of wiresfrom the main power outlet. PLEASE DO SO ONYOUR OWN RISK. I AM NOT RESPONSIBLE FOR

ANY INJURY CAUSED TO YOU OR ANYONE.

That's it, we have made a smartwatch!

Make sure to check out my youtube channel andsubscribe for more cool projects like this:

www.youtube.com/thetechnowright?sub_confirmation=1

You can also follow me on Instagram:

www.instagram.com/thetechnowright

Make a DIY Smartwatch Using ESP8266: Page 10

Page 11: Make a DIY Smartwatch Using ESP8266

This is really impressive. You should enter this into the Electronics Tips and Tricks contest.

Make a DIY Smartwatch Using ESP8266: Page 11