PS/2/You LED Sign

From MAKE Magazine

From MAKE Magazine

This project first appeared on the pages of MAKE magazine.

Go-anywhere, instantly updatable glowing digital message board.

  • Add Note x
  • x 7

It all started with a small LCD salvaged from an old printer. I recruited my code-savvy older brother, Adam, and we soon had the LCD displaying text from an Arduino microcontroller. This was neat, but it was inconvenient having to plug the Arduino into a computer for reprogramming whenever we wanted to change the text.

We needed something for inputting the text, and it didn’t take long to find a PS/2 keyboard code library for Arduino — which confirmed my observation that anything that communicates with wires has probably been hooked up to an Arduino. I salvaged a PS/2 port from an old computer motherboard, and after some trial and error, we could plug in a common PS/2 keyboard ($5 new) and type messages directly into the Arduino and out to the LCD.

The LCD was so small, however, that hardly anyone noticed our witty remarks. We needed a bigger display. After looking at many appallingly priced commercial LED matrix products, we found a new and much cheaper offering:

Sure Electronics’ 8×32 display boards. They cost $9 each and you can cascade up to four into one long display. We ordered three, and by the time they’d arrived, the Arduino community had already produced a library to run them. (Our code is based on two open source Arduino libraries: PS2Keyboard, by Christian Weichel; and MatrixDisplay, by Miles Burton.) The result is our PS/2/You system, which displays keyboard-typed messages in 2"-tall LED letters that can be read from quite a distance. You can store and switch between six different lines of text, and it automatically scrolls through lines that are too long for the display. Power comes from an AC adapter or six AA batteries for portable operation, and the whole thing is housed in a sturdy wooden frame.

Sections
Tools
Relevant parts
Relevant parts (continued)
first image
thumb image 1
thumb image 2
thumb image 3

Add Note Edit Step 1 — Build the frame.  ¶ 

  • Cut the 1×4 lumber in half lengthwise to make 2 strips about ¾"×1¾" (a nominal 1×4 is actually around ¾"×3½"). Use a narrow-kerf blade if possible.

  • Line up the 2 boards beside each other on a flat surface with their narrow edges up. Place one of the display panels facedown between the boards, so that the flanges on the panel rest on the boards, with the protruding LED matrix between them. Gently squeeze the boards snug against the sides of the LED matrix, and measure between the outside edges of the boards. This measurement is the length of the frame’s end pieces. (Remember this measurement for the following steps.)

  • Use a chop saw or handsaw to cut a 45° angle on one end of each piece, oriented so the cut goes diagonally across the narrow edge. Measure 18¼" down the board’s length from the inner edge of the cut, and make a second 45° cut that angles back out. Repeat on the second board. These will be the 2 long sides of the frame.

first image
thumb image 1
thumb image 2
thumb image 3

Add Note Edit Step 2  ¶ 

  • On each of the leftover board pieces, mark the distance measured measured in Step 1 down from the sharp, outside edge of the miter cut, along the longer face of the board. Cut one at 45° angled in from the measured length (the mirror image of the first cut), which will be each piece’s longest dimension. Don’t cut the other piece yet.

  • Desolder the PS/2 port from its donor motherboard. Line up the DC jack, PS/2 port, and power switch atop the edge of the marked but uncut short piece of wood. Mark out a notch in the edge of the board just wide enough for all of them to fit next to each other and deep enough that the tallest component will sit flush.

  • With a handsaw (or chop saw) cut the 2 edges of the notch. Make a few cuts to the correct depth in the middle of the notch, then chisel out the rest of the wood and file the bottom of the notch smooth. The ports and switch should slide into the notch easily but without extra space. Cut the second (notched) end piece just like the first mitered end piece.

  • NOTE: The frame style isn’t crucial, so let your creativity (and materials) have a say in the design. I had a woodshop at my disposal, so I made something like an extra-deep picture frame with mitered corners and a slot cut in the long sides to hold the display panels.

first image
thumb image 1
thumb image 2
thumb image 3

Add Note Edit Step 3  ¶ 

  • Set the blade of your table saw to a depth of 7" (the size of the flanges on the display panels). Cut a groove lengthwise down the inside face of each long frame piece, ¼" in from the edge (preferably with a narrowkerf blade).

  • Slide the 3 display panels into the slots in the long frame pieces, all oriented so that the writing on the printed circuit boards reads right side up as you look into the back of the frame. Fit and hold a frame end piece in place at each end, then drill 5/64" pilot holes and countersinks for the 1¼" #8 screws that hold the frame together.

  • The notched end belongs on the left side of the frame as you read the circuit board backs, which is the right side as you view the front of the display. Put the screws in as you go to keep the frame together. Ensure that your countersinks are deep enough, and (to avoid splitting the frame pieces) don’t overtighten the screws. The frame is now finished!

first image
thumb image 1
thumb image 2

Add Note Edit Step 4 — Cut the back cover.  ¶ 

  • Place the assembled frame on top of the plexiglass sheet. Use a screw or other sharp object to scratch a mark around the edge of the frame.

  • Cut out the back cover with a handsaw, table saw, or the cutting implement of your choice. Line up the cut piece on the back of the frame and drill 6 pilot holes through the back cover material and into the frame itself. It’s now ready to be closed up once all the electronics are in place and functioning.

first image
thumb image 1
thumb image 2

Add Note Edit Step 5 — Wire the power and PS/2 ports.  ¶ 

  • Wire the 2 battery packs in series by soldering the red (+) lead of one to the black (–) lead of the other.

  • Position the battery packs in the frame (I put them at the end opposite the notch). and lengthen the remaining 2 wires if necessary by splicing in stranded wire to let them reach the notch, where you’ll connect them to the DC jack and power switch. Insulate connections with electrical tape or heat-shrink tubing.

  • NOTES: The battery packs need to be removable for battery changes, so you can secure them in the frame using velcro, although the back cover and display panels seem to hold them in place nicely.

first image
thumb image 1
thumb image 2

Add Note Edit Step 6  ¶ 

  • Cut one end off a black breadboard jumper, and strip and tin the wire. Repeat with a red jumper. Solder the cut end of the black jumper and the black wire from the battery packs onto the DC jack’s negative terminal. Solder a short chunk of stranded red wire between the DC jack’s positive terminal and one of the outside contacts on the switch. Solder the cut end of the red jumper to the switch’s common terminal, and the battery positive to the free outside switch terminal.

  • If all went well, your switch should have an off position in the middle, a battery power position to one side, and adapter power on the other.

  • Cut one end off 4 more breadboard jumper wires: red, black, blue, and white (or your equivalent). Strip, tin, and solder them onto the positive, negative, data, and clock pins on the PS/2 port (see pin diagram), and use a multimeter set to “continuity” to confirm the pin-wire connections.

  • NOTES: I used blue for data wires, white for read/write and clock wires, yellow for the display panels’ “CS” wires, and red and black for power and ground — although I accidentally switched blue and white here on the PS/2 port. Having a consistent color scheme will make it much easier to fi gure out what’s going on.

first image

Add Note Edit Step 7  ¶ 

  • Dry-fit the PS/2 port, DC jack, and power switch again into the notch at the end of the frame. Heat up a glue gun and dab a bit of glue on each one before quickly pressing it tightly into the notch.

  • This is admittedly an unorthodox way of attaching what would normally be PCB or panel-mounted components, but it’s very strong and relatively tidy — a good substitute when there’s no PCB or mountable panel nearby.

first image
thumb image 1
thumb image 2

Add Note Edit Step 8 — Configure the display panels.  ¶ 

  • Each LED display panel comes with a ribbon cable and has 2 ports on its backside that the cable will connect to.

  • Use 2 of the ribbon cables to chain the 3 panels together end-to-end by their adjacent ports. Plug one end of the remaining cable into the port closest to the switch and power jack. Fold this ribbon up tightly and use hot glue to attach its free end plug to an inner side of the frame, with its holes facing up toward the back of the frame.

  • Each LED display panel has a block of little DIP switches labeled CS1, CS2, CS3, and CS4. These switches determine how the microcontroller identifies each panel. The PS/2/You code numbers the displays left to right, looking from the front, so turn off all but switch 3 on the panel nearest the notch, all but switch 2 on the middle panel, and all but switch 1 on the panel at the battery end.

  • To see what these switches do, set them to some other sequence once you have your display up and running.

first image
thumb image 1
thumb image 2

Add Note Edit Step 9 — Add the Ardweeny.  ¶ 

  • Plug your Ardweeny into the breadboard straddling the trench, with the green LED near the top, taking up the first 14 rows. Plug the voltage regulator into the bottom 3 rows on one side.

  • Plug the 0.1μF capacitor in between the voltage regulator’s input and ground legs (typically the sequence is IN-GND-OUT, going left to right looking at the front of the regulator, but check your datasheet to be sure).

  • Plug the 10μF capacitor’s positive leg in the regulator’s output and its negative leg (marked with a stripe) into the regulator’s ground bus.

  • NOTES: The mini breadboard has 17 rows, each consisting of an electrically connected 5-hole bus on either side of a central trench.

  • Peel off the breadboard backing (exciting!) and stick it onto the flat, surface-mount Holtek chip on the back of the display panel closest to the switch and ports.

first image
thumb image 1
thumb image 2

Add Note Edit Step 10  ¶ 

  • Since the voltage regulator’s ground bus is getting crowded by now, use a small jumper to extend it to an unused bus on the other side of the breadboard.

  • Plug the PS/2 port’s power wire into the Ardweeny’s power and its GND into the Ardweeny’s GND bus. Plug the PS/2 port’s read/write wire into Ardweeny pin D3 and its data wire into Arwdeeny pin D7.

  • Use jumpers to connect your components to the ribbon cable plug glued inside the frame. Note that the odd-numbered pins on the 2×8 plug run along the side with the small bump, opposite the side that the ribbon comes in.

  • To begin, connect CS2, the first wire on the ribbon (marked in pink) to Ardweeny pin D5. Connect CS3, the second wire, to D6, and ribbon wire 3 (CS1) to Ardweeny D4. For the display’s read/write input, connect ribbon wire 5 to Ardweeny D11, and for the data input, connect wire 7 to Ardweeny D10.

  • Finally, connect ribbon wire 15 to Ardweeny ground, and ribbon wire 16 to Ardweeny power. (You can also wire power and ground to the buses off the voltage regulator.)

first image

Add Note Edit Step 11 — Program it.  ¶ 

  • If you haven’t already, download and install the Arduino IDE (integrated development environment) from arduino.cc/en/Main/ Software. Launch the IDE.

  • To configure it for the Ardweeny, which acts just like an Arduino Duemilanove, click the menu item Tools → Board → Arduino Deumilanove or Nano w/ATmega328.

  • Then tell it which USB port you’ll program the Ardweeny through by clicking Tools → Serial Port and selecting the highest-numbered COM port (if there’s more than one).

first image
thumb image 1
thumb image 2

Add Note Edit Step 12  ¶ 

  • Download the code package PS2You_code.zip and unzip it.

  • Move the PS2Keyboard and MatrixDisplay folders into your Arduino libraries directory.

  • Restart the Arduino IDE and open up the code file PS2You.pde. Connect your computer to the Ardweeny with the FTDI programming adapter. Click Verify and Upload, and if all is well, a moment later the display will light up with the default text.

  • Unplug the programmer, load some batteries into the battery packs (if you’re going to be using battery power), and screw on the back cover. You’re all set!

  • UPDATE: If you are trying to make the PS/2/You with the new version of the LED panels, all you need to do is change line 131 of the MatrixDisplay.ccp file: Original code: writeDataBE(8,HT1632_CMD_COMS10,true); New code for ht1632c LED panels: writeDataBE(8,HT1632_CMD_COMS00,true);

  • UPDATE 2: If you are using the newest version of the Arduino IDE (1.0), you will need to edit MatrixDisplay.h, DisplayToolbox.h, and PS2Keyboard to replace #include <WProgram.h> and #include <wiring.h> with #include <Arduino.h>. In PS2You.pde/.ino, you will also need to change line 141 from textLines[currentLine] += c; to textLines[currentLine] += char(c);.

first image

Add Note Edit Step 13 — Input and Output Modes  ¶ 

  • The PS/2/You has an Input mode for entering text and an Output mode for displaying it. Pressing any alphanumeric key puts the system into Input mode, and hitting Enter gets you back to Output mode.

  • In Input mode, the PS/2/You displays a single line of text as you type it in, a maximum of 100 characters long. You can store up to 6 lines of text (this number is settable by changing the value of numLines near the beginning of PS2You.pde). Use the up and down arrow keys to select which line to edit, and backspace over any line of text or hit Escape to delete it.

  • In Output mode, the display loops through the stored text lines on its own, displaying each for one second, or if the line is longer than 16 characters, it will scroll across the display before moving onto the next line. If only one line of text is stored, it displays continuously.

first image

Add Note Edit Step 14 — Text Messaging  ¶ 

  • The uses for this contraption are many. Plug the keyboard in and enjoy putting your wittiest “wiseclacks” on it in the safety of your home, shop, or office — or use the battery option to take it into the wide world. We like to have the keyboard accessible so that passersby can add a riposte or two to the dialogue. But if monologue is more your thing, you can always keep the keyboard out of reach.

  • Add a dowel as a removable handle so you can wander the streets digitally promoting your geekified political leanings. Keep score (or heckle) at sporting events, deliver birthday greetings, advertise your wares at a farmer’s market, beam cryptic messages to your neighbors — the possibilities are endless!

first image

Add Note Edit Step 15 — Further Illuminations  ¶ 

  • There’s plenty of room for improvement to the code. Try using Ctrl and other keys to modify how the text displays: flashing, sliding in from the top, fading in, or other effects.

  • Four display panels can be cascaded together for a longer display, and Sure Electronics sells an identically programmable 8×32 panel with 5mm instead of 3mm LEDs, so a jumbo PS/2/You is almost inevitable.

No image

Add Note Edit Step 16 — Roll your own glyphs.  ¶ 

  • The display font is defined by hexadecimal values in the font.h file. It’s not user-friendly for editing, but Brent Morse has made a free applet that lets you design your own 5×7 LED display glyphs (morse-code.com/id89.htm).

  • Use it to modify the font, or make custom smilies or any other pattern you like.

This project first appeared in MAKE Volume 27, page 92.

For more information, check out the Audio category page.

Did you successfully follow this guide?

This guide has been completed 7 times.

Related Products

Comments Add Note Comments are onturn off

Guide Add Note

just wondering if anyone has updated the link to get the zip file from? currently it is not working http://cdn.makezine.com/make/27/PS2You

Raul , · Reply

Hi Raul,

Sorry about that! A blank space was causing problems. It's now been updated in Step 12. Also, you can go to it directly here:

http://cdn.makezine.com/make/27/PS2You-c...

Goli Mohammadi,

Thanks Goli

Also in your parts list you state a "Power switch, SDPT (on-off-on)" do you mean a SPDT?

Raul , · Reply

Yes! SPDT is correct. I'll go in and change it now. Thanks Raul!

Goli Mohammadi,

good idea but i cant find the led display for sale

i did find it on ebay but there was only 2 in stock but i want 3

jordan, · Reply

First Arduino project and I have following this guide exactly. I used sure 32x8 3mm LED part number DE-DP13111 and for whatever reason I cant get the code to work. Nothing lights up on the display. I have also tried scaling it down to 1 display and running some example code from the MatrixDisplay library. Still nothing on the display lights up. I ensured that I was getting 5V with a good ground to the display. Any tips on what should be my next step? I'm new to this.

Adam, · Reply

I'm in the same boat as Adam. I'm not getting anything to display. I first thought my USB port wasn't giving enough voltage so I tried it with a powered hub and still nothing. This is my first project and I know I soldiered correctly and wired everything right. I too can use some help.

Brian,

Hi folks,

Once we had submitted the article to make, Sure changed the output mode of their boards and stopped selling the ones we had used in the project. We altered the code to work with the new boards but the version on the Make Projects seems to be the code for the old boards.

The DE-DP13111 boards are the new version so you will need the new code. To find out if you have the old code or the new code, open up your MatrixDisplay.cpp file in the MatrixDisplay folder in the code package and search for the line:

writeDataBE(8,HT1632_CMD_COMS10,true);

If you find that line, you have the old code. To update the old code to the new code, just replace that line with:

writeDataBE(8,HT1632_CMD_COMS00,true);

This should solve the problem. If it doesn't, let me know and we'll move on to other troubleshooting tactics.

Immanuel McKenty, · Reply

I have the new board. I don't know how to open and edit the MatrixDisplay.cpp file

Paul Hoover,

Hi Paul,

If you are using Windows, and haven't placed it somewhere else, the MatrixDisplay.cpp file which we need to edit should be in:

My Documents -> Arduino -> libraries -> MatrixDisplay.

Once you are inside the MatrixDisplay folder, open up the MatrixDisplay.cpp text file with Notepad and search for the line:

writeDataBE(8,HT1632_CMD_COMS10,true);

(You can search in notepad by hitting CTRL+f or edit->find...) If you find that line, you have the old code. To update the old code for the new panels, just replace that line with:

writeDataBE(8,HT1632_CMD_COMS00,true);

and save the file. This should fix the problem. If it doesn't, let me know.

Immanuel McKenty, · Reply

Hello Paul,

Not sure if you are still checking here, but I'm having some issues with this project and don't know where to look.I can get the display to boot and all the connections look fine (e.g. code compiles and uploads fine and lights on keyboard flash upon plugging in to the port), yet when I start up I get "Hello World!" and no more of the introductory text. After the text is displayed briefly a series of 12 pairs of dots (arranged vertically and spaced 6 LEDs apart flash on the screen. No key entry seems to change the display. I can reboot the system and the same thing happens. I tried switching the data ports on the keyboard connection and no change. What should I check? Thanks, Jon

Jon Bonesteel, · Reply

Help!

I had mine working, but when I plugged in the wall adaptor I think I blew the voltage regulator. After playing around with the connections, I accidentally plugged in the power from the batteries into the +5 volt power for the ardrweeny and the matrix components. Well, I replaced the ardweeny and plugged it into the circuit, but now all I am getting out of the dot matrix display is 8 leds on in the upper left corner. Did I blow out the dot matrix display too?

Ethan Hada, · Reply

I just completed the build and my display is very glitchy. Also when I try to type, it only lets me type for a brief time and then starts to display the other messages without change. Can anyone help?

Mike T, · Reply

Hi, I have this all set up and it works fine in all respects except for one thing - when I type in characters to display on the LEDs, it displays the ASCII decimal value of the character I typed, not the character itself.

I had to change the code around to get it to compile - it seems like Arduino changed some of the libraries around after the ps/2/you code was written. I had to change ps2keyboard.cpp #include "WProgram.h" to #include "Arduino.h", and matrixdisplay.h #include <wiring.h> to #include <Arduino.h>.

Is it possible those changes have something to do with this, and may have introduced bugs? Particularly in ps2you.pde where it appends the typed in character:

textLines[currentLine] += c;

Or in ps2keyboard.cpp where it translates the keyboard input into glyhps?

thx for any help

Courtney, · Reply

I found this in the release notes for the latest Arduino IDE (1.0):

* The behavior of Serial.print() on a byte has been changed to align it

with the other numeric data types. In particular, it will now print

the digits of its argument as separate ASCII digits (e.g. '1', '2', '3')

rather than a single byte. The BYTE keyword has been removed. To send a

single byte of data, use Serial.write() (which is present in Arduino 0022

as well).

---

I guess if I can't figure out how to change the code to account for this, I'll just roll back to the previous IDE.

Courtney,

Thanks Courtney! Version 1.0 is not compatible with this PS/2 code. I downloaded Arduino 0022 and was able to get a clean Verify/Compile.

Building the rest of the circuit tomorrow....we'll see if it works.

JJP, · Reply

Success! (couldn't wait till tomorrow)

I was able to breadboard up the Ardweeny circuit and one DE-DP13111, no keyboard. Used Arduino 0022 and did the code modifications specified above to get the best 'hello world' message scrolling in green!

JJP,

Courtney - I ran into the same issue when completing my own project. Here's what needs to happen to get this project working with the current version of Arduino (1.0):

1) Edit MatrixDisplay.h, DisplayToolbox.h, and PS2Keyboard to replace "#include <WProgram.h>" and "#include <wiring.h>" with "#include <Arduino.h>".

2) Update line 131 of the MatrixDisplay.ccp from "writeDataBE(8,HT1632_CMD_COMS10,true);" to "writeDataBE(8,HT1632_CMD_COMS00,true);"

3) In PS2You.pde/.ino, change line 141 from "textLines[currentLine] += c;" to "textLines[currentLine] += char(c);"

That was all I did to get this kit working. Hopefully the instructions will be updated soon so others don't have to wrestle with this!

Catfang, · Reply

hi guys i am working on this project for myself and when i ordered the parts i got everything to spec except the displays they were all out at the time so i ordered the sure 15151-111v110 displays and i cant ever get as much as a single pixel to light anyone have any ideas?

Kenny Magana, · Reply

Is there a way to alter the default text so that it displays what was on the display when I turned it off last?

Jared, · Reply