Skip to content
Ed Nieuwenhuys edited this page Nov 20, 2024 · 7 revisions

Arduino-ESP32-Nano-Word clock

image

Built your own word clock with one or four languages with an Arduino ESP32 Nano.
You can control it with your phone of with a web page.
Software updates can be uploaded with OTA (Over the Air).
It will keep its time within the second correct with the internet NTP time and a time zone selection.

The Manual_ArduinoESP32Nano.pdf will contain the latest changes.

If you own an ILI9341 display, consider exploring this link for an alternative word clock design.

For those with a €50 LilyGo watch resembling an iWatch, this resource might be of interest.

Alternatively, you can opt not to build a word clock and instead use the software to control SK6812 or WS2812 LEDs via your smartphone with Bluetooth or through a webpage.

For the Arduino Nano word clocks from my previous projects, found at https://github.com/ednieuw/Word-Colour-Clock-SK6812-WS2812, a DS3231 RTC and a Bluetooth module are required to obtain and maintain the time.

The Arduino Nano ESP32 can synchronize its time via WIFI from the internet and features an integrated RTC module. Moreover, it shares the same form factor as the Nano and Nano Every.

The older Arduino MKR1000, Nano BLE 33, and all its variants with Bluetooth and WIFI have the limitation that only WIFI or BLE can be active. The ESP32 includes an Espressif BLE/WIFI module. Instead of the TI CC2541 chip, Bluetooth LE employs a Nordic nRF52 chip. Consequently, a different BLE service is needed for serial communication. Rather than FFE0, use 6e400001-b5a3-... etc., in your serial terminal app for interacting with the clock software's settings. Depending on the app, you may need to specify the protocol to use.

The Arduino Nano ESP32 can receive its time with WIFI from the internet and has an built-in RTC module.
Further more it has the same form factor as the Nano and Nano Every.

The older Arduino MKR1000, Nano BLE 33 and all its variants with Bluetooth and WIFI has the disadvantage that only WIFI or BLE could be used. The ESP32 has an Espressif BLE/WIFI module. Bluetooth LE does not use the TI CC2541 chip but a Nordic nRF52 chip.
That means you have to use a different BLE service for the serial communication. Not FFE0 but 6e400001-b5a3-... et cetera in your serial terminal app that is used to communicate with the settings of the clock software. Depending on the app you use you probably must specify which protocol to use.

See here: Use BLE on mobile to control the ESP32 The ESP32-S3 chip in the Nano ESP32 features a greater number of ports and a different port numbering system compared to the ATMEGA chips, necessitating a change in pin numbering within the Arduino software.

There are two methods for compiler pin numbering: one uses the GPIO numbering of the ESP32-S3, and the other uses Arduino pin numbering. This code should be compiled with the GPIO numbering option selected. If the LEDs do not illuminate, verify the GPIO numbering setting.

For the Arduino macro numbering (D1, D2, ..., D13 for digital pins and A0, A1, ..., A7 for analog pins) and LED_BUILTIN, LED_RED, LED_GREEN, LED_BLUE for the LEDs on the Nano ESP32 board, ensure 'GPIO numbering' is chosen in the compiler.

Nano-ESP32 Pinout

For my clocks, I utilize a PCB designed with Fritzing software, which is user-friendly and capable of exporting Gerber files for PCB manufacturing companies. Orders can also be placed directly through the Fritzing app.

NanoESP32-V01-3D
Nano ESP32 PCB for word clock et cetera

The PCB accommodates connections to a rotary encoder, a DS3231 RTC module or another I2C device, a DCF77 receiver module or any pulse-receiving device, and an LDR for measuring light intensity to adjust the LED strip's brightness.

The SK6812 RGBW LED strip operates on 5V, while the data signal from the Nano is 3.3V.

Attempts to use optocouplers for amplifying the data signal from 3.3V to 5V were unsuccessful. Details can be found here: OptocouplerSK6812.

The 74HCT125 level shifter, commonly used for level switching, has four ports. I modified the PCB design to utilize the IC's remaining three ports for other functions.

However, the SK6812 RGBW strip, even with 14 LEDs, functioned well when the data line was directly connected to the Nano ESP32's 3.3V data line. Strips with more LEDs have not been tested.

The takeaway is that the SK6812 RGBW strip can be connected with a 470-ohm resistor in the data line and a 200 - 1000 uF capacitor across the 5V and GND, directly to the strip, without a level shifter. However, this method does not guarantee success.

A robust 5V power supply is essential for the LEDs. When the Nano is powered via a USB-C cable, power can be drawn from the VBUS-pin (5V USB). VBUS provides 5V when powered via USB, but is disabled when powered through the VIN pin, preventing 5V output from the board in this case.

The PCB offers various power connection options. A 5V, >1A power supply can be connected at the designated 5V power input on the PCB's top left corner.

When the red line shortcut is closed, the LED strip is powered through the Power 6-21V (VIN) connection at 5V. This also powers the Nano ESP32. You can connect the Vin on the ESP32 Nano to a 5V USB power supply, even though the minimum voltage is listed as 6V. The 1N5817 diode further reduces the voltage by 0.5V to 4.5V.

However, it's important to remember that this 5V connection goes directly to the LED strip. Connecting a higher voltage power supply will destroy the LEDs, although the Nano will still power on.

If the Nano ESP32 is connected via the USB-C port, then the yellow connection must be shorted. The LEDs will then be powered by this source. This setup is adequate for 20 LEDs but may not be suitable for longer strips.

After the connections are made, the PCB and hardware will appear as shown in the images. image

How to make all this see here: https://github.com/ednieuw/Arduino-ESP32-Nano-Wordclock

Clone this wiki locally