Sunday, 2 March 2014

Pi-Server is dead, long live Pi-Fi

With the addition of a HiFiBerry DAC board from Crazy Audio and a USB WiFi adapter, my Pi-Server is now a stand-alone Hi Fi audio source which provides it's own wireless network so that it can be controlled by anything with  WiFi and a web browser.  I've also replaced the USB flash drives with an SSD.

I've written the whole thing up in a bit more detail, although there's nothing about the software set-up process (might add that if anyone asks).  It's on my ancient blueyonder personal web page here, which also shows an intermediate stage with a USB hub and 4 flash drives that I never got around to mentioning before:

Erm, edit: Blueyonder (i.e. Virgin Media) have scrapped their users' personal web sites, so this no longer exists.  -I.N. July 2020.

http://www.ian-nic.pwp.blueyonder.co.uk/PiFi

Oh, and it now has a new, glowing badge.


Monday, 27 August 2012

Pi-Server has a case. Sort of


I happened to have some transparent plastic around, salvaged from a water bath that was no longer needed, so I made this.  It's not the neatest job in the world, but it keeps the dust off and is well ventilated.  I did intend from the outset to leave a small gap at the top, it's not evidence of poor measuring leading to insufficient room for the USB flash drives..

Thursday, 23 August 2012

Pi-Server Update

Still haven't made a cover for it, but I did  buy a couple of Sandisk Cruzer Slice USB flash drives - 64GB each.  With their outer covers removed they will fit into the USB ports of the Raspberry Pi, and are able to store all my music between them with a few Gigs left over - plus whatever's free on the SD card.  No moving parts, no laser modules to fail and all controllable from a handy little remote, a tablet PC, smartphone or anything that will run a web browser.

Wednesday, 13 June 2012

Pi Server

Back in February I registered my interest in the Raspberry Pi, an inexpensive computer supplied as a small PCB with no case, based on ARM system-on-a-chip, which boots its OS from an SD card. It has 2 USB ports, ethernet, HDMI out, audio out, power in and some GPIO connectors to connect it to whatever you want. It is intended, at first, that it will run Debian Linux. Shortly afterwards, I was invited to place an order. A couple of weeks ago, it arrived.

It wasn't too hard to get Linux running on it, using a flat screen TV via the HDMI port and a USB wireless keyboard & mouse. The TV also has a USB port, which provided enough power to run the Raspberry Pi and the USB K & M.

I'm a complete newbie to Linux, and have had very little exposure to Unix (and none as a sys admin), so the first week all the time I spent with it was used getting some basic functionality out of it. Starting SSH and installing VNC turned out to be fairly simple, and removed the need for the keyboard, mouse and TV, since they allow me to use it remotely from another PC on the network, or even an Android tablet, it turns out.

Then I learned that Thomas Ruehl has got Logitech media server (and a selection of other media servers) running on one, which raised an interesting possibility. I have a Squeezebox duet, served from a PC in the next room, but the idea of using a tiny, low-power, low-noise, low-cost computer to do the job instead was very appealing.

I downloaded the SD card image, wrote it onto a card and went through the setup procedure, using an old 40GB 2.5" drive in a USB case with some MP3 files as the music library. This worked very well, but 40GB isn't big enough for my music collection, which is mostly flac files ripped from my CDs. I have all of these on an external 3.5" USB drive and set up this as the music library, which also worked well. I wasn't happy with that solution though as a) that drive also holds a backup of my digital photos and b) it runs off a 12V supply. The Raspberry Pi needs 5V so if I were to use a 3.5" drive for my music server I'd need to use 2 power supplies or an over-rated 12V supply with a regulator to give 5V in addition.

I considered getting a SSD, so there would be no moving parts and no noise at all, but rejected the idea as I wanted to keep costs down. Using a 2.5" drive seemed the better option, then I'd just need a 5V supply big enough to power both devices. I have one of those - it used to power an external SCSI magneto-optical drive and is rated at 5V, 2.5A. More than enough. A quick visit to Ebay got me a nice little Freecom 160GB USB drive, big enough to hold all my music with a bit of expansion room

Construction
Holding the Rasperry Pi board is a little awkward.  2 of the corners have some sort of connector in them and there are no convenient mounting holes.  My solution was to make some pillars out of plastic rod, attach them to the lid of the USB drive case with countersunk screws from the inside, and cut suitable slots in them so as not to interfere with the connectors whilst allowing the corners of the Raspberry Pi board to be held.

A length of sheet steel (actually from part of an old PC case) forms a mounting plate for the power input, fuse and switch. It was bent along the edges for rigidity, except for a section at each end which wrap around 2 of the plastic pillars to hold it in place.  The power connection to the Raspberry Pi board is made directly to the supply decoupling capacitor, bypassing the boards thermal fuse.  An alternative fuse is therefore a good idea.


Here's the back of the USB drive - I just used a short (ish) USB lead to connect to the Raspberry Pi.  The power lead to the USB drive shares the power supply to the Raspberry Pi.


I've also drilled & tapped the top ends of the pillars, so I can add a lid, or even a complete cover, later.

It is working very well, no hiccups or dropouts and is very quiet.  As soon as I can get my hands on another Raspberry Pi, I'm going to leave this one dedicated to being a Pi Server.

Thanks to Thomas Ruehl for his excellent work with the software, Logitech for keeping their media server software open source, the Raspberry Pi foundation and ebay user expressit for getting the USB drive to me very quickly.

Sunday, 30 January 2011

Adventures in DIY Hi Fi

Introduction

I meant to keep a blog of a couple of little projects I've started (and sometimes finished) over the last couple of years but never quite got around to it until now. As a result, this first post will be a bit long and probably tedious. I may post updates later on some other things which I've started earlier, so this isn't going to be quite as chronological as the term "blog" might suggest.



Bi-Amping Speakers
My most recent bit of tinkering has been to do with bi-amping my Tannoy 638 loudspeakers. I've always liked the idea of active speaker systems, and had some success at DIY bi-amping with my previous speakers, a pair of Mordaunt-Short MS-904s, so when I got the Tannoys I had the idea of bi-amping them as well. Both speakers are pictured right. This turned out to be a little trickier than I'd imagined.

638s are floor-standing 2 1/2 way speakers using an 8" dual concentric driver backed up by an 8" woofer below about 200Hz. Dual concentric drivers are the one genuine reason for buying Tannoy speakers. They're very clever bits of kit, and nothing does stereo imaging quite like them. But they do have flaws, and getting an active crossover that works well with them takes a bit of head-scratching and, unless you're a brilliant electronic engineer (I'm not), some experimentation.

First, I tried the crossover I'd been using with the 904s. That didn't work too badly, actually, but was not quite right. That was a 4th order Linkwitz-Riley, as described here: http://sound.westhost.com/project09.htm but using my own pcb and crossing over at 2.74 kHz - at that frequency, the separation of the driver centres is equal to the wavelength. With that crossover frequency, I'm surprised it sounded any good at all with the Tannoy's, which have a much bigger bass/mid driver, as you can see. Using a lower crossover frequency made the sound utterly dreadful and very "shouty" unless the the high frequency outputs were attenuated a lot - then it sounded muffled. Time to make some measurements.

Below are the frequency responses of the two parts of the dual concentric, 500Hz - 5kHz for the low frequency driver and 1kHz-10kHz for the tweeter. Measurements were made using a signal generator, microphone and oscilloscope and the vertical scale is arbitrary - amplitude of microphone signal relative to signal generator output expressed in dB.

You'll note the massive plateau from 2KHz to about 7kHz - the tweeter output continues to decline, but rather more slowly, up to 20kHz. Then there's the pit of oblivion in the low frequency driver's output at about 1.7 kHz. That would explain the shoutiness of a low crossover frequency and the muffling effect (i.e. no highs at all) of simply turning down the tweeter to try and fix it. A crossover which produces a flat summed electrical output isn't going to fix either of those.

So what to do? Some sort of band-reject filter to selectively bring down the region from 2-7 kHz coupled with an acoustic crossover frequency somewhere just below 2kHz so the tweeter can fill in that big dip and maybe lift the high frequencies above 10kHz a bit seemed like a sensible approach.

A little experimentation with a circuit simulator came up with a crossover whose electrical response looks like this
Which sounded a bit light at the top end. Well, muffled actually. Not surprising as the measured output looks like this


Note how the high frequencies are quieter than the low ones. Still, the great pit has gone although it's still not exactly a flat response even allowing for the attenuated treble. Moving the cut-off frequency of the high pass filter down an octave gave a worthwhile improvement.



That's brought the high frequencies nicely up to the same level as the lows. And that's the state of play as of today. They're sounding pretty good, even despite the ups and downs, notably the peak at 1.25 kHz and the dip at 630Hz. I may do some more tinkering with this, but for now, I'm going to listen to music through them for a while - that is why I did this, after all.

A couple more pictures before I go.

Here's the schematic for the crossover



Here's the Mk 2 version on prototyping board



Here's the double- sided pcb I made for the Mk 2 version



And here it is assembled.