Sisällysluettelo

Hacking the Lego Mindstorms RCX

Background

We have an old Lego Mindstorms RCX, the first model in the Mindstorms series.

The RCX motors are quite old fashioned, traditional lego motors:

It is quite difficult to cleanly integrate this to newer Lego Technic models, where most of the contacts are only done with Technic ”pins”.

Recently Lego has released a range of ”Power Functions” motors:

Medium motorLarge motor
XL motorServo motor

They are cheap, powerful and easy, and are used in many recent Lego models. It would be very cool to add programmed functions to these models using the Mindstorms RCX, but how to connect the motors?

Well, lego has made an adapter cable:

All the regular motors work just fine with this cable, but the Servo motor doesn't. Servo motor is special, it needs constant +9V and 0V connected, and then two other pins take variable 0-9V voltage in either polarity to control the position of the motor. This is often used to control the steering of the car, for example.

Servo motor hack

The regular motor output of RCX is the 0-9V adjustable signal, in either polarity. But servo needs constant 0V and +9V in addition. These are obviously available from inside of the RCX.. So lets open him, and add special output for the servo motor. :)

Adjustable 0-9V is taken from motor output port B, and constant 0V and 9V are taken directly from the battery pins. This has the disadvantage that servo motor will be always powered when it is connected, but the power draw is reasonably small..

I used an Power Functions extension cable, which I simply cut. Small hole is made to RCX casing to get the wire out.

Adding extra motor outputs

RCX only has three motor outputs, and three sensors inputs. We ran out of motor outputs in some project, so again it was hacking time. :)

Some sensors are ”active” and use +9V power. This power supply can be toggled ON and OFF in software, and +9V voltage appears on the sensor pins. I used this power to drive a miniature relay.. The relay then will multiplex one motor output to two.

The whole thing is fitted inside a two lego bricks, and superglued together. I forgot the take a picture when I made it, and now it is already installed on a model. :)

With the relay, you can control two motors using one motor output. Only one motor can run at the same time, but that is usually not a problem on most models.

You could build three of these relay circuits, and control six motors. :)

Note: Some images on this page are borrowed from the lego.com website.