Introduction: 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
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 - https://github.com/MajicDesigns/MD_MAX72XX
MD_Parola - https://github.com/MajicDesigns/MD_MAX72XX
MD_KeySwitch - https://github.com/MajicDesigns/MD_MAX72XX (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 https://github.com/MajicDesigns/MD_MAX72XX 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: https://www.amazon.com/gp/product/B01FCQZ8VW/ref=oh_aui_search_detailpage?ie=UTF8&psc=1 )
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.
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.
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.
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.
This view shows all four modules. The yellow, orange and black cable that runs the length of the car powers the second box car.
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.
The buffer was built on a scrap of board.
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
We have a be nice policy.
Please be positive and constructive.