go away spammer

Author Topic: Detecting Color with Two LEDs and Pulling Pins Low  (Read 2603 times)

0 Members and 1 Guest are viewing this topic.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Detecting Color with Two LEDs and Pulling Pins Low
« on: February 21, 2008, 05:35:01 AM »
I need to detect the following colors: black,white,green, aluminum foil(shiny tape)

Now admin used 3 LEDs with photoresistor , can I use only two and get acceptable readings?

Also what color leds  for me  --  red and green?


Another ,unrelated question: When you pull a pin low ( logical 0) on a microcontroller ,that pin is now GND, and I can connect the negative lead of the LED to that pin and the positive pin of the LED to a positive source. Right?

Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline gamefreak

  • Supreme Robot
  • *****
  • Posts: 543
  • Helpful? 2
  • Robo-Enthusiast
Re: Detecting Color with Two LEDs and Pulling Pins Low
« Reply #1 on: February 21, 2008, 07:11:40 AM »
With 2 different colors you could still detect some color, but not as much as with 3, and pulling the pin low on the controller would turn on the LED, but you need to be careful with current draw.
All hail Rodney, the holy 555 timer
And Steve said: "Let there be lead!"

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Detecting Color with Two LEDs and Pulling Pins Low
« Reply #2 on: February 21, 2008, 06:09:10 PM »
Hi,

I need to detect the following colors: black,white,green, aluminum foil(shiny tape)
Black is NOT a color, but absense of light.
White is "all colors" concurrently.
Aluminum foil couldn't really be called a color either, since it's more like "pure" reflection.


can I use only two and get acceptable readings?
Depends on what you find acceptable.


Also what color leds  for me  --  red and green?
That would enable you to single out the green at least (green LED => reflectance, red LED => absorption), black should be OK as well (as long as you won't have to take any other colors than green into consideration) but the aluminum foil would read like the white, only the intensity of reflection will differ.

Aluminum foil could be tested by contact (since it conducts).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Detecting Color with Two LEDs and Pulling Pins Low
« Reply #3 on: February 21, 2008, 06:27:52 PM »
Nice idea with the contacts to test for aluminum!!!!

I will use both green and red LEDS on my bot
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

 


Get Your Ad Here

data_list