Skip to content

AllanGallop/ESP32-CRT-Clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRT Clock

A retro CRT clock project using an ESP32 microcontroller to display time and weather information on a CRT television via composite video output.

Features

  • Real-time clock display with NTP synchronization
  • Weather information (temperature and icons) fetched from OpenWeatherMap
  • Retro CRT aesthetic with custom fonts and graphics
  • WiFi connectivity for time and weather updates
  • Automatic BST (British Summer Time) adjustment for UK timezone

Hardware Requirements

  • ESP32 development board (e.g., NodeMCU-32S)
  • CRT television or monitor with composite video input
  • Appropriate wiring for composite video signal

Software Requirements

  • PlatformIO IDE
  • Arduino framework for ESP32
  • Required libraries:
    • ESP32Lib (for composite video output)
    • NTPClient (for time synchronization)
    • ArduinoJson (for weather data parsing)

Installation

  1. Clone this repository:

    git clone <repository-url>
    cd crt_clock
    
  2. Open the project in PlatformIO.

  3. Configure your WiFi credentials in src/main.cpp:

    const char *WIFI_SSID = "YOUR_WIFI";
    const char *WIFI_PASS = "YOUR_PASSWORD";
  4. (Optional) Update location coordinates for weather data in src/main.cpp:

    const float LAT = 52.0406;  // Your latitude
    const float LON = -0.7594;  // Your longitude
  5. Build and upload to your ESP32:

    platformio run --target upload --environment nodemcu-32s
    

Usage

  1. Power on the ESP32 and connect it to your CRT via composite video.
  2. The device will connect to WiFi and synchronize time via NTP.
  3. Time and weather information will be displayed on the CRT screen.
  4. Weather data updates every 30 minutes.

Configuration

  • WiFi: Update SSID and password in src/main.cpp
  • Location: Modify LAT and LON for accurate weather data
  • Timezone: Adjust GMT_OFFSET_SECONDS for your timezone (currently set for UK)
  • Weather API: Ensure you have a valid OpenWeatherMap API key (not included in this code)

Video Output

Composite video is generated directly by the ESP32 using ESP32Lib/CompositeGrayDAC and output on GPIO 25.


    A) voltageDivider = false; B) voltageDivider = true

       55 shades                  179 shades

    ESP32        TV            ESP32                       TV     
    -----+                     -----+    ____ 100 ohm
        G|-                        G|---|____|+          
    pin25|--------- Comp       pin25|---|____|+--------- Comp    
    pin26|-                    pin26|-        220 ohm
         |                          |
         |                          |
    -----+                     -----+                              

Hardware Setup

The composite video output can be fed into a varierty of devices, for my clock I repurposed an old 7" B&W tube - driven by an all-in-wonder single chip deflection system (CD1379CP) and housed in a nice chunk of Oak for effect.

References & Links


My Makerspace - For putting up with my antics :D

Experimental Engineering An absolute gold mine for CRT related stuff
Experimental Engineering - STVG-502 Karaoke Machine CRT

Nikko.com CD1379CP Package

Bitluni ESP23Lib - Various Drawing methods & I2S video

About

A retro CRT clock project using an ESP32 microcontroller to display time and weather information on a CRT television via composite video output.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors