James West

May include blinky lights. And cocktails.

Category: Wife compliant

Rotary phone jukebox

I’m at the age where things which were normal in my childhood are now described as vintage; cars, furniture, radios, and telephones.

I got an old BT rotary dialling phone from eBay a while ago, and have been hanging on to do something with it. We did use it as a phone for a while, but the handset speaker wasn’t great quality and the ring was so loud it made us all jump. This phone has two push-buttons on top – one stopped the bells ringing and the other was labelled “Recall” but didn’t seem to be working – at least not as I’d expect a button labelled recall to function.

I think my phone is a BT model 8746, having been wired with a plug-in jack at the factory. There are lots of websites with detailed information about these old phones which can help you identify the model you’ve got, host circuit diagrams and have useful repair and maintenance guides. Sam Hallas’ site is wonderfully detailed and britishtelephones.com was also useful. There’s also quite a bit of prior art with Raspberry Pis and rotary dialling phones, and I read these helpful posts from Dan Aldred and Giles Booth.

With the lid off

This is what I found inside the phone after I got the case off. I used this diagram to work out where the handset earpiece connected to the board, and the terminals for the handset cradle switch. Using croc clips I connected the dial to the Raspberry Pi’s GPIO and used Dan Aldred’s code to try to read the pulses. I got nothing, which was a bit worrying. I knew the dial was doing something as I used Giles’ LED trick to be able to see pulses. Next I connected the LED to the Raspberry Pi and wrote a few lines of code to make it flash from the GPIO. Nothing again, so I found another Pi (a 2B lurking unused) and tried again. This time the LED flashed and once connected to the phone’s dial I was able to count some pulses, so I diagnosed a dead GPIO on the Zero W and ordered a replacement – the 2B was never going to fit inside the phone!

Although I was now detecting pulses, the Pi was returning inconsistent results. I wasn’t going to be able to accurately report the number being dialled. So I abandoned the crocodile clips and cut the terminal connectors off the wires in the phone and soldered them to the Pi. I had hoped to be able to keep the phone in reasonably original condition so it could be returned to use as a telephone, but as this now wasn’t going to be an option I was free to get a bit more hacky with the phone. The transparent push-buttons on top of the phone looked like they’d make great light pipes so I hot glued an LED into the bottom of each one. These I connected to 3v from the Raspberry Pi via the two-way switch on the cradle, so when the phone is on the hook one lights up red until you pick up the handset when it switches off and the other button lights up green.

Ready to put the case back on

With the dial soldered to the Raspberry Pi I got a cleaner signal from the dial and could now reliably read the number dialled. I added some code to Dan’s example to play a different .wav file for each number between 1 and 9. Dialling 0 switches the Raspberry Pi off. I’ve chosen songs about phone calls or phone conversations, starting with Hanging on the Telephone by Blondie when you dial 1. To get the audio from the Pi into the handset I used a Pimoroni Speakerphat and wired it straight into the handset, having identified the wires for the speaker from the circuit diagram. The output was a bit too loud, so I soldered a 1k resistor into the circuit which made the volume more sensible.

At the moment the music carries on playing even after you hang up the receiver. I should have a go at using the hook switch to stop the playback, but I’m not sure I can squeeze many more wires into the space – it’s surprisingly cramped inside those old phones, despite how big the look from the outside!

Cramming the Google AIY kit into a Roberts radio

The Google AIY kit that came with issue 57 of the MagPi makes a great internet radio. The cardboard box it comes with, however, is functional, but not wife-compliant so I wanted to find a better enclosure for it. For a while I mounted it behind a perspex Muji photo frame, which was OK but still not what I really wanted. Then I remembered the Pimoroni ARRR600 which had an internet radio inside an old Roberts.

Roberts radios are fantastic. They look amazing and, and are well built. When I first started working in radio the BBC’s local stations used them extensively for off-air cue at outside broadcasts and they survived a lot of rugged handling while still retaining their looks and sound quality. So I went to eBay and found a few for sale as “spares or repair.” I didn’t want to gut a functioning radio, or pay too much for just the case. I was out bid on a couple of R600s, but won the auction for a Roberts Rambler 2.

Roberts Rambler 2

Taking it apart and removing the old innards was pretty easy. I had to make a mounting plate for my four new buttons, so cut down some 3mm acrylic sheets I had left over from something else, and carefully drilled holes in the right places, using the top cover as a template. I fitted the new buttons and pots, and soldered all the wires to them and to the Google Voice hat. I used the original speaker from the radio, connecting it to the hat via the volume pot so it can be adjusted without having to bother the AIY kit. (Although you can still say “Volume up” or “Volume down” to it if you like). The pulsing LED is mounted underneath the top panel, and shines through nicely. As there are plenty of spare GPIOs available on the hat I connected the buttons as mentioned, and added three extra LEDs too. These don’t do anything at the moment, but I suspect I could add some code for them if inspiration strikes me.

Usual mess of wires

I used KTinkerer’s code and excellent blog post to get the BBC radio stations playing on the AIY kit, but I modified some of the station names to be more on-brand and swapped my BBC locals for Radio Nottingham from their example.

Roberts Rambler 2

I’m pleased with the outcome of this, and it sits nicely on the desk in the front room with my Twitter ticker. Strangely the LED connected to GPIO 5 is always dimly lit. If anyone has any idea what might be causing that, or any other feedback, I’d be interested to hear in the comments.

Desktop Twitter ticker

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.

Perpendicular Pi

Raspberry Pi Zero W lies flat, but hidden behind the Scroll pHat HD and ProtoZero board

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.

Drawings

I did a lot of head-scratching and drawing before making any cuts.

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.

A slice of the box

It doesn’t matter how scruffy the hole in the middle is, as long as there’s clearance to get the Raspberry Pi Zero W and Scroll pHat HD through there.

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!

This slideshow requires JavaScript.

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:
python3 scrolltwitter.py

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.

VW badge with LED rainbow

Wallpaper - Not VW camper vans

Not VW camper vans

When we redecorated the hall we went to B&Q in search of some wallpaper to run up the stairs. You know the stuff; probably floral. But then we saw this, and just had to get it.

We’re not massive VW fans, but the dream is to get some sort of camper van when we retire and hit the road, so it’s a little nod towards what might be.

When Cora, our neighbour, gave up her Golf she kept the badges off it’s boot and radiator, and when she saw this wallpaper she gave us one of them. I went to eBay and got a display frame to put it in, and it’s lived on the radiator shelf at the bottom of the stairs since then.

But it’s not felt quite finished; after all, everything can be improved by adding LEDs to it. There was (of course) a spare Raspberry Pi Zero and Blinkt! stick in my makers’ box, so I Dremmelled a Blinkt! sized slot in the bottom of the frame, poked the LEDs through and screwed the Zero onto the bottom of the box.

I’ve not done any fancy code, it just runs the rainbow.py script from Pimoroni’s Blinkt! library.

PS: This video was made with Apple’s Clips app. I really made it as an excuse to play with the app, which is a lot of fun and not that difficult to get started with.

© 2018 James West

Theme by Anders NorenUp ↑