Diy Photo Frame Using Raspberry Pi
<- Back To BlogPublished: 28/08/2016 UTC
Updated: 28/08/2016 UTC
Recently I decided to do something about the amassed collections of photos and videos I had taken from things such as from weddings, trips and travels. Nowadays it's far too easy to take 100s of photos since memory is cheap and we nearly all carry around a pocket camera (on our phones). Printing out photos is one option, but it feels too static to me. Being a web developer, I like dynamic and interactive.
Looking around, I found a Raspberry Pi that I had brought for another project that I had started but didn’t have the budget or time to finish for quite a while. Looking at it, I realised it had a display connector. So I started Googling for Raspberry Pi specific screens. After a bit of Googling I found that they did exist but were not that cheap, and the main issue is they generally were quite small (7" and under), whereas I wanted at least 10" or larger. Pondering on this for a while and wondering if I should take the spend money, I came across an old laptop that had a screen about the size I wanted. So I started researching and wondering if it was possible to adapt the Raspberry Pi and the screen together (perhaps I could find a wiring diagram and solder an adaptor). After a bit of research I came across a website (sorry I do not remember the URI) that showed a "laptop screen video driver board". As it turns out you can buy a board that can be programmed, and it basically turns a laptop screen into a normal monitor... Genius!
The "laptop screen drivers" were relatively in-expensive as well (for some models). So I pulled apart the laptop and found the exact screen model number was "LP156WH2". This is a great board as there is no additional back lighting power cable (it's all part of the same wiring loom as the signal data), some LCDs require a separate power wire and circuit board for the lighting - I suspect this one is LED backlit whereas the ones with separate power wires are traditional backlit. There turned out to be a few different boards available for my LCD screen model, some cheaper with just VGA, some with VGA DVI and HDMI, some with a remote and some even with TV tuners (many ideas filled my mind for future projects as there is so much potential). I settled on a unit with a remote, a single HDMI and a Realtek chip.
My reasoning for picking this board was:
- The main chip is a Realtek (good known brand - might last longer)
- The circuit board was quite small
- The Ebay auction said it would work on 5volts (the same voltage as the Raspberry Pi)
- The remote would be handy if I wanted to enclose it in a frame - More on this later)
- Tt had HDMI for the Raspberry Pi (no bulky VGA to HDMI adaptors would be required)
- It was only about $30-35 NZD with shipping! (Most of the dedicated Raspberry Pi screens were about $150-$200 NZD from memory and only 7")
The wait was on for the unit to ship from Hong Kong. Once home from work with the unit I grabbed the Raspberry Pi, the laptop screen, a POE splitter (see my blog post about the cat feeder for more details on what POE is) and stated a few experiments to see what it was capable of. First test 5 Volts. I set the POE splitter to 5 Volts (they have options of 5, 9 or 12 Volts) and attached it directly to the driver board. Success, it worked! Now to test both the Raspberry Pi and the screen off the same POE splitter. At this point I was still concerned about whether this would work, for those less familiar with POE my injector gear is not the new generation, it's the older IEEE 802.3af-2003 specification which is limited to 15.4 Watts (whereas the new gear is up to 25.5 Watts). I did a lot of research about the power drain of the screen and the Raspberry Pi but I didn't manage to get any exact numbers on what I would be drawing. My backup plan was to use two POE splitters (one for the Raspberry Pi and one for the screen) but that would also require two Ethernet cables. I did not like this idea but as a last resort I think it would still be better than plugging it into the wall, as wall outlets are never in the right place and 12v/5v wall wart power cables lose voltage quick over longer distances, making the voltage possibly unusable.
I grabbed a terminal strip, a few wired connectors I had made, and a Y power distribution cable, to send the power from the POE splitter to both the screen and the Raspberry Pi. It had a male DC jack for the tail into the POE power splitter, another DC jack for the screen driver board and a micro USB cable for the Raspberry Pi. Then I plugged it into the POE splitter and the screen just flashed and did not display. At this point I surmised there were two possibilities for this issue, one was there was not enough power coming from the POE to power both. The other possibility was that the drain of the Raspberry Pi dropped the 5v to a too low voltage for the screen and display driver to operate. One of the great things about POE is you can see the power draw of each of the ports! Sadly the POE injector I have only has a serial input, and my USB serial adaptor does not work with it. I do have a smaller POE injector that has Ethernet and I could have used to check what the draw was, but I suspected it was the draw of both causing it not to work on 5volts setting. I decided to proceed down that path of investigation. I surmised this was the case because the website for the display driver (when translated from Mandarin) mentioned only 12v as the operating voltage, which was different from the Ebay auction.
Since my hunch was that the screen was not working on 5 volts, I decided to try running the output from the injector at 12 volts and then using some sort of DC-DC converter to drop the voltage to 5 volts for the Raspberry PI. The next challenge was finding something to drop the voltage. It didn't take long for me to realise the perfect candidate was an automotive phone charger as cars run on 12v and of the car phone chargers accept a wide range of voltages as trucks sometimes run on 24 volts. I grabbed a spare one I had in a drawer and found an old cigarette lighter extension cord that I had cut the male end off for this type of testing. I connected this up to the terminal strip Y connector I had in place and plugged everything together. The moment of truth, was this going to be as elegant as I envisioned, with just a single Ethernet cable attached to it? I switched the voltage on the POE splitter up to 12 volts and plugged it in. Success! Both devices worked perfectly.
Once the next weekend came around I did some research and found you can get some relatively cheap 12 volts to micro USB prefab units that are very small (once again they were intended for cars), and they even had them in stock at the local Jaycar! This means I would not have to have a bulky cigarette lighter socket and automotive phone charger inside the enclosure. Since this project was to be on the wall, on display, I wanted it to be as elegant and minimalistic as possible. I popped out to our local Jaycar Electronics store and grabbed a Y DC-DC power cable, a female DC power jack and one of the 12 volt to micro USB units.
Ready for the final circuit test, I put everything together and voilà it worked! Next step was the frame. As you might have guessed I decided to mount it in a photo frame intended for actual printed photos. I liked this idea as I had seen an episode of the show Hak5 where they had computers on the wall inside photo frames (so you could see the computers working inside on the wall through the glass). I also liked the combining of old with the new, there is something about the elegance of a photo frame that I liked, but it's just the static nature that I did not like. The next challenge was to find a photo frame that could fit the screen in it. One of the major issues with this the dimensions/aspect ratio (most laptop screens are much wider then printed photos). I looked around for quite a while then took the measurements of the screen and went into the Warehouse to try and find one. After looking through the photo frames for quite a while I found one that looked like it would just fit exactly the screen (within a few millimetres). It was the only one, so I decided to take a chance. Just my luck, they were on special, and I think I got two for $15 NZD each (sometimes its good to get a backup when modifying things :) especially where glass is involved).
Once I got home I stated the mock fit. This was a very tight fit, as the screen ended up being a few millimetres bigger then the frame. After removing the metal tabs that where to hold the static photo in place I managed to carefully wiggle the screen in, this was a difficult process because I did not want to shatter or crack the LCD panel under the pressure. Thankfully the photo frame was not a very good one, one of the wooden corners expanded a little to allow the screen to fix, but it wasn't noticeable. Since its such a good pressure fit I didn't need too much to hold the screen, in which is good. I then trimmed the cardboard inner bezel to fit the new wider screen and started to place the other components. I found it was quite nice to attach the components to the frame with velcro strips and hold the cables to the outside of the frame with pins. I mounted the control board for the LCD driver board in one of the corners as it has the IR receiver on it, that way the remote should work through the glass. This did, however, render the buttons unusable which was no problem as I had the remote.
Next was the challenge of where it should be placed. After finding a good spot I then wired the Ethernet cable to it from the POE injector, and I started it up.
I intend to write a program in Python to display the photos from my NAS, which will be a good project to learn some Python.
I installed one of the standard OS's on the Raspberry Pi that had a GUI.
I decided to try an off the shelf solution for now, so I just loaded the 8 GB micro SD card up with a few photos and went looking for a program.
After a lot of time spent (much longer then I anticipated it would take) I finally managed to get something to work.
I used a program called fbi
(from memory sudo apt-get install fbi
), I then added a script to launch it (see below)
#!/bin/sh
sudo fbi -T 2 -noverbose --autozoom --random --blend 1 --timeout 6 /pictures/*
and added a simple start-up script /home/pi/.config/autostart/photos.desktop
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=FBI
Comment=
Exec=/photos.sh
StartupNotify=false
Terminal=false
Hidden=false
Photos look really nice on the screen. It has amazing colour quality, and I'm really happy with it. Sadly, the viewing angle is awful (which is something I didn't think of but is to be expected due to it having been a laptop screen), when looking up at it from an angle colours get inverted. I'm not sure this is correctable, I suspect there is some sort of polariser on the screen, or it might just be the design of the LCD's themselves doing it. The other issue I have with it is that the program fbi seems to lock up (freeze on a random photo) after about 3 or 4 days almost exactly the same time as it was started. All in all it was a great project and its great to be able to re-use the screen and not have to throw it out!
The opinions expressed on this website are my own and do not necessarily reflect the views of my employer. The posts on this website are provided "as is" with no warranties and confer no rights
Copyright © 2025 Jeremy Sells - See Site Terms/Disclaimer