TechKnowTone_Text

- Project

MATRIX - Animation Editor

STEM_Banner_Text

Here I’ve developed an easy to use application, for programming animation effects into LED panels, built from 16x16 arrays of WS2812B programmable RGB LEDs. The images you design with this app are stored on a microSD card, from which they are loaded and manipulated using an ESP32 microcontroller. Large panels up 48 x 128 LEDs can be designed using this app.

Video_Intro2

Project Overview
This project was created in support of a local school wanting to build several display panels for a light show, the 2021 Lumiere festival held in Durham city centre. I built a 48x16 panel as a proof of principle, and to develop the Windows app, so that is what the information on this page is all about. There are applications on the internet that can generate colourful patterns, but none that I could find, that would make the creation of LED images easy and then help you animate them. So it is essentially a graphical drawing tool, combined with a script editor for controlling your animations. Once the files are saved to the microSD card you don’t need a PC to run them.

Click on the image to the right to see examples of what can easily be created on a 48x16 LED panel using the MATRIX app..

The design was created using a 3-D modeller and printer, to ensure that the assembly goes together with ease. The ESP32 microcontroller is house in a small box, along with the 64x128 OLED display, a rotary encoder and a removable microSD card. This box mounts directly onto the back of the first LED matrix supporting frames, and they in turn connect together to make a larger display. The flexible 16x16 LED panels are glued to the supporting frames, which act as stiffeners.

The panels are grouped together using M3 screws and interlocking bars, and short legs can be fitted in the corners, so that they can be rotated outwards to hold the display panel in a vertical plane. But if you wish the LED panels could just as easily be mounted on a single sheet a plywood, with holes to allow the wires to come through.

The Matrix app was developed in ‘Processing’ an environment very similar to the Arduino IDE, and you can download the Java executable file from a link below; which runs on a PC without the need to be installed. The left-hand graphics editor supports multiple panel formats, and provides a range of drawing tools like freestyle pen, line, box and circle, as well as more sophisticated options like flood fill, cloning, moving, mirroring and flipping areas, as well as a text drawing mode.

The right-hand side is the animation script editor, which is like a simple programming language, with commands like ‘Bright’ to set the LED brightness, and ‘Speed’ to set the animation frame rate Just like conventional animation, the script supports multiple planes, used to build up the output image, and special functions like scrolling text and sprites. The editor is a ‘click’ to select and modify tool, with the only need for typing being to enter text for comments and display purposes. There is a simple help system too, which details the controls currently under the mouse pointer..

The circuit diagram for the control box is shown here on the left, with the ESP32 connected to the microSD card and display, as well as a rotary encoder, to provide a simple menu system on the display. As the ESP32 board runs at 3.3 volts, and the WS2812B LEDs run at 5 volts, there is an issue of incompatibility which has to be resolved with a level shifter circuit. This is solved by using a single WS2812B LED in the controller, powered from the 5 volt rail, but through a diode. This intermediate voltage supply ensures that the ESP32 can drive this LED, and it in turn can drive the first LED in the LED matrix. Problem solved reliably!

In construction I use wire wrap technology, to make the process easier and more reliable, and you can test your solution before needing to solder it. There is however an initial outlay in buying the wrapping tool and spools of wire.

 

Design Files
The following files can be downloaded to help you complete this project. Each has a hyper-link and an associated description. Depending on how your web browser is configured the links will either open the files directly into the browser or offer them as downloads.

Circuit Diagram - a detailed pdf of what is seen in the views above. Use it as a step by step guide to wiring up your project.
Parts list - the things you will need, and indicative budget prices.
3-D Models - a zip file containing all of the STL files, which you can use with a slicer application for 3-D printing.
3-D Parts - a pdf file which identifies the 3-D parts, and to prepare them for assembly
Software - the all important code, .ino files for HexBot2 and WiFi transceiver, plus a  ‘Processing’ application. See comments below on codin
Quick Guide - introduces the Matrix Editor and outlines its many features
Command Reference - a pdf file containing essential descriptions of each command used in the script editor.
 

Libraries
This project relies on the use of five libraries, <Arduino.h>, <HardwareSerial.h>,, <Wire.h>, "SSD1306Wire.h", <FastLED.h>, which need to be included in the IDE set-up, in order for the .ino code to compile correctly. If you haven’t used an ESP32 before with the Arduino IDE, then you will need to install the board libraries too. There are several articles on the web that explain this process.

Design Notes:

The following notes will help you understand how the files in this project work or can be used in principle. Each note has a bold heading for quick reference and they are listed in alphabetical order. TBD

.ino File - the software .zip file contains three folders: HexBot2, Proc_16ch_Controller_06, and Wii_WEMOS_Transceiver_O1, which in turn contains several files. These are all to be extracted and retained within the same folders, of those named. If you are wondering why there are several .ino files, it is because I use the tabbed interface within the Arduino IDE, and for each tab there is a corresponding .ino file. The PWM controller app is a compiled Java version, which will run without installation, once decompressed from the zip file into a normal folder.
3-D Models - this design is based on the use of 2x10 mm steel countersink screws. The pdf files provided should give you sufficient information to identify the parts and indicates the quantity of each to be printed.
Coding - It is essential that you undertake a calibration exercise, in order to enter the correct values into your .ino file, as servo values can vary widely. The more accurately you perform this important process, the better the walking performance of the robot. To make the process simpler I have included some additional 3D parts in the form of angle gauges.

Serial Port
- is used in this design convey readings and commands to the HexBot2, and for general debugging purposes. Being able to see the servo values being applied to each servo is very useful and essential to calibration. If you also build the WiFi Transceiver project you will be able to connect that unit to your PC via USB and communicate wirelessly with the HexBot2.
STL Model Files - use these with your favourite slicer application. In the 3D Parts pdf document I have indicated the size of pilot holes needed for the screws..

Need more?
If you feel that I haven’t included enough information to allow you to tackle a project of this type then send me an email explaining what you need. Or if you just want to give me some general feedback on this site, or to suggest projects what I might include which would be interesting to you, I’d be pleased to hear from you.

Page updated: 23/11/2021