Introduction: WW2 Radio Broadcast Time Machine

The idea behind this was to use some parts I had lying around and to construct an audio jukebox fashioned in an old radio. To provide some more purpose behind it I also decided to fill it with old radio broadcasts from WW2 and then to repurpose the frequency dial to select an individual year of the war and the relevant broadcasts would then play. I'd seen a few collections of MP3 recordings so everything was set to go.

In terms of hardware my favourite is either the arduino or the raspberry pi zero, and for this I'll be using the raspberry pi zero. However it has its drawbacks and in this case it is the lack of easy to use audio and no easy analogue inputs. To overcome this I tend to use the Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A which is a real easy way to add audio to the Pi and for the analogue input a MCP 3002 which is a two channel to SPI converter. Generally people tend to use a MCP 3008 which has 4 inputs but I thought it that would be too easy, fortunately I managed to find some software that worked with these in the end.

One of the other problems with using a PI is that it tends to suffer if you just turn it off without performing a shutdown, I've encountered this countless times and it always seems to corrupt the network config file. With this being envisioned as a simple standalone that would have been a problem so I also added a Pimoroni On/Off Shim which performs both a graceful shutdown at the press of a button, but also allows a boot up with the same button.

Step 1: WW2 Time Machine Radio Parts List

The parts needed

  1. Old radio
  2. French Polish
  3. SandPaper
  4. Lexan for dial
  5. Heatshrink
  6. Raspberry Pi Zero
  7. I2S Amp
  8. ON/OFF Shim
  9. Speaker
  10. Power brick
  11. MCP3002
  12. LED
  13. Resistor 270R
  14. 2x 10k Pots
  15. Push to make Switch
  16. USB Lead

Step 2: Finding an Old Radio

First step of course is to find a suitable old radio and I managed to find this one on ebay for £15. There was a temptation to get it running at first, but when the chassis came out and the full array of resistors and capacitors were on show that would need to be replaced I didnt feel so bad about taking it apart. Although strictly its not quite a 1940's set, there are some home build kits from that era that certainly looked similar.

Step 3: Removing the Old Radio and Constructing a New Chassis

It's fairly simple to take one of these apart, generally it seems that the chassis is mounted to the case and on that everything is mounted. So once its unscrewed and the knobs released it just slides out. Most are built entirely on a sub chassis. My original intention was to use a speaker from a ripped apart bluetooth speaker box, but I wondered if the old one would work. It was a pleasant surprise to find that not only did it work,but it sounded really great as well. So the next step here was to keep measuring everything and build a new chassis in Tinkercad. I redefined the frequency dial area and kept the speaker in the same place. In addition a mounting plate for the pi zero was added. I printed it out in PETG which I find as being less resistant to warping and a trial fit of all the parts seemed to show it would work. I had to play around a bit with the volume mounting so that the new pots would be a nice fit and still mount through the case.

You can download the 3D Chassis here if you want to tinker with it

Step 4: Renovating the Case

Now the first thing to do when the case was stripped down was to decide what to do with the finish. Although the case wasn't too bad I initially thought about just giving it a good clean to keep the worn patina look. Often a wipe over with vinegar will freshen up an old case, but there were a few places that the varnish had cracked through so I decided to strip it back. With old wooden cases they are normally covered in a thin veneer of wood, but its not so thin that you can't get a good sanding on it. First the speaker grille cloth was removed, which was pretty disgusting with about 50 years of dust and grime in it and put to one side. Then a couple of thick coats of Nitromors, a paint stripper, and the old varnish eventually came off. This had to be done twice as it was probably varnished at some point over the original finish. To clear some of the scratches and give it a nicer finish it was sanded with some 100 grit paper and then a final sanding with a medium sanding sponge. Do all this in line with the grain and then a wipe down with white spirit to clean off any dust. At the same time the box was also fixed up with some wood glue where the veneer had slightly pulled away. The wood grille bars had also delaminated a bit, so more wood glue and poke back the pieces where possible. Once this had dried, I just used a scalpel to clean up the edges of the wood and painted them brown with some Tamiya acrylic paint.

My first thought was to just replace the speaker cloth, but the cost of authentic looking material is pretty steep as its tended to be sold in long lengths. After a bit of exploring vintage radio forums, it looks as if you can bring back old cloth with a soak. So using cold water and lots of washing up liquid I soaked it overnight and surprisingly once it dried out again it came up pretty clean.

Now I was going to tackle the finish and initially decided to give it a clear varnish, then thought about using a spray varnish and whilst in the varnish/paint isle of the local DIY store found a bottle of french polish. Thinking that would be a good authentic finish I decided to give it a try. So now you need to know that french polishing is pretty much an artform/skill that takes a lot of practice to get right. You can search for instructions on YouTube and although it looks fairly simple it is a pretty messy operation. The knack seems to be getting the polish in a rag soaked in cotton wool so that you can squeeze out polish onto the wood as you work. If you just try it with a rag, about 3/4 of the way the polish starts drying out as the ethanol evaporates and the rag starts dragging. So in the end rather than getting the high gloss finish I managed to apply a couple of coats, sand lightly with 1500 grade paper, then apply a few more and it ended up looking OK. i still have french polish stains however on my fingernails.

Cleaning up the other parts was much easier with all the hardware going into the ultrasonic cleaner and the dial being polished up with some Silvo Polish. Brasso would have the choice, but Silvo and a bit more elbow grease was enough to clean the dial indicator.

At the end of this I had a pretty good looking wooden box ready for the time machine itself.

Steps in this section
1. Strip out any bolts/dials and cloth.

2. Wood strip the case with nitromors

3. Sanding down the veneer

4. Reparing the grille

5.Cleaning the speaker cloth

6.French polishing the case

7.Ultrasonic cleaning the screws and knobs

8. Polishing the dial indicator

Step 5: Raspberry Pi Zero and Amplifier

With a normal Raspberry PI audio output is quite simple as it has an audio jack output, but for the Pi Zero there is no real native options. There are some solutions that I've tried where you can re-route GPIO pins and then use a low pass filter but I have never really been able to get something sounding decent, and of course you need an amplifier as well to get something usable. There are plenty of DAC Hats,but these are for people looking for really good audio and overkill for these kind of projects. There are also some nice cheap Audio hats with built in speakers, but just not loud enough for this. So I settle now on the i2S amplifier breakout board from Adafruit which solves all the problems in one go. Just note that it is i2S and not i2C .

You only need a few wires to get this up and running and with a decent enough speaker you can get some great , loud mono audio.

Step 6: Making a New Dial

The idea here of course is to replace the existing dial and glass with one that shows the year instead of the frequency. Luckily the existing one was just a printed insert so I dropped it onto the scanner and copied it into Paint Shop Pro, used the clone tool and wiped out the old numbers and then just typed in some new ones for each year. With the glass the one in the radio was scratched and cracked and as it turns out made of plastic too. I printed out just the bezel surround to make test fitting easy and originally tried to make one out of acrylic. I've generally not got enough patience with acrylic and ended up cracking it when trying to drill the center hole. So I resorted to 1.5mm polycarbonate which is so much easier to hacksaw and drill. You can find it also called Lexan or Macrolon depending on where you live and it also takes a file as well so I soon had a bezel and dial that fitted. Interestingly as well was that the original paper had a slight metal deposit all over it, I can only assume that it was someone affected by the original brass pointer, perhaps some ageing process ?

Step 7: Volume and Selector Controls

One of the drawbacks of the Raspberry pi for tinkering is that it doesnt have any native analog input. Not really too much of a problem if you add a simple ADC (Analog to Digital Converter) and the MPC3002 fits the bill here and it converts an analog input into a 10bit value that can be read on the SPI bus.

Nearly all examples you find are for the MPC3008 which is a 4 channel device and the code for that certainly doesn't work with the MPC3002. There also seem to be lots of examples around that don't work either, but there is one that I can confirm works and its code can be found here.

With this code you can easily read two channels in and use the results. My example is going to use one for the Volume and the other the date selection. I did at one point also have a rotary encoder installed but a single turn volume is more fitting and with the frequency selector it also meant that I could assemble it all and then just tune the locations of the year markers with a great big case statement. Naturally pyhon doesn't support the case statement so a long if then else if statement will do the job.

The picture shows the MCP3002 sitting on a small prototype board and the 10K pot

Step 8: Power Supply and Control

The Pi just runs off USB power so very easy to get going, however you'll end up corrupting the SD card if you just yank the power. There are lots of ways to monitor a button press and initiate a shutdown, but then you tend to have to power cycle to get it back up. To get around this and make an easy to use project I use the Pimoroni ON/OFF shim.This lets you press once and it powers up and then a long press and it will run a clean shutdown. To make it a little bit portable as well I use an old power bank which handles the battery charging as well. Powerbanks are plenty cheap enough and capable of running the Pi for a fair while.

I fitted the push to make button fittingly in the location where the old mains power lead came out the back. As there is a delay while the Pi boots up I hard wired a LED into the 3v3 rail which comes on and soon as the PI gets power and provides a nice authentic glow on the dial. I put a 270R resistor in line and the other end just to ground. You could also add another to a GPIO pin if you wanted to give extra effects such as flickering, but for now this does enough to show that the power is on.

Step 9: Fitting Out the Case

With the case and chassis all ready and tested it was just a few 4mm bolts and Nyloc nuts to keep it in. Flanged self tapping screws keep the back in place.

The Power button also fitted nicely into the old mains lead hole.

I also wanted to re-use the old knobs and they were originally designed it seems to go onto brass rods and were slightly too large for the pots. As this isn't going to be getting any rough handling, I just slipped some heat-shrink over the pots and then glued the knobs onto that. It grips nice and tight and you can still take it apart if necessary.

Step 10: Downloading the Sound Files

I'm using MP3 files and there are a fantastic selection from , you can find grouped broadcasts of wartime broadcast and there are mainly two selections to choose from.

I started with the mainly news selection and these are then copied into directories on the PI. You can also find the larger selection, called the Big one on following link. There are several hundred broadcasts for each year and it is quite amazing the amount and range of these.

Larger collection

I use Filezilla as an easy way to transfer these to the Pi as it can login and transfer using SSH, so there is no need to setup a SAMBA drive or an FTP server.

Step 11: Circuit and Software to Play the Files

Once you have the amp working and you can follow the setup link below for that you will also need to install the mpg123 player, pretty straight forward google search for that the Python code is below. Just make sure you have i2s and SPI enabled in your Raspi Config. I have put this file into the directory /home/pi/volume/ so that i can run it on bootup later.

#!/usr/bin/env python
# WW2 Radio - software to read MCP3002 ADC and convert to volume and year adjustment
# Ouput via i2S amplifier 20/10/2018 - Ajax Jones
# Code fragments supplied from
# MCP 3002 Python

import RPi.GPIO as GPIO, time, os
from os import listdir
import subprocess
from time import sleep
import random

# read the SPI data from the MCP3002 chip, 2 possible adc's (0 and 1)
def readadc(adcnum, clockpin, mosipin, misopin, cspin):
    if ((adcnum > 1) or (adcnum < 0)):
        return -1
    GPIO.output(cspin, True)
    GPIO.output(clockpin, False)  # start clock low
    GPIO.output(cspin, False)     # bring CS low

    commandout = adcnum << 1;
    commandout |= 0x0D            # start bit + single-ended bit + MSBF bit
    commandout <<= 4              # we only need to send 4 bits here

    for i in range(4):
        if (commandout & 0x80):
            GPIO.output(mosipin, True)
            GPIO.output(mosipin, False)
        commandout <<= 1
        GPIO.output(clockpin, True)
        GPIO.output(clockpin, False)

    adcout = 0

    # read in one null bit and 10 ADC bits
    for i in range(11):
        GPIO.output(clockpin, True)
        GPIO.output(clockpin, False)
        adcout <<= 1
        if (GPIO.input(misopin)):
            adcout |= 0x1
    GPIO.output(cspin, True)

    adcout /= 2       # first bit is 'null' so drop it
    return adcout

# Use these pinouts for the raspberry pi zero
SPICLK  = 11
SPICS   = 8

# set up the SPI interface pins

# Note that bitbanging SPI is incredibly slow on the Pi as its not
# a RTOS - reading the ADC takes about 30 ms (~30 samples per second)
# which is awful for a microcontroller but better-than-nothing for Linux

# list year , this retrieves a list of files from the specified directory and returns the list
def list_year(radio_year):
        war_dir = '/home/pi/radio/WWII_News_'+radio_year
        mp3_files = [ f for f in listdir(war_dir) if f[-4:] == '.mp3' ]
        if not (len(mp3_files) > 0):
                print "No mp3 files found!"
        return mp3_files

print "--WW2 Radio ---------------------------------------------------------------"
last_read = 0   # store the last position of the volume pot
last_year = 0   # store the last position of the frequency pot
tolerance = 5   # allow a small tolerance so slight movement of the pots doesnt cause a change

while True:
        trim_pot_changed = False
        year_pot_changed = False

        for adcnum in range(2):
                ret = readadc(adcnum, SPICLK, SPIMOSI, SPIMISO, SPICS)
                if (adcnum == 0):   # read the pot for the year selector to see it has moved
                        year_adjust = abs(ret - last_year)
                        if ( year_adjust > tolerance+10):
                                year_pot_changed = True

                        if (year_pot_changed):    # Values for the if then checks can be made after its built
                      ['killall', 'mpg123'])   # kill any MP3 running
                                if ret <=50:
                                elif (ret >50  and ret <150):
                                elif (ret >=150 and ret <250):
                                elif (ret >=250 and ret <350):
                                elif (ret >=350 and ret <450):
                                elif (ret >=450 and ret <550):
                                elif (ret >=550):

                                # save the value of the pot for the next time around the loop
                                last_year = ret
                                print ("Playing from "),
                                print (war_year),
                                print (" number of files="),
                                war_dir = '/home/pi/radio/WWII_News_'+war_year+'/'
                                play_list = list_year(war_year)
                                num_of_files = len(play_list)
                                print num_of_files
                                play_file = random.randint(1,num_of_files)   # randomly select one of the files to play
                                war_mp3 = war_dir + play_list[play_file]

                                subprocess.Popen(['mpg123', war_mp3])  #  Use mpg123 as the player for the audio
                                sleep (0.1);   # provide a slight pause before continuing

                if (adcnum == 1):   # read the volume pot
                        pot_adjust = abs(ret - last_read)
                        if ( pot_adjust > tolerance):
                                trim_pot_changed = True

                        if ( trim_pot_changed ):
                                set_volume = ret / 10.24      # convert 10bit adc0 (0-1024) pot value into a 0-100 volume level
                                set_volume = round(set_volume)# round out decimal value
                                set_volume = int(set_volume)  # cast volume as integer

                                # Use the value from the pot to send a level to the amixer prog
                                print 'Volume = {volume}%' .format(volume = set_volume)
                                set_vol_cmd = 'sudo amixer cset numid=1 -- {volume}% > /dev/null' .format(volume = set_volume)
                                os.system(set_vol_cmd)  # set volume

                                # save the potentiometer reading for the next loop
                                last_read = ret

                        # A pause after changing the volume so we dont act on too many changes if the pot changes fast

Step 12: Auto Boot the Software on Load

There are many ways to run a command on the Pi on bootup, but I find this the easiest, Open up Crontab

<p>sudo crontab -e</p>

Now just add this line

<p>@reboot python /home/pi/volume/ &</p>

and that should do the trick, next time you reboot the Audio control prog will run and you should hear your first broadcast.

Step 13: What Next?

I'm currently in the process of building out a small PCB to sit on top of the raspberry pi so that I can have somewhere to mount the i2S amplifier and the ADC along with some screw terminals for the pots. This will let me make the install a bit neater and easily make a few more for friends.

I'm currently collecting some files at the moment for a space race radio, starting with sputnik and onwards through to the moon landings.

Please let me know if you have any ideas or want any tips or hints about putting one together yourself.

Signing off.

Audio Contest 2018

Second Prize in the
Audio Contest 2018