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
Apr 25, 2024
Structures in Allegro X layout editors let you create reusable building blocks for your PCBs, saving you time and ensuring consistency. What are Structures? Structures are pre-defined groups of design objects, such as vias, connecting lines (clines), and shapes. You can combi...
Apr 25, 2024
See how the UCIe protocol creates multi-die chips by connecting chiplets from different vendors and nodes, and learn about the role of IP and specifications.The post Want to Mix and Match Dies in a Single Package? UCIe Can Get You There appeared first on Chip Design....
Apr 18, 2024
Are you ready for a revolution in robotic technology (as opposed to a robotic revolution, of course)?...

featured video

MaxLinear Integrates Analog & Digital Design in One Chip with Cadence 3D Solvers

Sponsored by Cadence Design Systems

MaxLinear has the unique capability of integrating analog and digital design on the same chip. Because of this, the team developed some interesting technology in the communication space. In the optical infrastructure domain, they created the first fully integrated 5nm CMOS PAM4 DSP. All their products solve critical communication and high-frequency analysis challenges.

Learn more about how MaxLinear is using Cadence’s Clarity 3D Solver and EMX Planar 3D Solver in their design process.

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

Optimize Performance: RF Solutions from PCB to Antenna
Sponsored by Mouser Electronics and Amphenol
RF is a ubiquitous design element found in a large variety of electronic designs today. In this episode of Chalk Talk, Amelia Dalton and Rahul Rajan from Amphenol RF discuss how you can optimize your RF performance through each step of the signal chain. They examine how you can utilize Amphenol’s RF wide range of connectors including solutions for PCBs, board to board RF connectivity, board to panel and more!
May 25, 2023
37,757 views