LEGO® MINDSTORMS® and Technic®MINDSTORMS® EV3/NXTMINDSTORMS SensorsLEGO® technical dataLDrawMiscellaneous LEGO®VEX;LEGO® & PhotographyPanoramic PhotographyPhoto GalleryHome

 

 


    Some precisions on read phase jitter:

    "A/D scanning sequence appears to be as follows:

  • At the start of the 1 msec interrupt handler routine, RCX firmware turns off the 8 volt powering output to the sensors.
  • At the end of the 1 msec interrupt routine, RCX starts an A/D conversion cycle on the four analog inputs [three sensors and battery level] and then returns from interrupt.
  • The A/D conversion takes something like 266 cycles [@ 16 MHz] to complete.
  • When the A/D conversion finishes, it raises a "conversion complete" interrupt. This interrupt handler reads the values from the A/D ports and stores them in RAM. It then re-enables the 8 volt powering output.

    The jitter is probably due to the variable length of time it takes the 1 msec interrupt to operate. In particular, it does a lot more things every 10 msec to deal with timers, sound management, etc.

    There's really three levels of noticeable work in the 1 msec interrupt handler. Work that needs to be done every 1 msec, every 10 msec and every 100 msec. This probably corresponds to the 90, 110 and 130 µs observations.

    There's also a very little bit of work done every 3 and 12 msec as well. The every three msec work is to start the A/D sensor and these are the only measurements that you are looking at. It turns out the 3 and 12 msec counters are offset by one - the 12 msec counter is set up so that it wraps one msec after a 3 msec event has happened so you'll never see this incremental work." Dick Swan

    Asymmetry between steps duration

    "In examining the rotation sensor, I wrote a RCX program that simply frequently sampled the raw rotation sensor value and looked for transitions from old to new value and stored them counts in a 16 element array. I had the sensor hooked up to a motor so that it was running continuously at a constant speed of about 300 RPM. I was sampling as fast as firmware would run and was getting about ten samples the same value before any transition.

I think the time between samples was around 1 - 2 milliseconds. The anomaly I noticed was that for quadrant one [the lowest voltage level], I was reading about 50% more samples than any of the other three quadrants. I got a count of about 25,000 samples in quadrant one and about 15,000 samples in the other three quadrants. The number of transitions between each quadrant was around 2,000. I ran several experiments with similar results. [And I noticed about 0.1% transition errors]. I would have thought that all quadrants should have the same number of total samples read." Dick Swan

    This can be explained partially by this photo: the blades of the rotor are much larger than the space between them. Morover, threshold of optical fork is probably asymmetrical, and go to dark state as soon as light is partially blocked by blade, widening it a bit more.
     

LEGO® MINDSTORMS® and Technic®MINDSTORMS® EV3/NXTMINDSTORMS SensorsLEGO® technical dataLDrawMiscellaneous LEGO®VEX;LEGO® & PhotographyPanoramic PhotographyPhoto GalleryHome