Alpha 220 LED Sign

From Buffalo NAS-Central

Jump to: navigation, search


You can find one of these signs for less than $100.
Image:alpha220.jpg
220 Full Matrix, (Case 37.7" x 3.8" x 2.9 ") Tricolor[1]

Contents

[edit] Install a Serial Port Interface

In this case a KuroBoxPro was used however any Linkstation could be used by accessing the serial port interface.

First, install a serial port interface. There are two physical serial ports on the KuroBoxPro. One serial port on the bottom[2] which is the same as the port on the Linkstation Pro and one on the daughterboard accessible from the front. Both are addressed as /dev/ttyS0. Consider soldering in a pinheader rather than the pressure connector used in the LSPRO method.


The cheapest TTL/RS232 converter found was from futurelec, however the order is shipped from thailand so it takes 2-3 weeks to get it.

http://www.futurlec.com/Mini_RS232_TTL_3V.shtml

The sign uses a 6 conductor RJ-12 Jack. A snap in RJ-12 jack is used to interface the sign to the serial port converter

RS-278-2022

Image:RJ12jack.jpg

The serial port board/connector are then enclosed in a 2 port surface mount housing

RS-278-2092

Image:2PSM.jpg

[edit] Interface Sign to Serial Port Interface

A standard 6 wire telephone cable meant for a two line phone is used (a 4 wire one will not work) Plug one end into the sign, and one end into the Quick port RJ-12 Jack. Wire the jack into the serial port board as such[3]

100px-Rj11_connector.jpg

RS-279-422

  • Pin 4 of the RJ12 to RS-232 RXD
  • Pin 3 of the RJ12 to RS-232 TXD
  • Pin 6 of the RJ12 to RS-232 GND

[edit] Setup the serial port

Adjust the serial port settings, below is a script to do this. This information comes from a FAQ on using the Alpha sign with Linux[4].

Basically this

  1. Links /dev/ttyS0 to /dev/alpha
  2. Gives everyone read/write access to your sign (/dev/alpha)
  3. Provides a 9600,E,7,1 connection to the sign (/dev/alpha)

[edit] setledsign

# /usr/local/bin/setledsign
#!/bin/sh

rm /dev/alpha
ln -s /dev/ttyS0 /dev/alpha
chmod a+rw /dev/alpha
stty 9600 -opost -ocrnl -onlcr cs7 parenb -parodd < /dev/alpha

[edit] Wake up the sign and display something on it

[edit] alphamon.pl

# alphamon.pl
#
#!/usr/bin/perl
#
# Script will display the contents of /tmp/textfile to the ALPHA 220C LED
# Display
#
# Usage
#
# alphamon.pl [MODE TAG] [COLORTAG]


# Get the attention of the sign
print "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";


# Tell the sign to print the message
$message = `cat /tmp/textfile` ;

print "\001" . "Z" . "00" . "\002" . "AA" . "\x1B" . " $ARGV[0]" . "\x1C" . "$ARGV[1]" . $message . "\004";

[edit] Alpha Sign Syntax

"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\001" "Z" "00" "\002" "AA" "\x1B" "t" "\x1C" "1" Hello World "\004"
Value Meaning Code Type
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 NULL String of Null packets to get attention of sign
\001 SOH Start of Header
Z Direct at all Signs Type Code
00 All Signs Should Listen Sign Address
\002 Start of Text Character Start Type
A Text File Write File Type
A A File Label
\x1B ESC Start of Mode Field
t compressed text MODE TAG (see below)
\x1C color control code Control Code
1 red COLORTAG (see below)
Hello World Text Message
\004 EOT End of Transmission


[edit] MODE TAG and COLORTAG

The key parts of this are the MODE TAG and COLORTAG, there is full documentation available for this[5][6]but here are the pertinent parts.

MODE TAG
a Message travels right to left.
b Message remains stationary.
c Message remains stationary and flashes
d Auto. Randomly picks an effect for each part of the message, as opposed to the message as a whole.
e Previous message is pushed up by a new message.
f Previous message is pushed down by a new message.
g Previous message is pushed left by a new message.
h Previous message is pushed right by a new message.
i New message is wiped over the previous message from bottom to top.
j New message is wiped over the previous message from top to bottom.
k New message is wiped over the previous message from right to left.
l New message is wiped over the previous message from left to right.
m New message line pushes the bottom line to the top line if 2-line sign.
n This is followed by a Special Specifier ASCII character which defines one of the Special Modes.
o Various Modes are called upon to display the message automatically.
p Previous message is pushed toward the center of the display by the new message.
q Previous message is pushed outward from the center by the new message.
r New message is wiped over the previous message in an inward motion.
s New message is wiped over the previous message in an outward motion.
t COMPRESSED - Message travels right to left. Characters are approximately one half their normal width. (Only available on certain sign models.)
u Message flies apart from the center (Alpha 3.0 protocol).
v Wipe in a clockwise direction (Alpha 3.0 protocol).
COLORTAG
1 Red
2 Green
3 Amber
4 Dim red
5 Dim green
6 Brown
7 Orange
8 Yellow
9 Rainbow 1
A Rainbow 2
B Color mix
C Autocolor

[edit] Stock Ticker

The sign can be used for a number of purposes (to display weather forecasts from an RSS feed, to display news feeds as a news ticker) As a proof of concept the following script uses the sign to display a stock ticker that gets it's data from Yahoo! it then colors the prices

GREEN if they are positive/up

and

RED if they are negative/down

for the day.

Here it is in action: (clip from a cell phone so quality is somewhat poor)

First install perl and make

apt-get install perl make

Then install the quote package [7]

wget http://www.circlemud.org/pub/jelson/quote/quote-0.05.tar.gz
tar -xvzf quote-0.05.tar.gz
cd quote-0.05
./configure
./make
./make install

install curl and lynx so that they can be used later to get content from the web.

apt-get install curl lynx

Lastly here is a shell script to display the ticker

[edit] leddisplay

# /usr/local/bin/leddisplay
#!/bin/sh
# Stock ticker symbols
#
PTE=/usr/local/bin

stocks="  ^DJI ^IXIC ^GSPC "

        quote $stocks | cut -d"(" -f1 |sed 's/^/\x1C9 \x7F \x1C3 /' | sed '/ -/s/:/\x1C1/g' | sed '/ +/s/:/\x1C2/g' > /tmp/textfile
        $PTE/alphamon.pl t A  > /dev/alpha
  

[edit] References

  1. 220 brochure (Pdf)
  2. Add a Serial port to the ARM9 Linkstation
  3. Building a Data Cable for Alpha LED Scrolling Signs
  4. Using the Alpha 215C with Linux
  5. Alpha Sign Communications Protocol (pn 9708-8061)
  6. Alpha® Sign Communications Protocol Revision F
  7. quote -- command-line stock quote display
Personal tools
Downloads
Optware
hosted by
hosted by osuosl.org