This arm is a hybrid derived from several designs taken from two books and a 'classic' Lego Technic website. The books are -
'Make and Program Your Own Robots' by William Clark (1985, ISBN 0-0916-2890-3)
'Robot Projects' by Richard Pawson (1985, ISBN 0-7112-0419-5)
Both feature interfacing to the Sinclair Spectrum, so using an Arduino or Raspberry Pi would be really suitable alternatives. Clarke's book provides a simple microswitch design using paper clips that we have tried out. I want to look at building an alternative motor with PWM control and optical feedback sometime.