I’ve already made a couple of Raspberry Pi powered Twitter tickers with wildly different display sizes and, honestly, levels of success. Most importantly, they’ve both failed to be wife-compliant; that is they weren’t finished to a standard where I’d be allowed to leave them out and actually make use of them!
With wifi now built in to the Raspberry Pi Zero W, and Pimoroni’s neat Scroll pHat HD available, I wanted to have another go at this, and having learned a lot of general makery-ness over the last couple of years I thought I could manage to box it up in a smart display.
The code was the easiest part of this project; I just had to modify my previous efforts to work with the Scroll pHat HD rather then the PaPirus Zero or LED matrices I’d used before and add some GPIOZero bits to get the buttons working. You can see the code on GitHub.
The hardware was straightforward too. I used a right-angle header on the Pi which connected to a ProtoZero board with a long female header to plug into the Scroll pHat HD. I soldered the wires for my two buttons onto the ProtoZero. I needed the Pi to lie flat so I could connect power into it while the display was standing upright. (I’ve used ProtoZero boards in several of my projects, they’re really useful for breaking out GPIOs and neatly soldering your buttons, LEDs and other bits and pieces onto.)
The case was the bit I expected to find most difficult. I wasn’t good at woodwork at school, and haven’t done anything like this before.
But I had a plan.
I thought I could sandwich together sheets of plywood with a hole cut through the middle of them to make the case. There was some transparent red acrylic left over from supersecretproject#2 that would make a nice diffuser for the really very bright LEDs on the display.
So I did a lot of measuring of the assembeled hardware and drew my pictures, before heading out to treat myself to a jigsaw. This was a good decision.
I cut the plywood into biscuits and then drilled out the corners of the big hole I was about to jigsaw out of the piece. I made nine of these to accommodate the hardware, and then the front and back plates with feet to stand the box up on the table. I made a tidier hole in the front panel to show the display through, but drilled just a 12mm hole in the bottom corner of the back piece for the power lead. I used wood glue to glue the front half together in one stack, including the plastic and front panel, and then glued the back half separately. I drilled holes for the buttons into the top of this back half and then sanded everything down, rounded the corners slightly and gave it a varnish. This really brought out the colours in the different layers of ply and I think looks rather nice. I pushed the nuts to secure the buttons onto the wires, soldered up the buttons and threaded then into the holes I’d drilled into the top.
Now I did a last test of everything before gluing it all up and happily found everything worked as it should.
Then I glued the rear half onto the front, pushing the Scroll pHat HD right up against the acrylic, threaded the power wire through the rear hole and plugged it back into the Pi and glued the final back slice onto the sandwich.
When it all dried everything still worked, but the feet weren’t quite the same height and it wobbled when you pressed the buttons, so I sanded a few millimetres off the offending foot and gave myself a strong and stable foundation for the project!
I’m pleased with how this one has come out, and think it’s certainly wife-compliant, but as always I’d love to hear your suggestions for improvements in the comments.
UPDATE: Alex Burns tried to run the code from GitHub and found it wouldn’t run. This is because the Twython OAuth packages only install for Python 3 so you have to force the program to run in Python 3. To do this I typed the following at the command line:
ANOTHER UPDATE: It turns out that buttons and a display make a versatile hardware platform, so to grant a request from a family member I just had to write a new program to create a “Sleeps-til-Christmas-ometer”1.
— James West (@jameswest) December 3, 2018