Some day I stumbled about 8×8 Matrix LEDs with an SPI interface. While I started with a single 8×8 Matrix for little test purposes, I found out that there are also quite cheap displays with 4 arranged displays offering 32×8 pixel. I combined 2 of them to implement a little clock, driven by the internet (via time server ntp).
The driver was a ESP8266. I created an extra little controller board to attach the esp directly to the LED. This worked out well.
Some day I developed the idea to couple the esp8266 very closely to the matrix display to create little nifty devices.
Phase one: Find out how are the 8×8 matrix modules addressed by the gadgets you can buy?
It turns out: MAX7219 ist the answer. One application for this chip is to drive 7 segment displays with 8 digits. By nature of the 8×8 LED Matrix modules you can buy, you can also use the chip to address a single 8×8 Matrix module. The MAX7219 can be chained. that way several 8×8 modules can be packed together.
The internet is full of schematics how to couple the 7219 with the LED matrix.
As said before the interface to the 7219 from the controler side is SPI and also quite simple.
The overall schematics for the little device ended up to be:
The schematics consist of a voltage regulator to transform 5V (most likely provided by an USB interface) to the 3.3V the ESP8266 likes. The regulator is a AMS1117 (3.3V).
The ESP got a programming interface J1 (details in the previous post). For the connection to the matrix SPI is used (CS, MOSI, CLK) MISO we do not need since the 7219 does not hand back anything to the ESP8266.
A little detail: As Matrix Modules “Common Cathode” ones are required.Do not ask me why they are called common Cathode since the anodes are also connected, so also common.
R2 seems to determine the current that drives the LEDs. The internet told me that 10k would be a good value. I tried and it works with red and blue matrixes. The brightness of the LEDs is handles via PWM by the 7219 anyway.
R3 and R4 and pullups for the programming adapter and I also chose 10k. R1 I found in a few schematics on the internet it is a pulldown for the chip select. In fact it did not seem to be necessary so on the pcb I usually do not solder any resistor to it.
To be able to maybe attach some extra “things” to the module I added a few additional ports (J4 could be used as I2C ) when 3.3V and GND istaked from J5. J6,J7J8 are just “extensions to the esp pins, since for a a through hole connector I just did not have enough space on the PCB.
J3 is the incoming Power supply. It does not necessarily have to be 5V since the LED Matrix also works with less voltage (e.g. 3.3V), but the primary use case is to have it attached to USB.
An option will be to drive the thing via LiPo. The AMS1117 is not the best choice here since it it not a good LDO regulator, but it will work.
J2 is an output connector that could be used to attach cascaded Matrix modules.
Although the schematic looks extremely simple, the tricky part was the size of the board. It must not be bigger than the dimensions of the LED Matrix itself.
So the layout required to be my fist 4 layer layout.
I started with burried viasuntil I found out that JLCPCB does not support that. Vias are always though. This complicated the design a bit.
The PCB came delivered and looks like this:
You can seeone pin of the ESP8266 is a bit longer. It is the analog pin. I should be able to solder directly to it if possible. As described before IO16 and IO12 are also not through holes for reasons of space. I should also be able to solder directly to then only on this side without a though hole.
When soldering the components to the board I alsway start to solder the ESP8266 part. Somehow getting MAX7219 Chips is harder than ESP8266. So if I screw something up in the ESP8266 area, I did not waste a MAX7219.
Voltage Reg and the pullups for Reset, Flash and the MAX7219 Current control are soldered.
Next time I will use the KiCad “Hand Solder Pads”for the 1206 pads. they are definitely better to solder.
Her majesty, the ESP8266 residing on the other side of the PCB. On top of it, the 2.54 Header for the programming cable.
After having done a test programming, the MAX7219 as soldered.
The Matrix LEDs will be plugged in to the one row sockets above and below the MAX7219.
The final result looks like this:
The one row socket connectors are optional. A replacement of the LED Matrix will not be possible so easily if necessary of course.
Very compact design.
Leave A Comment