|    |  
      Here's a link to my NXT electronics folder: 
http://www.brickshelf.com/cgi-bin/gallery.cgi?f=187796 , which contains two 
experiments: 
 
My first experiment was to get the NXT to light an LED, in a similar way to the 
way the light sensor works.  My thanks to Philo for sharing a tutorial of how to 
modify RJ12 plugs to fit the NXT ports. 
 
My second experiment was to use pins 5 and 6 of the NXT sensor port to derive 4 
states in order to drive 3 different LEDs for a 3-colour light sensor.  The idea 
is that if the readings for each LED colour on each brick colour are known, the 
NXT can then determine the brick colour from a look-up table.  I used red, green 
and yellow LEDs for the output test, though the idea is to eventually use red, 
green and blue for a wider spectrum. 
 
The phototransistor circuit in the official light sensor was designed to improve 
the linearity of readings across the visible light spectrum, so the reading will 
be less with green or blue light than with red.  As long as the blue reading is 
high enough, the colour detection will work. 
 
There's a photo and a circuit schematic of this experiment in the folder. 
 
It wasn't easy to get 4 separate states, even programming the port with 
different sensor types, because pin 6 cannot be switched on an off in the same 
way as pin 5.  The window comparator in the circuit was required to detect the 
voltage on pin 6.  This might need further work to improve reliability as the 
window is quite small and the voltage might be subject to changes due to wire 
length etc... 
 
I'll post more electronic circuits and experiments in the folder in due course. 
 
PLMKWYT! 
 
Mark 
 |  
       |  
           
   
        Message has 2 Replies:        |    | Re: NXT electronic additions
  |  
  |  (...) That's a better idea because a yellow LED is just a red and a green LED that are both turned on at the same time. Hence there is no additional information in terms of reflectivity than you would have gained from the red and green LED's used (...)   (19 years ago, 11-Jun-06, to lugnet.robotics)   
   |         |    | Re: NXT electronic additions
  |  
  |  (...) The cheapest source for LED's that I've found is afer Christmas clearance sales of Philips LED Christmas lights. I picked up several sets of these cheap at Target. Each light socket contains an LED and one of the colors included in the (...)   (19 years ago, 13-Jun-06, to lugnet.robotics)   
   |         
      3 Messages in This Thread:     
     
 
      - Entire Thread on One Page:
      
        
- Nested: 
        All | Brief | Compact | Dots
        
 Linear: 
        All | Brief | Compact
           
         | 
        
  | 
      
 
   | 
           |