Port Multiplexers

Port multiplexers are used to connect more than one sensor or motor to a single input or output port. Some multiplexers are treated as a single sensor while others have their own port drivers.

Supported Multiplexers

Part Number Name Ports Supported connections
HiTechnic
NTX1060 NXT Touch Sensor Multiplexer 4 LEGO NXT Touch sensor
NSX2020 HiTechnic Sensor Multiplexer 4 NXT/Analog and NXT/I2C sensors
mindsensors.com
EV3SensorMux EV3 Sensor Multiplexer for EV3 or NXT 3 LEGO EV3 sensors (no 3rd party sensors)
NXTMMX-v2 Multiplexer for NXT/EV3 Motors 3 LEGO EV3/NXT motors
NXTServo-v3 8 Channel Servo Controller for NXT or EV3 8 Hobby type RC servo motors
NXTTouchMux Touch Sensor Multiplexer for NXT 3 LEGO NXT Touch sensors
SPLIT-Nx-v2 Port Splitter for NXT Digital Sensors 3 All I2C sensors

HiTechnic

NXT Touch Sensor Multiplexer

This multiplexer allows connecting up to 4 LEGO NXT Touch sensors to a single input port. This device is treated as a single sensor, so there are is no lego-port driver loaded.

HiTechnic Sensor Multiplexer

The sensor multiplexer provides 4 sensor ports via one input port. A port device is registered for each port. These can be found in /sys/class/lego-port/.

Any type of NXT/Analog sensor can be used with this multiplexer. Most NXT/I2C sensors can be uses as well, but they can only be operated as read-only.

This device cannot detect when motors are attached or removed. However, there is a command that can be used to attempt to detect sensors after they have been attached. This only works for certain LEGO and HiTechnic NXT sensors.

General Info

Module ht-nxt-smux
Driver name ht-nxt-smux-port
Connection types NXT/I2C, NXT/Analog
Connection prefix mux [1]
Number of modes 2

Modes

Name Description
analog [2] NXT/Analog sensor
i2c [3] NXT/I2C sensor

Notes

[1]

The full address is in the format: <parent-address>:]mux<n>.

For example, if we are looking at port 1 of this mux plugged into input port 2 on the EV3, the address will be in2:i2c08:mux1.

[2]The generic nxt-analog driver will be loaded when this mode is set. You must manually specify the correct driver for your sensor using set_device if you want to use another driver. Any driver with a connection type of NXT/Analog is allowed.
[3]If one of the supported sensors was detected by invoking the DETECT command on the HiTechnic NXT Sensor Multiplexer associated with this port, then the appropriate driver will be automatically loaded. Otherwise, you can use set_device to load the correct driver for your sensor. Most drivers with a connection type of NXT/I2C are allowed.

A ht-smux-i2c-sensor device is loaded by the HiTechnic NXT Sensor Multiplexer driver when it is detected by the sensor mux (automatic detection only works with the sensors listed in the linked page) or when manually specified by setting the port to i2c mode and writing the device name to set_device. You can use any one of the sensors that has the nxt-i2c-sensor module from the Supported Sensors. Keep in mind though that the sensor mux operates in a read-only mode with I2C sensors. You will not be able to use commands with these sensors. Additionally, some modes of I2C sensors require writing data to the sensor and as a result, these modes will not be usable either.

Mindsensors.com

EV3 Sensor Multiplexer for EV3 or NXT

This multiplexer allows connecting three EV3 sensors to a single input port. Only LEGO brand EV3 sensors are supported - 3rd party EV3 sensors won’t work.

General Info

Module ms-ev3-smux
Driver name ms-ev3-smux-port
Connection types EV3/UART, EV3/Analog
Connection prefix mux [4]
Number of modes 2

Modes

Name Description
uart [5] EV3/UART sensor
analog [6] EV3/Analog sensor

Notes

[4]

The full address is in the format: `[<parent-address>:]mux<n>

For example, if we are looking at port 1 of this mux plugged into input port 2 on the EV3, the address will be in2:i2c50:mux1.

[5]

UART sensor types are not automatically detected. By default, the lego-ev3-color driver will be loaded when this mode is set. Use set_device to load other sensor devices/drivers.

Supported sensors are:

Sensor Name Device/Driver Name
LEGO EV3 Color lego-ev3-color
LEGO EV3 Ultrasonic lego-ev3-us
LEGO EV3 GYRO lego-ev3-gyro
LEGO EV3 Infrared lego-ev3-ir
[6]Currently only the LEGO EV3 Touch sensor is supported. The lego-ev3-touch driver is loaded when this mode is set.

Multiplexer for NXT/EV3 Motors

The NXT motor multiplexer provides 3 motor ports via one input port. A port device is registered for each port. These can be found in /sys/class/lego-port/. This device cannot detect when motors are attached or removed.

General Info

Module ms-nxtmmx
Driver name ms-nxtmmx-out-port
Connection types tacho-motor
Connection prefix M [7]
Number of modes 1

Modes

Name Description
tacho-motor NXT/EV3 Large Motor

Notes

[7]The full address will be something like in2:i2c3:M1 depending on what port the motor multiplexer is plugged into.

8 Channel Servo Controller for NXT or EV3

This multiplexer allows connecting up to 8 hobby type RC servo motors to a single input port. There is no port device associated with this. When connected, It loads 8 servo-motor Subsystem devices that are used to control the motors.

Touch Sensor Multiplexer for NXT

This multiplexer allows connecting up to 3 LEGO NXT Touch sensors to a single input port. This device is treated as a single sensor, so there are is no lego-port driver loaded.

Port Splitter for NXT Digital Sensors

This multiplexer allows connecting up to 3 I2C sensors to a single input port. This is a passive device, so there are no drivers. All connected I2C devices must have a unique I2C address.