Making a Moving, Wirelessly Controlled LED Display




I have used LED matrix displays for a number of different projects over the last few years. These 8x8 LED units have a controller that allows an Arduino to talk to them sending text or graphic information that can be displayed in a number of ways. These small units can be daisy-chained together to create a long, scrolling display.


Step 1: Video

There is a video on YouTube that shows the display units and a number of other LED display projects.

Step 2: Non-Moving Display

While the displays are visually appealing and easy to use they might not get the amount of attention that one would hope they would generate at a train show or other public train display.

Step 3: On-Board Train Display

With this in mind I decided to build an on-board train display using three 8x32 LED boards. Each board is mounted on a car with the three connected together to create one long scrolling message board. To make things even more interesting and compelling to visitors the display's message can be changed remotely with a cell phone or computer. My first set of modules were mounted on three small G-scale ore cars. My latest G-scale installation has two modules on each of two box cars. To make it visible from any angle the display is duplicated on the back of the box cars. This facilitates viewing no matter where the cars are on the layout. A total of eight 8x32 modules are on the two box cars.

Step 4: The Display Modules

The display units are available from Amazon and other vendors. Each is made up of four 8x8 display modules combined on a single circuit board. That makes connections very easy.

Step 5: Display Connections

The display has a 5 pin input header on its right side and a 5 pin output header on the left. The Arduino is connected to the right side (as viewed from the front) and additional modules are connected to the left. The connections are

VCC - positive 5 volts
GND - ground DIN - data in - Arduino pin # 11
CS - chip select - Arduino Pin # 10
CLK - clock - Arduino pin # 13

Step 6: Dim Displays

The displays are not as bright as they could be as they are delivered. In order to increase the contrast I always cover such displays with transparent red acrylic or red plastic tape. To keep the size and weight down I opted for plastic tape for this installation. I purchased it from eBay.

Step 7: Without Red Filter

The two photos show the dramatic difference in contrast when a piece of red tinted acrylic is put over the display.

Here the temperature (75°F) is barely visible on my workbench.

Step 8: With Red Filter

The red acrylic makes the display fully readable, even in a brightly lit area.

Step 9: The Circuit

Just about any of the Arduino variants should work. I chose to use the Pro Mini and the Nano for my two projects as they are much smaller than the UNO and many of its brothers. This schematic shows the Pro Mini - wiring for the Nano is the same except for the location of some of the pins.

Step 10: The Software

Three libraries need to be installed. They are
MD_MAX72xx -
MD_Parola -
MD_KeySwitch - (note - The KeySwitch library is left over from the Scroll example and is not needed. I left it there as some residual code that I modified does not compile unless it is there. )

The Arduino sketch that I put together is composed of code from a number of sources including an example, Parola Scrolling, from the MD_Parola library. This library allows you to select the orientation of the modules and works very well with the 4 module boards.

In order to configure the library for these boards you must edit one line in the library. The file that must be edited is called MD_MAX72xx.h

On my Windows computer I found this library in the following directory.


You may find it in another folder.

When you find the file change the line that reads

#define USE_FC16_HW 0


#define USE_FC16_HW 1 Save the file and restart the Arduino IDE.

Step 11: Command Options

The software allows you to enter new messages from the Arduino Terminal as shown here

Step 12: Control Commands

In addition to entering text you can also enter commands that will change the scroll speed, scroll direction and a few other things.

Scroll Direction - enter /r Enter it again to return to normal
Scroll Speed - enter /s# where # is a digit from 0 to 9 - entering /s0 gives the fastest scroll speed and /s9 the slowest. (note that /s9 is VERY slow and can't be undone until it scrolls once at that speed)
Invert display - enter /i to change the display from red on a black background to black on a red background. Enter it again to return to normal.
Set brightness - enter /b# where # is a digit from 0 to 9 - entering /b0 gives the dimmest display while /b9 is the brightest
Reset Arduino - enter /x This does a hardware reset

Step 13: A Wireless Connection

The message that is shown on the display can be edited from within the sketch or changed from the Arduino terminal if the unit is plugged into a computer. I found this to be tedious as I wanted to be able to have the whole unit moving on a train. To change the message I would have to stop the train, connect the Arduino to the computer and change the message. A remote wireless solution was needed. I considered three different methods of connecting to the moving train wirelessly: WiFi, Bluetooth and a pair of RF Transceivers.

WiFi is surely doable but has one big disadvantage that removed it from consideration. In order to use WiFi a wireless network needs to be available. At some public venues (hotels, science centers, etc) WiFi is not open or not available. Rather than setting up my own WiFi router in those situations I opted for two simpler wireless options, Bluetooth and HC-12 transceivers.

Step 14: Bluetooth

Bluetooth is the easiest and least expensive wireless option. I added a simple Bluetooth board to the Arduino that controls the display with only three connections, vcc, ground and txd to Rx on the Arduino. Note that you need to temporarily disconnect the Bluetooth txd pin from the Arduino rx pin to program the Arduino. The Bluetooth module that I used was from Amazon (see: )

Step 15: Connecting to Bluetooth

The Bluetooth module can be accessed from a cell phone, tablet or PC that has a Bluetooth capability.

Make sure you use your devices setup utility to pair with the train's Bluetooth module before continuing.

On my android cell phone and tablet I used a free Bluetooth terminal program from Kai Morich - see

To start using the app touch the menu bars in the upper left and select Settings. Make sure you change Send Newline to LF as shown here.

Step 16:

Next go to Bluetooth Devices in the same menu. You should see the devices you have paired.

My Bluetooth adapter is named AMAZON06A and is seen here - select your device then go back to the main screen.

Step 17:

Click the icon that I have circled in yellow and you should connect to your Bluetooth device.

Now you can enter new text to be displayed. You can also enter commands (see the description of these under Software)

The command shown here changes the brightness to maximum (/b9).

Step 18: Macros

One of the nicest features in this terminal app is its ability to store and send out canned text, called macros. In this screen shot 10 different macro keys are shown.

If you hold the phone or tablet vertically only 6 macro keys are shown.

Step 19: Editing Macros

If you hold down one of the macro buttons you can edit what is says. In this example I replaced M1 with my name.

Step 20: G-Scale Installation

Each of the two G-scale box cars have four holes in their sides to accommodate the 4 LED modules.I cut these holes using my laser cutter but they can also be cut using more traditional methods.

Four holes were cut in each car giving room for a set of 4 modules on each side that display the same message.

Step 21: Wiring 2 Cars & 8 Modules

The wiring is shown. Note that only a single 5 conductor cable is used between cars.

Step 22:

As you can see the wiring is not complex. The first photo shows the right hand box car that houses the Arduino Nano (circled in yellow on the bottom of the car), the Bluetooth module (circled in yellow and mounted to the back of the car) and the battery (circled in red). You can also see the magnet glued to a corner block that holds the roof on - there is another magnet in the opposite corner.

Step 23:

This view shows all four modules. The yellow, orange and black cable that runs the length of the car powers the second box car.

Step 24:

This is the left hand box car.

Step 25: Powering the Display

The boxcar display can be powered in a number of ways. The simplest is to use a 3.7 volt lithium ion cell. I got a 3.5 hour run time from a single 18650 cell that I got from Amazon. This cell has a built in protection circuit that keeps it from being overcharged or over discharged. The cells that I purchased do NOT come with solder tabs so you either need to solder wires to them (not recommended but that is what I did) or put them in a cell holder.

Step 26: Other Power Options

You could use 4 NiMH or NiCad cells, providing 4.8 volts or you could use a higher voltage battery and run it through a buck converter to drop it to 5 volts. Another option is a battery pack that is used to charge a cell phone or other device.

Getting power from the track is also an option. Since the Arduino and LED modules are sensitive to anything but electrically "clean" power a filter circuit is needed to properly smooth track power.

Whatever you use keep in mind that the 8 display units can easily draw more than 1 amp when a long message is being displayed. This can be mitigated to some extent by using the brightness adjustment (see /b# above) and making the display dimmer. You can also put several cells or batteries in parallel to increase the run time.

Step 27: Buffer for Two Display Segments

I discovered some issues with the dual displays on the G-scale box cars. Since the two display sets are wired in parallel I theorized that insufficient signal may have been being supplied to each display.

A buffer circuit was designed and added to the two displays. The circuit, utilizing just two 7404 ICs, is shown here.

Step 28:

The buffer was built on a scrap of board.

Step 29:

This is the back view of the buffer board.

Step 30: Complete Schematic

Step 31: Enhancements

I plan on experimenting more with the HO version of this project. It seems that it might be possible to mount display units back to back on an HO gondola or flat-car. The challenge may be to supply power and house the Arduino and Bluetooth module. Weight and balance could also be an issue. I'll be sure to leave a note in the comments if I have any luck.

I hope you have a chance to build up a version of this project for yourself. Please let me know if I can help.

This information along with some larger photos are on my web page at



    • Paint Challenge

      Paint Challenge
    • Sew Tough Challenge

      Sew Tough Challenge
    • DIY Summer Camp Contest

      DIY Summer Camp Contest

    21 Discussions


    1 year ago

    Wow! Great Work


    1 year ago

    This is fantastic, so many arduino projects on here that either don't have clear instructions or need extra knowledge that isn't document. This was simple to follow, had the set up (mind you not mounted on a train) up and running in 30 minutes - many, many thanks for your time and sharing.

    1 reply

    Reply 1 year ago

    That is terrific news, Oliver - thanks for taking the time to let us know that it worked for you.

    Do you plan on a G-scale installation?

    thanks again



    1 year ago

    Neat project!

    Btw sort of off topic question - I haven't touched a RR set since the 70s so my knowledge is rusty
    But can the Arduino or raspberry versions of this also get the data through a DCC set up? I may be off here (and please feel free to correct me) but don't the DCC encoders work by giving each module (be it car or light) a , for lack of better term, "IP" number? If that's the case perhaps the sign can get the data from the track it self

    2 replies

    Reply 1 year ago

    David - you could use DCC to deliver new messages but it would require some custom programming as there is nothing in the DCC specification that supports sending text strings.

    I have been experimenting with an open source DCC system that runs on an Arduino - it is called DCC++ and can be seen here



    1 year ago

    I think this is an awesome addition to any train layout.

    My 2¢ ..... Could you just use a ESP8266 (ESP-201) Module to do it all?
    Very small footprint (1" x 1.5"). The ESP-201 could be loaded with a build in webpage to change the display text. ESP can run as an Access Point for WiFi and connect to it with any browser. Power could be drawn from the track to charge a battery and then the battery through a 3.3v converter to power the ESP and LED could run off the 5V battery?

    Again this is just my 2¢

    4 replies

    Reply 1 year ago

    That was more than $0.02, Jeff - great ideas! I have been doing some experimentation with some of the newer ESP units and they surely are up to the challenge -

    Track power is also an option so long as you can filter it properly, another thing I have been mulling over




    Reply 1 year ago

    I am a programmer in Columbus Ohio, If you want some help with it or to collaborate on it let me know.


    Reply 1 year ago

    A good find - you can also find such power pickup trucks that are meant for lighted passenger cars.




    1 year ago

    As you attempt to downsized to HO or even N, you might want to consider using a "Raspberry Pi Zero W". It's footprint is about 1" x 3" (1/3 the size of an Arduino) and is only about twice as thick as the circuit board. It has on-board WiFi & Bluetooth; is very low power; and is $10 from Adafruit. I can easily see this fitting inside an HO boxcar and might even be squeezed into something in N gauge. That single18650 cell will be larger and more difficult to include than the Pi. Even if you can't find an N gauge car that it fits, with the right sized display, this would be a fabulous stationary sign/billboard for any layout.

    Just my 2¢ for what it's worth.

    1 reply

    Reply 1 year ago

    Mike - the Pi Zero is certainly an option - Programming might be more of a challenge for some folks. One of the newer ESP units with Bluetooth might be a simpler choice.




    1 year ago

    Excellent project Dave. I suggest you upgrade it with your Android application using easy to use mitappinventor.

    1 reply

    Reply 1 year ago

    I considered writing my own app but the Bluetooth Serial app does such a nice job and spares users from downloading yet another custom app that I decided to go with that method of message programming.




    1 year ago

    Maybe it'd be better to put some "delay" between the displays, in order to compensate for the doors, so that the text will appear to "flow" under the doors instead of appearing directly on the other display instantaneously


    1 year ago

    Question: does the bluetooth program stay in the arduino, or is it temporary once the signal has depleted.


    1 year ago

    Very cool. Great explanation in the video as well. I can see using this for displaying a lot of other information on various projects. Thanks for sharing.


    1 year ago

    Controlling display wirelessly, that's great to have around. Interesting project, thank you