Mindstorms 8 Input RCX Touch Sensor Multiplexer

www.pdf24.org    Send article as PDF   
I have built a Lego Mindstorms NXT, 8 Input RCX Touch Sensor Multiplexer for use with the old style RCX Touch Sensors. I personally think these retro Touch Sensors are far, far easier to use in models due to their physical size. I really don't know what the Lego Designers where thinking when they designed the NXT Touch Sensor!

I have one of Mindsensors' new TouchMux's, but it doesn't work very well with the legacy RCX style Touch Sensors. 

Mindsensors do make a very good a RCX Sensor multiplexer for NXT, the RXMux which allows you to connects up to 4 RCX style analogue sensors to your NXT. The RXMux Supports the following Sensors:

  • RCX Touch Sensor
  • RCX Light Sensor
  • RCX Rotation sensor
  • RCX Temperature sensor

As I often use more than 4 Touch Sensors in many of my Robots, I needed to construct my own RCX-TouchMux as there is no commercial equivalent to my Knowledge available.

RCX Touch Sensor Mux Unit
NXT 8 Input RCX Touch Sensor Multiplexer Unit

It is a fully compatible I2C Bus Type Sensor based on a Philips PCF8574 remote I/O expander. It’s a single integrated circuit that includes eight pins that can be either inputs or outputs. The PCF8574 has eight I/O pins that are labelled P0 to P7.

8 x RCX-Touch Sensor Mux Circuit
Required Cuts for Lego 2×8 Electric Plate Modifications

As can be seed from the Schematic Circuit Diagram above, the bill of materials is minimal. All you need is the following:

Lego 2×8 Electric Plates

The whole assembly of the NXT – 8 Input RCX Touch Sensor Mux took less than an hour in total to build. One side of the Lego 2×8 Electrical Plates had the conducting strips cut every 2 studs.  The best way to cut the brass strips is with a mini cutting-wheel  used on a Dremel or similar clone. I use an Alec SupaTool myself as can be seen in the earlier post.

A wire was soldiered to each pair of newly created two stud conductors and attached to the I/O pins of the PCF8574. As well, a wire was soldiered to the other sides conductor and terminated to ground, VSS. This procedure is repeated for the other plate as well.  Two locating holes were drilled in the Lego 2×8 Tile to fit the NXT Style Expansion Cable Socket and a larger one to allow the access to the sockets connection pins to allow connection to the PCF8574 Data and power supply pins.

Required Cuts for Lego 2×8 Electric Plate Modifications

Once all the electronic and electrical parts are connected, I suggest you test the unit to see that the Mux works as it should before finally assembling.  The final step if all thing work, is to assemble the Lego and Electronic parts together using some 5 minute epoxy to hold them firmly together.

Lego 2×8 Electric Plate Connections Points to PCF8574 Chip


To test your new NXT – 8 Input RCX Touch Sensor Mux, I suggest you download the NXT-G block for Mindsensors PCF8574 kit along with the General purpose I2C read and write blocks for low-level communication to I2C sensors/devices and install the into your Lego Mindstorms NXT-G Programme. The sensors readings will be in binary for the PCF8574 Port Readings for the I/O Pins are as follows when the Touch Sensor is pushed on:

PCF8574 I/O Pins

Binary Output Sensor Pressed
P0 Pin 4 1 Touch Switch 1 Bank 'A'
P1 Pin 5 2 Touch Switch 2 Bank 'A'
P2 Pin 6 4 Touch Switch 3 Bank 'A'
P3 Pin 7 8 Touch Switch 4 Bank 'A'
P4 Pin 9 16 Touch Switch 1 Bank 'B'
P5 Pin 10 32 Touch Switch 2 Bank 'B'
P6 Pin 11 64 Touch Switch 3 Bank 'B'
P7 Pin 12 128 Touch Switch 4 Bank 'B'


If two switches or more are active, then you add the individual values together to get the displayed values. With some basic Math you can sort out relatively easily which Sensors are Active.

Philips PCF8574
Philips PCF8574 Block Diagram

The total cost for the "NXT – 8 Input RCX Touch Sensor Mux"  will set you back less than $10 and take an hour to build. That has to be a very cheap, yet  extremely valuable accessory to you Lego NXT Mindstorms Kit. And with a bit of refinement and a little more time, a smaller compact version could be easily achieved!

RCX_TS_Mux – NXC Code Sample: Download Sample TouchSwitchMux.nxc


Previous Post

Mindsensors' Motor Mux Power Input Modifications

For ease of use I have modified my Mindsensors' NXT & RCX Motor Multiplexers with the following Power Supply Modifications. This method finishes the issues associated with the external power ... Read more

Next Post
Java for Lego Mindstorms NXT

Java for Lego Mindstorms NXT

LeJOS (sometimes pronounced like the Spanish word "lejos" for "far") is a tiny Java-based operating system.  LeJOS was originally forked out of the TinyVM project. It contains a VM for ... Read more

Short URL: http://tinyurl.com/jm47tfr

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Do NOT follow this link or you will be banned from the site!