Mindsensors are about to release a Sensor MUX of their own! This one works very differently in that instead of doing the polling of the attached sensors for you, it allows itself to become a channel to said sensor. So, in essence, you send it a command, like “give me access to the sensor attached to channel 1” and then, as far as the NXT is concerned, that sensor is now attached directly to it. That means it will work with just about all sensors you hook up to it, including any analogue or digital sensor. So far I have played with it using the LEGO Colour Sensor. I made a fun little disco party light with it, using the SensorMUX and four Colour Sensors, all programmed in ROBOTC.
The SensorMUX has 4 channels + 1 virtual one, which is the actual MUX itself. It doesn’t use standard I2C to switch between channels. That required a bit of tweaking in the ROBOTC firmware because it does not allow you to do this. Under NXC this wasn’t an issue because there you can toggle the dig0 line quickly enough by switching between LightActive and LightInactive. The upshot of this, is that ROBOTC now has the ability to use dig0 and dig1 as both input and output pins and you can toggle them at freakishly high frequencies. This is all part of ROBOTC, as of version 3.59.0.
The SensorMUX requires an external battery pack, Mindsensors recommends a LiPo or something, just make sure it’s about 5-6 volts. I use a Power Functions battery box with a tweaked cable.
This sensor will be available to buy from the Mindsensors website from about the second week of March. You can read about the specs and things on the preliminary product page here: [LINK].
The method for switching between channels sure is simple. If only, one wouldn’t have to waste 32ms to switch between channels.
Why can’t somebody design a proper I2c multiplexer for the NXT!? Is it so hard to intercept the first byte of an I2C transaction?
Perhaps this is your chance to create a design, open source it and put it out on the Internet for everyone to implement? Btw, it should also work with analogue and RS485 sensors, which this one does.
Do you know how to read the data from de color sensor?
I use your disco party light to test the sensormux but I wonder how can I retrieve the information from the colorsensor. Could you please help me?
Regards
Jose Luis
That totally depends on what information you’re trying to retrieve from it. Could you elaborate?
= Xander