Fischertechnik, Scratch and Motor Control through the GPIO.

Fischertechnik robot arm connected to two L298 driver boards and controlled through Scratch.

Fischertechnik robot arm connected to two L298 driver boards and controlled through Scratch.

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

Scratch Script for controlling the motors

One of the eight scripts used to control the robot arm. ScratchGPIO shows which pins can be used for output.

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.

Robot arm control panel

The control panel for the robot arm.

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!


One response to “Fischertechnik, Scratch and Motor Control through the GPIO.

  1. Pingback: Wie man seine fischertechnik-Modelle mit Scratch ansteuert. | der fischertechnik-blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s