by Floris Wouterlood – Leiden, The Netherlands – May 26, 2016
Introduction
In a previous paper I described wiring up three MAX7219 8×8 dot led matrix devices with an Arduino microboard to create a news ticker scrolling the latest headlines. Based on the experience collected building that prototype I decided to construct a full scale ‘soldered’ news ticker equipped five MAX7219 8×8 dot matrix devices. Because each 8×8 dot matrix has 64 leds, a five-device unit sums up to 320 leds. At initialization all leds may light up simultaneously. The power need of 320 burning leds may overwhelm the current capacity of the computer’s usb port and may damage the computer. It seemed prudent stay on the safe side and to incorporate an external power supply in the design. The Arduino in the new 5-device news ticker is powered from the external power supply; the Arduino’s serial port is used for programming only.
Necessary parts
An Arduino Nano microcontroller board and five MAX7219 controller 8×8 dot led matrix displays (shorthand: ‘8×8 dot matrix device’), a breadboard usb power supply and a print board, and a wall outlet USB power supply/phone charger. Prices in various internet shops of these devices are in the range of US$ 2-10 a piece.
figure 1. Wiring of the five MAX7219 8×8 dot matrix devices, Arduino and the breadboard power supply. Lower panels: left: Nano and power supply solldered on board, right: wiring diagram.
I made my news ticker by daisy-chaining five 8×8 dot matrix devices (Figure 1), and connecting this chain to an Arduino Nano. Each 8×8 dot matrix device operates under a SPI controller protocol. The entire chain is powered and controlled via five wires: 5V, GND, DIN, CS and CLK. 5V and GND are connected with the 5V and GND pins of the breadboard power supply; the pins CS, CLK and DIN are connected with digital pins 8, 9 and 10 of the Arduino, respectively. Note that the connectivity presented here of CS, CLK and DIN is different from the usual connectivity (10-11-12). Arduino pins in the present arrangement were selected to enable further experimentation, e.g., connecting a LCD display. The MAX7219 is not hard wired to a particular Arduino pins, so one is free to select appropriate pins. Pins used for SPI functions should be defined in the sketch though.
Note that dot matrix device nr 5 at the end of the daisy chain has at the top pin marked VCC an extra wire that connects to the 5V plus pin of the breadboard power supply. This is done to have a stable 5V supply throughout the daisy-chain.
figure 2: News ticker doing its job. Once the sketch is loaded the news ticker is fully operational and the usb connection between Arduino and computer can be unplugged.
The Arduino (in this case a Nano) receives 5V power via its VIN pin that is connected to the VC (plus) pin of the breadboard power supply. The GND pin of the Nano is connected to GND of the the breadboard power supply. Once programmed with a sketch containing the newsticker lines it is not necessary to maintain usb connection between computer and Nano.
Discussion
The present 5-device news ticker is stable and works fine. It should be noted here that the MAX7219 dot led devices were purchased from two companies. The leds of the first batch of devices produce light with a slightly different color than the leds of the second batch, bought later. The chips are all stamped “MAXIM – MAX7219GNC”, while the numbers below the type number differ: +140
8, +1508, +1528. Different MAX7219 dot matrix devices bought at diffeerent times from different manufacturers thus seem to have little influence on stability. Recently, units have become available on the market consisting of four daisy-chained MAX7219 dot matrix devices. This makes it very easy to create one’s own news ticker, with little soldering to do. Alignment of the MAX7219 dot matrix devices is also not a challenge.
Microprocessor load: The 5-device news ticker runs with modest means. A ATMega168 processor-based Arduino platform is sufficient to do the job. The number of text lines added to the sketch increase the dynamic memory requirements in proportion.
A description of four text scrolling directions can be found at http://www.best-microcontroller-projects.com/max7219.html
Acknowledgements
The script that can be downloaded via the website https://zonnepanelen.wouterlood.com (page ‘Arduinohoekje’) is an adaptation of Marcelo Moraes’ MAX7219_5.ino. Marcelo wrote the scrolling routine based on the MaxMatrix library. Thanks also to the folks at Brainy Bits with their perfect description of how to work with the MAX7219 LED dot matrix module:
https://brainy-bits.com/tutorials/scroll-text-using-the-max7219-led-dot-matrix/
name of sketch: five_5_max7219_dot_matrix_news_ticker.ino (zip file)
previous paper
News ticker with three MAX7219 dot led matrix devices