m7n.nl

Writings and ideas
en nl

James Webb photo frame

2023-03-17 11 min read projects nerdy Marjolein

Strap in, we’re going to space and back again!

Telescopes

It was Christmas day 2021 and the James Webb space telescope was launching. Just like many people I know and don’t know, I’m absolutely fascinated with it and I was excited about the images it would produce. Since I’d taken an interest in home automation and building projects, it occurred to me that it would be amazing to have a picture frame in my home somewhere, where I could look at the latest images from the telescope. And then I found hexagonal mirror tiles online.

An idea was born.

So I ordered a bunch, and they were broken. Unperturbed, I ordered another batch.

Mirrors The mirrors

At the bottom of this post I have listed the requirements in case you want to try this yourself.

Design

Aliexpress takes a while to deliver, so I had time to think about the design. I spent a lot of time staring at the ceiling, imagining what that would look like. I was going to recreate the idea of the telescope using a wood board, black paint, and the mirrors. In the middle I wanted to put a screen which displays the most recent James Webb images. I made a design:

Tile Design The design and measurements for the board plus mirrors

The middle of the design would contain the screen instead of a tile (where the black column is on the actual telescope). I drew one tile in actual size and measured how a screen would fit:

Screen Design The design and fit of the screen

For the screen size I had two options in mind: a 5-inch screen (the red rectangle inside the hexagon) which seems very tiny and just sad, or a 7-inch screen (the tilted green rectangle) which is much better. So I went with the 7-inch screen, but this size posed a different problem as it doesn’t fit within one tile-space and thus blocks part of the mirrors from view. I had to solve that, and still keep the design in line with my requirements:

  1. A 7-inch screen as the minimal size, on a smaller screen the photos would be too small to see properly.
  2. All the mirrors around the center should remain intact and visible.

The solution was clear to me: I needed to create a column/cone which attaches to the board (just like on the real telescope!) and contains space to hide the cables. Then I could mount the screen on the front of the column.

At this point I started to explain my plans to people, and not a single person understood the way I’d visualised the idea, so bear with me. It will make sense.

Hardware and Software

Of course you can start the DIY immediately, but it’s good to note that testing the hardware and software before putting everything together is a must. The project is very wieldy and you don’t want to pull a muscle trying to look at a wall while you’re testing.

Raspberry Pi and Screen
I used a Raspberry Pi 3b which I still had lying around. At first I wanted to use a Pi Zero 2 W since it takes up less room, but as it turned out the 3b fit behind the board as well.

For the screen I went with a 7-inch Raspberry Pi touchscreen and a separate bracket I ordered on Aliexpress (for links, see Requirements). The bracket ended up not fitting perfectly and I had to do some extra drilling, but it wasn’t a problem as the holes are only visible at the back, which is out of sight. It might be more useful to get a screen with a bezel already included, but fixing such a screen to the column could be more difficult. But I was really winging it, and you could too!

Raspberry Pi OS and fbi
I installed Raspberry Pi OS, which has a very simple installation process you can follow on the Raspberry Pi website. Download the imager, choose the OS you want and write it to the microSD card. A graphic install is optional, definitely not needed. I ended up disabling the graphic environment.

It’s handy to make sure you can reach your Raspberry Pi via ssh. You can set this in the configuration before you make the image using the Raspberry Pi Imager. Choose the OS, click on the gear icon in the lower right corner and create a hostname. Then, check Enable SSH and choose whether you want to use a password or a key. Also check Set username and password and fill out those fields. Lastly, you can check Configure wireless LAN and fill out the SSID and password. All of this will save a lot of trouble later on.

After the install, you can log in via ssh:

$ ssh username@hostname.local

For the slideshow of pictures I installed fbi using this tutorial. In case this link ever disappears, here are a few instructions. You can also look at the man page for fbi.

First, create a directory containing pictures. Then, install fbi using the following commands:

$ sudo apt-get update
$ sudo apt-get -y install fbi

Start a slideshow using fbi (and change the path to your images directory):

$ sudo fbi -T 1 -noverbose -a -t 300 /path/to/images/*

While the other options are important as well and it would be good to read about them, the most important one to mention here is -t. This is the interval between slides. I’ve set it to 300 seconds (5 minutes) but you can set a longer or shorter interval.

And this is the result!

The slideshow in action!

Automation

Of course it would be great if fbi started up instantly upon booting. To do this, I created a small script. Do this as follows:

$ cd /usr/local/bin/
$ nano jwst-script.sh

In the script, add the following lines (and change the path to your images directory):

#!/bin/sh

while true
do
    fbi -d /dev/fb0  -T 1 -noverbose -a -t 300 --once /path/to/images/* 
done

Save your changes with Ctrl+O and exit nano with Ctrl+X. Make your script executable with:

$ sudo chmod +x jwst-script.sh

Now open /etc/rc.local:

$ nano /etc/rc.local

And add your script by adding the following lines to the end of the file:

# JWST slideshow script
/usr/local/bin/jwst-script.sh &

It’s only a tiny script, but I added it to GitHub anyway: script on GitHub

One more automation I originally wanted to do, was to automatically source the images from a feed and put them in a folder. I ended up not doing that because I want to manually select what I want to show, and because some images have an incompatible size which wouldn’t look great on a smaller screen. Of course there are still many possibilities on that level!

Next up: DIY all the things.

Wooden Board

My dad is a retired carpenter, so I asked him if perhaps he had a wooden board lying around that was large enough for the project, and he did! I drew the outline of the mirrors on the board and then I made a 3cm edge around it. Larger would have been fine too, but I was worried about the massive size of the project so I kept it modest.

My dad did most of the sawing since that really isn’t my strong point. I would have messed it up for sure. He also drilled a large hole in the middle for the cables.

My dad and brother My dad sawing and my brother helping out. Love you dad and Frank! ❤️

My brother and I sanded the board, especially around the edges to make them rounder. I took the board home and after using some wood filler on a few irregularities I painted it black, adding three layers of paint just to be sure.

Painting Painting the board black

Column and Screen

Of all the DIY I did, the column was probably the biggest challenge. I designed a rudimentary column in Tinkercad and bought a 3D print. It was quite a gamble and it could have gone very wrong. In hindsight I think I could have made the walls thicker, but there are no visible problems and it’s very sturdy.

Tinkercad Designs in Tinkercad

The one thing I forgot was to add a hole in one side of the column for the HDMI cable and power cable. When I noticed it, I took a small handsaw and made a hole myself. It could have looked better, but from the front it’s hardly visible. If you use my .obj files though, be sure to edit this first and make a hole there! You can download the files here: .obj files on GitHub.

The files are also available on Tinkercad so you can edit them directly: JWST column Tinker file and JWST column support Tinker file.

I had the cube-shaped part and the two square supports for the column printed out separately and screwed them together in the middle of each side of the column, using 7 small screws in total (in one place attaching a screw is impossible because of the hole for the cables).

My screen came with a separate bracket which has a removable back plate (see Requirements). I drilled a few extra holes in the back plate and installed it on the corners of the column using 4 screws. Then I was able to fix the screen and the rest of the bracket onto the back plate with the supplied screws.

Column The column with the back plate of the screen bracket attached to it

Back Side and Mirrors

So I had the board and the column plus screen, but on the back of the board there was still a lot of work to do. I started by attaching two small wooden bars: one as a wall mount and one for balance. On the top bar, I installed two hooks using two screws each, so they’re fixed very securely and can take a lot of weight. I also screwed the Raspberry Pi onto the board at this point, making sure that the ports were facing down so the cables are easy to attach and route.

Back side Hooks and cable management on the back side

Back to the screen/column unit, which needed to be attached to the center of the board. I started by drilling 4 holes in the board, carefully measuring so the screws ended up in the four corners of the column and the whole thing was exactly in the center. Then I used longer screws to securely fix the unit to the board.

Connectors with 90 degree corners hide the cables, which have been fed through the hole in the column and come out of the hole in the center of the board. Using a leftover piece of cable duct (and duct tape where needed), I routed the cables to the Raspberry Pi and down to the bottom center of the board. Here I forgot to make room for the cables in the bottom wooden bar. I fixed that with a hammer and a chisel and removed some wood (very, very carefully because of the screen). Of course other solutions would be better, such as two smaller bars.

When a Plan Comes Together

The last DIY part was attaching the mirrors, which I did using the supplied round pieces of double-sided tape. I actually added them a little earlier in the process because I got impatient, but I highly recommend adding them at the absolute latest moment since they scratch and break easily. It ended up fine in my case, but you know how these things can go. The size of the mirrors wasn’t always perfect so it was quite a puzzle, but it still looks great!

Mirror puzzle The mirror puzzle 🧩

And then, finally, the reveal. I couldn’t be happier with the result!

End result End result 2 The end result, featuring my dad and myself in the mirrors!

Lots of thanks to my dad, my brother and a bunch of nerds on irc. I’m absolutely over the moon and straight into L2 with this ❤️

Requirements

DIY

  • 18 hexagonal mirror tiles. Find them on Aliexpress: mirror tiles. Order extra, they break easily!
  • A large board of wood.
  • Wood filler for holes/irregularities in the wood.
  • Black paint and painting supplies.
  • A long wooden bar (or two short ones).
  • A 3D-printed column.
  • A piece of thin cable duct.

Computer hardware

  • A 7 inch (or larger, but not too large) TFT screen plus housing. Find them on Aliexpress: TFT screen and housing bracket.
  • A HDMI cable and adapter for the screen.
  • A Raspberry Pi with an RPi adapter. Other adapter brands are possible, but they often don’t play well with the voltage the Raspberry Pi requires. I mentioned using a 3b instead of a Zero 2 W, but if you have a Raspberry Pi Zero that works just fine, since fbi doesn’t create a heavy load.
  • A microSD card. I used a 64GB card but smaller is absolutely fine.

Software

  • Raspberry Pi OS.
  • fbi, a slideshow tool for Linux.
  • Tinkercad files and startup script you can find in my GitHub repository.