Compact clock has a variety of functions: Perfect time, Alarm, Measurement of temperature, humidity and atmosphere pressure indoors, Forecasting download, Upload submission to MQTT & Thingspeak server, Display of any predetermined information at set time. Clock has low power consumption and provides high display brightness.
LW-Clock is a device, based on ESP8266 microcontroller and real-time clock DS3231. It uses indicator modules MAX7919 for information output. BME280 sensor provides a precise measurement of indoor temperature, humidity and barometric pressure. An Internet connection via Wi-Fi module helps to synchronize time with NTP servers, to receive and display forecast, news, exchange rate etc. Data from sensors can be transmitted via MQTT protocol or displayed on popular monitoring service thingspeak.com. Clock can display predetermined information (reminders, greetings, advertisements, time-schedules etc.) according on schedule. Display of text messages, transmitted from any place via MQTT is also possible. Clock adjustment and manipulation is performed via WEB-interface. Micro-USB connector allows to use any low-duty USB-charger to power the device.
Note: Using the links provided here help to support these types of projects. Thank you for the support.
You can purchase a PCB with soldered elements and connectors for connecting the indicator and sensors, or just a PCB and a set of elements for installation https://diy.led-lightwell.eu/product/lw-multifunctional-clock-kit/
Component | Pins | Wemos D1 Mini |
---|---|---|
Dot Matrix Module MAX7219 | CS --> | D0 (GPIO16) |
CLK --> | D5 (GPIO14) | |
DIN --> | D7 (GPIO13) | |
+5V --> | ||
GND --> | ||
DS3231 | SCL --> | D1 (GPIO5) |
SDA --> | D2 (GPIO4) | |
+3V | ||
GND | ||
BME280 | SCL --> | D1 (GPIO5) |
SDA --> | D2 (GPIO4) | |
+5V | ||
GND | ||
Buzzer (active) | + --> | D8 (GPIO15) |
GND | ||
TTP223B digital touch capacitive sensor | Dout --> | D6 (GPIO12) |
+5V | ||
GND | ||
I2C | CS | D0 (GPIO16) |
CLK | D5 (GPIO14) | |
UART | Tx | TX (GPIO1) |
Rx | RX (GPIO3) |
It is recommended to use Arduino IDE. You will need to configure Arduino IDE to work with the Wemos board and USB port and install the required USB drivers.
Use the Arduino guide for details on how to installing and manage libraries https://www.arduino.cc/en/Guide/Libraries The following packages and libraries are used (download and install):
Note: There could be some Issues if using different versions of the libraries.
Starting with LW-Clock editing the Config.h file is optional. SSID and password for Wi-Fi, all API Keys are managed in the Web Interface. It is not required to edit the Config.h file before loading and running the code.
Open Weather Map free API key: http://openweathermap.org/ -- this is used to get weather data. LW-Clock version 1.0 supports 4 and more Dot Matrix Module MAX7219-- configure in the config.h file.
NOTE!!! If you use more than 4 modules you must connect an external power supply with a capacity of 330 mA per each 8x8 module!
NOTE: The settings in the Config.h are the default settings for the first loading. After loading you can change the settings via the Web Interface. If you want to change settings again in the Config.h, you will need to erase the file system on the Wemos or use the “Reset Settings” option in the Web Interface. During the first time run, Wemos D1 mini will try to connect to your Wi-Fi and fail (because it doesn't have any previously saved Wi-Fi credentials). This will cause it to start up an access point, which serves up a captive configuration portal. You can connect to this access point to select and enter credentials for your network. Save configuration and restart device. (Wemos D1 mini will restart and connect to your Wi-Fi network)
All clock management is carried out using a web browser. On first power-up, LW-Clock will serve a hotspot called LW-Clock. For clock adjustment and manipulation open a webpage with the 192.168.4.1 address. Within this hotspot you can manually override the time and date, set text messages for display, set timecodes of messages output and update software.
For Wi-Fi network connection please input its SSID and password. After successful connection LW-Clock will begin to receive and transmit information over the Internet. NTP servers are used to get accurate time. To get the current weather and forecast use the service https://openweathermap.org (you need to register and get an API key). To transmit temperature, humidity and barometric pressure data you can use the MQTT server https://www.cloudmqtt.com/ and the server https://thingspeak.com. You can also transmit information for display on the clock in the form of a creeping line through the MQTT server.
We designed three types of the clock case, which you can choose to give a device a complete and stylish look. First variant is made of black polished acryl, which fits perfectly into modern apartment or office. Second variant is made of woodworking industry waste and comes as a retro-style. Different colors and finishes can give a device a unique look which fits into any design of the apartment or office. You can order both assembling clock kit and finished case, ready for coloring or other treatment. Third variant is made of filaments for 3D-printers (ABS, PETG, PLA etc.). You can make it yourself using a 3D printer and blueprints.
You can download plywood and acryl blueprints for CNC laser platemaker here https://github.com/Lightwell-bg/LWClock-cases
3D Printed Case https://www.thingiverse.com/thing:3987202
You can purchase plywood and acryl enclosure cases here:
https://diy.led-lightwell.eu/product/diy-plywood-enclosure-case-for-lw-clock/
https://diy.led-lightwell.eu/product/diy-black-polished-acryl-enclosure-case-for-lw-clock/
Link to YouTube https://youtu.be/VDfjap1s_JY