Regulated LED Driver Documentation
The Regulated LED Driver is a high-performance, low-dropout linear LED driver designed to provide a stable and efficient power supply to LEDs in various Internet of Things (IoT) applications. This component is ideal for use in LED lighting systems, signage, and indicator lamps.
The Regulated LED Driver has the following pinout:
VIN (Input Voltage): 2.5V to 5.5V
VOUT (Output Voltage): Adjustable (see datasheet for details)
EN (Enable): Active High
DIM (Dimming): PWM Input (0-100% duty cycle)
GND (Ground): 0V
High accuracy and stability
Low dropout voltage (typically 0.5V)
Supports a wide range of input voltages
Adjustable output voltage
PWM dimming capability
Over-temperature protection
Short-circuit protection
### Example 1: Basic LED Driver Configuration (Arduino)
In this example, we will demonstrate how to use the Regulated LED Driver to power an LED strip using an Arduino board.
```arduino
const int enPin = 2; // Enable pin connected to Arduino digital pin 2
const int dimPin = 3; // Dimming pin connected to Arduino digital pin 3
void setup() {
pinMode(enPin, OUTPUT);
pinMode(dimPin, OUTPUT);
digitalWrite(enPin, HIGH); // Enable the LED driver
}
void loop() {
// Dim the LED strip to 50% brightness
analogWrite(dimPin, 128);
delay(1000);
// Dim the LED strip to 100% brightness
analogWrite(dimPin, 255);
delay(1000);
}
```
### Example 2: PWM Dimming using Raspberry Pi (Python)
In this example, we will demonstrate how to use the Regulated LED Driver to power an LED strip using a Raspberry Pi and Python.
```python
import RPi.GPIO as GPIO
import time
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Define the enable and dimming pins
enPin = 17
dimPin = 18
# Set up the pins as outputs
GPIO.setup(enPin, GPIO.OUT)
GPIO.setup(dimPin, GPIO.OUT)
# Enable the LED driver
GPIO.output(enPin, GPIO.HIGH)
try:
while True:
# Dim the LED strip to 25% brightness
GPIO.PWM(dimPin, 100).start(25)
time.sleep(1)
# Dim the LED strip to 50% brightness
GPIO.PWM(dimPin, 100).ChangeDutyCycle(50)
time.sleep(1)
# Dim the LED strip to 75% brightness
GPIO.PWM(dimPin, 100).ChangeDutyCycle(75)
time.sleep(1)
# Dim the LED strip to 100% brightness
GPIO.PWM(dimPin, 100).ChangeDutyCycle(100)
time.sleep(1)
except KeyboardInterrupt:
# Clean up GPIO on exit
GPIO.cleanup()
```
Note: These examples are for illustration purposes only and may require modification to suit specific use cases and hardware configurations. Always refer to the datasheet and component documentation for detailed specifications and usage guidelines.