Note your order number in the support request.
You can find order number on your Packing-slip or Order confirmation e-mail.
Humble Supporter of:
Robofest
Trinity College Fire Fighting Robot Contest.
Contact:
E-mail: Address:
mindsensors.com
8607 Mayland Drive
Richmond, VA 23294 USA. Phone: (804) 767-8116 Fax: (804) 859-4607
Active Sensor Multiplexer v2
Features
Active Sensor Multiplexer - The RCX has only 3 sensor input connectors. Most of the sophisticated robot designs need more than three sensors. Active Sensor Multiplexer lets you connect extra 3 Actively Powered sensors to single input port. Thus giving designer the power of total 9 sensors for each RCX. This permits you to connect Light, Angle or any other custom sensor at the same time to single RCX sensor input port.
RCX sensor port has just enough power to drive single sensor, hence this multiplexer not only switches signal, but also switches the power to sensor ON and OFF, while giving you the flexibility of three extra sensors and still conserving the battery. You can change from one sensor to another sensor by changing the sensor type momentarily, say from light sensor to touch sensor. Example of NQC program is included at the bottom of this page.
Also works with Mindstorms NXT.
Technical Specifications
Total power consumption: 4mW (less than 3% of total available power)
Current consumption: 500uA with no sensor attached.
Voltage drop: 50mV with Light sensor attached.
Channel selection time: 75 ms
Channel access logic: Random access to any channel.
Size: 5 studs by 4 studs.
Connector: Standard Mindstorms electric wires can be connected at the bottom or simple wire with two-pin female connectors can be connected at the top.
Devices used: High Reliability solid state SMT and Low power Microcontroller.
#define THRESHOLD 40
task main()
{
//AMUX is connected to port 2
SetSensorType(SENSOR_2,SENSOR_TYPE_LIGHT);
Wait (10);
// set full power to motors
SetPower(OUT_A+OUT_C,OUT_FULL);
// drive the robot forward
OnFwd(OUT_A+OUT_C);
Ch2();
// keep going forward until value of light sensor
//connected at channel2 of AMUX is <= predefined value
while (SENSOR_2 <= THRESHOLD) {
/* keep going */
;
}
Off(OUT_A+OUT_C); // then stop
}
/* --------------------------------------
** use this function to select channel 1
** (assuming that AMUX is connected to port 2 on RCX)
** -------------------------------------- */
void Ch1(void)
{
SetSensorType(SENSOR_2,SENSOR_TYPE_TOUCH);
Wait(1);
SetSensorType(SENSOR_2,SENSOR_TYPE_LIGHT);
}
/* --------------------------------------
** use this function to select channel 2
** -------------------------------------- */
void Ch2(void)
{
SetSensorType(SENSOR_2,SENSOR_TYPE_TOUCH);
Wait(1);
SetSensorType(SENSOR_2,SENSOR_TYPE_LIGHT);
Wait(1);
SetSensorType(SENSOR_2,SENSOR_TYPE_TOUCH);
Wait(1);
SetSensorType(SENSOR_2,SENSOR_TYPE_LIGHT);
}
/* --------------------------------------
** use this function to select channel 3
** -------------------------------------- */
void Ch3(void)
{
SetSensorType(SENSOR_2,SENSOR_TYPE_TOUCH);
Wait(1);
SetSensorType(SENSOR_2,SENSOR_TYPE_LIGHT);
Wait(1);
SetSensorType(SENSOR_2,SENSOR_TYPE_TOUCH);
Wait(1);
SetSensorType(SENSOR_2,SENSOR_TYPE_LIGHT);
Wait(1);
SetSensorType(SENSOR_2,SENSOR_TYPE_TOUCH);
Wait(1);
SetSensorType(SENSOR_2,SENSOR_TYPE_LIGHT);
}
Lejos driver for Active Sensor Multiplexer
import josx.platform.rcx.*;
/**
* Simple test class for active sensor multiplexer with lejos.
* It has been tested with lejos 2.1.0
* (should work with earlier versions since 1.4.0).
*
* @author Jean-Michel Gaudin
* @version 26-January-2004
*
* @see josx.platform.rcx.Sensor
*/
publicclass ActiveMpxTest implements SensorConstants
{
// Connect the active multiplexor output to rcx input 2
privatestatic Sensor rcxInput = Sensor.S2;
publicstaticvoid main(String [] args)
{
int i; //loops
int chValue; // active multiplexer ch values
// select active multiplexer ch1 input
selectCh1();
// display ch label
displayChlabel("ch1");
// read and display ch1 value
for (i=0;i<10;i++)
{
// read active multiplexer ch1 values
chValue = rcxInput.readValue();
// display it
displayChValue(chValue);
}
// select active multiplexer ch2 input
selectCh2();
// display ch label
displayChlabel("ch2");
// read and display ch2 values
for (i=0;i<10;i++)
{
// read active multiplexer ch2 value
chValue = rcxInput.readValue();
// display it
displayChValue(chValue);
}
// select active multiplexer ch3 input
selectCh3();
// display ch label
displayChlabel("ch3");
// read and display ch3 value
for (i=0;i<10;i++)
{
// read active multiplexer ch3 value
chValue = rcxInput.readValue();
// display it
displayChValue(chValue);
}
}
// Select the ch1 input of the active multiplexer
privatestaticvoid selectCh1()
{
rcxInput.passivate();
rcxInput.setTypeAndMode(SENSOR_TYPE_TOUCH,SENSOR_MODE_BOOL);
sleep10ms();
rcxInput.activate();
rcxInput.setTypeAndMode(SENSOR_TYPE_LIGHT,SENSOR_MODE_PCT);
}
// Select the ch2 input of the active multiplexer
privatestaticvoid selectCh2()
{
rcxInput.passivate();
rcxInput.setTypeAndMode(SENSOR_TYPE_TOUCH,SENSOR_MODE_BOOL);
sleep10ms();
rcxInput.activate();
rcxInput.setTypeAndMode(SENSOR_TYPE_LIGHT,SENSOR_MODE_PCT);
sleep10ms();
rcxInput.passivate();
rcxInput.setTypeAndMode(SENSOR_TYPE_TOUCH,SENSOR_MODE_BOOL);
sleep10ms();
rcxInput.activate();
rcxInput.setTypeAndMode(SENSOR_TYPE_LIGHT,SENSOR_MODE_PCT);
}
// Select the ch3 input of the active multiplexer
privatestaticvoid selectCh3()
{
rcxInput.passivate();
rcxInput.setTypeAndMode(SENSOR_TYPE_TOUCH,SENSOR_MODE_BOOL);
sleep10ms();
rcxInput.activate();
rcxInput.setTypeAndMode(SENSOR_TYPE_LIGHT,SENSOR_MODE_PCT);
sleep10ms();
rcxInput.passivate();
rcxInput.setTypeAndMode(SENSOR_TYPE_TOUCH,SENSOR_MODE_BOOL);
sleep10ms();
rcxInput.activate();
rcxInput.setTypeAndMode(SENSOR_TYPE_LIGHT,SENSOR_MODE_PCT);
sleep10ms();
rcxInput.passivate();
rcxInput.setTypeAndMode(SENSOR_TYPE_TOUCH,SENSOR_MODE_BOOL);
sleep10ms();
rcxInput.activate();
rcxInput.setTypeAndMode(SENSOR_TYPE_LIGHT,SENSOR_MODE_PCT);
}
// Current thread sleeps for 10 ms
privatestaticvoid sleep10ms()
{
try {Thread.sleep(10);}
catch(InterruptedException ie){}
}
// Display the ch label on the rcx LCD for 0.5 s
privatestaticvoid displayChlabel(String chLabel)
{
LCD.clear();
TextLCD.print (chLabel);
try{Thread.sleep(500);}
catch(InterruptedException ie){}
}
// Display the ch value on the rcx LCD for 250 ms
privatestaticvoid displayChValue(int chValue)
{
LCD.clear();
LCD.showNumber(chValue);
try{Thread.sleep(250);}
catch(InterruptedException ie){}
}
}
How to connect Active Sensor Multiplexer to RCX and sensors
If you are using standard lego wires, use the connector orientations as shown in this pitcure.
Note:
Active sensor Multiplexer needs to be connected to your Lego RCX only in one polarity way. Reversing this will cause the malfunction of multiplexer (This does not damage Multiplexer). To determine the correct polarity follow these steps:
Connect the multiplexer to your RCX.
Connect light sensor to Ch2.
Switch on your RCX.
If Light sensor is ON, reverse the polarity of RCX connection by rotating connecting wire by 180 degree.