Skip to content

Clock with WS2812 LEDs, controlled by a NodeMCU ESP8266 module

License

Notifications You must be signed in to change notification settings

MuellerA/Led-Clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LED Clock

Clock

Clock with WS2812 LEDs, controlled by a NodeMCU ESP8266 module.

DO NOT EXPOSE THE CLOCK TO THE INTERNET
The clock stores your WiFi credentials and supports remote updates

Features

  • Setting color for hour, minute, second
  • Brighness control
  • Use NTP for time synchronization
  • Convert from UTC to local time and DST
  • Manual and automatic time triggered On/Off
  • OTA Update
  • Optional secure HTTPS communication

Used Libraries

Material

  • NodeMCU v2
  • Buck converter 12V to 5V
  • 60x WS2812 LEDs on PCB
  • Photo resistor 5539
  • 3D printed housing
  • Acryl glass front plate

Setup

  1. Open the Arduino IDE
  2. Install the required libraries
  3. Check the Board Settings
  4. Load the Clock.ino sketch
  5. Modify the Password in password.h (it is used as PSK in Access Point mode and OTA Update password)
  6. Flash the ESP8266 using Arduino IDE
  7. Connect the NodeMCU with the buck converter, WS2812 LEDs and the photo resistor:
    schematic

First Start

  • Open the Serial Monitor in Arduino IDE
  • Power on / reset the Clock
  • Connect to Network with the SSID "Clock-xxxxxx" and the password specified in the password.h file (both are shown in the Serial Monitor)
  • Open the web page "http://192.168.4.1"
  • On the Settings page enter the credentials (SSID and PSK) of your Wireless LAN and press "save"
  • The clock will now connect to your network, fetch the current time and display it
  • Check your router for the network address of the Clock and open the page in the browser to check the other settings
  • At next power on the clock will remember the settings

Usage

  • The LEDs can be switched on/off manually and automatically. If automatic mode is enabled and the LEDs are switched manually, the automatic mode stays enabled and will switch at the next configured time again.
  • The OTA Update username is the Name specified on the Settings page and the password is the one specified in password.h file

Security

By default the Clock does not use https for communication, it's too slow. Https can be enabled in Clock.ino (#define HTTPS ...).

The repository contains a certificate and private key, but you should use your own. To create and upload them:

  1. Run the script "source/make-cert.sh" to create the certificate file "cert.der" and the private key file "key.der". The script requires OpenSSL to be installed.
  2. Create the directory "source/Clock/data" and copy the generated files into that directory.
  3. Install the SPIFS tool for Arduino as described in the ESP8266 documentation.
  4. Use the Upload Tool to upload the files to the ESP8266.

3D Print

The OpenSCAD file to 3D Print the housing is in the hardware folder. STL files are available at Thingiverse
An alternative to 3D Printing is to use a WS2812 LED ring with 60 LEDs

clock 1 clock 1 clock 1 clock 1

UI Screenshots

home settings update

About

Clock with WS2812 LEDs, controlled by a NodeMCU ESP8266 module

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published