Aug 6, 2008

Working with various motors in your NXT projects - Part 1

Have you ever wanted to create something cool with NXT - but the size and shape of the NXT motor made it impossible? Nearly all NXT projects use the standard NXT motors that ships with a Retail NXT kit. But that is not the only option:

Following one of the comments by a reader on my post last week about using the linear actuator, I thought I will do a blog on using motors - especially non NXT motors with your NXT kit.

The following list some ways of leveraging your motor collections and tells you how to control the various types of motors from your NXT brick:

1) Direct connection of a NXT motor to a NXT

This is the most obvious - and it is the easiest to program - either using the motor block and move block that comes with NXT-G - or a quick sequenced programmed using the on brick editor.

Given the NXT motor has a rotation sensor built in, this is the most flexible method - giving a variety of ways to program the motor action - including specifying the number of turns or number of degrees.

(2) Direct connection of a TECHNIC motor to a NXT via cable

If you have one of the common TECHNIC motor that used to ship with many recent models before Power Function motors came out - the easiest way is to use a NXT conversion cable. The cable (item #8528 at shop at home) comes with 2x2 studded connector plate on one end and an RJ12 plug on the other end. The cable also comes with a LEGO 9797 Education base kit.

This way you can use a simple Motor block to control the TECHNIC motor directly from the NXT - the motor derives its power from the NXT.

(3) Direct connection of a PF motor to a NXT

If you have some Power Function motors - from any of the latest TECHNIC and Creator models from 2008, then the PF motors are another option:

Powering it from NXT is not that simple - you need two cables:

LEGO have no plans to bring out a direct cable - so this is the only 'approved' way to power a PF motor directly with a NXT. Again programming this is just like the TECHNIC motor above - just use a Motor block and specify the length of time to turn on the motor (or you can leave it on until a sensor condition is met).

(4) Controlling the PF motors / train motors via IR-Link from a NXT

This is one of the best option for larger robots: The HiTechnic IR-link is a sensor that allows the NXT to control up to 4 sets of motors simultaneously. The motors does not derive the power from the NXT - but instead from its own PF power supply. The IR-link controls the motor using InfraRed signals. The company that made IR-Link (HiTechnic) also give you the NXT-G block so you can program it.

Edit: You can use this method for controlling both XL and Medium Power Functions motors as well as the train motors /IR-receivers that shippd with the new LEGO RC trains such as this one. [Thanks James, for the comment]

When I first tried this method a year ago, [see my review on BrickJournal) I did not like not being able to control the speed / power of the motor: The IRLink could only turn on or off the motor - you can not change the motor power - like you do with a direct connection methods above.

However, the guys at HiTechic have been busy - and recently I been playing with a beta version of a new NXT-G block that will support the Power Function PWM Combo mode. This will allow one command to control both motors and also allow selectable brake and float for each motor. I will post a link to the download location as soon as this is publicly available.

Why not drop us a comment and tell us how you used non NXT motors in your own NXT projects?


Anonymous said...

Great write-up, BlueToothKiwi - thanks.

I tried the links to the LEGO site - But I cant buy the two items you mentioned (NXT adopter and PF extension) from the country I live in. Where else can I get one from.

BlueToothKiwi said...

Thanks for the feedback Anonymous. You can make your own custom cable pretty easilly.

Anonymous said...


Anonymous said...

Nice write-up

I'm impatient to test the new beta NXTG block for IRlink with PWM Combo mode...
Where is it possible to get it ?


James Trobaugh said...

Don't forget LEGO train motors, the NXT does a great job of running these as well.

BlueToothKiwi said...

Jojo60 - I will follow up with HiTechnic.

Anonymous: I will post a follow up part

James: Thanks. Done.

Martin Williams said...

Cann you please post instructions on how to make your own NXT-PF cable? I want to do it today and I dont want to wait for weeks for the shipping of the two cables you mentioned.

BlueToothKiwi said...

Check this out, Anon and Martin:


b0kY said...

Can you please tell me, if anyone can make: PF Remote Controler CONTROLS the NXT...and please post the program, I have all the sensors but I don't know how to program the nxt to receive signals from the pf remote control...PLEASE HELP!

You can find me on NXTLOG-user name b0kY


Related Posts Plugin for WordPress, Blogger...