The lego build itself consists of three main components.
The head moves sides ways using a rack-and-pinion. The motor is linked via a standard elastic-band worm wheel drive to provide steady controlled movement.
The paper is gripped between two sets of wheels sprung with elastic bands to apply pressure. The wheels are linked by a common axle to ensure the paper stays parallel. The provide additional stabilisation the paper is pinned horizontally.
The pen moves up and down on a simple rocking mechanism with a counter balance. A number of gears and an elastic band provide some control and stability.