Driving a LED panel with a spreadsheet (Y5207 / AM03127 N00GA)

I recently found a LED panel on the street with no documentation, cabling, power supply, etc. I thought it would be a fun project with my son to see if we could get it going. The only markings were a model number Y5207. It turns out this is a widely available and very generic device that is also known by other part numbers such as the Maplin N00GA, Amplus AM03127, Velleman MML16R, and many others. They come in different sizes and optionally in different colours.

The Y5207 has just a power connection for 12VDC and an RJ-11 port for RS-232 data. The RJ-11 pinout for RS-232 has no set standard so we had to figure it out. You only need GND, RXD, TXD so it's not hard to work out with trial an error. In our case, we made up a cable as per the photo.

With the device facing towards you and the connectors on the left side, the top pin is GND, the next pin down is TXD and the next pin down is RXD.

The bad news: Upon reading the documentation, you can't just send this thing human generated commands via the serial port. The information has to be structured with a checksum calculated individually for each command. This makes it basically impossible for a human to hand craft commands to send. Therefore you can't just play with it with a young child that doesn't have enough math skills to understand how to construct a checksum.

To play with it you have a few options:
1. Connect to an Arduino, Raspberry Pi or other micro controller and use various libraries and code segments available on Github (like this one and many others; https://github.com/micolous/ledsign/tree/master/docs-official/y5207). There are also some great write ups like this one.
2. Get a copy of the official software (which is only for Windows). You can use some Googling around with the part numbers above to find it. The problem with this option is that it's just a black box, you have no idea how it works.

If you don't have a Windows machine, or don't want to mess around with Python, Java, etc, or.... in my case I wanted to create something that was interactive and allowed for young children to have a play with controlling such a device. This meant something like a spreadsheet!

The nice thing about doing it in a spreadsheet is:
1. You can very easily see HOW it all works without any prior programming knowledge
2. You can use it interactively from any computer that can run a spreadsheet (completely hardware agnostic)
3. You can start playing it right now with the device you are using to read this blog post
4. You can more or less mask the checksum calculation on a background sheet 

The only thing you need is a way to send RS-232 data to the device. You can use a USB-Serial adapter which are incredibly cheap and ubiquitous. (For example: https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20200406201242&SearchText=usb+to+rs232)

You also need a terminal that allows your operating system to actually send the data. Examples include SerialTools (Mac), or Putty (Multi-Platform)

This spreadsheet implements virtually all the features available in the official technical documentation of the device. (available here: https://github.com/micolous/ledsign/blob/master/docs-official/y5207/RGB%20ledbar%20conrad.pdf)

If you are too impatient to read any of this, just send the following string down the RS-232 cable by cutting/pasting it into your terminal program at 9600,8,N,1, and it may give you motivation:

<ID00><L1><PA><FE><MQ><WA><FB><AA><CC><N00>Hello World0D<E>

Notice the little 0D just before the <E> that's the checksum. You need to individually calculate it for each unique command. Bit of a bummer that prevents straight human-entered commands, but that's what the spreadsheet does.
Read below to find out how to use the spreadsheet in more detail:



The TL;DR version:
Main Sheet:  You enter your information in the yellow cells and the output is in the dark green cells. Each row of green cells can just be cut / pasted into a terminal software to send straight down the RS-232 wire. Use 9600 baud, 8 bits, No Parity, 1 Stop Big (this is commonly referred to as 8N1). 
Example: Cut cell T4 and Paste it into your terminal program and your sign should say Hello World.

It's basically that simple. You can then start messing with the "Message Options" to change the font, style, speed, etc. If you get more adventurous you can add Special Characters and custom graphics per the instructions in cells P10 and below.

The Slightly Longer Version:
I would recommend you read the documentation here to get a sense for how the commands work. The thing that makes it slightly complex is that for each command you need to calculate a checksum using an XOR algorithm. The spreadsheet sorts this out for you and the items in the green cells (T4 for example) have this checksum already applied.

Other Considerations:
1. Utility Sheet: There is a sheet called "Utility Sheet" which is in the tab next to "Main Sheet". Here you can perform some utility functions. For example, the spreadsheet assumes that you have sent the command in cell B5 of the utility sheet if you want to use all 4 "pages" (represented by cells P4, P5, P6 and P7 in the Main Sheet). You can have up to 26 pages and it would be easy to modify the spreadsheet to accommodate all 26.

2. LED Panel Capabilities: Some of the settings (for example multiple Lines, the largest font size, or various colours) only work on panels that have those capabilities. The panel I found was a red single line panel so I couldn't use some of the features.

3. Custom Graphics: You can create custom graphics (for example a company logo). These graphics cannot be produced in this version of the spreadsheet as it's quite complex to create. There are some built-in graphics you can try, for example by adding a to your text, but you can't create your own with this spreadsheet. If you do create your own via other means, they are stored in the panel. So if you create a custom image stored in Page 4, Block 1, then you could call it from the spreadsheet with (D = Page 4, 1 = Block 1)

Future Work:
1. Implement the Custom Graphics Generator within the spreadsheet (I have an idea of how to do it from my QR Code Generator spreadsheet).
2. Find out if the spreadsheet itself can send the data directly to the serial port - This could allow directly driving the display from Google Sheets?

No comments:

Post a comment