Friday, February 17, 2006

Control 19 Motors and 16 Sensors

The NXT Brick has 3 motor ports and 4 sensor ports. The NXT box comes with a sound sensor, a light sensor, a touch sensor, and an ultrasonic sensor, plus three motors. So out of the box, all of the brick ports are filled.

© Lego. All NXT Brick ports are filled with sensors and motors.


The “old” Lego Mindstorms RIS also had a limited number of ports. However, the sensors that connect to Mindstorms RIS are analog. By using some clever tricks, two analog sensors could share a single Mindstorms sensor port. This method allowed only a few extra sensors, no extra motors, and also required non-trivial programming. The Lego Mindstorms NXT comes with digital ports, but analog to digital cables will be available from Lego. That means you could in theory combine some legacy sensors, but not the new NXT sensors.

However, Lego Mindstorms NXT has a solution that is a lot simpler, and a lot more powerful! By the time Lego Mindstorms NXT will be available, HiTechnic will launch a multiplexer on the market. A multiplexer is a device a lot like the USB hub you may have: plug all your USB cables in the hub, and plug the hub in a single PC USB slot. HiTechnic introduces the same concept for Lego Mindstorms NXT motors and sensors. You can plug up to four motors, and up to four sensors, into their multiplexer, and plug the multiplexer in a single NXT Brick sensor port. So by giving up one sensor port, you win 8 additional ports. According to HiTechnic, each of the four added sensor ports will support both passive and active legacy (analog) sensors, including the “old” rotation sensor, as well as the new NXT sensors. In the four additional motor ports, you can connect both the smart NXT motors with position feedback, and the “legacy” Lego Technics motors you have used till now.


© HiTechnic. A prototype of the Hitechnic multiplexer.
The final casework will have Lego Technic compatible holes.


What if you want even more motors? Well, every NXT Brick sensor port can connect to a HiTechnic multiplexer. That means you can convert your 4 standard sensor ports into 16 motor ports and 16 sensor ports. The standard 3 motor ports are off course still available. Each of the added ports works just like a standard NXT port. Amazing!

For those rare cases that you need more than 16 sensors and 19 motors in a single robot, you may wonder if you could connect a HiTechnic multiplexer in one of the added sensor ports (daisy chaining in electronics speak). Although this may be possible in the future, the initial version does not support this feature. There are probably few robots that need this feature anyway. But if you do, an alternative solution is to add another NXT brick and combine them using the Bluetooth wireless link.

So how about speed? Is a NXT Brick sensor port fast enough to control 8 added ports? Won’t the values of the various sensor mix in annoying ways? To address these issues, the multiplexer has an internal processor. For every added sensor and every motor port, the multiplexer has an up-to-date sensor buffer of the sensor values and motor position measurements. Every time the NXT brick does a read on the original sensor port, one of these values is passed. According to HiTechnic, for most applications, there should be no noticeable difference from using the original NXT ports.


© HiTechnic. A look under the hood of the HiTechnic multiplexer.
A number of chips doing some fancy processing can be seen.


Notice that the multiplexer is still under development, and all the information presented here may change before the device is launched.

UPDATE: There is more information on The NXT Step blog about the multiplexer.

UPDATE 2: It is probably more appropriate to compare the multiplexer to a router, like the one you may use to connect multiple home computers on a single broadband connector, or to connect game computers together in a local network. The difference is in the complexity of smart signal routing.

9 Comments:

At February 17, 2006 2:30 PM , Blogger Jim Kelly said...

Filip,

Nice commentary on the multiplexor... especially explaining how even more motors and sensors can be added.

Depending on the cost of the MP, though... this could be an expensive hobby for those wanting to build a large robot :)

Jim

 
At February 17, 2006 3:04 PM , Anonymous Filip said...

Thanks! Yes, that thought did cross my mind too :-). But on the other hand, it is going to be an expensive hobby for me anyway. I can't image I'll be happy with just one NXT brick. For one, I would like to rebuild my old hexapod in all Lego parts. With 3 motors per leg, that's 18 motors to start with. With the multiplexer, I can actually control this with a single NXT Brick! That sounds a lot more simple than coordinating 6 separate NXT bricks via Bluetooth.

But why stop there? Hey, it's Lego and modular now! It would be great to add a few motors as a flexible spine to make it go over obstacles more easily. And I have been dying to replicate some scientific research that uses essentially an actively moving rod-whisker connected to a touch sensor to sense the environment.

I realize not everyone will have the parts to follow such motor-hungry designs. But I do hope to share the know-how of how these things work in easy-to-use libraries. Using these libraries should not require any of the science background. I'm pretty sure some kid or adult will use such libraries in ways I haven't even thought of yet. And (s)he will probably do so with just a single Lego Mindstorms NXT set... I used to be member of CLAWAR, the European Climbing and Walking Robot network, and we used to go on about how great it would be if only robots were more modular...

At the end of the day, all those parts will still cost less than a single Aibo. But the things you can do with it are so much more.

It does raise a new question though: how easily can I buy more Lego NXT motors and sensors after the launch?

 
At February 17, 2006 4:49 PM , Blogger Jim Kelly said...

Well, Lego does sell separate RIS motors and sensors... I think within a short time of release that Lego will offer individual items for sale.

Jim

 
At March 12, 2006 9:22 AM , Anonymous Anonymous said...

Does anyone know how to control this multiplexer in your program? Because the RCX and it's old school companions all had a build in number that referred to a specific sensor port, so to read more then one sensor on an RCX port you had to use those resistance things and configure the port as a light sensor right?

So how do you do this with the multiplexer and the NXT? Can you add more ports yourself because it is digital? or are there some special commands that are send to the multiplxer wich will then respond with the requested value?

 
At March 12, 2006 11:53 PM , Anonymous Filip said...

Hello anonymous,

The multiplexer is essentially a co-processor you talk to. So your program will talk to the multiplexer via a particular NXT sensor port, send commands to it and receive values.

Amongst these commands is the command to say which sensor (or which motor) you want to map directly to the sensor port. So, from the program's perspective, you are talking to port 5 of the sensor (multiplexer) on sensor port 1 (for instance).

As I understand it, you can also use a round robin method, where the multiplexer reads each its ports, and sends the values back one by one (essentially "time sharing" the NXT sensor port). You software needs to be listening to the sensor port, and wait for the right multiplexer port to send back its current reading. Or ask the multiplexer for the last read value.

There is no need for the firmware of the NXT brick to change its behavior in any way. However, your software will need to know that it is talking to a multiplexer. The commanding is not transparent. In this way, it is very different from a USB-hub or network router.

You cannot "detect" which sensor or motor is connected, there is no USB-like "plug-and-play". Even if there were, the software still needs to know where the physical location of the motor or sensor is to make a correct interpretation. Although it is possible to make libraries to make it the multiplexer (more) transparent, I believe the usefulness of that is limited because it is good to know these sensors/motors are connected differently.

That said, a good library that makes it easier to communicate with the multiplexer will no doubt become available after the multiplexer and NXT become available.

Filip.

 
At October 17, 2006 5:08 PM , Anonymous Anonymous said...

Hi,Filip,
The NXT-multiplexer could be very interesting.
Nevertheless I am asking if you also do need a (complete ??) new program and perhaps not as simple as the original NXT-software.
Also SERVERAL TIMES didn't receive any answer to any of my questions to the producer!
At this moment I am wondering if it (mp) really exists and/or functions.
It would be nice if it would enter soon the nxt-market for a reasonable price.
Who knows more?
Reactions please to: nnbvol1@planet.nl

 
At January 29, 2007 7:46 PM , Anonymous Anonymous said...

Can anyone tell me when this mulitplexer will be out for sale...I am building a automatic lawnmower with the NXT and I need more sensor ports for this project. Having this multiplexer would be great as it solves most of my project problems.

 
At March 14, 2007 9:05 AM , Anonymous Anonymous said...

Don't hold your breath. I have been watching this site for over a year waiting for updates on the multiplexor and as far as I can see it is vapor ware.

 
At April 17, 2007 12:24 PM , Blogger stelios said...

Is sensor multiplexer available for buying?

 

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home