Back to photostream

Oh.

Today at lunch, it occurred to me that instead of dealing with building a chassis from metal, wood, or plastic, and attaching Radio Shack wheels to industrial gear motors, that maybe I could find the information on the pinout of the Lego Mindstorms motors on the internet.

 

I'm not very good at googling, but I did, indeed, find the pinout. A cut cable , some stripped wires, and a little soldering later, and I'm turning this wheel with code, in both directions.

 

If you're interested, here's the technical information for the Mindstorms motor:

 

Pin 1 (white wire) = Motor lead.

Pin 2 (black wire) = Motor lead.

Pin 3 (red wire) = Ground

Pin 4 (green wire) = +4.5 Volts (though, I pushed 5 through, without adverse results)

Pin 5 (yellow wire) = Encoder output

Pin 6 (blue wire) = Encoder output.

 

The motor will run with just the black and white wires connected. As you'd expect, reverse the polarity to reverse the motor (I'm using an SN754410NE H-bridge IC for ease)

 

Power and ground are there to power the encoder outputs. The encoder outputs indicate the speed of the motor via pulse-width modulation. Shorter pulses mean the motor is moving faster, longer pulses mean it's moving slower. If you spent any time in Mindstorms, you may remember that the motors have a free-wheeling mode, and a brake mode. With no voltage on either the black or white wires, the motor is free wheeling, and the encoders send the pulses on the blue and yellow wires. I've read, but haven't confirmed, that a low voltage on both motor leads activates "brake mode". Dunno.

 

Anyway, the encoder outputs are identical, except that one leads the other, slightly out of phase. The direction of the motor determines which output leads. Get a scope, work it out... forward and backward aren't concrete concepts with these motors, anyway.

1,789 views
0 faves
3 comments
Uploaded on January 22, 2009
Taken on January 22, 2009