Introduction: WiFi Clock,Timer & Weather Station, Blynk Controlled

About: I'm retired, living in Queensland Australia with my wife. These are my hobbies, pretty much full time now. Isn't it great to retire and actually pursue your real interests!

This is a Morphing digital clock (thanks to Hari Wiguna for the concept and morphing code), it is also a Analog clock, weather reporting station and kitchen timer.

It is controlled entirely by a Blynk app on your smartphone by WiFi.

The app allows you to:

Display morphing digital clock, day, date, month
Display Analog clock, day, date, month

Display upward scrolling weather from OpenWeathermap.org and local temp/humidity sensor.

Use a kitchen timer function

NTP server time update with time zone selecter

OTA (over the air) update of firmware

The system firmware described here uses a local server for Blynk utilising a Raspberry Pi, There is plenty of info about how to set this up on the Blynk website.

Downloading of the Local Server software is free and can otentially save you money if you have many Blynk controlled gadgets around your home.

Alternatively you can create an account with Blynk and use thier servers although this will probably cost you a few dollars for the app widgets. There is free 'energy' (widgets) when you join Blynk but not enough for this project.

This is quite a complex system involving several wifi systems, server and complex firmware/software.

Assembly and wiring is fairly straightforward but the firmare installation is complicated.

I just hope I remember to tell you all you need to know :)

Study the Bynk website Blynk , you will also need to install the app on your phone.

You will also need to open a free account at OpenWeathermap.org to get your api key.

I would not advise a beginner to attempt this project.

Please note this is an entry in the Clocks contest, please vote if you like it.

Supplies

NodeMCU 12E ESP8266 module like here

64 x 32 dot matrix display like here

RTC real time clock module like here

DHT11 temp/humidity module like here

Vero board like this

Some wood for the case (pallet wood will do)

5v 6A power pack like this

A power In jack (PCB mount) like this

Some 24/28 gauge insulated wire

16 way ribbon cable (about 300mm), 2 x female DIL sockets and 1 x 6 way DIL socket

16 way DIL ribbon connector male (PCB mount)

2 way terminal block (PCB mount)

female header strips single row (about 40 altogether, assorted lengths)

TOOLS

Soldering station, solder, wire cutters etc.

Step 1: Making the Veroboard PCB

Cut a piece of Vero board 36 or 37 strips long by 13 holes wide.

Solder in the female single row header strips for the Arduino board (2 x 15 way), the RTC module (5 way) and the DHT11 module (3 way) as seen in the pictures.

Solder in the DC socket and the 2 way terminal block as shown in the picture.

Solder in the 16 way DIL male ribbon connector as shown.

Wire the board as per the schematic and cut the tracks where necessary.

Make a ribbon cable long enough with a 16 way female DIL connector on each end.

A power cable was supplied with my matrix module.

If not supplied make a power cable long enough for the display. Red and Black wires with a 4 way connector to fit the matrix module.

You will also need to make a 5 way cable with a 6 way DIL female header for connection to the right side connector of the matrix module. These 5 wires could be broken out from the ribbon cable instead but I found it easier to go back to the board and out again to the right side connector.

Please follow the schematic for all wiring.

Go over every connection with a multi meter or continuity checker, ensure there are no shorts or bridged connections. Check the voltage lines are correct.

I will try to find the time to do a Fritzing of this and upload.

Step 2: Make the Case

I made the case from some scrap Pine I had.

The drawing is fairly right, as always things designed on the computer nerver fit do they.

You may have to chisel and gouge to get the electronics to fit.

I made it with mitered corners like a picture frame, now I would do it on my CNC machine.

I suppose it could also be 3D printed. Your choice.

If it's wood, splash some varnish on it.

Step 3: Fit the Electronics in the Case

Fit the Matrix Panel first then the Vero PCB.

Plug in the power pack and check the voltages and grounds on the Vero board are at the right places on the Arduino, the RTC, the DHT11 (don't forget the battery), the 2 way power connector to the matrix and the ribbon cables.

When all checks out OK unplug the power pack and proceed to plug in the Arduino, RTC and DHT11.

Plug in the ribbon connectors both ends ensuring they are oriented correctly.

Plug in the 6 way connector to the right matix connector.

Plun in the suppled power cable to the matrix panel, cut and strip the ends at a suitable length and screw into the terminal block on the Vero board, ensuring correct polarity.

Step 4: Programming the Arduino

You will need the Arduino IDE installed, there is plenty of info on how to do this on the net. Arduino IDE.

When installed go to preferences and copy the text line below and paste into the 'Additional Boards Manager URLs:' box:-

http://arduino.esp8266.com/stable/package_esp8266c...

You will need to install the following libraries:

1. BlynkSimpleEsp8266, can be got from here. everything you need to know on this site here

2. ESP8266WiFi here

3. WiFiUdp here

4. ArduinoOTA included with the IDE

5. TimeLib here

6. RTClib here

7. DHT here

8. Ticker here

9. PxMatrix here

10. Fonts/Org_01 here

Installing the libraries is not part of this instructable, plenty of info on the net.

You will need to restart the IDE after installing libraries.

Start the IDE and open the BasicOTA.ino file if you prefer to have the OTA capability, upload the BasicOTA.ino to the ESP8266 board first, reset the board afterwards.

Information specific to you will need to be added where there are question marks in the ino file. These should be at line numbers:

6 - your wifi SSID,
7 - your wifi password,

open the MorphClockScrollWeather.ino file in the Arduino IDE

If you prefer not to have the OTA, comment out all the references to OTA in the MorphClockScrollWeather.ino using the IDE.

The Digit.cpp and Digit.h need to be in the same folder as the ino, they should be seen as tabs in the IDE.

Information specific to you will need to be added where there are question marks in the ino file. These should be at line numbers:

124 - your time zone,

140, 141,142 - weathermap key & info,

171 - your wifi SSID,

172 - your wifi password,

173 - the Blynk authority token, (more on this later)

Line numbers are an option in the IDE preferences, tick the box.

Now upload to the NodeMCU board.

If you are using OTA you should find the 'Edge Lit clock' in the ports under tools in the IDE, it will have its IP address too. Now you dont need the USB cable to update the firmware, do it over WiFi. Great huh !!

NOTE: I have found the lastest Arduino IDE does not display the OTA ports. I am using an older version 1.8.5. This works OK. They may have fixed this bug by the time you download the latest IDE.

Step 5:

Follow the instructions below:


1. Download Blynk App: http://j.mp/blynk_Android or http://j.mp/blynk_Android

2. Touch the QR-code icon and point the camera to the code below

3. Enjoy my app!

Please note that I found it is a different login and password for the app to the website.

If you are using a local server touch the traffic light icon on the login screen, slide the switch to Custom, fill in the IP address of your local server (this can be found on the RPi home screen, it will be something like 192.186.1.???), type 9443 as the port address next to the IP address. Login in.

When a new project is created in the app a authorisation token is created, it can be emailed to yourself and then inserted in the MorphClockScrollWeather.ino using the Arduino IDE.

I think thats all there is to it, good luck.

Any questions please use the comments below. I will try to answer as best I can.

Please note this is an entry in the Clocks contest, please vote if you like it.

Clocks Contest

Participated in the
Clocks Contest