Atomic Radio Chronometer Signal emulator for the ESP32. Emulates signals for DCF77, JJY, and WWVB to set almost any radio-based clock or watch.
| ARChronS-ESP32 | Pretty print | |
| LICENSE | Initial check-in | |
| README.md | Initial check-in | |
ARChronS - Atomic Radio Chronometer Signal
ARChronS is an emulator multiple world-wide atomic-clock-based time signals, used to synchronize clocks, watches, appliances and industrial equipment. ARChronS makes use of inexpensive ESP32 board to do all the heavy lifting, with almost no added components necessary (one resistor and some wire).
Available Emulation Modes
So far there are four combinations of frequency and station that ARChronS supports:
- DCF77 - German national time signal from Mainflingen at 77.5KHz
- JJY - Japanese time signal at either 40KHz (as per the Mount Otakadoya site) or 60KHz (as per the Fukushima site)
- WWVB - USAmerican time signal at 60KHz from Boulder Colorado with an inverted modulation relative to JJY.
Quick start
You'll need the following hardware:
- An ESP32 development board, ideally an ESP32-C6. Readily available through Ali Express, almsot any electronics shop, or Amazon if you're desperate.
- A 270-440 ohm resistor at any power rating. Don't go below 270 Ohm to keep the GPIO output current at 12mA or less.
- Enough wire to make an electromagnetic coil to generate the near-field. A simple air-wound coil of 15-20 turns. Some people make a simply loop with magnet wire. I used a some leftover 18 gauge and wound it on the spindle it came on. Wire from old twisted pair (slash telephone) cable is great too.
- Using a breadboard to assemble the setup is very helpful. The ESP32 fits straight into the breadboard, but take care that most ESP32 boards do not fit very well on single-tile breadboards, leaving access to just one row of pins on one side of the board. It's enough for our purposes though.
ESP32
This implementation drives the PWM at 40, 60, or 77.5 kHZ using the ledc PWM library.
- Choose the pin you want to use for signal output on the ESP32 (in this example, GPIO16).
- Wire the resistor to it and then wire the coil in series with the resistor to the GND pin on the ESP32. It's this simple:
(ESP32 GPIO21)----(330 ohm)----(COIL)----(GND ESP32)
- Power the ESP32 by connecting the USB cable to your computer.
- Launch Arduino IDE and load ARChronS-ESP32.ino .
- Select the ESP32 board you're using in board settings. If you didn't do so yet, you may have to install the board in the IDE board manager. This project is written for API version 3 and above.
- Set the output pin you chose before (in our case 21) as the led_pwm_pin constant in the top of the source file.
- Set username and password for your WiFi access point, so the ESP32 can fetch the current time via NTP.ORG.
- You can also customize the NTP servers, choosing ones closer to your location or local on yourt LAN.
- Set the offsets between your time zone and GMT, for daylight saving time and summer time.
- Verify the code compiles (Ctrl+R).
- If successful, compile and upload the code (Ctrl+U).
- If all goes well, the ESP32 should connect to the WiFi, get GMT time and then start transmitting the emulated DCF77 signal via the coil.
- Some receiving devices need a few minutes (like 2-5) to validate the signal and synchronize to it. Be patient.
- Some debug information is sent through the serial interface while the code is running, you can monitor it using a program like GtkTerm or picocom.
- If you are using a ESP32-C6 then pressing and holding the 'boot' button for one second will cycle to the next station "personality". The cycle goes in alphabetical order.
- Also if you are using an ESP32-C6, it has a NEOPIXEL LED that will give a status: