What
A custom-built alarm clock that plays Internet Radio streams to wake you up in the morning. With a web interface, so you can select radio stations, set alarm times.
It uses a Raspberry PI Zero as the main "brains" and an Arduino Nano as a co-processor for controlling the LCD and volume control.
On the I2C/I2S bus is also attached a DS1307 realtime clock module, and a Phat DAC audio module to allow audio output.
It uses a cheap audio amplifier and some speakers bought from Jaycar electronics, that sound alright.
The case was designed by myself using OpenSCAD is 3D printed using a friend's 3D printer.
Why
I have had an AM/FM alarm clock in the past, but then moved on to using Internet radio streams, mainly from either a tablet or phone on my bedside table, as that allowed me to chose a lot more radio streams than just what's locally available over the radio, plus better sound quality.
I wanted to keep that functionality, but not have to depend on my phone or tablet to give me the functionality. I don't think you can buy such a device, so I designed and built one!
There have been many custom-built Internet radio devices I've seen on the net, but none that I could find that can be used as a full-featured alarm clock with GUI to allow setting the alarm time and station control.
I like waking up to a radio station as opposed to a beep or noise, as it is a lot more pleasant usually, and I can listen to talk radio for example, or the news, which kind of helps me to wake up comparably to an annoying noise, but without being annoying.
Challenges and Problems
I've had a few challenges.
One was that the Raspberry Pi Zero does not have audio out. And a USB sound card was awkward to install (though possible). So for tidyness and internal elegance, I went for the Pimoroni pHAT DAC. It was a little complex to set up, involving modifying system files. But i got it working.
I also had to use a hardware Real-Time Clock module, as none of the Raspberry Pis have a hardware RTC with battery backup (something which I hope changes in future). That involved adding the RTC to the Pi's I2C bus and more modifying system config files, to let the RTC set the main system clock. Which works pretty well now.
I haven't done a lot of 3D modelling for enclosures and cases before. One tricky part was accommodating screws to hold components and the whole case together. I printed a few test prints of screw hole sizes to fit the screws that I had. I later realised that I could use screw inserts for screw holders. Oh well, the screw holes seem to work OK. Unfortunately, the main screw holes that hold the case bottom and top together are too small, so the case does not hold together properly at the moment. I may be able to drill out the holes to allow screws to go through.
Internet radio stream URLs seem to be becoming more and more rare. Even just my local ABC radio stream page, has replaced their stream URL page to embedded player pages, just before I finished this project! So now I have to go to archive.org to look up the old stream URLs. Thank goodness for archive.org, but also glad that ABC still lets you connect to their old URL addresses. With apps like TuneIn and others, the standalone URLs are becoming more difficult to find and behind the scenes. But all I need for now is my local ABC stations. But I would like to try other stations eventually.. I'm not sure where to look now! It seems that you have to hunt around..
Nice project! Just wondering why you use a RTC instead if an getting the time from an NTP server