|
Site map :Last upgrade to the site:
There has been
This is an unofficial LEGOŽ web site. Copyright 1996, 2000, Denis Cousineau
|
It is sometimes necessary (see Turing machine) to have a rotation sensors accurate for quarter of turns. Although the rotation sensor sold by Lego if perfect for that purpose, it is (i) difficult to obtain, not being included in the standard kits, and (ii) expensive, in case many rotation sensors are needed. Mario Ferrari suggested a method to use a LEGO switch as a rotation sensor for detecting 180 degree turns (half turns). Here, we expand his method so that the LEGO switch is sensitive to 90 degree turns. As shown in the next diagram, it is easy to achieve using two wires, being placed back to back on the other end of the switch: On this diagram, if you turn the red axle, the switch will turn on and off four times per turns. It is on when the axle is 45 degrees from the horizontal (or 135 or 225 or 315). It is off when the axle is 0, 90, 180 or 270 degrees. If it is connected to a Mindstorms RCX with the input configured as a switch detector, it will be 1 in the first cases and 0 in the other cases. The beauty of this method is that it can be expanded to include as many rotation sensors as you need in serial. For example, in the next diagram, three are connected. If all the axles are 45 degrees from the horizontal, the sensor will be on (a reading of 1). If any axle is not in a 45 degree position, the overall sensor will be off (a reading of 0). Below is the configuration used in the Turing machine. The only difference is that there is a small gap between the LEGO switchs. Because there is no electric plate that are 5-bump long, I used short wires instead. |