Skip to main content

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?

Popular posts from this blog


Robot Remix #6 Since 2015, the ROBOTMAK3R community has been challenged to use their imagination and come up with a new model combining the LEGO® MINDSTORMS® 31313 set and a single Technic set. This gave rise to the very first #ROBOTREMIX. Today, I am proud to announce that we are on our sixth remix series. The makers were challenged to combine LEGO® MINDSTORMS 31313 with  LEGO ®  Technic Forest Machine (42080).  Many amazing ideas were proposed, and based on their design submissions, four were selected to become a reality.  The first four Robot Remixes for 2019 are: CAT3RPILLAR by Anika and Nard, LIZARD by Anton, STREET CLEAN3R by Arvind and Sanjay, and AFRICAN SNAIL by Emmanuel. During the next several months, we will share the story behind each creation, including preliminary sketches, behind-the-scences insights and of course, building instructions and code so that you can build one too. Do you have an idea for how to combine MINDSTORMS with the Technic F


2023 is the 25th Anniversary of the MINDSTORMS brand. For 25 years, MINDSTORMS has educated and inspired a generation of robot builders, both children and adults. Unfortunately, the LEGO Group decided to end the line on December 2022. Many ROBOTMAK3RS have been passionately involved with the development of MINDSTORMS through the MUP and MCP programs. Even with the newest Robot Inventor line, several ROBOTMAK3RS were invited to submit additional bonus models that were included in the official app. Regardless of the retirement of a major LEGO robotics product line, ROBOTMAK3RS continue to MAKE-SHARE-INSPIRE using all LEGO robotics platforms available to us. Here is the official statement from LEGO. Since its launch in September 1998, LEGO MINDSTORMS has been one of the core ‘Build & Code’ experiences in the company’s portfolio, carrying with it significant brand equity and becoming a stand-out experience for the early days of consumer robotics and leading to current Build & Code

Machine Learning Meets MINDSTORMS

Machine Learning Extension LEGO MINDSTORMS announced today a brand new feature that is sure to excite all users. Machine Learning Extension is coming to the software in August 2022. This will allow users to implement new applications that were not possible before. Machine Learning has become exceedingly popular in recent years with applications in all sorts of industries from robotics to financial services to climate change. Now, even the youngest of robot enthusiasts and programmers have access to the world of Machine Learning and Artificial Intelligence. Comparing two classes Machine Learning on MINDSTORMS will work with both images and audio. For instance, you could train your model to recognize smiles and frowns on your face and have the emotion displayed on your hub. You could train your model to recognize when a red ball is present or not or identify a particular LEGO element. You can control your robot with audio commands that use your own voice. It is exciting to see what new p