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
May 8, 2024
Learn how artificial intelligence of things (AIoT) applications at the edge rely on TSMC's N12e manufacturing processes and specialized semiconductor IP.The post How Synopsys IP and TSMC’s N12e Process are Driving AIoT appeared first on Chip Design....
May 2, 2024
I'm envisioning what one of these pieces would look like on the wall of my office. It would look awesome!...

featured video

Why Wiwynn Energy-Optimized Data Center IT Solutions Use Cadence Optimality Explorer

Sponsored by Cadence Design Systems

In the AI era, as the signal-data rate increases, the signal integrity challenges in server designs also increase. Wiwynn provides hyperscale data centers with innovative cloud IT infrastructure, bringing the best total cost of ownership (TCO), energy, and energy-itemized IT solutions from the cloud to the edge.

Learn more about how Wiwynn is developing a new methodology for PCB designs with Cadence’s Optimality Intelligent System Explorer and Clarity 3D Solver.

featured paper

Designing Robust 5G Power Amplifiers for the Real World

Sponsored by Keysight

Simulating 5G power amplifier (PA) designs at the component and system levels with authentic modulation and high-fidelity behavioral models increases predictability, lowers risk, and shrinks schedules. Simulation software enables multi-technology layout and multi-domain analysis, evaluating the impacts of 5G PA design choices while delivering accurate results in a single virtual workspace. This application note delves into how authentic modulation enhances predictability and performance in 5G millimeter-wave systems.

Download now to revolutionize your design process.

featured chalk talk

Embedded Storage in Green IoT Applications
Sponsored by Mouser Electronics and Swissbit
In this episode of Chalk Talk, Amelia Dalton and Martin Schreiber from Swissbit explore the unique set of memory requirements that Green IoT designs demand, the roles that endurance, performance and density play in flash memory solutions, and how Swissbit’s SD cards and eMMC technologies can add value to your next IoT design.
Oct 25, 2023
26,170 views