Controller

The control requirements are not too demanding, and a small PIC is quite suitable. The Picaxe system, from Revolution Education, provides PIC-based controllers which can be quickly and easily programmed in situ using Picaxe Basic. There is a price to be paid for this convenience, of course - see the Programming section - but a Picaxe-18X suits this project very well.

On the standard Picaxe project board, the Picaxe-18X microcontroller has eight buffered outputs capable of driving lamps and small motors, which is more than enough, and five inputs, two of which can be either analogue or digital.

The initial calculation was that the input devices would be one limit switch for each of two push motors, two light sensors; and a counter to measure distance moved by the conveyor belt. In the event, there are one analogue light sensor and four microswitches, one on the conveyor belt and one on each of three push motors.

For mounting, fischertechnic pieces are hot-glued to the underside of the board. The wiring diagram is shown below.