Difference between revisions of "Project:Turing Machine"

From London Hackspace Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
At the moment, the machine is complete and works correctly but is unreliable. The current best run without getting an operation wrong is 7 instructions.  
 
At the moment, the machine is complete and works correctly but is unreliable. The current best run without getting an operation wrong is 7 instructions.  
  
A video of it operating at Maker Faire 2011 is here: http://www.youtube.com/embed/40DkJ9vt5CI
+
A video of it operating at Maker Faire 2011 is here: http://www.youtube.com/40DkJ9vt5CI
  
 
=== Design ===
 
=== Design ===

Revision as of 14:34, 17 March 2011

Picture of the Turing machine in December 2010
Test run with a steam engine

Srimech (JimM) is building a mechanical Turing machine. For background, you might want to read the XKCD strip A bunch of rocks. The scheme mentioned in this strip is Wolfram's rule 110 cellular automaton, which this machine emulates. This should also give you a good idea of how quickly this machine will operate.

At the moment, the machine is complete and works correctly but is unreliable. The current best run without getting an operation wrong is 7 instructions.

A video of it operating at Maker Faire 2011 is here: http://www.youtube.com/40DkJ9vt5CI

Design

The machine is a 5-symbol, 2-state universal Turing machine based on the 5x2 theoretical machine shown to be universal by Wolfram. This was until recently the simplest Turing machine known to be universal. It has since been surpassed by a 3-symbol, 2-state Turing machine, but the extra symbols do not make the mechanical design significantly more complicated.

Data is stored in the positions of ball bearings on a square metal grid. The machine picks up a ball bearing from one row, moves it to (potentially) different position on that row, then moves forwards or backwards one row. The machine also has 1 bit of internal memory. Ball bearings are lifted up from the grid by magnets, then drop into one of five channels. The internal state then diverts each channel into another two, giving ten possible channels. Each of these has levers in it which will alter the state of the machine or change the direction of the whole machine. The ten channels then map back to the five possible new symbols; this mapping is done by the 'maze' of channels near the base of the machine.

Three cams in the middle of the machine control all the action. One pushes down a rod which will propel the machine forward or backward like a punt. The second pulls a cord which raises ball bearings to the top of the machine. The third resets the direction each cycle such that a very light movement can switch it between backward and forward.

The whole machine is driven using a worm gear taken from a car windscreen wiper motor. The input shaft to this has a large pulley which can be driven by a small electric motor or a steam engine.

History

4th Dec 2010: First test run. Direction line detached, electric. Completed cycle in 2'14". Faults: Moved forward only one grid position, ball bearing continued past finish row.

5th Dec 2010: First run with steam engine attached. Speed is about right. Elastic band keeps coming off the drive pulley but didn't melt, surprisingly. Moved one space back instead of two. Vibration is causing the dir & state box to shake off the maze.

Problems outstanding:

  • Ball bearings drop out of the chutes at the bottom too quickly, and don't land in the correct space. Tried several arrangements of rubber bands and baffles to slow them down.
  • Punt not engaging with the track correctly. Needs the tip shape altered.
  • Direction sensor bars are trapping the ball bearing.

28th/29th Dec 2010: Added direction amplifier, gate at bottom of chutes to stop balls and release them slowly

  • Ball bearings jumping from one track to the next between the state and direction box. Needs more guards -> need sheet aluminium/brass.
  • Ball bearings are still not landing on the right square 100% of the time. Try different bars under the track, or double layer track.