WS2812 current waveform

WS2812 current waveform

 

01 WS2812 current waveform


I. Introduction

  The colored lamp bead WS2812B can be controlled by a single line, and multiple lamp beads can be cascaded and controlled through an IO port of the single-chip microcomputer. WS2812 three colors are set through 24 bits, and the brightness of each RGB has 256 levels that can be set. So the total number of colors is 2 to the 24th power. Next, observe the internal color driving mechanism by measuring the working current waveform of WS2812. Use a resistance box to sample the working current. The resistance of the resistance box is set at 10 to 50 ohms. By measuring the waveform of the VCC terminal, the working current waveform of WS2812 can be obtained. Next, through the software, set different colors of WS2812, ·Observe the different waveforms of its current.

GM1687595888_1280_800.MPG|_-11

▲ Figure 1.1.1 Set the green 0x80 current waveform

▲ 图1.1.1 设置绿色0x80电流波形

2. Measurement results

1. Working frequency

  Set the brightness of G in WS2812 to 0x80, and the brightness of other R and B to 0. The sampling resistor is 50 ohms, and this is the measured current waveform. It can be seen that the operating frequency of WS2812 is 4.235 kHz.

GM1687596225_1280_800.MPG|_-5
▲ Figure 1.2.1 The current waveform corresponding to the three colors set to 0x40

▲ 图1.2.1 三种颜色设置为 0x40 对应的电流波形

  This is to set G, R, both LEDs are 50% on, and B is off corresponding to the current waveform. It can be seen that the phases corresponding to the work of the two LEDs G and R are not in the same phase, and there is a certain phase difference between them. This is to set the brightness of the three RGB LEDs to 25%, and you can see that the three LEDs are turned on in turn. This is set to 12.5% ​​brightness, and the difference between the low level pulses corresponding to the three LEDs lighting up is 120°. By observing the WS2812 operating voltage waveform, it can be seen that the phase difference between the three LEDs is 120 degrees.

GM1687596820_1280_800.MPG|_-4

▲ Figure 1.2.2 The current waveform corresponding to the three colors set to 0x20

▲ 图1.2.2 三种颜色设置为 0x20 对应的电流波形

  Set the brightness of the three channels to 0xff, and the corresponding voltage waveform is a straight line. ·At this time, all three LEDs are turned on. Set the brightness of the three LEDs to 0x80, corresponding to the working voltage waveform. You can see overlapping waveforms between the three LEDs turning on at the same time. Set the brightness of the three LEDs to 0x10, 0x20, 0x30 respectively. This voltage waveform shows the obvious difference in lighting time between them. In addition, there is a phase difference of 120 degrees in one cycle. This arrangement can also reduce the fluctuation of the operating current to the greatest possible extent, and obtain a relatively stable operating current as much as possible.

GM1687597372_1280_800.MPG|_-6

 

Summary  ※


  In this paper , by observing the working current of WS2812, the internal LED PWM frequency is 4.235 kHz. The difference between the three LED lighting is 120 degrees.

GM1687597799_1280_800.MPG|_-3


■ Links to related literature:

● Links to related diagrams:

Guess you like

Origin blog.csdn.net/zhuoqingjoking97298/article/details/131363296