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

HiTechnic SMUXThis 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

Mindsensors SMUXThis 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!

 

Tags