![]() |
Four-way Multiplexer for LEGO RCX Touch Sensors |
The RCX has three analog inputs each of which is connected to a 10-bit analog to
digital converter (ADC) via a 10k ohm pullup resistor. Using that pullup as
part of a voltage divider is the objective.
Mux made with 4 resistors that came in a single cheap Radio Shack package.
All resistors are standard 5% tolerance (lowest grade) with these values:
12k 22k 47k 100kNotice how each successive value is approximately double the preceding one. I did a lot of complex math to determine the ideal values of the resistors using commonly found parts available in any Radio Shack in the country. I tested all combinations of common resistors at the extreme limits of their standard 5% tolerance to find values that would allow discrimination of any combinations of buttons pushed. I have no idea how this program does it as I wrote the code many years ago and never documented it at the time.
I wanted touch sensors that were as small as possible. A single 2x2 brick with
plug less than 1x1 is significantly smaller than a 2x3 brick with 2x2 connector.
Switches in these sensors were donated by antiquated 2-button mice. These mice
were destined for the garbage when they were replace with wheel mice.
Newer mice should work just as well.
Please ignore my soldering. That is the primary reason why I went into
software.