in Applications, Gadgets

Playing With A Mini Led Panel

During one of my trips to China I found some Mini Led Panel in a shop.

They are mini led displays that are able to scroll up to 5 five 250 characters messages. They come with a USB cable and some Windows software that allows you to program them. I actually bought two of them for something like 15 USD. 

I was quite intrigued by the concept of using them to display alerts on my personal computer or show direct messages coming from Twitter.

Unfortunately the application that comes with the device will only run on Windows and it actually does not allow me to use them as i would like.

In the first place I tried to understand how these devices were built. 

I found that they are based on the Prolific PL2303 USB to Serial Bridge controller. This is quite famous for these kind of device. You can find the datasheet here. Luckily enough there is a Mac OS X device driver than you can use to drive this device.

The next step was to reverse engineer the protocol used to program the device. Actually there is no documentation at all coming with the product. Since it is basically a serial device it had not to be that hard to understand the protocol doing some traces. Unfortunately on a Mac there are no free application to trace communication over serial interface/ Actually the Mac does not have any serial interface at all. Moreover the application to program the device only works in Windows.

I have a Windows XP virtual machine running on Parallels on my Mac so I decided to trace the protocol in that environment. From the long past I remember that I used a great utility from Sysinternals, now Microsoft, called portmon.exe. This is  a fantastic small utility that you can use to trace and debug serial communications on a Windows box. That was just what I needed.

After a couple of hours of debugging and a few traces I came out with a good understanding of the protocol. There are still some unknowns that I was not yet able to decode from the protocol (e.g. how to send bitmap images) but that was not critical for the realization of my idea.

The next step was to write a Max OS X application to program the device. I just wanted to write a very simple command line utility that I could user from any shell script on the system. So I did. I started from the Serial Port example in the Apple SDK and wrote some very basic utility implementing the protocol.

Finally I decided to use the mini led panel to display mentions coming from Twitter. I just modified a bash shell script to do just that at 15 minutes intervals. I remember I had seen a very simple shell script on Linux Journal so I used that as a starting point.

So, after four hours of work I had my hardware and application up and running.

I have noticed that a lot of similar devices share the very same protocol so you may use the same code to drive them.

If you wish here is a link to the complete Xcode project where you will find the source code of the command line utility and a copy of the shell script. I am putting these files in the public domain so do whatever you want with them. Download mlpupdate Xcode project here.

Finally, here is a photo of the device working: