RCX sensor multiplexer

The RCX only has 3 sensor ports, and they can only be used for analog input, as well as simple IO (passive vs. powered). There is no digital interface for the sensors. I would use the IR port and a PICAXE to expand, but to receive IR messages, you have to use 9 bytes at 2400 baud for a single user-byte; much too slow.

To exceed the 3 sensor limit (actually 6), I made a sensor multiplexer. It supports 8 RCX sensors on one input port; 4 light sensors, and 4 touch sensors.

The "finished" product.

Without the lego connectors.

The schematic.

This is based heavily off of Michael Gasperi’s “RCX Input Mux & Color Sensor”.

The program to run it is written in NQC. The RCX switches channels by switching to passive, then back to powered mode. Switching like this takes the supply voltage from the clock pin for long enough to toggle, and advance the 4017, and returns the supply before C2 runs down. C1 keeps it from advancing every 3ms from the pulse of supply power. Q1 provides a reference point; when and only when the 4017 triggers it, the RCX will read 100%. R2 keeps it from ever seeing 100% from the touch sensors, and the light sensors need either direct sunlight or a laser beam (both very unlikely) to return 100%. If the program thinks it is at the homing pulse, but it is not reading 100%, it will advance until it sees 100% (thus getting back to the pulse it should be on).

Advertisements
This entry was posted in Electronics, Mindstorms, RCX and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s