What is an LED pixel? Calculation of the required number of pixels to use in the project

In this article we will look at how you can create a video screen or a ticker from pixels.

Pixels look like:

The pixel size is shown in the drawing below

Pixels are supplied connected in garlands of 50 pieces.

Each RGB LED module or pixel contains a control controller.
The chip and the LED itself are encased in a waterproof, transparent, soft silicone case. The peculiarity of pixels is that they can be controlled independently of each other; this is ensured by a microcircuit inside the pixel. This property allows you to create pixel-based video screens and tickers.


Pixel Specifications:

Diode type

Number of colors

32 k (LPD6803) or 16 million (WS2801)

Mounting type

Through the hole Ø12mm, thickness mat. 2-3mm

Degree of protection

Dimensions

38mm x 12.5mm x 12.5mm

Maximum current through all three colors

60mA (0.3W)

Control protocol

Serial on two wires

Table of degrees of protection

The IP67 protection level of the pixels means that they are completely protected from dust and can also withstand temporary immersion in water up to 1 m.

The main advantages of these pixels:

1) Low cost
2) High brightness
3) High degree of protection IP65 (not afraid of dust or water, can be located outside without being covered by anything)
4) Ease of installation (any person can be trained to install pixels in 10 minutes, therefore, you do not need to hire expensive specialists).
5) Possibility of dismantling and reuse
6) The pixel does not heat up during operation

The main areas of application of this type of pixels are:

1) LED full-color dynamic displays and running lines of any shape, for example, a medical cross, a heart.
2) Dynamic logos of any geometry.
3) Using pixels as a dynamic light source to realize design ideas.
4) Since the pixel has a simple method of mounting into a hole with a diameter of 12 mm, this makes it possible to install it on any curved surface (ball, columns).

Calculation of the required number of pixels to use in the project.

To understand how many pixels you need and at what distance they need to be placed, consider the following:

1) From what distance should the image be visible.
2) What size of the image in pixels do you want to display.

The distance between pixels is determined based on the following table.

Basic rules for choosing a pixel pitch:

15 mm comfortable viewing distance of more than 17 meters,
25 mm comfortable viewing distance of more than 30 meters,
50 mm comfortable viewing distance of more than 60 meters.

Knowing the pixel size of the image you want to display, you can calculate the number of pixels needed, for example, if the image size is 32cm x 32cm with a pitch of 10mm, then you need 1024 pixels.

From our experience, a pixel pitch of 20-30mm is comfortable for perception.

Sometimes, in front of the pixels, an additional light-diffusing element (a sheet of matte acrylic) is installed at a short distance to reduce the “dots” effect.

It is also important to think carefully about the content that you plan to display on the display using controlled pixels.

Software for the controller, which controls the pixels, allows you to insert into the project ready-made AVI, GIF, video in various formats and Flash animation created in other editors. This makes it possible to create animation of any complexity.

Electrical connection of LED pixels.

The pixels are connected in series using a 4-wire cable. Where are two wires of the digital serial interface DAT and CLK and two power wires + 5V and minus. Pixels are supplied in the form of garlands of 50 pieces with connectors at the ends.
The maximum installation pitch is 70mm without extension, but it can be increased. To do this, you need to cut the standard cable and extend it to the required distance (up to 1.5 meters).
Below is a diagram of connecting the pixels to the controller and power supply.



Connection requirements in the case of a stand-alone system.
1) Pixels are connected in the form of a continuous garland, up to 2048 pieces long.
2) If the quantity is more than 2048 pieces, then a controller with several outputs is used, where 2048 pixels can be connected to each digital output.
3) 5V power must be connected every 40-50 pixels, i.e. at the beginning and end of the garland.
4) If the last segment of pixels is less than 25 pcs, then power does not need to be supplied to the end of the garland.
5) If the project uses several power supplies, then at the point where the garland transitions to another power supply, the 5V bus is broken, as shown in the figure below



6) The remaining power wires at the end of the last garland must be insulated from each other.
7) If the products are planned to be used outdoors, then it is better to connect the garlands to each other not through connectors, but by soldering and insulating them with heat-shrinkable tubing
8) Be careful, a pixel has an input and an output, signals from the controller arrive at the input, and signals from the output go to the inputs of neighboring pixels.
9) The input of the first pixel is connected to the controller only with GND, DAT, CLK wires.

Purpose of pixel wires.



For different pixel models, the color and purpose of the wires may differ. The color of the train may also differ in different batches.

Selecting power supply power

The required power supply power is calculated based on the number of pixels N multiplied by the maximum pixel power of 0.6 W and multiplied by a factor of 1.2

For example, the project uses 1024 pixels, multiply by the maximum pixel power 1024 x 0.6 = 614.4 W and multiply the resulting power by a factor of 1.2, we get 737.28 W. We need to use a power source with the same power or more for a voltage of 5V, or we can use several power sources of lower power; if we take three power sources, then the power of each should be at least 738/3 = 246 W.

Controller selection

From the above, we can now determine how many pixels will be involved in the project. The choice of a specific controller model depends on the total number of pixels in the project. If up to 2000 pixels, then the CS1 controller is sufficient. It has one port for connecting pixels. If more than 2000 but less than 4000, then you need to take the CS2 controller, which has two ports, each to control 1024 pixels. Etc.
When using multi-port controllers, it is desirable to distribute the pixels evenly across the ports.

For example:

The project uses 2150 pixels, a CS2 controller is used, which has 2 outputs. Then the first port will go to 1074 pcs, the second – 1074 pcs.

The pixels in question, also called “finger”, are installed in a hole with a diameter of 12 mm in any material 2-3 mm thick. The surface can be either flat or curved (arc, cylinder, ball, etc.)

Overall and installation dimensions of pixels

1) LED pixels are mounted in the form of a continuous garland, with power connected every 40-50 pcs.
2) You should try to place the holes in the grid with the same pitch, this will simplify the creation of a program on a PC.


Frequently asked questions (FAQ)

Question 1. Is it possible to assemble a video screen (media façade) using these pixels?
Answer. Depending on what you mean by a video screen, you can use these pixels to assemble a full-color display on which you can play simple animation and flash videos.

It is difficult to assemble a full-fledged video screen with a high refresh rate and a high resolution of more than 240x320.

The controllers we offer allow you to play an animation pre-recorded in the controller's memory. This video can be made in any video editor or Flash animation editor and it can contain any graphics, including text.

Question 2. Is it possible to increase the standard distance between pixels.
Answer. Yes it is possible within reasonable limits.
The pixels are controlled using the SPI digital protocol. This protocol is not immune to electromagnetic interference. Increasing the length between pixels can lead to complete system failure or periodic “blinking”.
A long cable can be affected by various factors:
1) Wire resistance
2) CLK signal frequency. The higher the CLK frequency, the less extension can be performed.
3) Electromagnetic interference. The presence of a power cable or transmitting/receiving antenna in the immediate vicinity can lead to unpredictable results.
If lengthening is necessary, we recommend the following:
1) Reduce the frequency of the CLK signal to the minimum possible value. Attention: decreasing the frequency will reduce the speed of “redrawing” of the animation.
2) For extension, use an 8-core computer network cable with shielding braid. Use 3 wires for power, one for DAT and CLK signals. Connect the screen to minus (GND). Moreover, the DAT and CLK wires must be “twisted” relative to GND separately.
These recommendations are not a complete guarantee of results.


Scientists display the word "HI" on a display created using new technology

Researchers at the University of Central Florida have created a technology that allows displays to replace subpixels of different colors (RGB) with a single pixel that changes color depending on the applied voltage. The study was published in the journal Nature Communications.

Modern color displays use an RGB scheme, in which each pixel consists of three subpixels of red, green and blue. By changing the intensity of the subpixels, the three primary colors can be mixed to create millions of different shades. However, such a scheme increases the complexity of the device and consumes three times more area per pixel.

The researchers decided to create technology for displays that can do without subpixels. Their work builds on previous work, in which scientists had to use multiple nanostructures to cover the entire visible spectrum with a pixel. In a new study, scientists were able to create a universal structure that changes color in the visible light range only depending on voltage.

The pixel is based on a substrate shaped like a carton for eggs, which was coated with a layer of aluminum. Above it are a polarizer and a transparent electrode. Between the substrate and the top layer are liquid crystals, the orientation of which can be changed using an electrode. The top layer of liquid crystals is always directed parallel to the polarizer due to interaction with it.


Pixel structure

Daniel Franklin et al. / Nature Communications, 2017

The color change happened as follows. The pixel was irradiated with light that fell on the substrate and was partially absorbed due to the appearance of plasmon resonance on the surface. The unabsorbed light was reflected and exited the pixel. By changing the voltage on the electrode, the researchers changed the orientation of the liquid crystals, thereby changing the polarization of the light incident on the substrate. This determined the characteristics of the plasmon resonance and, ultimately, the frequency of the color emerging from the pixel.

A device made according to this scheme can be implemented using already existing technologies, as scientists have demonstrated. They created a display, connected it to a computer and displayed static and dynamic images on it. It should be noted that such a screen cannot be considered a color display in the classical sense. Its color gamut can be represented as a one-dimensional line in a two-dimensional color space and a point in the blue region of space.

Digital LED RGB pixel (LED RGB PIXEL)

The term LED pixel is used in relation to information display devices (screens, monitors, etc.)

In our understanding, an LED RGB pixel is an electronic device using an RGB LED(s) and a specialized control chip.

In everyday life and on the Internet, these devices are called: smart pixel, smart LED, smart LED, digital LED, smart pixel, flash module, dreamled, etc.

The main difference between an RGB pixel and a simple RGB module is the presence of a specialized chip (pixel driver). This allows you to program each pixel in the garland separately, creating bright, complex and unique video (animation) effects.

More recently, LED pixels were larger and used the DMX512 protocol. The use of the DMX512 protocol sharply limited the possibilities of using LED pixels, both in terms of quantity and programming capabilities.

The development of modern electronics has made it possible to dramatically reduce the size of pixels and use faster data transfer buses. This practically removed the restrictions on the number of pixels in the project and significantly increased the frequency of “redrawing”. The emergence of “inexpensive” programmable controllers has made it possible to create unique dynamic systems of almost any complexity.

Regardless of the specific model, an LED pixel consists of a housing, a circuit board, a control chip (IC), and one to several LEDs.

Let's look at the components of a pixel

LEDs.

  1. SMD LED The most commonly used LED pixels are conventional RGB SMD 5050 (3 in 1) LEDs. They provide high uniformity of glow. Brightness is ensured by increasing the number of LEDs per pixel (up to 18 pcs). For indoors, we recommend using pixels only on SMD LEDs.
  2. DIP LED Output LEDs (R+G+B) are used less often in pixels; despite their higher brightness, they have poor mixing ability. Recommended for external use.

Control chip.

There are a huge number of pixel control chips on the market. Moreover, the same type of pixel can be manufactured on different control chips.

Roughly control chips can be divided into 3 groups

- single-wire control interface.

This class includes TM1803, TM1812, UCS1903, UCS1904, UCS1909, TLS3001, TLS3002, TLS3003, etc.

The pixels on these chips are connected using a three-wire circuit. Two power wires and one signal wire.

- two-wire interface

LPD6803, LPD6806, MY9221, WS2801, MBI 6020, MBI 6024, DM412, D705, MBI 6030, SM16176, etc.

The pixels on these chips are connected using a four-wire circuit. Two power wires and two signal wires.

- 3-wire or more interface

DM413, MBI 5030, MBI 5031, AUR6352, AUR6353, HL1609, MY9231, MY9293,

The pixels on these chips are connected using a five-wire circuit. Two power wires and three signal wires.

We give preference to pixels based on LPD6803 (5 bit) and WS2801 (8 bit) chips.

Question. Which is better, 5 bit or 8 bit pixels.

Answer. In terms of refresh rate, the 5-bit chip is definitely better, it is 33% faster.

In terms of the number of colors, for 5 bits - 32768 colors, for 8 bits - 16 million, then the 8 bit chip is definitely better.

For applications where there will be no smooth transitions (gradient transitions) and contrasting fast transitions will be used, we recommend using pixels based on the LPD6803 chip.

For applications where the main emphasis is on smooth transitions, we recommend pixels based on the WS2801 chip.

Frame.

The housing design of the pixel determines its scope of application. The vast majority of the pixels we offer have a high degree of protection, which allows them to be used both outdoors and indoors. Often the pixel body is made of plastic, which requires additional protection from ultraviolet radiation.

RGB LED Pixels - a digital system consisting of RGB LEDs(full color), where each LED has its own controller. That. For each pixel (RGB LED), you can set a different color, which allows you to create different LED solutions. A digital RGB LED strip is designed in a similar way.
In each RGB LED module or pixel (in the future we will adhere to this terminology, implying that this is one full-color LED), a control controller (LED driver) and the LED itself are placed in a silicone waterproof housing.

In this article we will look at 2 types of the most popular RGB LED pixels today: 12mm and 20mm in diameter. Both types have similar controller chips, but contain different LEDs and differ in shape.

So, a few characteristics of RGB LED modules:
- pixel diameter 12mm and 20mm
- 4-wire bus
- 20mm currently uses the LPD6803 controller. 12mm can come with WS2801 or LPD6803 controller
- LPD6803 (datasheet) uses 15-bit color (5 bits for each color)
- WS2801 (datasheet) uses 24 bits (8 bits per color)
- power supply 5V, consumption maximum 60mA per 1 pixel (when all colors are set to maximum, i.e. white color is displayed)
- 2-pin SPI-like communication protocol

Now, a short video illustrating the operation of 12mm RGB LED pixels:

The silicone housings of these pixels are slightly larger than 20mm, but if you drill holes for them, then it is better to drill the hole itself exactly 20mm, the RGB pixel will fit exactly there and will sit tightly. These pixels use 5050 RGB LEDs and are brighter than 12mm pixels. However, they do not have very good color mixing: if you look closely, you can see the components of the colors of one RGB pixel.

The maximum current consumption of one RGB module is 60mA, 20mA for each color.

12mm pixels are slightly elongated than their 20mm counterparts. They use 8mm LEDs, which are less bright than those found in 20mm RGB modules. But they have great color mixing!

Power consumption is exactly the same as 20mm pixels.

Pixel spacing

The RGB pixels are connected to each other using a 4-core flat cable. The distance between them is different, for example, for the 20mm modules under consideration it is 63mm, and for the 12mm module the distance is 90mm. Naturally, it can be increased by cutting the standard cable and extending it to the required distance.

Application

In the videos below, you can see various applications of RGB LED Pixels:

RGB LED Controllers

Each RGB pixel housing contains a microchip - a driver for controlling the RGB LED. Mostly WS2801 or LDP6803 are used now. The chips work very simply - serial data is received on one leg of the chip, processed and transferred in transit to the other leg of the chip. The LPD6803 chip uses a sequence of 16 bits (15 bits of color data and 1 start bit), the WS2801 uses 24 bits of data.

That. if you need to write data to 10 RGB LED pixels, then you need to transmit a sequence of 10 * 16 or 24 bits.

Now let's look at the differences between these two drivers.

LPD6803
This chip allows you to manually control PWM color brightness. The faster the PWM is, the more blurred the colors in the RGB LED will be, but the PWM frequency cannot be very fast due to the delay in the chips.
It should be noted that the PWM clock frequency is the same as that of the data, which allows us to save one MK pin. This is good, but for example on Arduino it can only be implemented using an interrupt.

WS2801
This controller is more functional; in addition to 24-bit color, it uses built-in PWM. This saves the resources of the control microcontroller and it is already possible to do without interruptions.

Nutrition

As mentioned above, each RGB LED can consume up to 60mA from a 5V power supply. Accordingly, with 20 RGB pixels the maximum current consumption will be 1.2A, and with 25 - 1.5A. Naturally, this is when all the LEDs are lit in white (when the color is white, all 3 components of the RGB LED are lit).
For such a number of pixels, you must use at least a 5V, 2A power supply. Or you can do it easier and use an old ATX power supply from a computer (see) which provides a current of up to 30A. Don't forget to connect the grounds of the power supply and your controller together.

Connection

A distinctive feature of the RGB modules under consideration is that they are digitally controlled, which means that only 2 wires are used for control (clock and data) and you can connect as many RGB pixels as you need. Plus 2 power wires.

However, do not forget that this is not a common bus, where all pixels are included in parallel. The power conductors (5V and GND) are connected everywhere in parallel, but the control lines in each RGB pixel are connected to the “input”, respectively, the output lines are connected to the “output”, i.e. into the gap.

When you connect to the microcontroller, make sure that the “input” from the RGB pixel is connected to the MK. To do this, there are usually arrows on the connection board. For example, in the picture above, the large arrow in the upper right corner is the exit, and opposite it, on the left, is the entrance. Next, all other RGB LED pixels are connected from output to input.

Let's look at a practical example of connection and use with a controller. The maximum current that the Arduino board can provide is 500mA, so it is necessary to use an external, more powerful power supply.

For RGB pixels using the LPD6803 controller, the red wire must be connected to the +5V power supply, the green wire to digital pin 3 of the Arduino controller, the yellow wire to digital pin 2, and finally the blue wire to the minus of the power supply and GND of the Arduino controller.
The colors of the conductors may differ when using the WS2801 controller! Therefore, before connecting, carefully read the instructions.

12mm RGB modules are available on both the WS2801 controller and the old LPD6803. It's easy to distinguish them - just read the inscription on the board.

Please note that wire colors for the WS2801 controller may vary!

Program for LPD6803

Considering that the PWM chip control and the data line can be combined, the program is very simple. The library uses an interrupt that is called every few milliseconds. If the data has arrived, then it is sent, if not, then pulses are stored at the Arduino output to maintain the PWM frequency. Timer 1 is used for interruption.
The program code is based on bliptronics, the library itself and the example can be downloaded from GitHub.

A little clarification on using the library and strandtest.pde. The object is initialized by calling a procedure with 3 parameters: the number of RGB LED pixels, indicating the output data and clock.

LPD6803 strip = LPD6803(20, dataPin, clockPin);

The next step is to call setup():

Void setup() ( strip.setCPUmax(50); // start with 50% CPU usage. up this if the strand flickers or is slow // Start up the LED counter strip.begin(); // Update the strip, to start they are all "off" strip.show();

setCPUmax()- configures Timer1 to issue an interrupt to ensure the operation of the PWM RGB LED controller. The value can be from 0 to 100.

begin()- starts interrupt work

show()- updates the state of all RGB pixels. This function must be called after all the settings for the colors have been made and now they need to be displayed. The function updates all RGB LEDs at once, even if you only updated the color of one pixel. Because data is transmitted immediately for all RGB LEDs.

And finally, let's look at an example function colorWipe. The function creates a semblance of running fire with a color change. This is a regular loop with incrementing pixels (to count the total number of pixels it is convenient to use the function numPixels()) and setting the color from (increment i) to c. In this case, the color is stored in a 16-bit variable. Then, the recorded data is sent to the RGB LED display for display using the show() command. And at the end of the cycle, there is a slight delay.

Below is the Color() function, which converts 8-bit Red, Green and Blue colors into one 15-bit RGB color for the LED controller. That. the maximum decimal value for each color is 31.

// fill the dots one after the other with said color // good for testing purposes void colorWipe(uint16_t c, uint8_t wait) ( int i; for (i=0; i Example of calling the function to completely fill each color, with a 50ms pause between colorWipe(Color(31, 0, 0), 50); // red fill colorWipe(Color(0, 31, 0), 50); // green fill colorWipe(Color(0, 0, 31), 50); ); //blue fill

Program for WS2801

The program for this controller is similar to the LPD6803, but a little simpler, because we don't need to constantly issue a signal from the interrupt for PWM.

Bluetooth