Light Sensing

There are several ways to determine if a device is powered on such as a non-contact current sensor or measuring voltage on the PCB, but I think the least expensive and least likely to void the warranty will be to detect if the blue light on the on/off push button is illuminated.

LED’s are great for emitting light, but they can also be used for detecting light. Many electronic devices can be reversed. For example a motor can be powered by electricity or it can generate electricity, a speaker can also be used as a microphone and an LED will generate current when exposed to light. Additionally, LED’s are spectrally selective. In other words, they can detect specific colors of light.

Generally speaking LED’s, are most sensitive to light that is lower than their dominant emission wavelength. Therefore, a yellow or red LED may yield the best results for detecting a green LED. Likewise an aqua or green LED could be used to detect blue light. My testing found that a sensing LED with a wavelength 50nm greater than the emitting LED worked best. If you don’t know the wavelength of the emitting LED and you don’t have an expensive spectrometer, it can easily be found using a diffraction grating such as this slide which cost under a dollar.

Place a ruler directly in front of the LED to measure. Then position the slide at a known distance of at least 5 feet from the LED. Longer distances tend to give more accurate results. Looking through the slide you’ll see that some of the light gets diffracted.

The ruler in front of the LED can be used to measure the distance from the light source to its nearest neighbor either left or right. In this case the value is 5.875 inches. The wavelength represented by λ (lambda) is equal to the following formula where d is the distance between slits in the diffraction grating, y is the distance between the LED and its nearest neighbor and L is the distance from the slide to the LED.

My diffraction grating slide has a value of d equal to 4850nm.  If you don’t know this value, it can be determined by solving for d with an LED of a known wavelength.  The distance to the nearest neighbor y is 5.875 inches and the distance L from the slide is 60 inches.  The units cancel out so it doesn’t matter if you prefer metric.  Plugging in the numbers gives a wavelength of 472nm for the blue led on the surveillance server power button.  Therefore, an LED 50nm higher or around 522nm should work well as a detector. I’ll use a Broadcom high intensity green LED with a wavelength of 525nm.  It has a narrow 15 degree viewing angle and a water clear lens both of which should improve the sensitivity. More information on measuring wavelength is available here.

This guide was first published on Oct 16, 2019. It was last updated on Oct 16, 2019. This page (Light Sensing) was last updated on Oct 16, 2019.