Author Topic: colored led recognition with photoresistor or -diode  (Read 3672 times)

0 Members and 1 Guest are viewing this topic.

Offline Chris_DTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: be
colored led recognition with photoresistor or -diode
« on: November 26, 2021, 12:06:21 pm »
Hallo,
I have this project in mind: I want to create an array of leds, with different colours, wich should be recognized - so to speak - by photoresistors or -diodes(or better: the resistor should react on the color of the led).
Is there someone who already tried to do this? I mean: one photoresistor should recognize a red led for instance, and the other a green led, and they shouldn't be able to react on the color of the other.
« Last Edit: November 26, 2021, 01:11:05 pm by Chris_D »
 

Offline BeBuLamar

  • Super Contributor
  • ***
  • Posts: 1199
  • Country: us
Re: colored led recognition with photoresistor or -diode
« Reply #1 on: November 26, 2021, 03:18:11 pm »
You would need 3 photoresistors (or some integrated device with 3 sensors) and the R,G,B filters.
 

Offline Chris_DTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: be
Re: colored led recognition with photoresistor or -diode
« Reply #2 on: November 26, 2021, 07:48:43 pm »
You would need 3 photoresistors (or some integrated device with 3 sensors) and the R,G,B filters.
Do you mean creating RGB filters or do they exist? Because I want to create a really huge array of leds.And I want to do it as cheap as possible.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5871
  • Country: de
Re: colored led recognition with photoresistor or -diode
« Reply #3 on: November 26, 2021, 08:53:53 pm »
It's called a Bayer filter. Do a search.
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14196
  • Country: de
Re: colored led recognition with photoresistor or -diode
« Reply #4 on: November 26, 2021, 08:58:21 pm »
There are ready made light sensors with integrated filters, a bit like a 1 pixel camera.

For a large array I would consider a camera.
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 7949
  • Country: us
  • Retired, now restoring antique test equipment
Re: colored led recognition with photoresistor or -diode
« Reply #5 on: November 26, 2021, 09:02:22 pm »
If you want to assemble your own color filters with non-microscopic sizes, the traditional Kodak (now made by someone else) Wratten filters come in 75 mm and 100 mm square sizes, and are easily cut to size with a normal scissors.
see  https://www.kodak.com/en/motion/page/wratten-2-filters
That webpage includes download links for the transmission curves on each filter type.
The discussion from the CRC Handbook can be found at
http://www.astrosurf.com/luxorion/Documents/transmission-wratten-filters.pdf
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5871
  • Country: de
Re: colored led recognition with photoresistor or -diode
« Reply #6 on: November 26, 2021, 09:16:31 pm »
If you want to assemble your own color filters with non-microscopic sizes, the traditional Kodak (now made by someone else) Wratten filters come in 75 mm and 100 mm square sizes, and are easily cut to size with a normal scissors.
see  https://www.kodak.com/en/motion/page/wratten-2-filters
That webpage includes download links for the transmission curves on each filter type.
The discussion from the CRC Handbook can be found at
http://www.astrosurf.com/luxorion/Documents/transmission-wratten-filters.pdf

Yeah, snippets of those could be placed in front of each photodetector. Also a nice idea.

A simpler idea might be using colour sensors:
https://www.vishay.com/optical-sensors/digital-output-color-sensor/


« Last Edit: November 26, 2021, 09:20:23 pm by Benta »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19520
  • Country: gb
  • 0999
Re: colored led recognition with photoresistor or -diode
« Reply #7 on: November 26, 2021, 09:40:49 pm »
Hallo,
I have this project in mind: I want to create an array of leds, with different colours, wich should be recognized - so to speak - by photoresistors or -diodes(or better: the resistor should react on the color of the led).
Is there someone who already tried to do this? I mean: one photoresistor should recognize a red led for instance, and the other a green led, and they shouldn't be able to react on the color of the other.
What's the application? If it's just to identify the colour of an object illuminated by the LEDs, then only use one photodetector and only one LED is illuminate at a time.
 
The following users thanked this post: Siwastaja

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3358
  • Country: nl
Re: colored led recognition with photoresistor or -diode
« Reply #8 on: November 27, 2021, 01:25:52 am »
Why try to recognize the color?

You could for example PWM your LED's or have them emit data just as with IR remote controls.

If you have a matrix of LED's you could use separate data for rows and columns.

For better advice then tell us more about your application.
 

Offline Rich S

  • Newbie
  • Posts: 9
  • Country: us
Re: colored led recognition with photoresistor or -diode
« Reply #9 on: November 27, 2021, 01:41:45 am »
or in other words, a "webcam"
already integrated with analog front end, A/D converter and USB interface
I hear they're plug-and-play with the popular OS's too!  :-+
 

Offline Chris_DTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: be
Re: colored led recognition with photoresistor or -diode
« Reply #10 on: November 27, 2021, 06:10:27 am »
Hallo,
I have this project in mind: I want to create an array of leds, with different colours, wich should be recognized - so to speak - by photoresistors or -diodes(or better: the resistor should react on the color of the led).
Is there someone who already tried to do this? I mean: one photoresistor should recognize a red led for instance, and the other a green led, and they shouldn't be able to react on the color of the other.
What's the application? If it's just to identify the colour of an object illuminated by the LEDs, then only use one photodetector and only one LED is illuminate at a time.
No they are next to each other. In rows. With very little space.
 

Offline Chris_DTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: be
Re: colored led recognition with photoresistor or -diode
« Reply #11 on: November 27, 2021, 06:13:20 am »
Why try to recognize the color?

You could for example PWM your LED's or have them emit data just as with IR remote controls.

If you have a matrix of LED's you could use separate data for rows and columns.

For better advice then tell us more about your application.
That is a good idea. the leds are in rows, next to each other. The purpose is that the resistors/diodes recognize them, and act as a trigger (for sounds by the way).
How do I do this? Are there any schematics online? And how to 'de-modulate', because there has to be a 'receiver' of some sort?
« Last Edit: November 27, 2021, 09:27:55 am by Chris_D »
 

Offline Chris_DTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: be
Re: colored led recognition with photoresistor or -diode
« Reply #12 on: November 27, 2021, 06:14:46 am »
It's called a Bayer filter. Do a search.
Yes, I see, but that is not what I'm looking for.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8172
  • Country: fi
Re: colored led recognition with photoresistor or -diode
« Reply #13 on: November 27, 2021, 08:57:14 am »
As Zero999 said.

LEDs can turn on/off in just tens of nanoseconds!

Photodiodes can react in tens of nanoseconds! Phototransistors are slower, but likely fast enough.

Fast enough for what?

For implementing this pseudocode:
1) turn on red LED
2) R = Sample intensity value
3) Turn off red LED, turn on green LED
4) G = Sample intensity value
5) Turn off green LED, turn on blue LED
6) B = Sample intensity value

See? You need just one RGB LED, and one normal single-color photodiode (or phototransistor, if you are fine with poor characteristic curve, including large temperature variation).

If the light source for detection has to be external (for example, whatever ambient light is available, and you can't shield it), then this won't work, of course.
 

Offline Chris_DTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: be
Re: colored led recognition with photoresistor or -diode
« Reply #14 on: November 27, 2021, 09:22:15 am »
As Zero999 said.

LEDs can turn on/off in just tens of nanoseconds!

Photodiodes can react in tens of nanoseconds! Phototransistors are slower, but likely fast enough.

Fast enough for what?

For implementing this pseudocode:
1) turn on red LED
2) R = Sample intensity value
3) Turn off red LED, turn on green LED
4) G = Sample intensity value
5) Turn off green LED, turn on blue LED
6) B = Sample intensity value

See? You need just one RGB LED, and one normal single-color photodiode (or phototransistor, if you are fine with poor characteristic curve, including large temperature variation).

If the light source for detection has to be external (for example, whatever ambient light is available, and you can't shield it), then this won't work, of course.
I understand what you are saying, but if I have obtained the right sample value, I suppose in amp, then how do I proceed?The purpose it that my receiving resistor/diode should work as a trigger/switch for a signal. Do I need resistors, transistors,...?
« Last Edit: November 27, 2021, 09:24:15 am by Chris_D »
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8172
  • Country: fi
Re: colored led recognition with photoresistor or -diode
« Reply #15 on: November 27, 2021, 12:51:43 pm »
I don't know, because I didn't quite understand from the opening post what you are actually doing. Maybe elaborate a bit, not on what you think you need as a solution, but what's the original project?
 

Offline Chris_DTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: be
Re: colored led recognition with photoresistor or -diode
« Reply #16 on: November 27, 2021, 01:26:15 pm »
I don't know, because I didn't quite understand from the opening post what you are actually doing. Maybe elaborate a bit, not on what you think you need as a solution, but what's the original project?
I just want to make a little circuit (for the moment) where 3 photoresistors/diodes react to a different color of light.
And if they do, another light starts to burn.
I thought this was going to be rather simple. :D
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8172
  • Country: fi
Re: colored led recognition with photoresistor or -diode
« Reply #17 on: November 27, 2021, 01:37:23 pm »
It's not about it being simple or not simple, it's about us understanding what you actually want, so we can make good suggestions, i.e., see what is the simplest way to achieve your goal, whatever it is.

For example, it was a bit unclear if the device needs to detect color of external objects, or color of external light. The former is easy to do using the method described by Zero999 and myself. If it's about the latter, then you need a sensor with color filters. Look at the parametric search of your favorite distributor; I haven't used color sensors myself lately but I'm sure you'll find some nice tiny integrated chip with color filters and R,G,B light sensors and their signal conditioning all nicely integrated.

What do you mean by "trigger"? You mean, like "red color detected" -> "play a certain sound"? This is all doable using analog electronics, but likely much easier to achieve with a microcontroller, so you can empirically adjust detection algorithms and thresholds. For example, certain "red" color might look quite red to your eye, but still cause a significant signal level on the green channel.

Finally, knowing your actual goal could help us give completely different suggestions. For example, if you are sorting LEDs with the contraption, then just measuring Vf at certain constant current (like 10mA) could prove easiest.
« Last Edit: November 27, 2021, 01:39:26 pm by Siwastaja »
 

Offline Chris_DTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: be
Re: colored led recognition with photoresistor or -diode
« Reply #18 on: November 27, 2021, 03:07:41 pm »
It's not about it being simple or not simple, it's about us understanding what you actually want, so we can make good suggestions, i.e., see what is the simplest way to achieve your goal, whatever it is.

For example, it was a bit unclear if the device needs to detect color of external objects, or color of external light. The former is easy to do using the method described by Zero999 and myself. If it's about the latter, then you need a sensor with color filters. Look at the parametric search of your favorite distributor; I haven't used color sensors myself lately but I'm sure you'll find some nice tiny integrated chip with color filters and R,G,B light sensors and their signal conditioning all nicely integrated.

What do you mean by "trigger"? You mean, like "red color detected" -> "play a certain sound"? This is all doable using analog electronics, but likely much easier to achieve with a microcontroller, so you can empirically adjust detection algorithms and thresholds. For example, certain "red" color might look quite red to your eye, but still cause a significant signal level on the green channel.

Finally, knowing your actual goal could help us give completely different suggestions. For example, if you are sorting LEDs with the contraption, then just measuring Vf at certain constant current (like 10mA) could prove easiest.
No, it is color of external light.
And I don't want to use microcontrollers.
And I have a motto I've borrowed from Goethe, who contributed heavy to color theory: 'In der beschränkung zeigt sich erst der Meister'.
« Last Edit: November 27, 2021, 03:10:03 pm by Chris_D »
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8172
  • Country: fi
Re: colored led recognition with photoresistor or -diode
« Reply #19 on: November 27, 2021, 04:45:28 pm »
OK, we are getting your requirements bit by bit!

Not "wanting" to use a microcontroller is a strange one but yeah, if you want to do that, this may (or may not) increase the difficulty significantly. Analog electronics is simple when... simple, but get pretty complex and hard to design really fast, as you have to sacrifice flexibility. To me, restraining from use of certain tools for no technical reason is not a simplification, but a complication.

As an engineer, I can't help you when for you this isn't an engineering project, but an art project including a social game element.

But as you clearly know what you are doing, while I don't have a clue, I wish you best of luck.
« Last Edit: November 27, 2021, 04:47:08 pm by Siwastaja »
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2391
  • Country: gb
  • Recovering Electrical Engineer
Re: colored led recognition with photoresistor or -diode
« Reply #20 on: November 27, 2021, 05:19:09 pm »
Heres a dirty secret: Coloured leds can be used as wavelength specific photodiodes- just use them to control single transistor current sources.  https://www.analog.com/en/analog-dialogue/raqs/raq-issue-108.html

Something as simple as this:

https://wiki.analog.com/university/courses/electronics/electronics-lab-led-sensor
« Last Edit: November 27, 2021, 09:43:09 pm by Terry Bites »
 
The following users thanked this post: Chris_D

Offline Chris_DTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: be
Re: colored led recognition with photoresistor or -diode
« Reply #21 on: November 27, 2021, 06:40:35 pm »
Heres a dirty secret: Coloured leds can be used as wavelength specific photodiodes- just use them to control single transistor current sources.  https://www.analog.com/en/analog-dialogue/raqs/raq-issue-108.html

Something as simple as this?

(Attachment Link)
Hello Terry, indeed, very interesting.
Actually I was basically just thinking about the 'simple' (although I'm not going to use that word anymore  :) )  light detector circuit with a photoresistor,
like so: https://circuits-diy.com/light-activated-led-using-photoresistor-ldr/
but working the other way round (switch goes on when there is light detected instead of darkness), with the photoresistor reacting to light of a certain kind of color, red or green for instance.
« Last Edit: November 27, 2021, 06:55:32 pm by Chris_D »
 

Offline Chris_DTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: be
Re: colored led recognition with photoresistor or -diode
« Reply #22 on: November 27, 2021, 06:50:16 pm »
Heres a dirty secret: Coloured leds can be used as wavelength specific photodiodes- just use them to control single transistor current sources.  https://www.analog.com/en/analog-dialogue/raqs/raq-issue-108.html

Something as simple as this?

(Attachment Link)
...but intriguing idea nevertheless.
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2391
  • Country: gb
  • Recovering Electrical Engineer
 
The following users thanked this post: Chris_D

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19520
  • Country: gb
  • 0999
Re: colored led recognition with photoresistor or -diode
« Reply #24 on: November 27, 2021, 10:25:12 pm »
Heres a dirty secret: Coloured leds can be used as wavelength specific photodiodes- just use them to control single transistor current sources.  https://www.analog.com/en/analog-dialogue/raqs/raq-issue-108.html

Something as simple as this?

(Attachment Link)
...but intriguing idea nevertheless.
It works, but note that an LED will respond to a shorter wavelength, than what it emits, so a red LED, will respond to orange, yellow, green light and a blue LED will respond to blue and violet. If you choose red and green LEDs, with coloured epoxy, it should minimise the response to other wavelengths.
 
The following users thanked this post: Chris_D


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf