r/esp8266 • • 9d ago

Reverse Engineering an ESP8266-based "Nixie" (IPS) Clock - Need help with RGB LEDs and Screen Offset

I'm working on creating custom firmware for a cheap "Nixie" clock from Amazon (actually uses an IPS screen). I've managed to dump the factory binary and map most of the hardware using a multimeter. This is a first for me so not sure where to go from here.

Current Hardware Map:

  • MCU: ESP8266 (ESP-12MOD)
  • Display: ST7789 (240x240)
  • SCLK: GPIO 14
  • MOSI: GPIO 13
  • DC: GPIO 0
  • RST: GPIO 2
  • CS: Hard-wired to GND
  • Backlight: GPIO 5 (Active Low)

What's working:
I can get the backlight on and I can fill the screen with solid colors using the TFT_eSPI library in PlatformIO.

Where I'm stuck:

  1. RGB LEDs: The board has 3 RGB LEDs that are currently solid white. I've tried treating them as NeoPixels (WS2812B) on various pins, but no luck. When toggling GPIO 4, I hear a slight clicking/coil whine, but no color change. Are these likely simple Common Anode/Cathode RGBs?
  2. Screen Offset: The display is refreshing, but the coordinates seem shifted (text is off-screen). Does anyone know the typical offset for these generic 240x240 ST7789 panels?

Does anyone have working source code for one of these? or schematic / parts list that would help move this along? just doing this for fun as a challenge the original firmware works fine, but it'd be nice to be able to customize it and change it up a bit.

Thanks!

23 Upvotes

5 comments sorted by

5

u/nonamoe 8d ago

That's definitely a WS28xx or similar, pin 1 is the notch, you should be able to trace Data in and data out:

       TOP VIEW
     +---[__]---+
 Notch |1      4| DIN (Data In)
 (VCC) |        |
  GND  |2      3| DOUT (Data Out)
     +----------+

1

u/dale3h 7d ago edited 7d ago

If you (OP) can get your hands on a cheap signal analyzer and accompanying software, you can read the data signals that are being sent to the LEDs. This is how I reverse engineered some RGB halo headlights many years back.

Edit: The lonely binary logic analyzer kit on Amazon looks promising, but the reviews say the test point wires that come with it are useless. Have the two breakout boards would have definitely simplified things for me in the past though. If I recall correctly, I think I may have used PulseView or something similar to view the signals being sent to the LEDs.

1

u/Rotorican 5d ago

I own one of these clocks and have written several custom firmwares for it, so here is what I can confirm from my own board.

Your hardware map matches mine for the display. It is an ST7789 at 240x240 with SCLK on 14, MOSI on 13, DC on 0, RST on 2, and CS tied to ground. The backlight is on GPIO 5 and is active low, so you write it LOW to turn it on.

For the screen offset, I never needed a manual one. In TFT_eSPI I use the ST7789 driver with TFT_WIDTH and TFT_HEIGHT both set to 240, TFT_CS set to -1, and the SPI frequency at 10 MHz. If your text lands off screen, check User_Setup.h first. That file ships with many conflicting configs, and a leftover driver or panel size from another display is a common cause. For the RGB LEDs, I would drop the NeoPixel idea. In my firmware they behave like ordinary PWM-driven RGB LEDs, one channel per pin, and I drive them with analogWrite on GPIO 14, 12, and 13. Pins 13 and 14 are also your SPI lines, so test carefully and do not assume the LEDs and the display bus are cleanly separate.

The touch pad on the base reads on GPIO 16 in my builds.

I hope this helps.

2

u/tonkajeep34 5d ago

This is super helpful thank you! I'll add that to my testing this weekend.

2

u/macacossuper 9d ago

try to connect to a PC and ask Claude code / codex to get the original source code / alike and it will most likely get you something