Monday 16 March 2015

RiscPiC - a bit late, but here it is.

2014 saw the 20th anniversary of the launch of Acorn's RiscPC, and to celebrate the event I fired one up.  It still worked, and still didn't thrash its hard disc just because I asked it to open a menu, which I was able to do without moving the mouse pointer all the way to the top of the screen somewhere.  A subseqent conversation with other members of the Bristol RISCOS user group, in the pub, naturally, led to an idea - why not put a Raspberry Pi, running RISCOS into a case that looks like a little RiscPC?.  Both myself and Vince Hudd decided to tackle the project,  You can buy Vince's professionally 3d-printed designs at most RISCOS shows, and soon from riscpic.co.uk.  I opted to use my own, rather basic "glorified glue gun" type printer and try for something more like a scale model of a RiscPC.  Here's my first attempt, sat atop a real one.  The scale is 2:5


The case is in 2 parts plus lid and front flap. The front overhanging bit slots vertically into the main case.  It seemed easier to do it that way rather than printing the whole thing with huge amounds of support material to remove.  Sadly the fitting turned out to be not quite right and the sideways pressure has split the main case - you can see that on the left-hand side.  Also, although the front flap does open, it doesn't open all the way.  Inside is a Raspberry Pi, SATA-USB adaper, 120GB SSD, USB hub with added power from which the sockets have been removed and remounted on the front and rear (2 behind the front flap) and a power distribution circuit board.

I'm now on the 3rd prototype.  I'm not sure I can regard it as finished, but I'm unlikely now to make another.  This time I did do the box in one piece and had great fun (!) removing the support material. The front flap now opens fully,
Flap open.  Note the SD card slot on the side.
Flap closed



Here's what's inside.  It all works rather well.  Raspberry Pi (model B) is on the left, SSD on the right, power distribution circuit (with the fuseholder) at the top.  USB hub is above the Pi's network port.  Network cable goes in through a big hole in the case rear then has to bend rather sharply to get into the socket.  That's not ideal, but prevents the need for another big hole in the side.

Sunday 15 March 2015

More PiFi Updates.


With the recent launch of the Raspberry Pi 2, with it's 4-core processor and more memory, I had to see if it would make Logitech Media Server run a bit more snappily.  Using it with the PiFi also meant getting a new DAC board, since the original HiFiBerry that I have won't fit the pins of the new Pi2 layout (which is the same as the B+).  I decided to try the IQaudIO Pi-DAC+ just to be different.  I've no complaints about the HiFiBerry I've been using, and I've no reason to believe that the latest offerings from them are inferior to the IQaudIO device (they use the same chip at least), I just thought it was worth trying the competition since the cost of the thing wasn't exactly going to leave me starving if I hated it and had to buy something else.  I don't hate it, it sounds lovely.  Better than the original HiFiBerry (which uses a different chip to the current ones, so don't conclude anything from that) and better than my CD player.

I've also done a new cradle for the Pi2 and SSD - in tasteful mauve.  This also meant printing another back for the glowing badge - there it is at the top of this post..


The two buttons are also new.  The green one switches the power on, the red one asks the Pi2 to shutdown nicely.  When the shutdown finishes, the power goes off automatically.

You can see the circuit board a bit better in this photo.  It communicates with the Pi2 by means of a couple of GPIO pins.  The shutdown request generated by the red button goes to a pin which is monitored every 5 seconds by a little Python script.  If that pin is high then it sends another pin high, and issues a "sudo shutdown -h now".  The power control circuit ignores that event, but, when shutdown has finished the Pi2 sends all the GPIO pins low and the falling edge is used to shut off the power.  If any of my legions of followers request it, I'll post some more detail about that.  Might just do it anyway.


Meanwhile, the back panel has also changed - I've used these two connectors from Maplin.  I'm considering splashing out on some Lumberg 0332 series DIN connectors, but for now these are much better (IMO) than the standard coaxial power connectors (that's the 2-pin one on the right) and those ghastly RCA phonos.  You noticed, perhaps, that I removed them from the DAC board?  Audio out is now from a right-angle PCB header underneath the board to the 3-pin socket on the left in this photo.

The photo below shows a side view, and you can see the two thin wires (red & white) which connect the power control board to the GPIO pins.  Rather than mess with more header pins, I simply soldered them on and used a PCB header on the power control board to allow me to disconnect them.

On the software front, it's much the same.   The major difference, and a vast improvement, is that the SSD now has 2 partitions - its still mostly a big NTFS partition to store the music files, but there's now a small (4GB) ext4 partition for the Linux rootFS - i.e. the operating system.  Once the basic kernel is loaded from the SD card, the rest of the boot sequence is done from the rootFS partition on the SSD.   The NTFS partition is the first one, so the USB lead to the SSD can be plugged straight into a Windows PC for rapid file transfer.  Thanks to Sam Hobbs for the tutorial on that subject.  I've moved the DHCP and DNS duties for my home network onto another Pi (well, I had a spare now). There is still a DHCP server and DNS on the PiFi which now only looks at the WiFi interface as it is needed to connect wireless devices to control the PiFi when no wired network is available.

Finally, to answer my initial query, yes, the Pi2 is a very worthwhile improvement.  Not only does it boot up much quicker and scan the library a lot quicker, it responds noticeably more snappily to navigation requests, especially when using folder navigation.