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

 

 

     
    A light barrier with NXT® light sensor

    Following this discussion on Lugnet, I built this proof of concept of a light barrier using NXT light sensor and an optic fiber. Any small object passing between the end of the fiber and light sensor phototransistor can be easily detected, even if they have different color or reflectivity.

    The fiber I used comes from the RIS 2.0 kit, but similar ones can also be found in some ExoForce sets.

     

    The fiber is maintained in front of the LED and the other end is routed to face the sensor. You must take care to avoid any gap between the connector holding the fiber and the sensor to prevent direct light bleeding from LED to phototransistor. The fiber must be applied on the LED for best light coupling.

    The LED light is greatly attenuated by the fiber (the red glow proves that!). If you use the barrier in bright ambient light, you must shield it properly!

    In order to try this setup, I use it to count LEGO soccer balls that are notoriously hard to detect because of the black dots on white background.

    Here is the simple NXT-G ball counting program. An automatic calibration is done at program start, light must not be blocked at that time.

    With a slightly improved program, you may detect back to back balls easily.

    The improved ball counting program. The light level is averaged to adapt to slowly varying ambient light levels.

       

    In the same discussion, Brian Davis suggested the use of fiber optics on the phototransistor to improve spatial resolution of the light sensor. In order to test this concept, I built this contraption with three light sensor and a LEGO lamp (turning on sensor LED completely wash out the faint light received through the fiber). Three fibers close to each other should be able to detect black lines on paper.

    Unfortunately, I was not able to get it work correctly. Sensitivity is very low and readings are very easily perturbed by ambient light.

    Front view of the assembly.

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