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
    2009-04-18We'd like to make this stuff opensource. Anybody interested please contact us via <opensource @ lepomux.org>.



    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 by
    Dietmar Cordes
    <d.cordes @ lepomux.org>

    (software) and
    Gunther Lemm
    <g.lemm @ lepomux.org>

    (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.