8' Wide Stock Ticker - ESP32
I wanted to learn more about addressable LED's recently, so I made a large stock ticker as my first project.
The initial version turned out just as cool as I thought it would be.
Project overview
Hardware
- ESP32 chip - cheap WEMOS LOLIN32 off Amazon w/ OLED display
- WS2812B Addressable LED's - 150 pixels / m - IP30 - 5v - black
- AC100-240V DC5V20A Max 100W power supply
- cut 16.4' strips in half and mount to 8' x 12" x 12mm plywood painted black
- solder data pins in zig-zag order, left to right, top to bottom
Software
- Arduino IDE
- configure ESP32 wifi
- enable over-the-air updating to allow easy modification
- get current time from pool.ntp.org
- serve stock data from simple Flask app on Heroku written in Python
- use Polygon.io api to query data on page request
- show status on oled display for troubleshooting
I won't share all the code here as it's pretty darn simple and I'm no programmer, but here things worth knowing:
WEMOS LOLIN32 with onboard 128x64 OLED display
Control the onboard I2C OLED with Arduino's Wire.h
and pretty much any SSD1306 library.
I used SSD1306Wire.h
from ThingPulse.
Display address is 0x3c
OTA Updater
The standard Arduino OTA updater. Totally worth installing, especially on the ESP32 where you have to hold down the boot button every time you want to update the software.
Don't forget to put the handler function in the main loop!
updateData()
Simple function to grab any content from the index url of our webserver.
In this case, the web app is written in Flask, served with Gunicorn, and hosted on Heroku.
LEDMatrixLoop()
The main loop to update the matrix. Uses the Adafruit NeoMatrix / NeoPixel libraries.
Future improvements
Increase density
This sign has 8 rows x 75 LED columns = 600 LEDs
I'd like to figure out what it takes to make 16 rows x 300 LED columns = 4,800 LEDs
This might require a different setup as I've read that each led chip takes about 20 micro-seconds to pass the data along. That might slow the framerate down too far to make a smooth animation.
But the ESP32 has enough I/O pins to drive each row individually if needed, so it seems doable.
Add company logos
With 16 rows you could downsample company logos to make the display much more interesting. Make these full-color.
Add diffuser
I think this would look best if it had an aluminum frame around the edges, and a diffuser over the top of the LEDs.
Basically just a sheet of frosted acrylic, with some kind of divider between each LED to keep the light from bleeding out of its individual box.
Maybe cnc cut some 1/4" baltic birch with half-lap joints and glue it all together / paint it black.
Intersperse funky pixel art character animations
It would be kinda fun to have some pixel art characters interact with the data passing across the display at points! 16x16 pixels would be a good size for this.