Connect with us

Color Sensor

Discussion in 'Sensors and Actuators' started by BM Engineer, Mar 20, 2017.

Scroll to continue with content
  1. BM Engineer

    BM Engineer

    10
    0
    Mar 12, 2017
    Hello,
    I want to develop a circuit that detects the orange color of an LED and measure the time the LED orange light is on.
    I want to measure the orange light of 10 LED apart from each other. and they are placed in different places. Can I use one microcontroller? how to connect them ?
    What are the best color sensors.? Also, I want to make it as cheap as possible. So, what are the cheapest components to use ( like The microcontroller and so on).?
     
  2. davenn

    davenn Moderator

    13,399
    1,790
    Sep 5, 2009
    and how far apart are the LEDs and the detector going to be ?
    you are going to have to filter out ALL other light sources ... will be difficult
     
  3. BM Engineer

    BM Engineer

    10
    0
    Mar 12, 2017
    1cm
     
  4. Alec_t

    Alec_t

    2,724
    723
    Jul 7, 2015
    Is the LED light always orange, or does the colour change?
     
  5. BM Engineer

    BM Engineer

    10
    0
    Mar 12, 2017
    It's always orange ..
    Actually, It's an indicator led for a medical device, I want to record the time a certain program is on - the led is on whenever the program is active
     
  6. Alec_t

    Alec_t

    2,724
    723
    Jul 7, 2015
    A photo-transistor or light-dependent-resistor in direct contact with the LED could exclude extraneous light easily, but presumably the LED has to be visible also to a human when the device is in use?
     
  7. BM Engineer

    BM Engineer

    10
    0
    Mar 12, 2017
    Yes it's visible
    but it's small
    can I use A photo-transistor or light-dependent-resistor anyway?
     
  8. Bluejets

    Bluejets

    3,645
    736
    Oct 5, 2014
    If you are only detecting when it is on you could just measure the voltage across it.
     
    Arouse1973 likes this.
  9. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,259
    2,707
    Jan 21, 2010
    Yet again, I think it's time that you let us in on what the problem is you're trying to solve. While your solution might turn out to be the best one, it might also be unnecessarily complex.

    What are you trying to achieve?
     
  10. Alec_t

    Alec_t

    2,724
    723
    Jul 7, 2015
    Yes. What I'd probably do is put the light sensor in a housing mounted right over the LED so as to exclude all extraneous light. That of course would prevent the user seeing the LED, so I'd then use the sensor signal to light another LED visible to the user.
     
    BM Engineer likes this.
  11. Herschel Peeler

    Herschel Peeler

    401
    65
    Feb 21, 2016
    A LED can also be used as a light sensor. Light falling on an LED generates a voltage. The color of the lens (poorly) filters in that color. So an orange LED selects predominately the orange light.

    I don't know if they will be sensitive enough for you though. A CdS cell (photo resistor) or phototransistor might be better.
     
    Last edited by a moderator: Apr 4, 2017
  12. BM Engineer

    BM Engineer

    10
    0
    Mar 12, 2017
    Yes
    I was a little bit confused when I posted this
    I want to measure the on time of a LED which is an indicator for a certain program running in a medical device. In other words, I want to measure each time the program is activated.
     
    Last edited by a moderator: Apr 4, 2017
  13. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,259
    2,707
    Jan 21, 2010
    The problems are threefold:
    1. It's a medical device so we wouldn't suggest anything invasive, or even completely obscuring the LED and providing a duplicate controlled by your circuit.
    2. Non-contact to a relatively low intensity signal in conditions of unknown and probably variable ambient lighting.
    3. Unknown method of attachment.
    OK, so let's ignore 1 and 3 and go with the non-contact optical sensor. it would make a lot of sense to have two identical sensors, one pointing at the LED and the other pointing adjacent to the LED. You would then amplify the differential between these two sensors. That should help significantly in eliminating some of the effects of variable ambient lighting. (you could also point the second sensor to a dummy LED. This could be the top of a LED cut off and stuck to the case near the real one. This may help in getting better readings from the reference sensor.)

    It is also possible to achieve this by using a single sensor and amplifying the difference between the current signal and a low-pass filtered version of it. This presumes that changes in ambient lighting will be slower than the rate of change of light intensity of the LED as it switches on and off.

    At the output, you would again be looking for pulses with a fast rising or falling edge indicating a change in state of the LED. Depending on lighting conditions or noise, it is quite possible that you might detect extra edges or miss some.

    Is it important that you get the duration of every flash of the LED?

    Is there a maximum and minimum time the LED is on (or indeed off between pulses)? This may allow some transitions to be ignored.

    For best results you woul probably want to process the signal using a microcontroller so it can determine when it thinks the LED is actually on and off. As a simple test it can try to duplicate the LED status and you can visually check to see if it's getting things reasonably right. Using an oscilloscope you can compare the signal from your sensor to the output from the microcontroller to check for small glitches that are not visible.

    Once you have the detection of pulses working sufficiently well, I guess you'll want to do something else with them. The microcontroller may be able to assist there too.
     
  14. Bluejets

    Bluejets

    3,645
    736
    Oct 5, 2014
    You might be able to look at monitoring what turns the led on as it might be as simple as monitoring power supply on/off.
    Not enough info.
     
  15. RodB

    RodB

    7
    1
    Mar 19, 2017
    Hi - I once worked for an engineer that used a camera chip to analyse LED color. The output from the camera was fed to a microprocessor and analysed to determine the time it took for the LED light to pass through a pane of glass. You might be able to use this for determining if the light is on and how long it stays on.

    Rod
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.
Loading...
Electronics Point Logo
Continue to site
Quote of the day

-