How to Control White LED Strips with ESP32

When simple white light led strip meets the ESP32 smart controller, it is no longer a monotonous color.

But how to control white LED strips with ESP32?

The ESP32 controller can also accurately control the brightness of white light and simulate the changes in natural light. The multi-segment LED strip can be programmed to achieve dynamic effects such as marquees, waves, and flashes. If you want to know more about how to use it, our blog can provide you with concise guidance.

1.All Materials

DC5V Non-water proof Power Supply

DC5V Output

  • Voltage: DC 5V
  • Current: Up to 80A
  • Power: 200W

DC5V Input

  • Voltage Range: AC 110V/220V (dual input supported, switch-selectable)
Arduino 5V LED Power Supply
DC5V Power supply

Purpose of DC5V power supply:

  • Power for the white light LED strip and the ESP32  
  • Provide enough current to allow the LED strip to run farther
  • It is widely used and can be directly compatible with most electronic components and USB devices, reducing the need for conversion circuits.

We also have a detailed explanation of the power supply, hoping to help users quickly and accurately choose the right product. Waterproof power supplies and non-waterproof power supplies have their own characteristics in actual applications, and can be selected according to their own use environment.

Waterproof power supplies with a protection level of IP67 and above can effectively block the invasion of rain and strong moisture, and are mainly used in outdoor environments that are prone to rain or long-term humidity; ordinary non-waterproof power supplies are suitable for dry and clean indoor environments. In this case, ordinary power supplies can be used, which can both meet the needs and save costs.

ESP32 Board

22222
ESP32 Control Board Area Pin Introduction

Model: ESP32
Operating Voltage: DC5V
Input Voltage (recommended): DC5V,the control board is powered by a DC head.

Digital I/O Pins: The negative pole of the light strip is connected to the digital I/O pin (PWM pin is recommended)
Analog Input Pins: 9
Clock Speed: 30 MHz
Programming Interface: USB Type-C

Use in This Setup:

  • The Esp32 controller sends digital data signals to the regular white light led strip
  • If the current of the LED strip is too large, please use an external power supply,to ensure that the light strip can work properly.
  • The GPIO of ESP32 is 3.3V logic level. It is recommended to add a 220 ohm-1K ohm resistor between GPIO and the light strip (to prevent overcurrent from damaging ESP32)

Regular white light LED Strip

D1 5V White 1
 Regular white light LED Strip

Type: Regular non-addressable white led strip
Input Voltage: 5V DC
Features: No complicated IC chips, rich images can be displayed through the built-in program of the controller
LED quantity: 60 LEDs/m

Installation tips

  • Connect the positive pole of the light strip to the positive pole of the DC5V power supply.
  • The negative pole of the light strip is connected to the digital I/O pin (PWM pin is recommended)

2.ESP32 and single white led Wiring Schematic

The wiring diagram of LEDSuntech is shown below:

esp32 white Schematic diagram
  How to Control regular white light LED Strip with ESP32 Wiring Diagram

Note:

1. The current of the control board is <500mA;

2. The current of the single white led strip is too large, please use an external power supply to power the LED strip;

3. The DC3.3/5V interface is the voltage output port of the control board, it is  cannot be connected to the power supply. Use the DC interface to connect the power supply;

4. This wiring diagram is for common anode, please note that the program must be a common anode program;

5. Note that the GPIO of ESP32 is a 3.3V logic level. It is recommended to add a 220 ohm-1K ohm resistor between GPIO and the light strip (to prevent overcurrent from damaging ESP32).

 

3.ESP32 and single white LED Connection Diagram

esp32 white connect
    How to Control regular white light LED Strip with ESP32 LEDSuntech

Conventional monochromatic white light is the most widely used in daily applications. It combines practicality with health properties. White light can accurately restore the color of objects and avoid color difference interfering with visual judgment. In addition, monochromatic white light greatly reduces the proportion of harmful short-wave blue light, which can significantly relieve eye fatigue caused by long-term use. If you are also interested in RGB LED strips other than white light, you can also contact us for more information.

4. Programming Code Upload

The Software: Arduino IDE

Library Used: FastLED

LEDSuntech :If you have any questions about how to write code, you can contact us. Our engineering team can provide you with technical support.

				
					const int whiteLedPin = 19;  // Must be a PWM pin
const int fadeSpeed = 15;   //Transition speed (milliseconds)

void setup() {
  pinMode(whiteLedPin, OUTPUT);
}

void loop() {
  // fade effect
  for (int brightness = 255; brightness &gt;= 0; brightness--) {
    analogWrite(whiteLedPin, brightness);  // Common anode 255 = off, 0 = brightest
    delay(fadeSpeed);
  }
  
  //fade effect
  for (int brightness = 0; brightness &lt;= 255; brightness++) {
    analogWrite(whiteLedPin, brightness);
    delay(fadeSpeed);
  }
}
				
			

5. Single white light Demonstration Video

Here is a video showing how to control the light changing effect of a regular single color LED strip with ESP32:

Even the simplest white LED can break through the traditional limitations through the intelligent control of ESP32. The monochrome white light can also gradually brighten or dim, creating an environment that naturally wakes you up or helps you sleep. It has become an intelligent terminal that integrates environmental perception, artistic expression, and energy-saving interaction. If you are also interested, please feel free to contact us.

Feel Free To Contact Us

We will reply your email within 12 hours.

Ask For A Quote