Nixie Clock – NTP Sync & HTTP Switch

Recently, I purchased a Nixie clock online and was looking for an alternative method to sync the time of the clock. The method provided by the clock supplier, Gra-Afch, was to use a GPS dongle. However, I did not like an additional dongle sticking out. The clock is powered by an Arduino Mega2560 and I had a hunch that there were alternative boards with internet capabilities some where online. Searching on Aliexpress, I found a Mega2560 board with an ESP8226 built into it.

Prerequisites

Assumptions

  • ESP8266 has been flashed with a AT-Command firmware (Make sure you follow the DIP Switch table)
  • Arduino IDE installed

Flashing Firmware

After flashing the ESP8266 with an AT-Command firmware we can move on to flash the Mega2560 with the provided sketch. The sketch is based off of afch code.

Step 1: Adding Libraries to Arduino IDE

Additional libraries added are:

  • EasyNTPClient: To retrieve the current time from a NTP server.
  • WiFiEsp: To allow the Arduino board to connect to internet and serve as a server for incoming local HTTP request. The server is user to switch the nixie tubes on and off.
  • The other libraries are provided by Gra-Afch.

Drag and drop the library folders provided with the sketch to Arduino IDE libraries folder.
Libraries folder is located at:

  • macOS: /Users/<username>/Documents/Arduino/libraries
  • Windows: C:\Users\<username>\Documents\Arduino\libraries

* Note that I have removed Tone and IRRemote libraries

Step 2: Editing WiFi Credentials & Flashing

  • Open NixieClockShield_NCS314.ino with Arduino IDE
  • Edit ssid[] and pass[] with your WiFi credentials.
    char ssid[] = "SSID";
    char pass[] = "PASSWORD";
  • Flash your board with the updated firmware and you’re done!

HTTP Server Details

This firmware also includes a HTTP Server that allows you to switch the nixie tubes on and off remotely.

  • On: <Arduino IP>/H
  • Off: <Arduino IP>/L
  • Status: <Arduino IP>/ (Returns 1 when the tubes are On and 0 when its Off)

Leave a Comment

Your email address will not be published. Required fields are marked *