Radio-4-Matic - part 1 - introduction

posted in Electronics by Cargo Cult on Monday January 7 2013

So, there have been vague hintings at a Raspberry Pi project I've been building. It's been functional for a while in its time-travelling lunacy - but first, what the hell is it?

Something one encounters in these western United States of America is the lack of BBC Radio 4. Or rather, the lack of proper live Radio Four, the excellent iPlayer Radio providing invaluable on-demand capability. "But Adam," I hear you cry, "you can already listen to live BBC radio over the internet! Why can't you use that?"

It's 'talk radio', but completely different.

Timezones. It's live radio, but all the timing is wrong. Namely, the written-in-stone Radio 4 schedule must not, under any circumstances, be allowed to become misaligned from the rising and the setting of the sun. How could anything (or anyone) remotely British even think of operating normally if the Friday evening comedy gets broadcast on Friday morning, or if the Book at Bedtime arrives early in the evening? Or heaven forbid, if Woman's Hour escapes from its usual 10am ghetto?

So, short of removing both the North American continent and the Atlantic Ocean in order to make Seattle a suburb of Plymouth, we're going to have to take the existing internet radio streaming and add a timezone-busting delay. Oh, and then wrap the whole thing in a suitably middle-class casing complete with a Royal warrant of appointment. Luckily, we moved west of the Prime meridian, so we can get away without using actual time travel.

Cue the Radio-4-Matic.

Roberts R707

Outwardly, it looks like a typical old British radio, permanently tuned into Radio 4. At 6pm, it provides the Six O'Clock News. Only the 6pm is Seattle-time, not London-time. Waking up can be accompanied by the Today Programme. All very civilised.

Hardware-wise, it's an eBay-acquired 1970s Roberts transistor radio, containing a bog-standard 256MB Raspberry Pi running Raspbian (actually, this exact Pi helped Raspbian get going). The radio has been modified so that the LW, MW and SW buttons provide line-in audio from the Pi's analogue audio-out - VHF still operates as a conventional radio (currently tuned to NPR, no less). Purists may be relieved to hear that hardware modifications to this vintage radio involved snipping one racism-carrying wire from the AM tuner before soldering in two others. Should be completely reversible in about ten minutes, including time waiting for the soldering iron to heat up. I originally intended to replace everything except the speaker, but after discovering how easy it was to pipe in new audio, and how awesome it sounded, I simply didn't have the heart...

Opened up for some exploratory surgery...

Software-wise, it operates a slightly-illicit transatlantic SSH SOCKS tunnel, with the faintly-dodgy get_iplayer and rtmpdump grabbing the radio stream, piping data to ffmpeg for remuxing the AAC-compressed audio from FLV into ADTS. This gets stored on the Pi's SD card as timestamped .aac files, with the basically-ubiquitous mplayer used for playback, started with an appropriate delay - with all of the previous utilities marshalled together with a hideously hacky script written in ... PHP. Stop laughing. Non-blocking file IO and POSIX process management in a command-line program written in PHP? Ohyes! I'm going to rewrite in Python at some vague point in the future. But it's already super-resilient against any particular subsection choking, dying or getting stuck. It'll also probably cope with daylight-savings changes. Probably. It also doesn't record things unnecessarily, such as the World Service overnight.

Plenty of space for the Raspberry Pi to live in...

It's still rather hacked-together (I'm waiting for a USB WiFi dongle to arrive, along with a 12V power supply and a DC-to-DC step-down power supply, to remove all the wires hanging from the back) but it's most definitely functional, and useful. The end result will be a radio and nothing but a radio - except one with this magical eight-hour delay...

Roberts R707, connected to the intertubes!

I'll be documenting the precise hacks involved, both software and hardware - but for now, it's nice to actually describe this thing!

I'll also eventually get round to fully documenting the Timelapse-o-Tron™ one day, too...

Edit 2013-01-09: Now with part 2, hardware!

Edit 2013-01-11 (just): ... and part 3, software. Phew.

Edit 2013-01-12: ... and a surprise appearance on Radio 4 itself. Eek.

Edit 2013-06-30: ... a somewhat belated upgrade to make the whole thing run on mains electricity. Blinking heck batteries last a long time in 1970s hardware.

Sunday Things - urbex edition

posted in Links by Cargo Cult on Sunday January 6 2013

What would we do without intrepid photographers infiltrating abandoned buildings? Probably have to go infiltrating more of them ourselves, of course.

The science of corrosion.
Abandoned biological research laboratories - full set - a M. Anatole Lb has many many other sets on Flickr. Wow.
I was born in Sheffield, don't you know.
Sheffield Town Hall and Courts - full set - while a Mr. M D Allen has more Midlands-oriented rust, demolition and dereliction in yet more sets on Flickr.

I think it's some sort of hairdryer?
W Steel Corporation - full set - randompkguy Esq. brings us some more American corrosion in a wide range of sets. He was already mentioned in the very first Sunday Things, no less.

Bonus Someone's GPU Is Melting corner:

What is a Fluxion and should it Klax like that?

Hello, you either have plugins turned off or an old version of Macromedia's Flash Player. Get the latest Flash player.

OSSITY #4 - KLAXING FLUXION - MY BRAIN IS ALSO MELTING.

Sunday Things - end-of-the-year edition

posted in Links by Cargo Cult on Sunday December 30 2012

Last article of 2012! At this rate, I need to extend the archives to split things into separate years - fifty articles in just over six months? Not bad going...

Astronauts should cut down on the caffeine.

Hello, you either have plugins turned off or an old version of Macromedia's Flash Player. Get the latest Flash player.

Apollo 16 Lunar Rover, in stabilised video - any properly-executed Kubrickian moon-hoax would have taken an anachronistic Steadicam along too. Instead, we must rely on software. via
It's cold outside, no kind of atmosphere... I'm all alone, more or less.
Arctic Technology - brilliantly icy radio antennas, dishes and radomes courtesy of Christian Houge. See also: Barentsburg for some icy, Soviet, Svalbard coal-mining..

... and yet the Enterprise never made it to space.

Hello, you either have plugins turned off or an old version of Macromedia's Flash Player. Get the latest Flash player.

The Space Shuttle - narrated by William Shatner. An hour and twenty minutes of infrastructure and procedure constructed to launch the now-decommissioned Space Shuttles. I've found US governmental stuff to share a certain aesthetic - be it Amtrak, post offices or NASA...
My kind of holiday destination.
The Most Remote Workplace on Earth - the permanently-manned French-Italian Concordia station in Antarctica, over 3km above sea-level. Temperatures? Below -80ºC during winter. Next closest station? 600km away. And nights lasting months on end... See also.

Bonus Audio Extravaganza corner:

Sunday Things - post-apocalyptic, pre-Newtonmas edition

posted in Links by Cargo Cult on Sunday December 23 2012

So, the Mayan apocalypse turned out to be deeply disappointing - and the anniversary of the birth of Sir Isaac Newton isn't quite upon us. Ignoring calendrical differences for the latter, obviously. So what else do we have?

The Sunday Things.

I think I missed my train here...
Mayfield, the ghost station of Manchester - I used to regularly catch trains from Manchester Oxford Road and Manchester Piccadilly, but never knew there was an abandoned third station just nearby. I wish I'd gone exploring that city with a pre-digital camera... via Jason M.
At least one seat is allocated to a Dr. Strangelove.
Inside NASA's Mysterious Rubber Room - deep underneath the launch pads at Kennedy Space Centre lie some strange, disused remnants of the Apollo programme. Rubber-lined corridors and shock-proof blast-rooms, ready to withstand an exploding Saturn V rocket. See also: Mr. Scriptunas' Best Spaceflight Photos of 2012. via Gryn
Quite a ridiculously high polygon count.
Multi-gigapixel panorama of Mount Everest - by David Breashears. Almost too much to look at - an impossibly detailed alien landscape, lifeless except for the insect-like trails of climbers and their colourful detritus on some modern pilgrimage to the highest point on the planet. via

The mechanical meets the biological.
Robots at Work and Play - robots robots robots, robots robots. Robots robots robots? Robots! #35? Baby-faced firefighting segway. Freaky.
Egyptologists have also wondered about the empty sarcophagi at the hearts of the pyramids.
Zwentendorf Nuclear Power Station - near-fully-constructed power plant in Austria, never actually commissioned. flash-free images

Bonus Merry Christmas! corner:

What the Christmas message is all about...

Hello, you either have plugins turned off or an old version of Macromedia's Flash Player. Get the latest Flash player.

The Spirit of Christmas - lovingly told by Cyriak himself. Awww...

Sunday Things - experimental aeronautical edition

posted in Links by Cargo Cult on Sunday December 16 2012

A Sunday Things with a cohesive theme! That's not space! But lots of weird-looking planes instead, courtesy of Wikipedia's list of experimental aircraft. Here are a few picks:

For something nominally designed without aesthetics in mind, still beautiful.
Fairey Delta 2 - the first aircraft to exceed a thousand miles per hour, this graceful beast certainly looks the part.
The Soviets were experts in funny-looking machinery.
Bartini Beriev VVA-14 - of course we need a version of an ekranoplan here. Take its wings off, leave it to decay, then sprinkle it with snow? Perfect. Note to self: the Russian Central Air Force Museum looks well worth a visit. See also: the Lun-class ekranoplan mouldering somewhere else in the former USSR.
MOSTLY PROPELLOR. MOSTLY.
Bell X-22 - the timeline of experimental aeronautics is littered with attempts at vertical take-off. The tiltrotor is one route which has never quite taken off (ahem) - although the V-22 Osprey seems to have finally escaped its long and troubled development...
Fastest plane imaginable! Actually, a bit slow.
Douglas X-3 Stiletto - like some incredible star-fighter piloted by a testosterone-oozing science-fiction hero, this fearsome beast proved disappointingly underpowered. But, it provided design experience for the actual Starfighter...
HELP I THINK I'M GOING BACKWARDS
Grumman X-29 - even the 1980s weren't immune to assumption-busting redesigns. Swept wings, you say? Let's see how they work the other way round! Of course, the Russians eventually built one too...
The Citroën of the aerial world?
Leduc 0.21 - a gloriously French series of experimental ramjet-powered fighters, unfortunately incapable of supersonic flight despite their gorgeous looks. More imagery here.

Bonus Yet More Funny Planes corner: