Raspberry Pi radio alarm clock - part 1
Tags: iot, raspberrypi, hack, retro
Published: 2021-05-20 08:19:19

---
title: Raspberry Pi radio alarm clock - part 1
published: true
description: Teardown and feasability study of upgrading a mid-1980s Sanyo radio alarm clock to an IoT device
tags: iot, raspberrypi, hack, retro
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jumokqu8a8grbseodgcv.jpeg
---

## Introduction

{% soundcloud https://soundcloud.com/nocrowdsurfing/john-peel-festive-fifty-1985-1 %}

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jumokqu8a8grbseodgcv.jpeg)

I've had this Sanyo RM5005 radio alarm clock since my 13th birthday back in 1985. It replaced a second-hand Morphy Richards model with a flip display. If you're not familiar with flip displays, they look something like this:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rrnrzs3wywlycl80bwtx.png)

Anyway, it looks like the Sanyo was available in brown (or wood-effect?), black, or like mine, a white, which has now aged to a vaguely yellowish hue. A working model will set you back about £20 from the usual places, unless you happen to chance upon one in a charity shop.

I don't really want to part with this reminder of my youth (especially as it still works), but maybe doing a hack project on it would justify keeping it around?

So, the plan is to replace the innards with a Raspberry Pi. I thought the Zero WH would be a suitable board to use. They're small, cheap and more than capable of running an internet radio client and network time protocol client.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jqcx8660jlyugeb4qg5a.jpg)

## Initial teardown

Here's where it gets fun. I took many things apart as a child, as my Dad trained as an electrician and I was interested too. Unfortunately, most of things I dissassembled never worked again afterwards. Hopefully this won't be the case here.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hkpm8ksvse0evfj28www.jpeg)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k30t4k9z3ymlzg7ta15i.jpeg)

Like I say, this still works perfectly, but isn't it just a matter of time before one of those capacitors goes bang, and the magic smoke that makes the radio work escapes? We'll be ditching all of the power supply and circuit board, except for the speaker and LED display module, if we can salvage it.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k715o3z5qr44eg7js2ln.jpeg)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5l0g5h1hc90xyzd0j4ol.jpeg)

## But would the Pi Zero fit?

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2fu9th6f3vpojgxvcwj9.jpeg)

Looks like that's a yes. The amount of space prompted me to start thinking about adding an SSD for increased storage. Why not add the backup from my old iPod and turn this into a media server too?

## The tuning dial

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mgn4799kuntmhng7asad.jpeg)

A hi-tech solution of a plastic wheel, a small spring and a loop of cotton kept this thing in tune for over 35 years!

## The 7-segment LED display

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h2ozdv9jbsi5lj4xrjal.jpeg)

We will need to desolder the LED display or source a compatible module. It's a Sanyo SL-1042-27T. It's a very thin module, so I suspect the driver gubbins is on a separate chip. I know very little about driving LED modules, so at this stage I don't know if I can just [bit-bang it from a Node.js script](https://www.npmjs.com/package/rpio) or what.

In fact it turns out the whole clock radio experience, including display driving, is provided by this [3M3 LM8560](https://hubtronics.in/electronics/1434) chip:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/am3l19q0n9krxve25qhp.jpeg)

It looks like these will today set you back a whopping 60p each! Here's the [datasheet](http://www.paulanders.com/G5-LED/ver1/datablad.pdf) in case we later need pin-outs etc.

## The speaker

Another outstanding question is: can we drive the speaker directly from a pair of GPIO pins, or do we need to source an [audio module](https://thepihut.com/collections/adafruit-breakout-boards/products/adafruit-mono-2-5w-class-d-audio-amplifier-pam8302) (or 'hat') for the Pi?

## Next time

Booting and configuring the Pi.