Lego Rotation Sensor Internals

Posted on Feb 5, 2014

Lego rotation sensor is a nice little device that enables RCX to measure rotation of an axle with good resolution: 16 steps per turn. Unfortunately it is plagued with a problem: at low rotation speed value read seems to jump randomly from 1 or two units. So I decided to have a fairly indiscrete look at it. here is what I discovered. Active sensors (rotation sensor, light sensor)

Lego Rotation Sensor Internals
Click here to download the full size of the above Circuit.

communicate with RCX through a two phases scheme: during 2. 9ms, RCX powers sensor (+8V), then during about 100 µs RCX reads analog value returned by sensor. During read phase, no power is provided to sensor, and this one has to live on its own reserve. This is done by storing energy in a capacitor during power phase. Here is a zoom on read phas of a rotation sensor. Numerous traces are accumulated over some time while rotating axle of sensor. You can see that sensor communicates with RCX through a 4 levels code. The voltages I measured for this levels are: These values seem a bit low when compared to Michael Gasperi`s (see his rotation sensor page ), perhaps my batteries were exhausted. You can also see that there is some jitter in read phase duration (between 90 µs and 125 µs) As the axle is rotated clockwise, output cycles througs steps 1 > 2 > 3 > 4 > 1, and through steps 1 > 4 > 3 > 2 > 1 when rotated ccw. This enables RCX to determinate rotation direction. As pointed out by here by JG rgen Stuber, we have here the first problem of rotation sensor: during transition between step 3 and 4, output crosses voltage of level 2, and between step 1 and 2, output crosses voltage of level 4. Since this transition takes some time, there is a probability that it happens just when RCX samples value. I tried to determine sampling time, it seems to take place about 60 µs after beginning of read phase. Here is such a...

Leave Comment

characters left:

Related Circuits

  • New Circuits



    Popular Circuits

    Time-Delay Photo-Flash Trigger
    Bird Feeder Monitor Circuit
    555 Timer as Monostable Multivibrator
    Boost Led Driver With 1:3000 Dimming Ratio And Excellent Current Regulation
    ESR Meter
    LMD18200 motor controller electronic project
    Infrared Switch Circuit
    TDA2030 8w Amplifier