Saturday, September 6, 2014

Quick start with max7219 led dotmatrix display on raspberry pi and arduino - DIY led displays and name boards

ADVERTISEMENT
Displays are an integral part of many DIY projects to convey information to the external word. Many micro-controller projects needs a simple way to communicate the information to the external world and we use led displays. It is possible to directly drive the led displays with a micro-controller, at the expense of the precious pins on the micros/ arduino. Added difficulties are the current control resistors and limitations on the display brightness etc. Here is a simple and popular solution for driving led displays using the MAX7219/MAX7221 a compact, serial input/output common-cathode display driver chips from maxim semiconductors. See Datasheet here

If you want to read more on direct drive solutions please see my posts here (clock using direct drive 7segment led ) or dotmatrix (external link) and pin connections and fonts

It needs only 3 pins from the microcontroller/arduino/raspberry pi to control the entire display. It is available in the form of low cost kits / can order the individual chip-set. Kits are pretty easy to assemle (see figure)

Assembly


MAX7219 kit components
Assembly is pretty simple if you just follow the silk screen. Keep the pcb with silk screen facing up and first solder the capacitors and resistors (take care of polarity on electrolytic capacitor). Solder the ic - socket (align the small wedge on the silk screen) and then all connectors.

The assembled led matrix is shown below

Assembled max 7219 led matrix (see the text on led array facing the bottom)

Quickly test the led matrix on arduino


I used the library Maxmatrix which can be downloaded here (unzip and copy the MaxMatrix folder to arduino/library folder. Load the example sketch to test the scrolling text pattern. (remember to set the number of led matrix if you use more than one and also the pin numbers). The connection is quite simple. I used

int data = 8;    // DIN pin of MAX7219 module

int load = 9;    // CS pin of MAX7219 module

int clock = 10;  // CLK pin of MAX7219 module


So change to what ever pin you intend to use and also if you use more matrices , connect DOUT to the next matrix and the rest are parallel.


Usage on the Raspberry pi -> i followed the guide here




No comments:

Post a Comment