lördag 21 november 2015

Kitchen Radio

My mother-in-law has got a small combined radio and CD-player that is mounted under the top row of kitchen cabinets, over the work bench, in her kitchen. My wife would like something similar, to replace the normal radio we have on a shelf in the corner of our kitchen opposite to our stove and work bench (i.e., our old radio was far away from where we do the cooking).
However, I wanted to take a stab at making something cooler, so I started to collect stuff:

Ingredients

* one Raspberry Pi 2
* one official Raspberry Pi touchscreen (7 inches)
* one Pimoroni Raspberry Pi Official Touchscreen Stand
* one IQaudIO Pi-DigiAMP+
* one 15v Power Brick (50 W / 3.3 A)
* one DIY kit for a pair of Jeff Bagby's "The Quarks Micro Desktop Speaker"

Preparations

This is not my first Raspberry Pi, so it in itself didn't pose any challenge. To assemble and attach the touchscreen was trickier. You need a steady hand and some guts but I have a suspicion that the flimsy flat cables and plastic contacts might be sturdier than they look.

Note that when installing an OS on the Pi, you need to have another monitor attached to it as most distributions doesn't support the official Touchscreen out of the box (nor do they support the DigiAMP+).

When attaching both the touchscreen and the DigiAMP, without any extra spacers and screws than the supplied ones, a bit of creativity is required. However, since the GPIO pins secure the DigiAMP to the Pi on one side, I could borrow some of the spacers from that side to secure the touchscreen instead.

After messing around with both Rasbian and OpenElec, I settled on OpenElec. I recommend that you begin with the OpenElec image for the Raspberry Pi 2 supplied by IQaudIO as it comes pre-configured with DigiAMP support (and very wisely adjusts the volume of OpenElec in order not to blow the speakers out on the first bar of the first tune you play). You then upgrade that base installation with the "Milhouse" tar-ball for the Pi 2, which comes with touchscreen support. However, I first tried the OpenELEC-RPi2.arm-6.0-Milhouse-20151009210341-#1009-ge2b6fef.tar build and in that one, the audio stuttered in a weird way when playing videos - kind of with a weird Doppler-effect. To solve that, I bought the Raspberry MPEG-2 and VC-1 licenses to enable hardware video decoding - but that didn't help. Instead, the problem went away when I upgraded to the OpenELEC-RPi2.arm-7.0-Milhouse-20151120231902-#1120-g297af74.tar build (so now I don't now whether the licenses helped or not and am too lazy to disable the licenses to check. In any case, the licenses might come in handy if I ever want to watch some more demanding video-encoding on the kitchen media centre). 

The touchscreen stand is worth a few comments as well. It is quite nicely done although it requires some puzzling to assemble. However, due to the Pi ports, they've chosen to design the stand so that you have to put the touchscreen upside down in it. This is not entirely ideal, as I got the impression that the viewing angle is better when it is not upside down - but I might be wrong here. In any case, you have to make the Pi flip the image to match the alignment of the touchscreen in the stand. My first try involved putting "display_rotate=2" in /boot/config.txt. That did rotate the screen image - but not the touch points of the screen... Imagine my surprise when poking the upper left area of the screen and the lower right area of the image reacted. To flip both screen and image, instead put "lcd_rotate=2" in /boot/config.txt.

Now we are only missing one thing - easily touchscreen accessible volume controls, something that is simply missing in the default skin Confluence (although I find that skin the more elegant one - guess I cannot have it all). So far, the best skin for controlling volume with the touchscreen is the re-Touched one. The trick here is to find a version of re-Touched matching your version of OpenElec. I ended up with skin.re-touched-3.1.0.zip from the re-touched github repository.

Result

After having built the speakers as well (but not finished them! If you look at the pictures, they aren't closed yet but only held together with rubber-bands as I want to resolder and rearrange the filters in them somewhat - but I was too impatient and wanted to try the set-up out first), we now have a fully working kitchen radio solution where we can listen to our own ripped CDs, Swedish radio as well as German and New Zealand radio (pity that they don't talk much but mostly just play music in the NZ-night time radio we get here during our daytime) and, as a bonus, YouTube videos as well!

The speakers are pretty cool. They have a full, crisp sound for their size and pair up well with the DigiAMP+. Turning the volume all the way up doesn't seem to blow the speaker but it sure gets loud, much louder than we need (except perhaps for when running the dishwasher, blender, mixer, extractor fan, and frying something violently sputtering on high heat).

So far, a really successful project with endless potential for future improvements and extensions! Much, much cooler than a fixed kitchen radio and CD-player. ;-)
 

1 kommentar: