กลับไปหน้ารวมไฟล์
uno-multiple-time-zone-clock-using-the-ds3231-and-lcd-keypad-455e34-en.md

I have been using 3 check clocks that run on button cells to keep track of different time zones. I live in Hamburg, Germany and my family live in Denver and California. I got tired of replacing expensive batteries every month, so I decided to use one of the Arduinos laying around to build a 3 time zone clock.

When you start the clock, you can set the date, time, and day of the week in the menu. It will then display my location HAM (for Hamburg) the local time and date on the first line. The second line has the other 2 times in the indicated times zones. With minor adjustments to the code, the order of the display can be changed.

Finally, I dont want the light to be bright all night long, so I added a line of code to dim the display when I am sleeping based on a schedule.

Using the DS3231 RTC with a built in battery, the clock keeps its time even if the power is off.

I soldered a 1x4 4 pin stackable header to the SCL, SDA, VCC, and GND open spaces on the back of the Uno board to mount the DS3231.

STEPS:

Step 1: Solder the 1x4 header to the back of the UNO boards open solder positions for SCL, SDA, VCC, and GRD.

Step 2: Put a CR2032 button cell in the DS3231 RTC IC2 module

Step 3: Mount the DS3231 module on the back of the Uno using the newly added 1x4 header. Make sure the pins match the corresponding pins between the Uno and the DS3231.

Step 4: Mount the DF Robot LCD Keypad shield to the top of the Uno.

Step 5: Copy/Paste the code into your Arduino software and upload it to the Uno.

Step 6: Use the buttons on the Keypad to change the date and time by using the Select button to move from menu to menu and adjust the date/time using the up and down buttons. Move from Hours -> Minutes or Year -> Month -> Day using the left and right buttons.

Step 7: Click Select when finished with the date/time and the screen will display the date and time for your local time zone as well as the time for 2 other time zones.

Step 8: If you want to change the time zones, change the calculation for hour1 and hour2 indicated by //change time zone 1 calculation by changing the - 9 as well as the lcd.print("M "); and lcd.print("PT "); locations. Keep in mind you only have 16 characters on the displays second line.

Step 9: If you want to change the time the display dims and lights up, adjust the code in the section that is commented // Turn off light after 10 pm, turn back on after 8 am - this is in a 24 hour clock

EXPANDED TECHNICAL DETAILS

Global Chronometric Hub

This project transforms an Arduino Uno into a multi-timezone dashboard, ideal for international offices or long-distance family tracking.

  • UTC Offset Mapping: The Arduino tracks "Master UTC Time" via the DS3231 RTC. The firmware applies programmable offsets (e.g., -5 for New York, +1 for London, +7 for Bangkok) to calculate concurrent times.
  • HMI Navigation: Uses an LCD Keypad Shield, allowing the user to scroll through dozens of pre-set world cities and view their current time and date on the 16x2 display.

Accuracy

  • High-Precision Time Base: The DS3231's temperature-compensated crystal ensures the clock drifts by less than 1 minute over an entire year.

ข้อมูล Frontmatter ดั้งเดิม

title: "UNO Multiple time zone clock using the DS3231 and LCD Keypad"
description: "This clock shows 3 time zones as well as the date. It utilizes a DS3231 RTC (Real Time Clock) and a LCD Keypad Shield. Using UNO."
author: "ssm2130"
category: ""
tags:
  - "date"
  - "keypad"
  - "clock"
  - "rtc"
  - "multiple"
  - "arduino"
  - "time"
  - "lcd"
  - "uno"
  - "zones"
views: 3811
likes: 1
price: 699
difficulty: "Intermediate"
components:
  - "1x Soldering iron (generic)"
  - "1x LCD Keypad Shield"
  - "1x Solder Flux, Soldering"
  - "1x Solder Wire, Lead Free"
  - "1x 9V 1A Switching Wall Power Supply"
  - "1x 1x4 4 pin stackable header"
  - "1x Arduino UNO"
  - "1x DS3231M - ±5ppm, I2C Real-Time Clock"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "0463eeaa3fd472c94ecc5e2de0dc1c26290fba083db07bbb53cb8f02c210175d"
encryptedPayload: "U2FsdGVkX19bqR4B1kB98M06Zu/FG44ItSHQxNvMC+hrptpb5NwJbO/RcEL9sRRa0c2DELa06S7Qj9lk3q9acQU6q0PwDbcIFatku8cvzaM="
seoDescription: "Build a Multiple time zone clock with UNO, DS3231 RTC, and LCD Keypad Shield. Displays 3 time zones and date."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/uno-multiple-time-zone-clock-using-the-ds3231-and-lcd-keypad-455e34_cover.jpg"
lang: "en"