Digital Picture Frame

I know that everyone and their uncle has made one of these, but here goes anyway...

What shall we do with the broken laptop?

At work we are fairly rough on laptops as they follow us out into the field and generally live in less than ideal conditions. We are inevitably balancing them on things, hanging onto them by one corner while trying to type with the other hand, etc. We run the batteries all the way out to the point where the little LED meter on the side won't even light, or they float for weeks and never get discharged. We connect all manner of things to the ports, often while balancing them precariously... as a result a laptop is fairly dead after about 3 years. The donor machine for this project is one of those laptops. The case has cracked preventing the battery from staying inside. This results in random reboots when on battery. This matters less than you would think as the charging circuits have apparently failed. The power jack is working loose resulting in random reboots whenever. The mini-PCI network card has failed. The cooling fan seized up long ago. You get the picture.

For this project it is perfect.

What I have here is an old HP Omnibook 6000. This is a P3 something with 128Mb of RAM and a 4Gb hard drive. It has a 1024x768 18 bit [1] LCD and 2 PCMCIA slots, USB, serial, parallel, etc.

[1] Yes, 18 bit. I know the video card says 24 bit but the LCD hardware only uses 6 bits for red, green, and blue. 6x3 is 18. There are some other tricks that happen in there but you only get 262,144 colors at a time. You can't tell the difference. Don't worry about it.

The Hardware

Since the plan is to strip the active parts out of the laptop case and install them into a frame, the cracked case isn't an issue. The battery mounts go with the case and since we aren't using a battery anyway, the charging issue is gone. The power connector is likely a cracked solder joint and can be repaired once out of the case. Odds are it doesn't matter anyway as the power connection will be relocated into a form of pseudo midspan power over ethernet... more on that later. The network card will be replaced by a PCMCIA network card that was too annoying to use elsewhere. The fan will either be repaired, replaced, or deemed unimportant (the most likely choice) and converted to passive cooling. We are getting a little ahead of ourselves here. All this is just a box of parts without some software.

The Software

Let's start with the software. The idea is to get the software running more or less like it should on the unmodified hardware before you tear it apart. This way, you know what worked and what didn't before you changed stuff and you don't spend 18 hours troubleshooting a dead system only to discover that there were no bootable partitions.

I am going to use Linux for this project simply because that is what I do. I also find it easier to secure the system, hopefully make it do some fancy stuff, and generally not murder someone getting it to do what I want instead of what it thinks most people want to do.

The distribution I am using is Slackware. There are many other distributions out there that are just as good, but Slack is what I know, so that is how I go.

Choices, Choices...

We picked Linux. We picked Slackware. But how to display the pictures?

There are two ways to go here. We can go with SVGAlib or X.

If we go with SVGAlib then we are limited to a smaller number of graphics programs. The front runners seem to be:

If we go with X, then the whole world opens up. We have:

I tested many of these programs and they all work just fine. They are command line programmable and can display full screen. Along the way I found the perfect solution. Xscreensaver. Yep, the package that puts gears and the game of Life on your screen when you aren't there to see it also has a module called Glslideshow. Glslideshow takes advantage of hardware acceleration to take an image, scale, pan it around (or over it), and cross fade to the next one. The defaults were annoying, but tweaking the settings to make it fit the image to the screen and never pan results in a very nice slideshow that does a very pleasing soft transition from picture to picture. Much nicer than the hard change all the other programs do.

The Xscreensaver package also can run with no one logged in. It can use any program that can display on the root window as a module, and has a command line interface to control everything. Perfect.

So, we need an install with a bootable system, X, Xscreensaver... what else?

Bells and Whistles

We should have a way to get data in and out of this thing. A network interface would be a good idea, but the internal one is blown. No problem, I have an old 3Com PCMCIA card. This was one of the ones with the stupid dongle. I don't mean the dongle was a bad idea, I mean the dongle itself is dumb. It is about two feet long and had an RJ-45 plug on the end of it. This would require you to be no more than two feet from a jack to use it. Rarely are network jacks that conveniently placed. It was a poor idea for common use, but perfect for me since I can cut the plug off and attach a jack instead.

Luck would also have it that I have an old 802.11b card with a broken case that I can put in here. Ok, looks like I need some modules for that too and maybe the HostAP package. I may be able to make this an Access Point too.

I should include Apache for a web interface, SAMBA for shares.... Let's just stop there for now and get it running.

At this point I gave up and simply installed just about everything except for the bloated window managers, TeX, etc. This gave me plenty of flexibility until I figured out what I really needed. I got it booting, X running, xscreensaver doing its thing and the network going so I could get into the box without a keyboard.

Now to strip it to the bones...

Break out the Screwdrivers!

Carefully remove every screw you can find. Gently pry the case apart where it clips together. When all done, you have a pile of plastic bezels and other parts and a pile of electronics. The only electronics we need are the mother board, the display, and the hard drive. It is a good idea to keep the CD-ROM or floppy and the external cable, but everything else can go. In my case, the keyboard was sent back to the office to replace a broken keyboard on another Omnibook.

The plastic bits are junk, but don't ditch them just yet. The bottom of the case serves as a template for locating mounting holes and the pressed-in brass nuts can be extracted for mounting the parts.

Plug all the bits back into each other and make sure it still works.

The Frame

Time to find a frame.

I found a deep frame at the local craft store. I believe it was listed as a canvas frame or something like it. It is 11x14 inches and about 2 inches deep. Once you account for the front reveal, the glass, and the matte, you have about 1 5/8 inches to work with. It is a little tight, but very workable.

There are also extruded aluminum frame segments that are just about as deep. Those will work too. There are plenty of other possible solutions as well. Be creative.

Putting it all together

A foam core frame was made to hold the LCD and keep it centered behind the glass. The glass, matte, LCD and foam core were placed in the frame and the mother board with the PCMCIA cards installed was placed on top to check for clearance. A little maneuvering of parts yielded a position where all the cables reached, the cards all fit, nothing was being crushed, and there was room for the network jack I was going to install. I carefully marked the backing for the first mounting hole, drilled it, mounted the mother board at one point and checked to make sure it was right. Happy with my first hole, I used the bottom of the laptop case to locate several other mounting holes on the backing. Drill the backing and mount the mother board. Check for fit.

The backing for the frame originally locked in place with little tabs that would catch a groove in the back of the frame. Since I was looking for a more stable mount, I cut triangular wedges that tuck into the corners and bolted the backing to them.

Foam core triangles were cut to block the LCD in place and keep it from tilting backwards when upright. These were placed under the triangles the backing mounts to and are held in place by the screws that hold the backing on.

Power and Data

I needed a way to get power and data into the frame. I could go wireless for the data, but I would always need a cord for power (Sorry, Mr. Tesla...). We have a number of devices at work that use power over ethernet (POE). It makes sense. If we already have to have a cable, why not use it for both. True POE requires special circuitry and a special switch that can supply power. It is also 48V. Early POE simply used the unused pairs in a CAT 5 cable for power and a simple dongle to inject power onto the unused pairs. A CAT 5 coupler, an extension cord from a security camera, and an old network jack should do the trick. The extension cord yielded a plug and socket that fit the laptop and power supply. The socket was grafted to the coupler. The plug was soldered to the network jack on the pins that weren't used by the network card. Now I can use one cable for both power and data.

The only problem with mounting an RJ-45 jack on the back of the frame is that the plug will prevent the frame from sitting flush against the wall. True, the cable will do the same, but the plug is a much bigger problem. I solved this by making a pocket in the frame back and mounting the jack sideways. This lets the cable plug in and not have to bend. Now the frame can sit much closer to the wall.

The final power issue is the power switch. Because of the way the mother board is mounted, there is no way to reach the power switch. A little tinkering revealed that the power switch was simply a normally open momentary switch. Luckily, the placement of the switch on the board made it easy to modify an IC wire wrap socket and solder it in place giving me two pins to connect to. A small momentary contact switch was mounted to the backing and connected to the pins.

Try it out

With all the hardware assembled, fire it up. The system came up without a hitch. I was able to SSH into the frame, start X and run xscreensaver. I added some pictures and told xscreensaver to use XV to display them. It works great... except for that stipple pattern XV uses while changing images. A little rummaging through the source code revealed where this pattern was coming from and a few minor changes later, XV now displays nothing but black while changing images. Much cleaner.

More to do...

It is working, but I still need to automate the startup, add a web interface for managing it, get wireless working as an AP, etc.

back one level