Introduction: How to Make a Raspberry Pi Media Panel (fka Digital Photo Frame)
The goal of this project was to create a low cost Raspberry Pi Media Panel--a nice looking screen that could stand in the living room or attach to the refrigerator with the primary purpose of streaming personal photo and video content full time, but also be able to do some other cool things when needed...like show the weather, play a movie, play music, or receive AirPlay content.
Read this blog post if you want to learn more about what a media panel is and why you might want one.
Success criteria were:
-Low cost: a full blown computing device and screen for between $100 and $200 all in
-Attractive: meaning my wife finds it aesthetically acceptable for the living room
-Light: no more than a few pounds
-Thin: no more than an inch thick, including frame
-Quick: can be built in a few hours or less
-Simple: requiring mainly assembly, versus construction or manufacturing
Several people have asked me about an integrated product/service like this that is off-the-shelf. I've been working on one for over two years, and it unlocks the photos and videos you have in the cloud and creates smart channels of your content you can stream to any screen. It's like Pandora, but for your memories.
We call it Fireside.
Fireside makes enjoying and sharing your photos and videos as easy as taking them--and it makes it easy to turn your tablet (or any Android device) into a smart photo frame. It also makes it easy to add an auto-curated "family channel" to your TV. If Sonos is your home's audio ambience, Fireside is your home's visual ambience.
The app is currently free from Amazon, and works with Google Photos or Dropbox. Try it now.
Step 1: Select the Right LCD Screen
There is a lot to picking the right LCD screen...so much that I wrote a completely separate blog post on how to select the right LCD screen for your media panel. If you want the full details and/or are thinking of doing something different, read that post.
To keep things short and simple, I recommend using a 15" or 17" screen similar to the screens used in the MacBook or MacBook Pro. You can, of course, also use a screen from an old laptop you already own, but you need to make sure you can find an LCD controller board that can operate it.
We bought our screens from Laptopscreen.com, and the exact models we chose were the LG & Philips LP154WP1-TLA1 and the LG & Philips LP171WU3-TLA2. They were about $75 each brand new. Both screens were matte finish, though the next time I think we'll opt for glossy.
Don't worry so much about the numbers after the dash...they don't have a large impact on the screen. The critical numbers that determine whether an LCD Controller will support your panel and how to program it are the LP154WP1 and LP171WU3.
If you have questions, or are thinking about getting a different screen, read this blog post first.
Step 2: Order an LCD Controller Board
As you may have read in the blog post on picking LCD screens, there are a number of places you can buy an LCD controller board. However, I think the best is a company called NJYTouch based in China. For the LP154WP1 or LP171WU3 screen, order Model 5451 (audio) from their eBay Store. It costs about $40, and includes the inverter, a control switch (so you can turn your screen on and off) and the correct LVDS connector cable for your LCD screen...plus the programming so that when it arrives it is plug and play.
Shipping for the item is currently free, but takes about a month to get to the US. Instead, ask to upgrade to DHL after you've purchased and for about $20 more the unit will arrive in under a week.
You will need to buy a 12 volt 4 amp power adapter--you can use any standard 2.5mm internal diameter 5.5mm outer diameter. We used this one from Amazon rather than having NJYTouch ship one specially from China.
You'll also need to buy an HDMI A to DVI 24+1 cable, since the controller board has DVI and VGA input but no direct HDMI. We used this one from amazon.
If you want to have audio, you need a device that can take the audio track off HDMI and deliver it via 3.5mm analog. You can find these on Amazon for between $30 and $99, depending on options. We've used this $43 product from J-Tech Digital with the X-mini II speaker via 3.5mm jack and had a good experience.
Unfortunately, there is a problem with the 3.5mm analog out on the Raspberry Pi board itself, and if you try to use it you will get a lot of popping and background noise. Similarly, if you try to add a USB sound card and take audio off via software, you'll find relatively poor performance and audio/video delay and syncing issues in our experience. Currently, the only reliable way is to take audio off HDMI.
Step 3: Order a Frame
Once your LCD screen arrives, it's time to get out the tape measure and get the exact dimensions so you can order a frame for it. American Frame provides nice looking and low cost cut-to-order metal frames to your exact specification. Unfortunately, they do not cut metric sizes. Since LCD panels are made to metric specifications, you will have to calculate the size using 16ths of an inch as best you can. If you can't get a perfect match, round up to make sure the panel will fit inside the frame.
I recommend the Radius Colorcast line since the slightly larger rabbet depth fits the depth of the LCD panel a little better and the rounded bevel makes a slightly more attractive package. The Standard line works fine too if you want something simpler. Colors worth checking out include Black, Bright White, Right Red and Natural Steel. The frames you see in the photos of this tutorial are all Natural Steel.
Make sure you order the standard white mounting board and that you remove the matting and the acrylic that are automatically added to the order. You don't need them. Total cost should be around $10-15 plus shipping, which will take up to about a week depending on where you're located.
Step 4: Magnetic Mount Vs Stand Vs Hanging
Now you need to decide where you want to put your frame so you can get the correct mounting hardware. If you're going to hang it, your frame will ship with everything you need.
If you want to mount it on the refrigerator, we recommend getting four extremely strong magnets. We used MMR-A-X8 Neodymium mounting magnets from K&J Magnetics for about $5 each. In retrospect, this may have been overkill, but the good news is there is no chance that our Media Panel is going to accidentally come off the refrigerator. To attach the magnets to the frame, you will need a 2" x 1/2" mending brace (sold at Ace Hardware or similar) and four 1/6" wide x 1/2" long machine nuts and bolts.
If you want to stand your Media Panel on a desk or a table, the $5 Easel Mate by Albin Products is a great solution. Do not order directly from Albin like we did. Albin is the designer of the Easel Mate and wholesales it. Unfortunately, the Easel Mate they sell on their web site is the wood screw version, and will not work for our metal frame. Many picture frame stores seem to carry the Easel Mate, and we ended up buying it at University Art in Palo Alto. A quick Google search will turn up many other suppliers you can order from online.
Step 5: Order a Raspberry Pi and Accessories
With the longer lead time items out of the way, it's time to buy the brains of your Media Panel, the Raspberry Pi. We bought our Raspberry Pi Model B for $35 from Element14. To round it out, you'll also need a few more things:
-USB WiFi (unless you plan to use ethernet). We use this product from Edimax which is about $9.
-A case for your Pi: We like this one you can buy on Amazon in a variety of colors for about $12.
-An SD Card for your operating system. We like this 8 GB one from Amazon for about $7.
-A cable to power your Raspberry Pi, either a Micro B AC adapter ($5) or a USB A to USB Micro B ($5) if you plan to backpower your Raspberry Pi from a powered USB hub (more on this later). Backpowering is recommended, as connecting all your USB peripherals to the USB hub offloads the power draw from the Raspberry Pi and results in more stable Raspberry Pi operation.
-(Recommended) Powered USB hub. We use this model from Belkin which was about $17.
-(Recommended) USB Mouse and Keyboard. If anything goes wrong during your setup, it can be convenient to just plug a mouse and keyboard in to address the problem vs using SSH or your XBMC remote control. You probably already have them, and if you don't you can get them pretty cheap from Amazon. Make sure you pick one from the RPi Verified Peripherals list.
If you decide to deviate at all from this specific set of items, be sure you check the Rasperry Pi Verified Peripherals list first to see if it works with Raspberry Pi. Do not assume something will just work.
Step 6: Prepare Your Raspberry Pi
The next step is to load the operating system on your Raspberry Pi. There are lots of operating systems you could use, but our experience has been best with Raspbmc. It's a minimal Linux distribution based on Debian specifically tuned for running XBMC on Raspberry Pi. The system auto-updates, and it boots directly into XBMC.
Follow these directions to download and install Raspbmc. Be sure to set up your install so that your Raspberry Pi has network access. This means you need to configure WiFi.
Power up your USB hub and connect it to one of the Raspberry Pi USB A jacks. Then from one of the 4 ports on the hub, connect your USB A to USB Micro B Cable from the hub to the USB Micro B jack on the Raspberry Pi. This is called backpowering, and will be how your Raspberry Pi receives power. Finally, connect your USB WiFi module and testing keyboard/mouse (if you like--not essential).
To verify your install worked, connect your Raspberry Pi to a TV via HDMI and make sure it boots into XBMC. Also, make sure that you can see the weather and RSS feeds so you know Internet access is working on the device. Navigate into the System: Info section and write down your device's IP address in case you need it in the future for SSH access or to set up your remote control.
Also, I recommend enabling "Allow control of XBMC via HTTP" in System: Settings: Web Server (so you can use the remote control app for your smartphone) and "Allow XBMC to receive AirPlay content" in System: Settings: Airplay.
Finally, download and install the free XBMC app for your iPhone or Android phone so you have a remote control for your system.
Step 7: Assemble the LCD Controller Board
Here is a video that shows you how to put together the LCD Controller Board and accessories you have received. Assemble as described in the video, but do not attach the LVDS cable to the LCD panel yet. We'll do this in the next step because the cable must pass through the hole we need to cut in the mounting board.
Step 8: Assemble the Frame
This step is for putting together all the pieces. Assemble your frame and insert the LCD panel and LCD Controller Board as per the video. Provided everything goes right, it shouldn't take more than about 10 minutes.
Once your frame is assembled, connect power to your LCD controller board, plug in the HDMI cable to your Raspberry Pi and then power up your Raspberry Pi to get the first glimpse of your Media Panel in action.
Step 9: Adding Your Media and Operating Your Media Panel
Two (among many) ways to add personal media to your Media Panel are as follows:
The first method is easy and requires no technical abilities, but requires buying a USB flash drive. Buy a USB Flash Drive (like this 64 GB SanDisk for $38) and create two folders on it using the computer that stores your media. One for videos, and one for photos. Copy your personal photos and videos into the correct folder. Unplug your flash drive and plug it into the USB hub connected to your Raspberry Pi. Now you just need to tell XBMC where to find the media (see below).
The second method is to copy the files directly to the SD card on the Raspberry Pi, which requires using SCP / SSH. SSH to your Raspberry Pi and create folders for your media in /home/pi. Open a terminal window on another computer on your network and type 'ssh pi@ipaddress' and then enter raspberry for the default password. ipaddress should be replaced with the IP address of your device, like 192.168.1.2 as an example. You will now be in the /home/pi directory. Type two commands: "mkdir pics" and "mkdir videos" followed by "exit" to log out. Now navigate to the directory containing your photos and type this command "scp * pi@ipaddress:/home/pi/pics". Enter your password again, and make sure you don't have anything else in the folder other than photos because everything in the folder is now being copied to your Raspberry Pi. Do the same for videos using "scp * pi@ipaddress:/home/pi/videos".
Now that your media is accessible locally to your Media Panel, you need to make XBMC aware of it. Under Pictures, go to "Add Source" and select your pics folder. Do the same under Videos for your videos folder.
To set up XBMC to do a photo slide show, follow these directions to add the Slideshow Screensaver and configure it to use your pics folder.
To run a video loop, use the following steps (kludgy, I know...):
-In System, Settings, Video, Playback, select "Play the next video automatically" play next item in a folder
-Navigate to your video folder under Videos, Files
-Using your remote control, change the mode to gesture.
-Select and hold down on the video folder. From the pop-up menu, click Queue Item.
-Select and hold down on the video folder again. From the pop-up menu, click Now Playing.
-You should be presented with a list of all the videos in your folder.
-Gesture left to get the right menu and select Shuffle (unless you want to play videos in order).
-Click once on a video to start your infinite video loop playing.
In addition, of course, you can configure your Media Panel to have all the standard video and audio services of XBMC, including Amazon Instant Video, Hulu, Youtube, and countless others.