Review: the PiFace Real-Time Clock

Unhook a Raspberry Pi from the mains and it forgets the time and date. It’ll only get them back again if you re-connect it to the Internet or enter the data manually. As a Pi user who doesn’t keep his kit connected – I usually wire and power it up when I need it – and doesn’t always bother with the Ethernet cable when he does, I’ve been after a decent real-time clock (RTC) add-on for quite a while. An RTC allows your Pi to keep time, even when the Pi’s power is cut.

I’ve tried several RTCs, but until now none of them have provided quite the right fit-and-forget functionality I wanted. They were either too bulky to fit into my Pi casing, or didn’t allow me to continue using the Pi’s GPIO ports. Others had an overly complex software install, sometimes requiring you to obtain an non-standard Linux distro.

Well, goodbye to all that nonsense. Now I have a real-time clock that fits the bill perfectly.

Ladies and Gentlemen, let me introduce you to the PiFace RTC:

PiFace RTC

You’ll have guessed from the name that it comes from Dr Andrew Robinson, the boffin behind the PiFace, an add-on that simplifies connecting all sorts of peripheral devices to the Pi. The PiFace is undoubtedly a clever bit of kit, but the PiFace RTC is an altogether smarter piece of design.

What Andrew clearly realised is that folk who need an RTC don’t expect it to be their Pi’s only add-on. He could have integrated an RTC into the PiFace, but a better approach was to design a separate unit that works alongside his main offering. And therefore, of course, with anything else you might want to connect to your Pi’s GPIO.

So, the PiFace RTC was designed to fit underneath other add-ons without restricting their access to the GPIO pins in any way, physically or electrically. What we have here is a board drops onto the Pi’s pins, which pass through holes in the board so that other kit can be clipped to them too.

The RTC’s back-up battery, a CR1220 coin cell, is small and the board itself incredibly thin, in order both to minimise the add-on’s vertical height but to ensure there is still plenty of pin left for devices placed on top of it. Pushed onto the pins, the PiFace RTC doesn’t even extend vertically as far as the Pi’s camera connector. Now, this thinness makes the PiFace RTC seem less than robust, but since it can be left in place on the Pi, that shouldn’t matter: it’s not a gadget you should be taking on and off.

PiFace RTC

The PiFace RTC drops right on to the Pi’s pins and leaves plenty of room for other devices
Pictures from PiFace

You might be wondering how Dr Robinson has managed to make a Pi add-on without the customary chunky female GPIO connector. Other RTCs I’ve tried had just that: a thick plastic adaptor below and pass-through pins – usually much thinner and more readily bendable than the Pi’s own – above. Here comes the really clever bit: two of the PiFace RTC’s 26 metal-lined holes have been drilled fractionally off axis – you can just see this in in the photo at top. While the board still fits onto the Pi’s pins, it’s sufficiently distorted to force contact between each hole and its pin.

I’ve been using the PiFace RTC for about four months now, and I’ve not once had a mis-read when the Pi boots up and updates its own clock from the value proved by the battery backed board. Which communicates with the PI via I²C, by the way.

Software installation is easy: there’s no need to compile kernels or anything like that, just download and run a shell script to enable update the Pi’s system files to enable I²C and make it accessible to devices at start-up. Once the script has been run, you use the Unix date command to set the RTC’s own clock, reboot and… er… that’s it.

CR1220 batteries cost a pound or so and, says Dr Robinson, will last a couple of years in the RTC board. I’ve not had mine quite that long, so I’ll have to take his word for it. I can say it works as well with a Pi B+ is it does with a Pi. I’ll be trying it with a Pi 2 soon.


The PiFace RTC only costs £8.40 including VAT from Farnell/Element 14, which is cheaper than most other Pi RTCs. Even if it weren’t, the PiFace RTC would be worth a look for its ease of use and negligible impact on your ongoing use of your Pi.

I spotted the RTC quite a while back on the PiFace site. It had nothing but a ‘not yet available’ message, even though Farnell was selling the thing. This fact I discovered by accident. The PiFace site has since been updated, but the company should more of a noise about this small, useful, genius device.

Price £8.40 including VAT
More Info PiFace

The Sinclair ZX81: a Raspberry Pi retro restyle – Part 2

Previously on ‘ZX81: a Raspberry Pi retro restyle’: I used a headerless Arduino Leonardo to connect a ZX81 microcomputer keyboard to a Raspberry Pi via USB, using code to handle normal, shifted and function-shifted key presses.

After some searching on eBay, I found an old ZX81 going cheap because it lacked cables, though when it arrived, I found the computer itself to be in excellent condition. Possibly it has never been used, though how if that were the case the cables were lost and the box got so tatty is a mystery I will probably never solve.

ZX keyboard controller

A new ZX keyboard connected to the USB controller – an Arduino Leonardo

Continue reading

Review: the Fuze, a Raspberry Pi keyboard case and electronics kit

Back in the day of the board computers of the late 1970s – your Scrumpi, your Nascom 1, your UK-101 et al – it was customary to build a case for it out of wood. If you were a better equipped ‘constructor’ – what we used to call ‘makers’ in those far distant days – you’d build a box out of metal.

Folk like Tangerine offered optional cases, but most home micros made do with homemade jobs or nothing at all. Then along came the pre-knighthood Sir Clive Sinclair with his ZX80, and home micros all had to be clad in plastic from then on.


The Fuze looks like an old-style home micro case.

Continue reading

Connect a Raspberry Pi to a Mac using a USB-Serial adapter

I’m enjoying tinkering with the Raspberry Pi. Alas most of the tutorials and guides available online, of which there are many, focus on hooking the tiny board computer to Windows or Linux machines. Mac-centric guidance is sparse, and I could have used some this week.

The Pi has 26 general purpose IO ports on board, two of which can be used for UART (Universal Asynchronous Receivers/Transmitters) communications. The Pi hooks its UART pins to a login console at boot, and it should be straightforward with a suitable USB-Serial adaptor — I have the TTL-232R-3V3 from FTDI Chip — to view the results of the start-up process on a terminal window in Mac OS X. I bought my cable from Farnell, by the way — it terminates in three female connectors ready to slot onto the Pi’s GPIO pins.

A Pi's UART pins, connected

A Pi’s UART pins, connected

Continue reading