Retro Radio Riddle [M3R3]

Introduction: Retro Radio Riddle [M3R3]

The "Retro Radio Riddle" (original in german: "Retro Radio Rätsel") is a project created in the course Multimodal Media Madness at the RWTH Aachen in Germany.
Its original purpose is to be part of an escape room. But the use may differ depending on how you build it.

Its design is meant to be based on a steam-punk design, which also should be the theme of the whole room. This led us to the idea to realize the project with an old-fashioned radio, which noise should be included in the riddle. If you prefer a radio in a newer design, feel free to modify it.

As you can guess from the name, this isn't an ordinary radio but it acts like one. If you turn it on, it plays a white noise like a radio until you choose one of the custom made frequencies. As close you set the frequency, the noise will reduce and you can hear voices and sounds like on a radio. But these voices don't tell you the traffic jams or the weather, these voices speak to you and asks you a riddle. When you are successful solving all the riddles by using the three backlit buttons, a secret box will open on the back with a key, possibly for the next riddle in the escape room. Or a cookie!

And that’s how to build your own Retro Radio Riddle:

Step 1: Get an Overview on What You Want to Realize

In our case we decided to purchase this radio, so we only had to focus on the inside - the core.

Since we keep the radio functions with the fader and speaker, they are the key to get asked a riddle.
But we changed the functions of the buttons from the radio to act as input keys for the riddles. Because we considered the former background lights of two buttons as boring, we changed them into RGB, which offer an additional support for the riddle.

As the heart of the radio we chose a Raspberry Pi B+, supported by an ATMega328, which should be responsible for the buttons, LEDs, servo (for the secret box) and some key functions of the riddle.

The Raspberry offers a lot of processing power yet is small enough to find its place in the case.

Based on these input and output possibilities we created some riddles, each with a unique way to solve. These can be found in the additional PDF "riddles".

Step 2: Open the Radio and Remove Unnecessary Parts

Since we have an idea which parts are necessary, let's get rid of those we have no use for anymore.
Which is quite much. In fact everything despite the speaker, the display, the buttons (the ones you are actually seeing), the potentiometers and, of course, the screws. And since we'll need some more current than the transformer offers, we also can remove the small 0.6 A transformer.

The radio will be quite empty right now, which leads to the next part:

Step 3: Getting the New Parts

As mentioned earlier, we got:
- a Raspberry Pi B+

- an ATMega328 (sometimes called AVR)


- TDA2005 as amplifier

- MCP3002 (an Analog-Digital-Converter)

and in addition:

- some resistors and capacitors

In the following there are the reasons we decided to use each of the components:

Step 4: First (smaller) Circuit Board

Because the old circuit boards were not usable for further work we had to design our own which meet our requirements. You should pay attention to the spots of the screws and LEDs, because they should be compatible with the old parts and the case. We needed to drill the holes in the buttons a little bigger, because the RGB LEDs were a little bit bigger than the former ones. Because of the three RGB LEDs for the buttons, and an additional fourth one as display backlight, which should be able to light in all possible combinations and colors, we decided to use a micro controller to get all informations about the buttons, some key functions of the riddle, control all LEDs and to control the position of the servo which is responsible for the close mechanism of the secret box. Since the servo is only controllable by PWM and the Raspberrys' PWM function is already in use for the built in sound, this was an additional motivation for a micro controller. All those components are accessible by the "Serial Peripheral Interface" (SPI) with the AVR in slave mode and the Raspberry in master mode, by sending two bytes to the AVR and one byte in exchange to the Raspberry in the same time. Because of the multiple ports, interrupts and the interfaces for PWM and SPI, the ATMega328 works fine. You may feel free in using your own codes, but we decided to use the first nibble (four bit) of the two byte to specify different functions and the other three nibbles as parameters:

⦁ 0x0: Keep current process, parameters will be ignored, just for getting update about the buttons and the flags

⦁ 0x1: Static LED light, every three bits control one LED (RGB) beginning at the LSB

⦁ 0x2: Running Light forward, parameters control the start position

⦁ 0x3: Running Light backward, parameters control the start position

⦁ 0x4: Rotating Light, parameters control the start position, but changes only occur on the same LEDs (repeat after three steps)

⦁ 0x5: Rotating Light backwards

⦁ 0x6: Auto: parameters are a mask for all LEDs, which will light up when the responsible button is pressed

⦁ 0x7 - 0xE: Reaction test: parameters will be ignored; may get divided in different, not implemented yet functions

⦁ 0xF: Set servo position by parameter

The byte you'll receive as answer is structured like this:
The first nibble (first four bytes, starting with the MSB) is used for the following flags for the reaction test (which isn't fully implemented yet in the software on the Raspberry):

⦁ Bit 7: 1 if all LEDs are in same color, 0 else

⦁ Bit 6: 1 if any key is pressed until all LEDs light in same color, 0 else

⦁ Bit 5: 1 if any key is pressed while all LEDs light in same color, 0 else

⦁ Bit 4: 1 if Reaction Test was started and is running, 0 else

And the further nibble gives information about the state of the pressed buttons:

⦁ Bit 3: 1 if Button 4 is pressed (predefined for a switch for an internet radio function, not implemented yet), 0 else

⦁ Bit 2: 1 if Button 3 is pressed (most right one), 0 else

⦁ Bit 1: 1 if Button 2 is pressed (middle one), 0 else

⦁ Bit 0: 1 if Button 1 is pressed (most left one), 0 else

We created our circuit boards with a pcb-mill. The files we used are also uploaded. To make it more easy to update the software of the micro controller we built in the "In System Programmer" (ISP) interface on the circuit board. A pinhead for the servo, for the fourth button and for the fourth LED are placed on it like all pull-down resistors for the Buttons and series resistance for the LEDs.

Step 5: Second (main) Circuit Board

The second circuit board adopts the function of the old main board including an amplifier for the sound output of the raspberry, which is controllable by the logarithmic potentiometer (also used for volume control before) with switch on/off function. We decided to use this switch function only for the amplifier to avoid a long booting delay of the raspberry but to make the radio noiseless when switched off.
A secondary potentiometer is responsible for setting the frequency. Since the Raspberry has no built in Analogue-Digital-Converter (ADC) we used the MCP3002, a two channel ADC with a 10 bit resolution, also accessed by SPI. Since we only need one channel we implemented it to take the difference of both channels, but made it possible to use the second channel for future purpose with a pinhead and a jumper, which connects the second channel to ground.

Pay attention to the position of the potentiometers! We decided to reuse the old ones and measured their old positions and the positions of the screws.

Since the old 0.6 A power supply would be too less to power all our devices we decided to use a 2 A power supply. But after some drafts for those supplies we decided to use an old switched 2 A power supply which offers each 1 A for 5 V (used to power the Raspberry, ADC, AVR and LEDs) and 1 A for 12 V (used for the amplifier). Measuring all parts and drawing them into the PCB-software takes much time. But if you drew the components and the circuit, routing the circuit board is done very fast!

Because our amplifier delivers much more electric power than the built in speaker is able to work with, we decided to use an trimmer to limit the output of to avoid damage of the speaker. As soon as the circuit boards are milled, you have to solder the parts onto the boards, which takes a while. Once everything is ready you can put it back into the case, connect all connections which are prepared by plug-connections.

Step 6: Building the Secret Box

The secret box is placed in the back of the radio. Because the box should open on its own, we put there a joint with a servomotor in. We lasercut the box as well as the joint from a 3 mm thick MDF board. The box got glued and the servomotor and the joint were screwed in. The vector graphics for the box and the joint are attached, so you can lasercut it yourself.
The side of the box, which you can see from the outside was cut out of the former back plate of the radio, so it stays hidden a little longer.

Step 7: The Software

The AVR is programmed in C and flashed with a programmer. Pay attention to program the responsible refuse bit to avoid the prescaler of the micro controller to prescale the 8 MHz to 1 MHz, because this makes problems for the Raspberry to communicate with the AVR. Unfortunately it's not done by a line of code but through an interface of your IDE (AtmelStudio in our case). We recommend you to read the responsible part in the datasheet of your used micro controller!

Since we wrote the code for the riddle in Java, the hardest part was to develop the software/drivers to communicate between the Raspberry Pi and the ATMega, to get the information of the buttons and potentiometers as well as to light the LEDs.

Writing the drivers in C using the library wiringpi was very easy. That's why we built our tools for testing first in C.
We uploaded the software, so you will get an idea on how you do it by yourself or you just take our files. Using JNI it was possible to access the driver through Java, even if Java is platform independent. Constructing an object orientated interface around it, we made it possible to implement all functions at the same time.

Nevertheless these are the things we implemented:

- First there is a noise, just like in a real radio

- If a Player moves near one out of six frequencies, he will hear a background noise at first, that turns into a voice, which asks him a riddle or just gives him hints.

- If there is a question on the current frequency, the player is able to answer it using the buttons on the front.

- When all questions on the different frequencies are answered correctly, the box on the back opens and the player get the reward like a key or a cookie. Just as you wish.

When the software is finished, put it on the Raspberry Pi and the micro-controller, close the radio and start to riddle!

Step 8: Recording Audio Files...

To keep our code simple we used the standard library of Java for processing audio input files. That's why we recorded the riddle sounds in audio/wave format. Since the original riddle was recorded in German only, we just can provide the attached German examples. Additionally we used some background. We added an sound effect of a tube amplifier to make it sound more authentic, but the bad sound quality of the built in "sound card" of the Raspberry already makes a good noise for our retro radio. Feel free to use your own background sounds. Maybe some old-fashioned music does it, too! Or sounds of a recorder/tape. To tide over long bridges after listening to the riddle at some frequency without any input we recorded some random comments (r1.wav - r10.wav in the ZIP), which can be played for every frequency if it matches.

Be the First to Share


    • Fabric Challenge

      Fabric Challenge
    • Meatless Challenge

      Meatless Challenge
    • First Time Author Contest

      First Time Author Contest