Marius M
ROMANIA • + Follow
Edit Project
Description
ESP01 - TM1637 NTP CLOCK
Basic PCB backplate board for a 0.56" display, that uses an ESP01 /ESP01S to get NTP Time and display it.
Sketch code is a little bit messy because is still in progress, but it gets the job done. Just make sure you have all the libraries installed.
Make sure you solder the desired jumper option to provide 3.3V or 5V to the display (i used 3.3V so the display can be as dim as possible).
If you want to print the support, make sure you have 4 x M3 insert nuts.
Code
ESP01 - TM1637 NTP Time - autoupdate
C/C++
#include <Arduino.h> #include "TM1637.h" #include <NTPClient.h> #include <ESP8266WiFi.h> #include <WiFiUdp.h> #include <Timezone.h> #include <WiFiManager.h> // https://github.com/tzapu/WiFiManager #ifdef U8X8_HAVE_HW_SPI #include <SPI.h> #endif #ifdef U8X8_HAVE_HW_I2C #include <Wire.h> #endif #include <ThingSpeak.h> //pins definitions for TM1637 and can be changed to other ports #define CLK 2 // 2 for esp-01 (12 for D1 mini) #define DIO 0 // 0 for esp-01 (14 for D1 mini) #define UPDATE 3000 // ms for updating screen //const char *ssid = "xxxxxxx"; //your SSID //const char *password = "xxxxxxx"; //your password int status = WL_IDLE_STATUS; WiFiClient client; WiFiUDP ntpUDP; NTPClient timeClient(ntpUDP, "ro.pool.ntp.org", 0 /*10800 seconds for summer time, 7200 winter time*/, 60000); //NTPClient(UDP& udp, const char* poolServerName, int timeOffset, int updateInterval); TM1637 tm1637(CLK, DIO); bool points = true; uint32_t time1, time2; time_t local, utc; String h, m; WiFiManager wm; uint8_t NumTab[] = { 1, 9, 2, 0xff, 1, 6, 8, 0xff, 4, 0xff, 1, 0xff, 0xff, 0xff, 0xff, 0xff }; // 192.168.4.1 uint8_t ListDisp[4]; unsigned char i = 0; unsigned char count = 0; void setup() { WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP Serial.begin(115200); wm.setConfigPortalBlocking(false); tm1637.init(); tm1637.set(0); //set the brightness DARKEST = 0, BRIGHTEST = 7 timeClient.begin(); //WiFi.begin(ssid, password); ///////reset settings - wipe credentials FOR TESTING //wm.resetSettings(); wm.autoConnect("NTP_CLOCK_TM1637", "password#123"); // connect to 192.168.4.1 to configure WiFi } void loop(void) { wm.process(); if (WiFi.status() != WL_CONNECTED) { i = count; count++; if (count == sizeof(NumTab)) count = 0; for (unsigned char BitSelect = 0; BitSelect < 4; BitSelect++) { ListDisp[BitSelect] = NumTab[i]; i++; if (i == sizeof(NumTab)) i = 0; } tm1637.display(0, ListDisp[0]); tm1637.display(1, ListDisp[1]); tm1637.display(2, ListDisp[2]); tm1637.display(3, ListDisp[3]); delay(300); } else { timeClient.update(); unsigned long epochTime = timeClient.getEpochTime(); // convert received time stamp to time_t object utc = epochTime; // Then convert the UTC UNIX timestamp to local time TimeChangeRule EEST = { "EEST", Last, Sun, Mar, 3, 180 }; //Ora de vara - //Central European Time (Frankfurt, Paris) *Sun, 2* TimeChangeRule EET = { "EET", Last, Sun, Oct, 4, 120 }; //Ora de iarna - Central European Time (Frankfurt, Paris) Timezone EE(EEST, EET); local = EE.toLocal(utc); displayTime(); delay(UPDATE); } } void displayTime() { //////// reduce brightness at night time (between 19:00 and 07:00) tm1637.point(POINT_ON); //turn points on if (hour(local) >= 19 || hour(local) <= 7) { tm1637.set(1); } else { tm1637.set(7); } ////////// "compose" time as String and display it h = ""; // format the time to 12-hour format with AM/PM and no seconds if (hour(local) < 10) // add a space if hour is under 10 h += "0"; h += hour(local); int digitoneH = h.toInt() / 10; int digittwoH = h.toInt() % 10; tm1637.display(0, digitoneH); tm1637.display(1, digittwoH); //t += ":"; // colon is handled in display m = ""; if (minute(local) < 10) // add a zero if minute is under 10 m += "0"; m += minute(local); int digitoneM = m.toInt() / 10; int digittwoM = m.toInt() % 10; tm1637.display(2, digitoneM); tm1637.display(3, digittwoM); Serial.print("Time is: "); Serial.print(digitoneH); Serial.print(digittwoH); Serial.print(":"); Serial.print(digitoneM); Serial.println(digittwoM); }
CAD-Custom parts and enclosures
Dec 26,2023
1,288 views
end-flag
ESP01 - TM1637 NTP CLOCK
Basic ESP01 NTP clock with a 0.56'' TM1537 7 segments display.
1288
1
0
Published: Dec 26,2023
BOM(Bill of materials)
Purchase
Donation Received ($)
PCBWay Donate 10% cost To Author
Only PCB
PCB+Assembly
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
Copy this HTML into your page to embed a link to order this shared project
Copy
Under the
Attribution-ShareAlike (CC BY-SA)
License.

Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW
ESP32-S3 4.3inch Capacitive Touch Display Development Board, 800×480, 5-point Touch, 32-bit LX7 Dual-core Processor
BUY NOW
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(1)

Upload photo
0 / 10000
It looks like you have not written anything. Please add a comment and try again.
You can upload up to 5 images!
Image size should not exceed 2MB!
File format not supported!
-
Mr. Marsupial Mar 06,2024
View More
VOTING
0 votes
- 0 USER VOTES
0.00
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Design
1/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Usability
2/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Creativity
3/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Content
4/4
More by Marius M
-
WLED controller SR - INMP441 adapter Basic 1x6 adapter for INMP441 sound module, so you can enable sound reactive on this WLED controller...
-
ESP32 D1 mini - WLED Controller SR (5-12V) ESP32 D1 Mini compatible board for led control via WLED App, based on SN74LVC2T45 level shifter, wit...
-
ESP32-S3 DevBoard Compact ESP32-S3 dev Board, that can be powered by both USB and battery.It features a LED on GPIO2, ...
-
ESP01 - TM1637 NTP CLOCK Basic PCB backplate board for a 0.56" display, that uses an ESP01 /ESP01S to get NTP Time and displa...
-
Fixed output MT3608 Small size MT3608 DC-DC boost converter with fixed output.You have to use the properly resistor valu...
-
mUSB-CR2032 adapter This project is a handy CR2032 battery adapter I've designed for situations when you need a CR2032 b...
-
PCB Christmas Star 2024 - PCBWay Edition PCB Christmas Star 2024 - PCBWay EditionBring a festive sparkle to your celebrations with this delig...
-
PCB Christmas Star 2024 -1 Bring a festive sparkle to your celebrations with this delightful Christmas-themed PCB badge! Design...
-
PCB Christmas Tree 2023 A small PCB Christmas tree, using ATtiny85 / ATtiny13A and TTP223 touch sensor.There are 11 LEDs con...
-
[ LedClock- MICRO - 24x41 ] - 7 Segment PCB [ LedClock- MICRO- 24x41 ] - 7 Segment PCB7 Segment PCB used in "LedClock- MICRO " project.!!! For s...
-
PCBway 11th anniversary badge PCBway 11th anniversary badge.This badge uses 12 fast changing LEDs so it can create a festive blink...
-
WLED Sound Reactive Controller (ESP32 32D/E) - MINI WLED Sound Reactive Controller (ESP32 32D/E) - MINISay hello to the latest ESP32-powered WLED board,...
-
MAX6675 Module MAX6675 K-type thermocouple module.Added some extra capacitors for better temperature reading stabil...
-
Reflow Hot Plate - Controller Board with Arduino Pro Mini Remix of the original Reflow hot plate controller board by Curious Scientist based on Arduino Pro Mi...
-
WLED Sound Reactive Controller (ESP32 32D/E) Say hello to the latest ESP32-powered WLED board, built for awesome LED setups! 2 Channels – Control...
-
ATTiny1614 and VCNL4200 LED Controller This project centers on creating a smart lighting system that dynamically turn ON and OFF an address...
-
PCB Christmas Star 2024 -2 Bring a festive sparkle to your celebrations with this delightful Christmas-themed PCB badge! Design...
-
LedClock - ALL IN ONE PCB This version features an ALL IN ONE PCB of the LED clock project by @imeszaros. The PCB was specific...
-
WLED controller SR - INMP441 adapter Basic 1x6 adapter for INMP441 sound module, so you can enable sound reactive on this WLED controller...
-
ESP32 D1 mini - WLED Controller SR (5-12V) ESP32 D1 Mini compatible board for led control via WLED App, based on SN74LVC2T45 level shifter, wit...
-
ESP32-S3 DevBoard Compact ESP32-S3 dev Board, that can be powered by both USB and battery.It features a LED on GPIO2, ...
-
ESP01 - TM1637 NTP CLOCK Basic PCB backplate board for a 0.56" display, that uses an ESP01 /ESP01S to get NTP Time and displa...
-
Fixed output MT3608 Small size MT3608 DC-DC boost converter with fixed output.You have to use the properly resistor valu...
-
mUSB-CR2032 adapter This project is a handy CR2032 battery adapter I've designed for situations when you need a CR2032 b...
-
PCB Christmas Star 2024 - PCBWay Edition PCB Christmas Star 2024 - PCBWay EditionBring a festive sparkle to your celebrations with this delig...
-
PCB Christmas Star 2024 -1 Bring a festive sparkle to your celebrations with this delightful Christmas-themed PCB badge! Design...
-
PCB Christmas Tree 2023 A small PCB Christmas tree, using ATtiny85 / ATtiny13A and TTP223 touch sensor.There are 11 LEDs con...
-
[ LedClock- MICRO - 24x41 ] - 7 Segment PCB [ LedClock- MICRO- 24x41 ] - 7 Segment PCB7 Segment PCB used in "LedClock- MICRO " project.!!! For s...
-
PCBway 11th anniversary badge PCBway 11th anniversary badge.This badge uses 12 fast changing LEDs so it can create a festive blink...
-
WLED Sound Reactive Controller (ESP32 32D/E) - MINI WLED Sound Reactive Controller (ESP32 32D/E) - MINISay hello to the latest ESP32-powered WLED board,...
You may also like
-
-
Commodore 64 1541-II 1581 Floppy Disk Drive C64 Power Supply Unit USB-C 5V 12V DIN connector 5.25
195 1 3 -
Easy to print simple stacking organizer with drawers
93 0 0 -
-
-
-
-
-
-
Modifying a Hotplate to a Reflow Solder Station
1167 1 6 -
MPL3115A2 Barometric Pressure, Altitude, and Temperature Sensor
655 0 1 -