Skip to content

flavian112/internet_clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Internet Clock

A digital clock that syncs it's time with the internet over WiFi.

Repositories

Resources

Files

Schematic

Schematic

Board

Board

3D View

3D View 3D View Back

Clock Display

The clock display is controlled by the MM5451 chip. To turn the segments of the display on, the chip has to be interfaced with a clock and a data line. The chip can control up to 35 segments, 34 of which are used here. The data is transmitted by enabling the clock (at max 500 kHz) and then signaling that the data transmission starts by pulling the data line high for one pulse. Data is read on the rising edge of the clock. Then the 35 bits are transmitted. The following table shows which bit corresponds to which display segment. Note the first bit is unused in our case.

Clock Display

MM5451 Display Example

Usage

The clock is configured via Serial over USB at 9600 Baud. The following commands can be used:

  • pt print the current datetime
  • pz print the current timezone
  • ps print the current ssid
  • pp print the current password
  • sz <timezone> sets the timezone, i.g. Europe/Zurich
  • ss <ssid> sets the ssid
  • sp <password> sets the password

Time API

The time is synced with worldtimeapi.org, the local time can be retrieved by a GET request to http://worldtimeapi.org/api/timezone/<timezone>

Example

# curl "http://worldtimeapi.org/api/timezone/Europe/Zurich"
{
  "abbreviation": "CET",
  "client_ip": "2a01:8b81:2006:0:6d30:dc40:c29a:f48a",
  "datetime": "2024-02-03T14:22:09.924310+01:00",
  "day_of_week": 6,
  "day_of_year": 34,
  "dst": false,
  "dst_from": null,
  "dst_offset": 0,
  "dst_until": null,
  "raw_offset": 3600,
  "timezone": "Europe/Zurich",
  "unixtime": 1706966529,
  "utc_datetime": "2024-02-03T13:22:09.924310+00:00",
  "utc_offset": "+01:00",
  "week_number": 5
}

Images

Breadboard Prototype

Completed 1

Completed 2

About

A digital 7-segment clock, synced via internet.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published