ClunkPi

A photo of a circuit board about 3cm by 2cm dominated by
	      a power transistor

ClunkPi is an add-on board I (Ben Harris) made to interface a Raspberry Pi to a pulse clock. I designed it to fit all models of Raspberry Pi, from the Model A onwards. It can operate any clock that's compatible with the British Post Office class A system, including movements made by Gents, Synchronome, and English Clock Systems. I also wrote a program called Clunk to keep a pulse clock driven by ClunkPi syncronised to the system clock (and hence to NTP).

I designed ClunkPi for my own use, but the design files are available here in case they can be of use to anyone else.

Specifications

ClunkPi fits the 26-pin I/O header on the original Raspberry Pi. It also works on the first 26 pins of the 40-bit header used from the Model B+ onwards. The board is smaller than either a HAT or a uHAT, so it should fit many cases.

ClunkPi is essentially a switchable current source. It provides a current of 250 mA ±10% into a resistance of up to 12 Ω. It is switched by GPIO line 17 from the Pi. It is powered by the Pi's 5 V line, from which it needs 250 mA.

In theory, it should be possible to run ClunkPi off a higher voltage to drive multiple clocks, up to the 50 V limit of the drive transistor.

Design files

I designed ClunkPi using KiCad. The KiCad source files are available for download.

Circuit description

The circuit is a simple current source controlled by a shunt voltage regulator. U1 and R2 control the base current in Q1 to achieve 1.24 V across R1. D1 suppresses any voltage spike caused by the inductance of the clock coil. The whole thing turns off when the GPIO line goes low.

The specifications of Q1 are critical. It needs a high enough hFE and a low enough VBE that it can sink 250 mA when driven by the relatively weak output of a Raspberry Pi GPIO.

Use

Plug the board into a Raspberry Pi with the square solder pad connected to pin 1 of the GPIO connector. Connect the clock (either way around) to the pads labelled "J2".

Parts

The parts I used to assemble my ClunkPi were:

RefBrandMPN Distributor & PNDescription
D1Taiwan Semiconductor 1N4933 Farnell 2677321Silicon diode, 50 V, 1 A
J1Amphenol FCI 76342-313LF Farnell 109798526-way pin socket
Q1{ ON Semiconductor 2SC6144SG Farnell 2533297High-gain power transistor
LairdA15037-101 Mouser 739-A15037101TO-220 heatsink pad
Farnell 149556M3 × 10 screw
MackayM3 Nyloc nut
R1Vishay MRS25000C5118FCT00 Farnell 9469303Resistor, 5.11 Ω, 1%, 600 mW
R2MulticompMCRE000032 Farnell 1700231Resistor, 390 Ω
U1Texas Instruments TLV431CLPE3 Farnell 1236566Shunt regulator, 1.24 V

Boards

I got my boards made by AISLER because they were cheap. I fed them the KiCad PCB file directly.