feature article
Subscribe Now

Using LEDs as Light-Level Sensors and Emitters

Modulating LED power based on ambient light level increases battery life, a particularly helpful feature in devices where battery life is measured in days. Using a very simple circuit, Altera’s MAX II and MAX IIZ CPLDs can measure the analog light level of their environments and then drive an LED at a proportional analog intensity level. Controlling the LED intensity based on ambient light as demonstrated reduces LED energy usage by more than 47% without affecting appearance.

Introduction

In portable electronic products, a common use for LEDs is a “heartbeat” indicator that shows power status, battery condition, or Bluetooth connection activity. The LED can be a major factor in determining battery life, as its intensity is directly proportional to power drain. LEDs are designed to be easily seen in bright ambient light, yet it can be assumed that much of the time a portable device is in a dark purse or pocket. A low-intensity LED indicator extends battery life but is useless in a bright environment. Modulating LED power based on ambient light level would increase battery life, a particularly helpful feature in a device where battery life is measured in days.

Regulating the LED’s Intensity

A PWM is very effective at regulating the LED’s intensity with very little wasted energy. The only feature necessary to complete a light-sensitive flash intensity system is an ambient light-level sensor, which can be added to a CPLD or FPGA circuit with no additional components. The light sensor uses the same blinking LED to measure ambient light level. The LED is forward biased to emit light and reverse biased to act as a light detector. Figure 1 shows how the LED is biased for emitting light and for sensing light with a relaxation oscillator. The frequency of oscillation is proportional to light intensity, allowing the use of a PWM to regulate LED light intensity output.

A very simple feedback system can be created for a flashing light. The LED flash intensity is determined by a value presented to the PWM, which is calculated when the LED is off. It is biased as a sensor connected to a relaxation oscillator. The oscillator output feeds into a frequency counter, where the frequency is proportional to the ambient light level. The frequency counter output is the value that controls the intensity of the LED PWM. It is possible to have only one sensor controlling the intensity of multiple LEDs.

Figure 2 shows the block diagram for a flashing LED with a feedback loop that controls the intensity based on the ambient light level.

Figure 3 shows an Altera® MAX® II CPLD design implemented on a MAX II Starter Kit that generates a 1-Hz flash rate with 125ms on period LED flash with a PWM duty cycle from 6.25% to 100%. Various tests with discrete LEDs plugged into the #4 and #8 terminals of the right-side 2×5 header have determined that the four MSBs of an 8-bit counter that samples the LED sensor PINOSC frequency for 125ms are the optimum values to control LED intensity.

Author: Rafael Camarota, Non-Volatile Product Line Manager, Low-Cost Products

Mr. Camarota joined Altera in 2002, where he is responsible for all CPLDs, and configuration products. He has more than 25 years of semiconductor experience and in the PLD industry. He holds a BSEE from Carnegie-Mellon University, and has over 25 patents relating to programmable logic circuits.

Leave a Reply

featured blogs
Mar 29, 2024
By Mark Williams, Sr Software Engineering Group Director Translator: Masaru Yasukawa 差動アンプはã1つの入力信号ではなく2つの入力信号間の差にゲインをé...
Mar 26, 2024
Learn how GPU acceleration impacts digital chip design implementation, expanding beyond chip simulation to fulfill compute demands of the RTL-to-GDSII process.The post Can GPUs Accelerate Digital Design Implementation? appeared first on Chip Design....
Mar 21, 2024
The awesome thing about these machines is that you are limited only by your imagination, and I've got a GREAT imagination....

featured video

We are Altera. We are for the innovators.

Sponsored by Intel

Today we embark on an exciting journey as we transition to Altera, an Intel Company. In a world of endless opportunities and challenges, we are here to provide the flexibility needed by our ecosystem of customers and partners to pioneer and accelerate innovation. As we leap into the future, we are committed to providing easy-to-design and deploy leadership programmable solutions to innovators to unlock extraordinary possibilities for everyone on the planet.

To learn more about Altera visit: http://intel.com/altera

featured chalk talk

Dependable Power Distribution: Supporting Fail Operational and Highly Available Systems
Sponsored by Infineon
Megatrends in automotive designs have heavily influenced the requirements needed for vehicle architectures and power distribution systems. In this episode of Chalk Talk, Amelia Dalton and Robert Pizuti from Infineon investigate the trends and new use cases required for dependable power systems and how Infineon is advancing innovation in automotive designs with their EiceDRIVER and PROFET devices.
Dec 7, 2023
14,397 views