[PROJECT-ID: PH-STOCK-DISPLAY]

PHYSICAL STOCK DATA DISPLAY

STATUS: COMPLETED
CATEGORY: Hardware · Electronics · Data Visualization

[ OVERVIEW ]

This project involved building a custom physical display system for real-time stock market data from the Swedish broker Avanza. The goal was to create a tangible, always-on dashboard that provides instant visibility into key market metrics without requiring screen interaction.

Built using 8 individual 64×64 HUB75 LED matrices controlled by an ESP32 microcontroller, the display shows live stock prices, market indices, and custom indicators. The implementation leverages the ESP32-HUB75-MatrixPanel-DMA library for efficient display control with double buffering to eliminate flickering.

[ DISPLAY PREVIEW ]

Close-up view of the display showing live market data

The finished display continuously streams real-time market data from Avanza's API, showing live stock prices, indices, and custom indicators across the 512×64 pixel LED matrix array. The high-contrast display provides instant visibility of market movements from across the room.

This close-up view showcases the display's clarity and color rendering. The implementation successfully balances the ESP32's memory constraints with the need for smooth, flicker-free updates through careful optimization and efficient use of the HUB75-MatrixPanel-DMA library.

[ TECHNICAL SPECIFICATIONS ]

HARDWARE
  • • ESP32 Microcontroller
  • • 8 × 64×64 HUB75 RGB LED Matrices
  • • 5V 4A Power Supply
  • • Custom 3D Printed Enclosure
  • • Spliced Power Distribution Cables
  • • CAD Design in Fusion 360
SOFTWARE
  • • C++ (Arduino Framework)
  • • ESP32-HUB75-MatrixPanel-DMA
  • • Avanza API (Reverse-Engineered)

[ BUILD PROCESS ]

3D printing the custom enclosure parts
Removing 3D printed parts from the build plate
Mounting and assembling the LED matrices
Splicing power cables together for unified power distribution
Connecting the display components

The physical build involved multiple stages. First, custom holders and enclosure parts were designed in Fusion 360 and 3D printed to securely mount all 8 LED matrices and provide a clean, professional appearance.

Power distribution was a critical challenge. Each LED matrix came with power cables designed to power two matrices. To create a unified power system, four of these cables were carefully spliced together, allowing the entire 8-matrix setup to be powered by a single 5V 4A supply through one cable connection.

The ESP32 was chosen for its WiFi capabilities, sufficient GPIO pins for HUB75 control, and robust DMA support which enables flicker-free display updates through double buffering.

[ FINISHED RESULT ]

Live market data streaming on the completed display

The finished display runs continuously, fetching real-time stock data from Avanza's API and displaying updates across the 512×64 pixel canvas (8 matrices × 64×64 each). The bright, high-contrast LED display is easily visible from across the room, providing instant market awareness.

The ESP32-HUB75-MatrixPanel-DMA library's double buffering implementation ensures completely flicker-free updates in person, even during rapid price changes. While the display may appear slightly flickering on video due to camera refresh rates, it is perfectly smooth when viewed in real life. Data is fetched over WiFi, parsed in C++, and rendered efficiently to maintain smooth performance within the ESP32's memory constraints.

[ CHALLENGES & SOLUTIONS ]

Challenge 1: ESP32 Memory Constraints

Managing 8 × 64×64 matrices requires significant memory, and the ESP32 has limited RAM compared to traditional computers. Double buffering, while necessary for flicker-free display, consumes substantial RAM.

[SOLUTION]

Carefully examined and logged memory usage throughout development. Implemented a staged initialization approach: first fetching data over WiFi and writing to flash memory, then deallocating the WiFi object before initializing the LED matrix object. Reduced color precision to 2-bit, which significantly decreased memory requirements while maintaining acceptable visual quality. The ESP32-HUB75-MatrixPanel-DMA library's efficient DMA (Direct Memory Access) implementation combined with these optimizations kept memory usage within acceptable limits while preserving the essential double buffering for flicker-free display.

Challenge 2: Reverse Engineering Avanza's API

Avanza doesn't provide a public API, requiring analysis of their web/mobile app traffic to understand endpoints and authentication.

[SOLUTION]

Captured and analyzed network requests to identify API endpoints, request formats, and authentication mechanisms. Implemented the protocol in C++ for the ESP32.

Challenge 3: Power Distribution Across 8 Matrices

Each matrix pair came with separate power cables, creating a complex wiring situation.

[SOLUTION]

This challenge was fairly straightforward but yielded a surprising result. Spliced four power cables together to create a unified distribution system powered by a single 5V 4A supply. Through experimentation (without precise current measurement), discovered that the 4A supply was sufficient to power all 8 matrices. The brightness can be reduced significantly while still appearing very bright, and many pixels remain black/off at any given time, keeping actual power draw manageable.

[ CONCLUSION ]

This project successfully combined embedded systems programming, reverse engineering, CAD design, and 3D printing to create a functional real-time stock display. Working with the ESP32's constraints and leveraging the ESP32-HUB75-MatrixPanel-DMA library provided deep insights into memory management, DMA operations, and efficient C++ programming for microcontrollers.

The memory optimization work in particular strengthened my programming skills significantly. Working with memory-constrained hardware requires understanding the fundamentals deeply to be able to optimize and squeeze out performance—making me a better programmer in general. These low-level optimization techniques translate directly to writing more efficient code across all platforms.

The integration of Avanza's reverse-engineered API demonstrates the value of understanding network protocols and API architectures, while the physical build process reinforced the importance of careful planning in power distribution and mechanical design.

Building physical projects continues to be a rewarding complement to purely software-based work, offering new perspectives on problem-solving and bridging the digital-physical divide.