Now that both HiTechnic and Mindsensors have a SensorMUX, it may be a good opportunity to highlight some of the differences between the two.
The HiTechnic SensorMUX
This one has been around for a few years now and is well liked with FTC teams everywhere. It allows you hook up to four supported sensors, which are automatically polled by the SensorMUX at specific intervals, depending on the number of bytes that need to be retrieved. Communications with this sensor MUX is done through I2C only at 9600 Hz.
The HiTechnic SensorMUX is listed at $57.95.
Pros
- It does all the work for you, once the MUX channel has been configured to poll X bytes at address Y, it will continue to do so, until you tell it to stop. You simply retrieve those bytes from the SMUX and do whatever you like with them.
- Can identify and configure channels, according to the supported sensors connected to them.
- Has been part of my driver suite for a long time and is well integrated with the drivers for the supported devices
- FTC legal
Cons
- It comes in a pretty big package
- Can be tricky to configure manually, if you’re trying to make it work with unrecognised sensors.
- Does not allow you to send commands to the connected sensors
- Does not allow you to use RS485 sensors
- No battery level indication, other than “good” or “bad”.
The Mindsensors SensorMUX
This SMUX becomes truly transparent to the NXT, once you’ve switched to a specific channel . The SMUX has 5 channels, 0 to 5. 0 is a special channel, which allows you to control aspects of the SMUX itself. 1 through 4 are for the connected sensors. This sensor is the new kid on the block and hasn’t been field tested as much as the HT one. The idea of this sensor is not to switch and poll all connected sensors continuously, but rather switch occasionally between a set of sensors, depending on the task at hand. Communications wit this sensor MUX is done through a special messaging system that requires bit-banging the first digital pin (dig0). On NXC and NXT-G this is done by switching between Analogue Active and Analogue Inactive. On ROBOTC this was a very slow process, so a special sensorCustom was created to allow the manipulation of the digital pins directly from the firmware, communication with the SMUX is now equally fast across all different firmwares. This method of communication was chosen so as to not interfere with regular I2C and RS485 communication.
The Mindsensors SensorMUX is listed at $54.95.
Pros
- Once a channel has been selected, the SMUX becomes completely invisible to the NXT, allowing you to connected virtually any sensor to the SMUX, including analogue, digital and RS485.
- Has indicator lights to show you which channel has been selected
- A compact package
- Allows you to get a voltage level in mV
Cons
- Is not FTC legal
- The time required to switch between channels is around 30-50ms, depending on the sensor connected to it. This has to do with the messaging system that is used to select a channel and a small amount of time needed to reconfigure the sensor port for the connected sensor.
- Checking the battery level requires you to switch to channel 0 and retrieve the battery level, this is fairly time consuming operation (50-80ms), so should not be done more than necessary.
- The reconfiguration of a sensor port through the firmware can cause a sensor reset. Depending on the sensor, this may or may not be an issue.
Conclusion
So which one is best? That’s a bit hard to say, really. It depends very much on what you’re going to use it for. Take a look at what you need it for, then check the list of pros and cons for each and see which one comes on top. That, or buy both!
I wasn’t aware that the Mindsensors SensorMUX was capable of supporting RS-486 add-ons as well as I2C, and Analogue Sensors.
Have you tried the Mindsensors SensorMUX with a couple of RS-486 Devices, such as NXT2WiFi and Xbee?
I have not tested that, no. That is based on information I got from Mindsensors.
I’d add another couple of FTC observations related to the HiTechnic MUX…
PRO: The MUX offers the only reliable way to get stable readings from the HT GYRO sensor which, if connected to the NXT, is dramatically affected by voltage changes because it is an analog sensor.
CON: The battery box is total junk. Talking to HiTechnic, it turns out that that is because there are very few 9V boxes out there for them to choose from. The good news is that if it breaks you can get 6 (yes six!) of the identical boxes all the way from Hong Kong (with free shipping) to the US for just $10.
I’d also suggest that HT should consider using slightly thicker wires for the 9V power from the battery – but the problem there is that the wires come with the battery box. We’ve seen internal breaks on the wires right where they enter the MUX but careful disassembly let us install replacements without too much difficulty. Actually we ended up installing a powerpole style connector inline to the battery box so the drive team can switch out the entire battery box if needed, rather than mess with taking it apart in the heat of competition!
I was lucky to get a prototype SMUX from HT when they still came with Power Function connectors 🙂
[…] that needs to be retrieved. For a full list of the pros and cons on both sensors see this article: Comparing HiTechnic and Mindsensors SensorMUXes, by Xander Soldaat. […]
As always, a perfect and succinct review of these sensor multiplexers! Also learned a bit more about both. Great job, Xander. Also a thanks to Ron McRae with his additional hardware experience regarding the battery box issue.
Hi Xander,
This is very useful. Looking at the way the Mindsensors sensorMUX works I suspect it does not work with the Lego colo sensor.
Oh but it does 🙂 I have a video of a rocking NXTDisco Party to prove it!