Arduino meets Las Vegas with the Freetronics DMD

Updated 30/01/2013

Time once more to have some fun, and this time by examining the new Freetronics DMD “Dot Matrix Display”. We will look at the setup and operation of the display. In a nutshell the DMD comprises of a board measuring approximately 320mm across by 160mm which contains 16 rows of 32 high-intensity red LEDs. For example, in the off state:

Connection of the DMD to your Arduino-compatible board is quite simple. Included with each DMD is a 2×8 IDC cable of around 220mm in length, and a PCB to allow direct connection to the Arduino digital pins D6~13:

Finally the cable connects to the left-hand socket on the rear of the DMD:

You can also daisy-chain more than one display, so a matching output socket is also provided. Finally, an external power supply is recommended in order to drive the LEDs as maximum brightness – 5V at ~4 A per DMD. This is connected to a separate terminal on the rear of the board:

Do not connect these terminals to the 5V/GND of your Arduino board!

A power cable with lugs is also included so you can daisy chain the high-intensity power feeds as well. When using this method, ensure your power supply can deliver 5V at 4A  for each DMD used – so for two DMDs, you will need 8A, etc. For testing (and our demonstration) purposes you can simply connect the DMD to your Arduino via the IDC cable, however the LEDs will not light at their full potential.

Using the display with your Arduino sketches is quite simple. There is an enthusiastic group of people working on the library which you will need, and you can download it from and follow the progress at the DMD Github page and forks. Furthermore, there is always the Freetronics forum for help, advice and conversation. Finally you will also need the TimerOne library – available from here.

However for now let’s run through the use of the DMD and get things moving. Starting with scrolling text – download the demonstration sketch from here. All the code in the sketch outside of void loop() is necessary. Replace the text within the quotes with what you would like to scroll across the display, and enter the number of characters (including spaces) in the next parameter. Finally, if you have more than one display change the 1 to your number of displays in #define DISPLAYS_ACROSS 1.

Here is a quick video of our example sketch:

Now for some more static display functions – starting with clearing the display. You can use

to turn off all the pixels, or

to turn on all the pixels.

Note: turning on more pixels at once increases the current draw. Always keep this in mind and measure with an ammeter if unsure. 

Next some text. First you need to choose the font, at the time of writing there were two to choose from. Use

for a smaller font or

for a larger font. To position a single character on the DMD, use:

which will display the character ‘x’ at location x,y (in pixels – starting from zero). For example, using

results with:

Note if you have the pixels on ‘behind’ the character, the unused pixels in the character are not ‘transparent’. For example:

However if you change the last parameter to GRAPHICS_NOR, the unused pixels will become ‘transparent’. For example:

You can also use the parameter GRAPHICS_OR to overlay a character on the display. This is done with the blinking colon in the example sketch provided with the library.

Next, to draw a string (group of characters). This is simple, just select your font type and then use (for example):

Again, the 5 is a parameter for the length of the string to display. This results in the following:

Next up we look at the graphic commands. To control an individual pixel, use

And changing the 1 to a 0 turns off the pixel. To draw a circle with the centre at x,y and a radius r, use

To draw a line from x1, y2 to x2, y2, use:

To draw a rectangle from x1, y2 to x2, y, use:

And to draw a filled rectangle use:

Now let’s put those functions to work. You can download the demonstration sketch from here, and watch the following results:

Update – the DMD is also available in other colours, such as white:

So there you have it, an inexpensive and easy to use display board with all sorts of applications. Although the demonstrations contained within this article were rather simple, you now have the knowledge to apply your imagination to the DMD and display what you like. For more information, support and conversation visit the Freetronics product page and support forum.

Disclaimer – The parts reviewed in this article are a promotional consideration made available by Freetronics.

Have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

The following two tabs change content below.

John Boxall

Founder, owner and managing editor of tronixstuff.com.

2 Responses to “Arduino meets Las Vegas with the Freetronics DMD”

  1. i want complete circuit diagram of above dot matrix display plez help me!!!!!!!!!!!

Trackbacks/Pingbacks


Leave a Reply

Receive notifications of new posts by email.

The Arduino Book

Arduino Workshop

Für unsere deutschen Freunde

Dla naszych polskich przyjaciół ...

Australian Electronics!

Buy and support Silicon Chip - Australia's only Electronics Magazine.

Use of our content…

%d bloggers like this: