As discussed in the previous blog, the LEDs in a DMD panel are organized as small groups in a matrix form. With this the number of pins and power required are significantly reduced. But it is preferable to be able to control with 4-5 pins so that even an 8 bit MCUs can manage such display. This calls for a bit complex electronics in the panel and software in the MCU, but should be manageable in terms of cost and usability.

This blog covers the internal circuitry inside DMD in detail. The block diagram of the overall set up is depicted below.

DMD - System Block Diagram

Dot Matrix Display – Overall Setup Block Diagram

As it can be seen, there are shift registers and demulitplexers used to simplify the effort in MCU. The dual P-channel MOSFET feeds the positive supply voltage to the LED anodes which denotes the row control and the shift registers provides the return path for the LED’s which denotes the column control. The MCU controls the demultiplexer with GPIO interface and interfaces with the shift registers through serial interface, most commonly SPI. More details of them are covered below. For further explanation, we will consider a DMD panel of 512 LEDs, each row is a collection of anode of 32 LEDs and each column is a collection of cathode of 4 groups of 4 LEDs (one column of 16 LEDs divided into 4 groups each of 4 LEDs for reducing IO pins required). The following figure depicts the arrangement of 16X32 LED panel

Row and Column arrangement in 16 X 32 DMD panel

16 X 32 DMD panel arrangement

Role of Serial Shift Register (74HC595)

The purpose of the shift register is to reduce the number of GPIOs required to drive the column of the LED matrix. 74HC595 is an 8-bit serial shift register with output latches and storage register.  The block diagram of the shift register commonly used inside DMD is given below (courtesy of 74HC595 datasheet)

74HC595 shift register block diagram

Serial Shift Register – Block Diagram

With one shift register we get 8 GPIOs possible. Hence for driving 32 columns of 16 LEDs, (total 128 GPIOs) we require 16 serial shift register. SPI clock, SPI MOSI and a latch signal acts a shift register inputs. The main advantage of this serial shift register is that it outputs the serial input fed to it in its serial output pin only when the latch signal is provided. The serial output of the first shift register is connected to the serial input second register. Likewise 16 shift registers are cascaded in series resulting in 128 GPIO pins.

Each of the 128 pin will in turn control 4 LEDs in a column resulting 512 LEDs on the whole. The data to be displayed can be fed as a 128 bit data with 128 clock pulse to the serial shift register. The data will not appear on the output unless the data is transferred to the storage register. Only upon the positive transition of the latch signal, the data will be transferred to the storage register. The data will automatically appear on the output since the output enable pin is permanently grounded.

Since the shift register corresponds to the control of 4 groups of LEDs in 32 columns, the Demultiplexer IC is required to drive the LEDs in 16 rows corresponding to the required data bits.

The following figure depicts the serial shift register circuitry in 16X32 DMD panel, with 128 output lines. Each shift register outputs has 8 outputs, hence 16 shift registers are serially connected for 128 output lines for column control. One output line is connected to 1 group of 4 LEDs in a column. Hence 128 output lines will be connected to 128 groups of 4 LEDs across 32 columns (i.e. one column has 4 groups of 4 LEDs).

Serial shift register with SPI interface

Serial Shift Register Circuit in 16 X 32 DMD panel

Role of Demultiplexer

Demultiplexer is dedicated for row control. 74HC138 is a 3 to 8 line demultiplexer with eight mutually exclusive inverting outputs. Out of three available address inputs only two inputs are selected for 4 individual inverting outputs. The four outputs from the demux will control the gates of four dual P-channel MOSFET where we get 4 pairs of drive outputs which in turn will drive the necessary current to the LEDs in the 16 rows. Finally there are 4 individual sets of multiplexed rows within the DMD. The block diagram of demultiplexer is depicted below (courtesy of 74HC138 datasheet)

3 to 8 line demultiplexer block diagram

Demultiplexer Block Diagram

With this arrangement only four rows will be illuminated at a time while the other is not illuminated. Hence the values of 4 outputs from the demux should be toggled periodically to illuminate all the sets of multiplexed rows. With persistence of human eye, if the LEDs are refreshed once around 20 ms, it is sufficient to show a flicker free display.

Following figure shows the four individual sets of the multiplexed rows inside DMD. The Color coding differentiates the 4 multiplexed rows and the four demux outputs are connected in the following manner

Y0 – connected to the rows R16, R12, R8, R4

Y1 – connected to the rows R15, R11, R7, R3

Y2 – connected to the rows R14, R10, R6, R2

Y3 – connected to the rows R13, R9, R5, R1

Row multiplex inside Dot Matrix Display

Multiplexed rows inside DMD

The demultiplexer input/output combination and the DMD row illumination sequence is illustrated in the following table

DMD-TB

Example

  1. Consider a 32X16 DMD panel
  2. The following figures illustrates the sequence of bit shifting

A single data bit is shifted in to the DMD and it is effectively present in the [R16, C8] location.

Bit 1 shifted into R16, C8

First Bit shift into DMD

On further data in, the Old data moves one bit to [R16, C7] and new data bit is loaded at [R16, C8]

Bit 2 loaded at R16, C8

After 2nd bit input

After the input of 9th bit, the first bit is moved to the twelfth row at [R12, C8] and the bit 9 is loaded at [R16, C8]

Bit 9 loaded at R16, C8

After 9th Bit input

Similarly with 32nd bit input, the bit one is moved to the forth row at [R4, C1] and the bit 32 is loaded at [R16, C8]

Bit 32 is loaded at R16, C8

After 32nd bit input

Upon the input of 33rd bit, the bit one is again moved to the sixteenth row but this time at [R16, C16] and the new bit 33 is loaded at [R16, C8]

New bit 33 is loaded at R16, C8

After 33rd bit input

Likewise on input of 128 bits, the bit 1 is moved to the consecutive rows and columns till [R4, C25] and the bit 128 is loaded at [R16, C8]

Bit 128 is loaded at R16, C8

After 128th bit input

Thus the entire pattern to be displayed can be loaded bit by bit. Running even at a low clock frequency of 8KHz, the 128 bits can be easily shifted in 16 ms, more than needed for human eye to detect the change.

DMD – Daisy Chain

It is possible to connect the multiple DMD panels in series using ribbon cables. This is called daisy-chaining. The number of the DMD in series is limited to the RAM size and the SPI clock frequency.
Even though the DMD can also come with multiple LEDs of varying color such as RED, GREEN, BLUE, etc, the underlying connection mechanism is same and each of the colored LED’s are controlled separately.

Now that we can control each LED of the DMD display independently, we can create any pattern to be displayed. In the upcoming blogs, we will discuss in detail about the software based control mechanism and creating rolling displays.

 

Displays are primarily an output device used for presentation of information in text or image forms. In any processing system, it is mostly necessary to have a display to communicate the processed information to the user. Different types of displays are available ranging from a small LED (Light Emitting Diode) to large LCD/LED monitors with touch. The former typically can show only a status of the system while the later can display more information graphically.

In this blog, we discuss about one type of display, the Dot Matrix Displays, more commonly called as DMD, which is essentially a LED based display but packed together tightly to enable basic graphical rendering. We will cover the technology in detail including the principle behind its operation, interfacing techniques and its applications.

Dot Matrix Display (DMD)

Dot Matrix Display is the simple and more commonly used displays for showing advertisement information in shops, clocks, railway departure indicators, bus routes, etc where low cost displays are required with limited resolution. Further it is used extensively by electronic enthusiasts in their hobby projects.

Daisy chained DMD panels

Three 16X32 DMD panels

DMD’s are now becoming more popular in industrial segments due to low cost and durability when compared to LCD technologies. Following are the advantages of the DMD displays used in industries

  1. Easy update and dynamic message display to diverse audience
  2. Can display in any fonts/languages as generated by software
  3. Basic graphics and animation effects possible
  4. No need of powerful MCUs
  5. Relay messages to employees through one board or company-wide communication system
  6. Easy integration with the existing setup with just a tiny gateway between the system and the DMD panel
  7. Durable and practically no maintenance
  8. Low cost compared to LCD displays

Commonly available display configurations are from 3X5 (15 LEDS) to 128X64 (8192 LEDS). Large sized DMD panels for industry require special design considerations both in hardware and software which is discussed in detail below.

DMD – Design Considerations

Let us assume a case of a DMD panel of size 16×32 i.e. with 512 LED’s. To show an image/display of our liking, it is essential to control the LEDs individually. We should be able to power on or off any particular LED independently of others. Simplest method is to dedicate a control line from MCU for each LED. This calls for 512 GPIO’s from the MCU to control a single panel.

The problem with this approach is that not only it is practically possible to have a MCU with so much GPIO’s but there might be many display which will call for much more pins. It will be cumbersome to manage the wiring as well.

Second easiest way to reduce the number of GPIO’s needed to control the LED’s, Dot Matrix Display panel can be organized as a two dimensional array of LEDs. The LED’s in the Dot Matrix Display can be wired together in such that the anodes of LEDs in a row are tied together and cathodes of LED’s in a column are tied together.

Now that they are organized in a 2D matrix format, it is possible to switch on a particular LED by closing the circuit for the row and column corresponding to that LED. Even as we have control over individual LEDs, still we will not be able to use the model because of the following reasons:

  1. Considering 16×32 DMD (i.e. 16 rows and 32 columns, in total 512 LEDs), in a matrix configuration we will still need 16 (row control) + 32 (column control) = 48 GPIOs per panel. Using 3 panels increases this to 144, way beyond pins available in a low cost MCU.
  2. Even if we have enough pins, it is not possible to have individual control of LEDs. For example, as shown in the below circuits, turning ON only the first LED in row 1 and both first, second LEDs in row 2 is not possible as closing row and column circuits will illuminate all those connected in common.
    2D Matrix display configuration

    Expected to switch ON only three LEDs

    Row column intersection in DMD

    Four LEDs ON instead of three

  3. Another major consideration is the power requirement. With a 2.1V forward voltage and a typical current consumption of 20mA, each LED will consume 4.2mW. So with all the 512 LEDs powered on simultaneously, the consumption will be around 512 * 20mA * 2.1V = 21.5 Watts. A 3 panel set up will draw upward of 60 W.
  4. And none of the MCU’s can power this much.

DMD – Design Philosophy

Considering all these factors, we are in need of a mechanism to work with a sub set of LEDs at a time. First and foremost factor taken in account is that only “we” the humans are going to see the display. We take advantage of a shortcoming in human vision called the “persistence of vision”.

According to this phenomenon, when light strikes the retina, depending on the brightness of the image, retinal field of view and color, the brain retains the impression of that light for about 100 to 60 milliseconds even after the source of that light is removed. So, the eye cannot clearly detect changes in light that occur faster than this retention period and they either go unnoticed or they appear to be one continuous light to the observer.

So based on this, if we power on the LED’s for a brief period of time and keep it off for more time but do it very fast that our human eyes are not able to differentiate it, we will be able to achieve the necessary effect. Let us assume that the 512 LED’s are managed in 4 groups of 128 each, if we can say switch on each 128 LED for 5 ms and keep it off for 15 ms, we will be able to refresh each LED in 20 ms much faster that the eye can notice. Further the power consumption is reduced to a quarter of that when all are illuminated to around only 5.4 W, much manageable.

This is how actually DMD displays are built. The LEDs are organized to smaller groups that are cyclically powered on as needed. Even though this seems to be a lot of work for MCU, actually it is not and even an 8 bit MCU with 6 pins can control the panel with few more tricks. More of this is presented in our next blog.