My greatest interest in the Raspberry Pi lies in those 26 little pins tucked down on the side of the board. They just invite things to be connected to them. Having found a pile of dusty Fischertechnik (loosely assembled in a sort-of robot arm shape) in a cupboard, I decided that something could be done with it.
The arm was so dusty it needed disassembling and washing. I left the motors and sensors out of the wash but I figured that everything else would cope. Sure enough, it looked like new again.
I found some L298 motor driver boards on Ebay and these easily connect to the Raspberry Pi GPIO connections. There are four motors in this arm:
- Rotation of the base
- Lifting of the “forearm”
- Lifting the “upper arm”
- Closing the jaws
I’ve used eight sprites (Shaped like small buttons) to control each of the directions for the motors. Each of the sprites has a very simple script – when the sprite is clicked the motor runs for 1 second. Nothing earth-shattering, but very convenient.
One thing I’d like to try is using some form of sensing to measure arm position. There are two infra-red sensors and emitters attached to the arm which detect rotation of the motors, but I have a suspicion that Scratch might not be able to keep up with checking these transitions. I’d also have to consider how they’re interfaced. Most things seem to be running on 9v, but it might be possible that the infra-red sensors are something like open-collector phototransistors.
So… at the moment it’ll stay as it is. It’s actually pretty tricky to control manually – as the upper arm is tilted forwards, the lower arm drops and so each movement requires a correction in another place. The gripper always stays horizontal courtesy of a bell crank in the “elbow”. At least that’s one cause for concern ironed out!