LePoMux

LEPOMUX
What is it?
LEPOMUX stands for LEGO Port-Multiplexer. Its purpose is to extend the the I/O ports of the LEGO RCX.
(In case you don't know what the RCX is, take a look at LEGO's Mindstorm website).
 
 
Features:
  • 4 transparently multiplexed LEGO-compatible sensor inputs
  • 4 inputs for IR distance sensors (Sharp GP2D12)
  • 2 PWM-controlled LEGO-compatible motorports (16 different speeds, up to 16 PWM ports supported by firmware)
  • 4 servo compatible outputs (16 different angles, up to 8 servos supported by firmware)
  • 3 infrared sensors for IR-beacon recognition (100 / 125 Hz, requires additional IR-Eye board which is connected via a 6-pin Mini-DIN connector)
  • 8 LEDs which show the state of the motor ports and can be used for indication or debugging
  • RC5 remote control decoding support (IR commands are linked to user programmable command lists [not completely implemented yet])
  • completely timing independent data transfer protocol with up to 90 bytes/s transfer rate
  • each datasource is directly addressable
  • addressing only takes about 10 to 30 ms for any source (depends on the OS used in the RCX)
  • PWM-cycles, Servo-PWM and IR-detection frequencies can be configured via software
  • modular design (controller/battery module can be equipped with different sensor/actuator modules)
  • low power consumption
  • small size (the basic controller/battery module fits into a LEGO battery case)
  • OS-independent - it can be used e.g. with BrickOS, NQC or LejOS
  •  
    Drawbacks:
  • you lose one of your motorports and two of your sensor inputs
  • like most sensor extensions, Lepomux needs an additional power source
  • active sensors aren't powered permanently - switching between multiple active sensors has to be done fast/slow enough in order to power them
  •  
    You want it?
    The first Lepomux-sets are almost ready for shipping. Some missing contact plates will hopefully arrive in week 43. A set including controller, sensor- and motorboard will cost about 150 Euro (plus taxes & shipping). If you're interested in buying one or more of them, please let us know by sending an email to order@lepomux.org.
     
    News
    2004-09-30After a long time of planning and engineering, Lepomux is finally in production. Shipping will hopefully start in late October.
    2004-05-24The production prototype is finally on its way and it features a new protocol version which is 100% timing-independent.
    2003-11-28Long time no update. Actually, our new Lepomux homepage should've been online for months. Unfortunately we had no time to work on it, so we decided to update this page another time. All the features listed above are related to the forthcoming production release 'Lepomux v3.1'.
    2003-06-02We're busy developing Lepomux v3.0. There will soon be more info about it on a whole new lepomux.org-website including lots of photos and even a shop ;-)
    2003-02-28Even v2.0 won't make its way into production because LEGO doesn't sell those 9V battery cases any more. Expect Lepomux v3.0 to reside in one of the new cases together with six AA-batteries as power supply.
    2003-02-27Lepomux v2.0 arrived. We changed the RCX-Data-Interface to use both motor directions. This results in a transfer of 1.5 bit per edge. See protocol description below.
    2003-02-01We're just working on a new protocol version (and a new hardware revision) that makes the kernel patch obsolete.
    Visible results may be expected in about two weeks.



    Serial Data Transfer Protocol (outdated)
    Controlling the Lepomux is done via one of the RCX motorports. The initial version used a protocol with 5 bit preamble, 8 bit data and a parity bit. Bit timing was measured within the preamble so we knew when to sample the data bits. As it is almost impossible to generate a precise 1kHz output using BrickOS, we had to patch the kernel and do some nasty tricks. This enabled us to send up to 30 byte/s to the Lepomux. All in all, this protocol wasn't too robust and had quite a lot of overhead because of the preamble.

    Finally we dropped that protocol because there was a much better way to do it. RCX motorports have 3 states: forward, off and reverse (actually we've got 4 states, because a motor can be set to 'off' = floating or 'brake' = shorted - anyway, brake is hard to detect and not really needed in this case). Looking at those 3 states, our motorport carries one and a half bit of info per edge. This fact can be used to implement an almost timing-independent protocol where each bit starts with an edge. There is no need for a patched kernel any more and even the preamble is obsolete. A transfer of one byte takes about 10ms using BrickOS (take a look at senddata.c). NQC, LejOS or anything else can be used too, but transfers will take up to 30ms.

    Lepomux v3.1 will additionally use 'break' to determine start and end of datapackets. This leads us to a completely timing-independent protocol.

     
     



    Lepomux v1.0 Prototype Assembly
     
    IMG_1939.JPG

    the top of the upper PCB with the LEDs on it ...

    IMG_1941.JPG

    ... and the bottom.

    IMG_1942.JPG

    both PCBs piggybacked. the 26-pin connector is the place where all the sensor and motor signals go

     
    IMG_1944.JPG

    on the left, you can see the Mini-DIN connector for the IR-sensors. below there's the power connector.

    IMG_1961.JPG

    here we got a slaughtered battery case. we cut the powerstrips to get three connectors on the top of the box.

    IMG_1966.JPG

    after soldering and glueing we put some tape on the back of our connectors to prevent short circuits.

     
    IMG_1969.JPG

    the wires of these connectors are directly soldered to the PCBs

    IMG_1970.JPG

    a close look on the upper side of the bottom PCB. the big chip on it is the brain of the Lepomux (TI's MSP-430)

    IMG_1975.JPG

    now the PCBs can be put into the case
    the upper one first ...

     
    IMG_1977.JPG

    ... and the bottom on top of the other one.

    IMG_1980.JPG

    done! (obviously the whole thing only works with the original "POLICE"-battery boxes ;-)

    This is a project done by
    Dietmar Cordes (software) and
    Gunther Lemm (hardware / kernel patch).
    All rights reserved.

    NOTE: This site is in no way connected to or endorsed by LEGO corporation. LEGO and RCX are trademarks of the LEGO corporation.

    Thanks to Silpion for hosting this site.