Introduction: DIY LED Sign With MAX7219 Dot Matrix Module STM8S003F3 MCU for AVR PIC MSP430 Arduino ARM STM32
To satisfy electronic DIY hobbyists, ICStation has developed MAX7219 Dot Matrix Module. It uses the Max7219 chip which do a great job on saving of MCU I/O. It can not only control each point individually, but also can be extended without limitation to meet your requirements on LED Sign, Team Logo and so on.
What's more, it's controlled by the STM8S003F3 MCU with 1K data storge space which is low cost, low power consumption, very powerful.
Major Building Portions of Electronic DIY Kits:
1. The 12pcs of MAX7219 Dot Matrix Kits are ready
2. Decomposition the pin header
3. Welding the SMD and max7219 Chip
4. Welding the electrolytic capacitor
5. Welding the pin header
6. Assembling the PCB
7. Setup the Dot Matrix
8. Wire Connection
9. Power the Dot Matrix and testing with our Code
Components & Tools
Main chip: MAX7219
MCU: STM8S003F3
Tools:
Soldering Iron
Tweezer
Power Module
STM8S003F3P6 Development Board
ST-Link
Dupont Line
Copper Wire
Electrician Glue
Soldering Wire
Pin Header
Step 1: The 12pcs of MAX7219 Dot Matrix Kits Are Ready
If you'd like to do the same sign, you need to prepare 12pcs of the kits.
As the item is with STM8S003F3 MUC which the data storge space is 1K.
If you need to show more characters which is up to 1K, you can change the MCU which is with larger space. And please be noted that the MCU and Display Module should be powered seperately.
Step 2: Decomposition the Pin Header
When the kits are ready, let's unpack the package and start the decomposition the pin header.
Step 3: Welding the SMD and Max7219 Chip
When you're soldering the SMD components, it's better to melt a little solder on the pad before placing components to the melting point of the solder.
1. Fixing one pin
Melting soldering tin on the pin in order to let the soldering tin are fully with the welding plate
2. Putting up the module and keeping it with an inclination of about 100°, in order to prevent the soldering tin dripping to the unwelded plate with the resulting of blockage)
3. Moving the soldering Iron slowly from the top of the soldering iron to the down (be slowly or missing solder)
4. The solder will automatically fall down due to the gravity. One side of the pins has been successfully welded when the iron moves to the bottom side. Then weld the other side with the same method.
Please double check there is the missing solder place or not.
Here is the Video for your reference: http://player.youku.com/player.php/sid/XNjA2MjQwNzgw/v.swf.
Step 4: Welding the Electrolytic Capacitor and the Pin Header
Look below pictures for reference
Step 5: Assembling the PCB
Pay attention to the connection of jump cap.
Step 6: Setup the Dot Matrix
The side with character of the Dot Matrix should be at the same side of PCB with the character of LED_Dot8*8.
Step 7: Wire Connection
PIN Define
CLK: Serial-Clock Input. 10MHz maximum rate.
CS: Chip-Select Input. Serial data is loaded into the shift register while CS is low.
DIN: Serial-Data Input.
DOUT: Serial-Data Output. The data into DIN is valid at DOUT 16.5 clock cycles later.
VCC: Positive Supply Voltage. Connect to +5V.
GN:D Ground
Down and Up Connection
CLK - CLK
CS - CS
DIN - DOUT
GND - GND
VCC - VCC
Incoming Line Connection
Blue Wire - CLK
Purpule Wire - CS
Grey Wire - DIN
White Wire - GND
Black Wire - VCC
Step 8: Power the Dot Matrix and Testing With Code
Download the material here.
MAX7219 Dot Matrix
STM8
ST-Link
Thank you for your visiting! Please feel free to share us your comments. :)
Should you meet any problem, please feel free to contact us.
ICStation Team
16 Comments
9 years ago on Introduction
Hi,
I noticed your price on the kit is very low. Does that include the MAX7219? If it does at the price the MAX7219 are counterfeit. 99% of the ones on eBay are fakes. I have had to source these chips and they are impossibile to get real ones for less than $4- 5 each.
I just wanted people to be aware, even if they work.
Reply 8 years ago on Introduction
If eBay work, be satisfied friend!
hug
Reply 8 years ago on Introduction
Why support companies and people who make/sell fakes?
Reply 5 years ago
Define fake? If a certain IC is designed to do something and someone else designs an IC that the does the same thing how is it "fake" ? lying by putting the "max" name on it is one thing.. but "fake" is really vague. If i have a flat head screwdriver by crafts man, and another identical one but made by someone else who is lying and putting the craftsman name on it, it doesn't make it a fake screw driver , it'll still work lol ... so why support people who make fakes? because the little guys gotta eat too.. im sure the billion dollar companies will be alright
9 years ago on Introduction
I only notice 12 LED matrices but you mentioned 16 pieces. What are the other 4?
The LedControl library only supports up to 8 devices. How do you control 12 LED matrices? From LedControl.cpp,
LedControl::LedControl(int dataPin, int clkPin, int csPin, int numDevices) {
...
if(numDevices<=0 || numDevices>8 )
numDevices=8;
Reply 9 years ago on Introduction
Thank you a lot for pointing out this problem for us and we have already corrected it.
The max7219chip can realize the infinite cascade and the Single Chip Micyoco just control three IO ports ,timing sequence and enough space. You can refer to the STM8 code:http://www.icstation.com/ebay/IC/All%20data%20modules/2609.zip
Reply 9 years ago on Introduction
Ok. So I need to remove the condition in the library or increase the limit if I have say 100 LED matrices.
Reply 8 years ago on Introduction
This is old, but thought I'd reply for others wanting to know. The limitation is set by the library itself, so to increase the limit you would need to make several changes to the library. If I remember, there's a check on the constructor that sets the # to 8 if more than 8 are setup. Also, there's at least one array that that needs to be increased to facilitate the number of displays you want. I think there needs to be 8 bytes per display, so if you have 100 bytes, then the array needs to have 800 elements.
The library does have its downfalls though. The biggest is that the refresh rate for 3-4+ displays is VERY low (only a few per second). This means scrolling text or animations are basically out of the question. I had to write my own library just to control the 24 displays I'm using.
I'm in the final testing phase and need to create a few examples, but should be released by the end of the month. It's written specifically for a large number of 8x8 displays and has built-in functions for scrolling text, printing characters, drawing lines, circles, triangles, rectangles, quads, and ellipses. It also supports 2 fonts, 5x7 and 8x8.
The Library is called LedMatrix and LedMatrixSPI. The first is a software spi implementation that's probably good for ~20 displays. The second is a hardware spi implementation for 20+. The reason I made two was the first can use any I/O pin, where the second requires use of specific pins.
Here's a small demonstration. This was when it was just 16 displays (I've since added 8 more). https://www.youtube.com/watch?v=Qz3abLlZXxA
8 years ago on Introduction
In Aliexpress or eBay sells these modules?
thanks
Reply 8 years ago on Introduction
Yes they do. I just purchased 24 from eBay and the ICs are already soldered on the board. You just need to solder the pin headers.
8 years ago on Introduction
i do the same montage but i have a problem in the program can you send me ypur program please its very urgent
9 years ago
I bought the module recently, hooked it up to an Arduino Uno and uploaded the LCDemoMatrix example.
I found that the "Arduino" display was mirrored. That is when the code says
lc.setRow(0,0,a[0]); the 8th row was activated. Similarly in lc.setRow(0,1,a[1]); the 7th row was on.
I modified the code to
lc.setRow(0,maxrow-0,a[0]);
lc.setRow(0,maxrow-1,a[1]);
...
where maxrow=7
Do you know why this happens?
My chip is also MAX7219. The LED part number "1088AS" is on the same side as the board label LED_Dot8*8.
Reply 9 years ago on Introduction
It is the problem of sorting and you should change the display order according to the code we provide.
Reply 9 years ago on Introduction
I got a similar problem.
My rows are correct, but the cols are mirrored.
If I try to display the letter "L" it is displayed backwards. (see picture)
So col[0] references to the 8th col instead of the 1st.
If can't figure out a solution for this.
9 years ago on Introduction
A very great instructable.
Reply 9 years ago on Introduction
Thank you.:)