I want to detect different light sources in arduino. The first Idea about solving this problem came into my mind was to add three light detection sensors (LDR, IR receiver Diode and Photo transistor) to combine them and put the outputs of these sensors to analog inputs of Arduino. And after that analyse data according to different light sources (for example Bulb, Tube light, Lighter flame and Sun light) and finally make check according to these data.

My question is, am I approaching problem correctly? Or is there any better but cheap approach toward this problem? because I cannot arrange spectrometer or any sensor to measure spectrogram of the lights.

What is the correct way to detect and differentiate between different light sources?

  • 1
    \$\begingroup\$ The first step in all this is to do some research on the different sources you want to detect, learn thoroughly about their similarities and differences, and then strategize about an analytic approach you feel will do the job. Sensor research will now start and may impact your analytic approach, due to what is practical for your situation. After this process, you will know what sensors you want and how you plan to use them. You seem to be asking for us to tell you the outcome of this process. Have you done your research yet, though? \$\endgroup\$
    – jonk
    Commented Mar 25, 2014 at 16:34

1 Answer 1


Have you considered using a number of light intensity sensors (type doesn't really matter), each with a different coloured filter over them? A few different colours from different parts of the spectrum would essentially be a simple spectrometer. Optical bandpass filters aren't particularly expensive. Selecting 3 or 4 points in the spectrum (visible or invisible) might give enough data to differentiate between light sources.

There's a range of "DIY Spectrometers" documented online using different techniques. Some people appear to use CDs or cheap diffraction gratings (for example from toy glasses).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.