You will have completed the first module, using the Arduino for controlling servo loops. This second model will introduce some fundamentals of machine vision, and will build up to the aim of controlling a system with video feedback.
You will have learned how to share a control task between a PC and an Arduino, reading an incremental encoder with high speed software that includes Atmel assembly code. Now you will learn the ability to control a system in which a motor controls the position of an object, while a camera provides the feedback signal to command its movement.
You have attached a bobbin, a cotton reel will do, to the shaft of a Pololu geared motor, with its axis horizontal, one-and-a-half metres off the ground
To the bottom of a string is attached a brightly coloured ‘target’, to be viewed by your PC camera or a plugged-in webcam. The target can be a ball, or small square of plastic. Machine vision will track its coordinates in the field of view, while the motor winds the string to control the vertical position.
Experience will be drawn from a previous module in MTR2302, where the position of the target in the field of view is displayed in a ‘canvas’ on-screen window. Now when the mouse cursor is moved to a position in the canvas and the mouse clicked, the screen will be marked with that as a target. The motor is then driven to move the suspended object to that height.