Controlling rgb led strip from android phone. We control the LED strip via Bluetooth. RGB Tape Power

Good day to all. To begin with, I will say that the idea of ​​​​associating an RGB LED Controller for a tape with a smart remote control is far from new and was born to me quite a long time ago. But in this publication I would like to focus on the simplicity of the idea and the cheapness of its implementation. As usual, I suggest you watch a video from my channel about bringing this small idea to life, and only then move on to the text part of the review, there is a lot of things that I did not say in the video. Despite the fact that the video turned out to be relatively short, for your convenience, I have written navigation through it.

0:00 - 3:43 - Controller unboxing and theory
3:44 - 6:15 - Connecting and altering connectors
6:16 - 6:45 - Checking work
6:46 - 8:57 - LED strip binding on Xiaomi Remote 360
8:58 - 9:32 - Conclusion and demonstration

Controller for RGB LED strip -

I bought the controllers on AliExpress for each, I bought the Xiaomi Remote 360 ​​smart remote control there a very long time ago - its cost is approximately .

Considering that such controllers can be bought for any LED strip and programmed to work with Xiaomi Remote 360, while IR channels in colors will not conflict very often, it is quite easy to give priority to such a solution compared to Xiaomi Yeelight smart LED strip. It certainly has its own plug-in and the variation of color solutions is presented in a larger volume, but its cost and length still put forward my simple solution as a priority.


Smart LED strip Xiaomi Yeelight - or

When choosing a controller for the LED strip, I immediately decided to discard all controllers that have their own software and work via Bluetooth or Wi-Fi, since in this case we are interested in working within the Xiaomi smart home ecosystem.

I had a Wi-Fi controller that used to be on this LED strip. Either it clashed with my router, or it was crooked out of the box and responded to the signals of the touch panel for a very long time, and in most cases did not react at all, caught incomprehensible Wi-Fi and turned on on its own. I didn’t find anything on the Internet about his programming and solving this problem, after which I parted with him, just after that the idea came up to implement this kind of integration.


Now let's go directly to the controller itself. It is a small board with chips, through which color mixing is carried out according to the RGB Сurves type. The board has a remote IR signal receiver, a soldered connector for power supply, wiring for three color channels and plus. All this is collected in a small white Deshman plastic case. I’m not going to delve into the features of the board, simply because I don’t have special knowledge in microcircuits and I won’t be smart, after all, we are only interested in the operation of this controller within the Xiaomi smart home system, and not its insides.




When connecting the controller to the tape, there were some minor problems in that, unfortunately, I did not look at the connection connectors when buying and they turned out to be the same, so I had to quickly change the connector on the controller to “dad”, the donor itself was the old controller. Of course, it was possible to twist the wires in a straight line, but I needed the controller to be able to move mobilely and control another tape in case of something. For stripping thin contacts it is better to use a special stripper, well, and whether to do as I suggested and did in the video.


Wire stripper -

Also in everyday life, when working with thin wiring of LED strips, it is better to have heat shrink tubes, which I also did not have.


Heat shrink tubing for wiring insulation -

The remotes of this kind of controllers are almost all the same, the difference is the presence of keys or buttons that allow you to make a choice of a particular color, as well as turn on color variation programs. In my case, this is a remote control for 44 keys, most of which are programmed. At the same time, since the controllers are quite cheap, it is possible to repeat IR signals on different keys of different controllers. That is, for example, an IR signal from the remote control of one controller responsible for turning on the red color can turn on the color transfusion mode on another controller and vice versa. They may also conflict with the TV remote control.


I connected the second controller to the LED strip, which illuminates the frames of the TV. Since I didn’t have a donor connector for the “dad”, I had to twist the wires in a straight line.


The LED strip on the TV has migrated from the table, as many LEDs are out of order and do not adequately respond to controller commands. Retouching the frames of the TV solved this problem and the backlight looks quite good in this arrangement. In the future, I plan to replace it with the remains of the LED strip located on the table today.


Now we connect the LED strip controller with Xiaomi Remote 360 ​​in the future, this bundle will allow not only to remotely control the LED strip from a smartphone, but also to set scenarios using .

To connect the controller and the Xiaomi Remote 360 ​​smart remote control, go to the mi home application - add devises - remote control plugin.


Then, from the bottom, select the very first icon with two remote controls superimposed on each other - this is a simple remote binding mode, in which each button on the remote control needs to be programmed separately.


Click on the image of the very first remote control ➜ click plus ➜ enter the name of the button, click next.


then a picture will appear indicating the need to press the programmable button on the remote control, repeat the operation and program all the necessary colors ➜ then press the button in the upper right corner, confirming the creation of a new remote control and the buttons that we have programmed.

Of the minuses, one can note the lack of animation of pressing a button - a kind of animated toggle switch, if available, which could be understood which device is working and which is not, turning it on remotely and not being able to visually observe it.

In general, these are the nuances with highlighting various objects with LED tape in my room. From myself I can say that I like experimenting with this kind of solutions. Controllers and LED strips I definitely recommend for purchase for similar and similar solutions. Well, now I propose to look at a series of photos and evaluate the resulting aesthetics.





Thank you for watching, do not forget to subscribe to and comment on the videos, there will be a lot of new and interesting content.

Smartphone lighting control- this is the last step in intelligent systems "smart home" after control using remote controls and panels. Let's see why this function is needed and how it works.

Why do you need to control the light through the phone?

We are used to turning on and off the light with ordinary switches. In "smart home" systems, more "advanced" methods have long been used - remote controls and panels. They allow you to control the lighting throughout the house at once from one point. With the advent of the light control function via Wi-Fi, home and apartment owners can control lamps outside the home.

There are several reasons to control the light through a smartphone:

  • You can use your own smartphone inside the house without having to search for the remote control;
  • You can create a "presence effect" in the house, being outside it - for security purposes;
  • You can set the desired light scenario when leaving work to come to a lighted house.

This feature is especially convenient for those who have health restrictions in movement. It will also provide comfort to parents - for example, when Small child I woke up at night and was afraid of the dark.

How it works?

Lighting control in this scheme is performed via a Wi-Fi signal. To set up light control via a smartphone, you will need devices:

  1. The smartphone itself, in which a special application is installed;
  2. Actuating device - lamps are connected to it;
  3. wifi router, which transfers data between the smartphone and the executive device.

Everything is simple. The user sets a command through an application on a smartphone - turn on or off the light, change the brightness, color temperature, etc. The signal via Wi-Fi is received by the executive device, which implements the user's command.

If almost everyone has a smartphone and a router, then the executive device has to be purchased separately. As a rule, controllers become such devices. They are selected according to the type of lighting fixtures that are used in the room. For example, it is designed to control color RGB lighting based on LED strips. It comes immediately with a remote control included, and can work both from the remote control and from a smartphone or tablet on which the application is installed.

A very interesting gateway controller is a gateway between the Wi-Fi network and the RF signal for controlling Arlight's SMART series controllers.

If you are interested in creating such a lighting system in your own home or office,. We will help you calculate and select all the components necessary to create a backlight controlled via a Wi-Fi signal.

This project is about how to make LED lighting controlled from the next room so as not to get up from the couch. RGB LED lighting is equally good for decorating a small aquarium or a large room.

Can light up different colors bath from RGB tape on Arduino. To create, so to speak, a bath on microprocessor control from Arduino.

All you need to assemble an RGB backlight are the following components:

  1. Bluetooth module HC-05 for wireless communication with Arduino.
  2. Arduino nano, mini, Uno board with microprocessor ATmega 8, ATmega 168, ATmega 328.
  3. RGB LED strip, with or without IP65 waterproof design if required.
  4. Smartphone with Android as a remote control for RGB lighting.
  5. MOSFETs like P3055LD, P3055LDG, PHD3355L, but better with holes for mounting holes. Bipolar transistors work worse .
  6. Resistors 10 kOhm, 0.125 W - 3 pieces.

A little theory about connecting RGB tape toArduino

You cannot connect the LED strip directly to the Arduino board. The LED strip glows from 12 V, while the microprocessor needs only 5 V to work.

But, the main problem is that the outputs of the microprocessor do not have enough power to power a whole strip of LEDs. On average, a meter long LED strip consumes 600 mA. Such a current will definitely disable the Arduino board.

The PWM outputs used by the microprocessor do not have enough power to illuminate the RGB tape, but still they can be used to remove the control signal.

For power decoupling, it is recommended to use transistors as keys. It is better to use MOSFETs: they need a meager current to the “gate” to turn on, and besides, they have more power compared to bipolar switches of the same size.

RGBribbons toArduino

On the wiring diagram, the PWM outputs are used to control the tape: 9 (red), 10 (green), 11 (blue).

Three resistors of 10 kOhm, 0.125 W are hung on the "gate" of each transistor.

Plus from the 12 V power supply (red wire) goes directly to the RGB tape.

The minus from the 12 V power supply (black wire) is distributed over the "sources" of the field-effect transistors.

The "drain" of each transistor is connected to a separate tape contact: R, G, B. It is recommended for convenience when connecting to use red, green, blue wires.

The ground pin GND of the Arduino board should be connected to the minus of the input power.

The Arduino Uno board itself is powered by a separate AC adapter. For Arduino nano, mini, you will need to assemble a simple power supply on an integrated 7805 stabilizer.

Connecting Bluetooth module HC-05:

  • VCC - 5V (supply +5 V);
  • GND - GND (ground, common);
  • RX - TX on Arduino nano, mini, Uno;
  • TX - RX on Arduino nano, mini, Uno;
  • LED - not used;
  • KEY - not used.

The program sketch below is generic for driving both a single LED and an LED strip. The main thing is to leave the necessary lines, and delete unnecessary ones or make comments in slashes.

unsigned long x; int LED = 9; // green is connected to pin 9 int LED2 = 10; // blue is connected to pin 10 int LED3 = 11; // red is connected to pin 11 int a,b,c = 0; void setup() ( Serial.begin(9600); Serial.setTimeout(4); pinMode(LED, OUTPUT); pinMode(LED2, OUTPUT); pinMode(LED3, OUTPUT); ) void loop() ( if (Serial. available()) ( x = Serial.parseInt(); if (x>=0 && x<=255) { a = x; // для RGB ленты //a = 255-x; // для светодиода analogWrite(LED, a); } if (x>=256 && x<=511) { b = x-256; // для RGB ленты //b = 511-x; // для светодиода analogWrite(LED2, b); } if (x>=512 && x<=767) { c = x-512; // для RGB ленты //c = 767-x; // для светодиода analogWrite(LED3, c); } /* Serial.println(x); Serial.println(a); Serial.println(b); Serial.println(c); */ } }

If you need to connect one RGB LED, then there is a wiring diagram for its connection.

Installing the app on your phone

Download the application with the short name RGB on the phone. .

After installation, launch the application by icon.

Click on the caption

We find the installed Bluetooth module HC-05 in the list.

If there is a connection, instead of the inscription, the address and name of the installed Bluetooth module will be displayed.

Well, that's all, the RGB backlight control is set up!

Here is a video example of our project in action:

GPS clock on Arduino Biometric lock - LCD layout and assembly

An RGB controller is used to control these devices. But besides him, in recent years, the Arduino board has been used.

Arduino - the principle of operation

arduino board

An Arduino board is a device on which a programmable microcontroller is installed. Various sensors, controls or encoder are connected to it and, according to a given sketch (program), the board controls motors, LEDs and other actuators, including other Arduino boards using the SPI protocol. The device can be controlled via remote control, Bluetooth module, HC-06, Wi-Fi, ESP or internet, and buttons. Some of the most popular boards are the Arduino Nano and Arduino Uno, as well as the Arduino Pro Mini, a device based on the ATmega 328 microcontroller.


Appearance Arduino Pro Mini
Appearance Arduino Uno
Appearance Arduino micro

Programming is carried out in the open source Arduino environment installed on a regular computer. Programs are downloaded via USB.

The principle of load control through Arduino


Arduino control

The board has many outputs, both digital, having two states - on and off, and analog, controlled through a PWM controller with a frequency of 500 Hz.

But the outputs are designed for a current of 20 - 40 mA with a voltage of 5 V. This is enough to power an indicator RGB LED or a 32x32 mm LED matrix module. For a more powerful load, this is not enough.

To solve this problem in many projects, you need to connect additional devices:

  • Relay. In addition to individual relays with a supply voltage of 5V, there are entire assemblies with a different number of contacts, as well as with built-in starters.
  • Amplifiers on bipolar transistors. The power of such devices is limited by the control current, but you can assemble a circuit from several elements or use a transistor assembly.
  • Field effect or MOSFET transistors. They can drive loads with currents of several amps and voltages up to 40 - 50 V. When connecting a mosfet to a PWM and a motor or other inductive load, a protective diode is needed. When connected to LEDs or LED lamps, this is not necessary.
  • Expansion boards.

Connecting LED strip to Arduino


connecting led strip to arduino

Expert opinion

Alexey Bartosh

Specialist in the repair, maintenance of electrical equipment and industrial electronics.

Ask an expert

Arduino Nano can control more than just electric motors. They are also used for LED strips. But since the output current and voltage of the board are not sufficient to directly connect a strip with LEDs to it, additional devices must be installed between the controller and the LED strip.

via relay


Connection via relay

The relay is connected to the device to a digital output. The strip controlled with its help has only two states - on and off. Three relays are needed to control the red-blue-green ribbon. The current that such a device can control is limited by the power of the coil (a low power coil is not able to close large contacts). To connect more power, relay assemblies are used.

With a bipolar transistor


Connecting with a transistor

A bipolar transistor can be used to amplify the output current and voltage. It is selected according to the current and voltage of the load. The control current should not be higher than 20 mA, therefore it is supplied through a current-limiting resistance of 1 - 10 kOhm.

The transistor is better to use n-p-n with a common emitter. For a higher gain, a circuit with several elements or a transistor assembly (amplifier chip) is used.

With a field effect transistor

In addition to bipolar, field-effect transistors are used to control the bands. Another name for these devices is MOS or MOSFET-transistor.

Such an element, unlike a bipolar one, is controlled not by current, but by voltage at the gate. This allows a small gate current to drive large load currents - up to tens of amperes.

The element is connected through a current-limiting resistance. In addition, it is sensitive to interference, so the controller output should be connected to ground with a 10 kΩ resistor.

With expansion boards


Connecting an Arduino with Expansion Boards

In addition to relays and transistors, ready-made blocks and expansion boards are used.

This can be Wi-Fi or Bluetooth, a motor control driver such as the L298N module or an equalizer. They are designed to control loads of different power and voltage. Such devices are single-channel - they can only control a monochrome tape, and multi-channel - designed for RGB and RGBW devices, as well as tapes with WS 2812 LEDs.

Program example


Arduino and LED strip

Arduino boards are able to control LED structures according to predetermined programs. Their libraries can be downloaded from the official site, found on the Internet or write a new sketch (code) yourself. You can assemble such a device with your own hands.

Here are some options for using such systems:

  • Lighting control. With the help of a light sensor, the light in the room turns on both immediately and with a gradual increase in brightness as the sun goes down. The inclusion can also be done via wi-fi, with integration into the "smart home" system or telephone connection.
  • Turning on the light on the stairs or in a long corridor. The LED lighting of each step separately looks very nice. When a motion sensor is connected to the board, its operation will cause sequential, with a time delay, the illumination of steps or a corridor will turn on, and disabling this element will lead to the reverse process.
  • Color music. By applying an audio signal to the analog inputs through the filters, the output will be a color-musical installation.
  • Computer modding. With the help of appropriate sensors and programs, the color of the LEDs may depend on the temperature or the load of the processor or RAM. Such a device works according to the dmx 512 protocol.
  • Controlling the speed of running lights with an encoder. Similar installations are assembled on WS 2811, WS 2812 and WS 2812B chips.

Video instruction

RGB LED control from computer via USB port (virtual COM port). LED strip control from a computer

RGB LED strip control via arduino

Multi-color RGB LED strips have long been included in the number of lighting fixtures. An RGB controller is used to control these devices. But besides him, in recent years, the Arduino board has been used.

Arduino - the principle of operation

arduino board

An Arduino board is a device on which a programmable microcontroller is installed. Various sensors, controls or encoder are connected to it and, according to a given sketch (program), the board controls motors, LEDs and other actuators, including other Arduino boards using the SPI protocol. The device can be controlled via remote control, Bluetooth module, HC-06, Wi-Fi, ESP or internet, and buttons. Some of the most popular boards are the Arduino Nano and Arduino Uno, as well as the Arduino Pro Mini, a device based on the ATmega 328 microcontroller.

Appearance Arduino Pro Mini Appearance Arduino Uno Appearance Arduino micro

Programming is carried out in the open source Arduino environment installed on a regular computer. Programs are downloaded via USB.

But the outputs are designed for a current of 20 - 40 mA with a voltage of 5 V. This is enough to power an indicator RGB LED or a 32x32 mm LED matrix module. For a more powerful load, this is not enough.

To solve this problem in many projects, you need to connect additional devices:

  • Relay. In addition to individual relays with a supply voltage of 5V, there are entire assemblies with a different number of contacts, as well as with built-in starters.
  • Amplifiers on bipolar transistors. The power of such devices is limited by the control current, but you can assemble a circuit from several elements or use a transistor assembly.
  • Field effect or MOSFET transistors. They can drive loads with currents of several amps and voltages up to 40 - 50 V. When connecting a mosfet to a PWM and a motor or other inductive load, a protective diode is needed. When connected to LEDs or LED lamps, this is not necessary.
  • Expansion boards.
to content

Connecting LED strip to Arduino


connecting led strip to arduino

Expert opinion

Alexey Bartosh

Specialist in the repair, maintenance of electrical equipment and industrial electronics.

Ask an expert

Arduino Nano can control more than just electric motors. They are also used for LED strips. But since the output current and voltage of the board are not sufficient to directly connect a strip with LEDs to it, additional devices must be installed between the controller and the LED strip.

via relay

Connection via relay

The relay is connected to the device to a digital output. The strip controlled with its help has only two states - on and off. Three relays are needed to control the red-blue-green ribbon. The current that such a device can control is limited by the power of the coil (a low power coil is not able to close large contacts). To connect more power, relay assemblies are used.


Connecting with a transistor

A bipolar transistor can be used to amplify the output current and voltage. It is selected according to the current and voltage of the load. The control current should not be higher than 20 mA, therefore it is supplied through a current-limiting resistance of 1 - 10 kOhm.

The transistor is better to use n-p-n with a common emitter. For a higher gain, a circuit with several elements or a transistor assembly (amplifier chip) is used.

In addition to bipolar, field-effect transistors are used to control the bands. Another name for these devices is MOS or MOSFET-transistor.

Such an element, unlike a bipolar one, is controlled not by current, but by voltage at the gate. This allows a small gate current to drive large load currents - up to tens of amperes.

The element is connected through a current-limiting resistance. In addition, it is sensitive to interference, so the controller output should be connected to ground with a 10 kΩ resistor.

With expansion boards


Connecting an Arduino with Expansion Boards

In addition to relays and transistors, ready-made blocks and expansion boards are used.

This can be Wi-Fi or Bluetooth, a motor control driver such as the L298N module or an equalizer. They are designed to control loads of different power and voltage. Such devices are single-channel - they can only control a monochrome tape, and multi-channel - designed for RGB and RGBW devices, as well as tapes with WS 2812 LEDs.

Back to content

Program example


Arduino and LED strip

Arduino boards are able to control LED structures according to predetermined programs. Their libraries can be downloaded from the official site, found on the Internet or write a new sketch (code) yourself. You can assemble such a device with your own hands.

Here are some options for using such systems:

  • Lighting control. With the help of a light sensor, the light in the room turns on both immediately and with a gradual increase in brightness as the sun goes down. The inclusion can also be done via wi-fi, with integration into the "smart home" system or telephone connection.
  • Turning on the light on the stairs or in a long corridor. The LED lighting of each step separately looks very nice. When a motion sensor is connected to the board, its operation will cause sequential, with a time delay, the illumination of steps or a corridor will turn on, and disabling this element will lead to the reverse process.
  • Color music. By applying an audio signal to the analog inputs through the filters, the output will be a color-musical installation.
  • Computer modding. With the help of appropriate sensors and programs, the color of the LEDs may depend on the temperature or the load of the processor or RAM. Such a device works according to the dmx 512 protocol.
  • Controlling the speed of running lights with an encoder. Similar installations are assembled on WS 2811, WS 2812 and WS 2812B chips.
to content

Video instruction

lampaexpert.ru

Wiring diagram and control of the LED strip using Arduino

Arduino - a computer platform used to build simple automation systems, a small board with an integrated microprocessor and RAM. Controlling an LED strip via Arduino is one way to use it.

The ATmega processor controls the sketch program, controlling numerous discrete outputs, analog and digital inputs / outputs, PWM controllers.

How the Arduino works

The "heart" of the Arduino board is a microcontroller to which sensors and control elements are connected. A given program (called a "sketch") allows you to control electric motors, LEDs in strips and other lighting fixtures, even used to control another Arduino board via the SPI protocol. Control is carried out using the remote control, Bluetooth module or Wi-Fi network.

For programming, an open source code on a PC is used. You can use the USB connector to download control programs.

The principle of load control through Arduino

There are two types of ports on the Arduino board - digital and analog. The first has two states - "0" and "1" (logical zero and one). When you connect the LED to the board in one state, it will glow, in the other it will not.

The analog input is, in fact, a PWM controller that registers signals with a frequency of about 500 Hz. Such signals are fed to the controller with a configurable duty cycle. The analog input allows not only to turn on or off the controlled element, but also to change the current (voltage) value.

When connecting directly through the port, use weak LEDs by adding a terminating resistor to them. A more powerful load will disable it. To organize the control of the LED strip and other lighting fixtures, use an electronic key (transistor).

Connecting to Arduino

Direct connection of the LED strip to the Arduino is only appropriate if weak LED diodes are used. For an LED strip, additional electrical elements must be installed between it and the board.

via relay

Connect the relay to the Arduino board via a digital output. The controlled band can have one of two states - on or off. If you need to control the RGB tape, you will need three relays.

The current value controlled by this device is limited by the power of the coil. If the power is too low, the element will not be able to close large contacts. For the highest powers, use relay assemblies.

With a bipolar transistor

If you need to increase the current or voltage at the output, connect a bipolar transistor. When choosing it, be guided by the load current. The control current does not exceed 20 mA, so add a 1 to 10 kΩ resistor to limit the current through the resistance.

Note! Ideally, you need to use an n-p-n type transistor based on a common emitter. If high amplification is required, use a transistor assembly.

With a field effect transistor

Instead of bipolar transistors to control LED strips, take field (abbreviated as MOS). The difference between them is related to the control principle: bipolar ones change the current, field ones change the gate voltage. Due to this, a small gate current drives a large load (tens of amperes).

Be sure to add a current limiting resistor to the circuit. Due to the high sensitivity to interference, a 10 kΩ resistor mass is connected to the controller output.

With expansion boards

If there is no desire to use relays and transistors, you can buy whole blocks - expansion boards. These include Wi-Fi, Bluetooth, equalizer, driver, etc., which are necessary to control loads of different capacities and voltages. These can be either single-channel elements that are suitable for monochrome tapes, or multi-channel elements (for controlling color RGB tapes).

Various programs

Libraries with programs for the Arduino board can be downloaded from the official website or found on the Internet at other information resources. If you have the skills, you can even write a sketch program (source code) yourself. To assemble an electrical circuit, no specific knowledge is required.

Options for using a system controlled by Arduino:

  1. Lighting. The presence of the sensor will allow you to set a program, according to which the light in the room either appears immediately or smoothly turns on parallel to the sunset (with increasing brightness). To turn it on, you can use Wi-Fi, phone and integration into the Smart Home system.
  2. Illumination of the corridor and stairwells. Arduino will allow you to organize the lighting of each part (for example, steps) separately. Add a motion sensor to the board so that the address LEDs light up sequentially depending on the place where the movement of the object is detected. If there is no movement, the diodes will go out.
  3. Light music. Use filters and apply audio signals to the analog input to organize light music (equalizer) at the output.
  4. Computer upgrade. Some sensors will allow you to create a dependence of the color of the LEDs on the temperature of the processor, its load, and the load on the RAM. Uses DMX 512 protocol.

Arduino chips expand the possibilities of using monochrome and multi-channel (RGB) LED strips. In addition to the merging of different colors, the formation of hundreds of thousands of shades, you can create unique effects - fading at sunset, periodically turning on / off when motion is detected, and much more.

Controlling an LED strip via Arduino - circuits for smoothly turning on and off lighting

220.guru

RGB LED control from computer via USB port

RGB LED control from computer

// To control the color of the LED, we use 3 PWM ports

int bluePin = 9;

int greenpin = 10;

int redPin = 11;

// LED control commands. Colors and off

String COLOR_RED = "red";

String COLOR_BLUE = "blue";

String COLOR_GREEN = "green";

String COLOR_OFF = "off";

// Initialize the serial port. Set the speed to 9600 bps

Serial.begin(9600);

// Initialize Outputs For Our RGB LED

pinMode(redPin, OUTPUT);

pinMode(greenPin, OUTPUT);

pinMode(bluePin, OUTPUT);

// Read the command with the color from the PC into the color variable

// Check if data is available from PC

int check = serial.available();

// if there is, then read it as a string

if (check > 0) (

color = Serial.readString();

// Compare the incoming command with those described earlier and turn on the required color on the RGB LED

if (COLOR_RED.equalsIgnoreCase(color)) (

setColor(255, 0, 0);

) else if (COLOR_GREEN.equalsIgnoreCase(color)) (

setColor(0, 255, 0);

) else if (COLOR_BLUE.equalsIgnoreCase(color)) (

setcolor(0, 0, 255);

) else if (COLOR_OFF.equalsIgnoreCase(color)) (

setcolor(0, 0, 0);

) else if(check > 0)(

// If the command is not recognized, give the user a hint.

Serial.println("Send command is bad! Send please \"RED\" \"GREEN\" \"BLUE\" or \"OFF\"!");

// Function to turn on the desired color on our RGB LED

void setColor(int red, int green, int blue) (

analogWrite(redpin, red);

analogWrite(greenPin, green);

analogWrite(bluepin, blue);

gearise.ru

Control of LED light sources via SPI and DMX protocols

This article is devoted to a special class of controllable LED light sources, which includes pixel LED strips "Running Fire", controllable "flexible neon" and flash modules. They, like conventional multi-color RGB strips and modules, use three-color LEDs with red (Red), green (Green) and blue (Blue) glow color.

The fundamental difference is that in addition to the LEDs, control microcircuits are installed directly on the tape or inside the modules. Due to this, it becomes possible to control not all LEDs at the same time, but each LED or a group of several LEDs separately. Such a group is called a pixel. The number of LEDs per pixel depends on the type of strip. LED strips and modules with a supply voltage of 12V usually have 3 RGB LEDs per pixel, with a power supply of 24V - 6 LEDs per pixel. In LED strips and modules with a supply voltage of 5V, control is usually carried out by each LED separately, and the control chip can be built into the housing of the RGB LED itself.

Most controllers allow you to set the length of the connected tape and select the sequence of RGB channels on the tape (RGB, RBG, BGR, etc.). This is necessary so that the color specified in the program matches the reproduced color, red is red, green is green and blue is blue.

The digital signal generated by the pixel controller is fed to a chip installed on a tape or in a flash module, which is a specialized microcontroller that receives a digital signal, decodes it, and controls the brightness and color of the LEDs. Often these microcontrollers are called "chip" or "driver". In this article, for unambiguous understanding, we will call them "driver".

The type of drivers used must be indicated in the parameters of LED strips or flash modules. Knowing this type is necessary in order to select and correctly configure the controller that will control the tape or modules.

Most controllers can work with several types of drivers. A list of drivers that a particular controller works with is given in its technical specifications, as well as in the controller software, if used to create your own lighting programs. Since we are constantly working to improve software and controllers, lists of compatible drivers are updated periodically.

Applied drivers are divided into two fundamentally different classes. In accordance with this, LED strips, flash modules and "flexible neon" can be divided into two classes.

  • The first class (more extensive and more commonly used) are drivers using the SPI (Serial Peripheral Interface) digital interface,
  • The second is drivers that use the digital control protocol DMX (Digital Multiplex - digital multiplexing).

Both classes of drivers have their own advantages, which we will discuss below. Let's take a closer look at both types of protocols used.

Using the SPI protocol.

A feature of LED strips and modules using the SPI control protocol is the serial transmission of data from pixel to pixel along the entire length of the connected chain. The digital control sequence is generated by the controller and fed to the first pixel. The driver of this pixel “takes” the first received information for itself, and transmits the remaining digital sequence to the next pixel. The second driver also “cuts off” the initial part of the information for itself and transfers the rest to the third chip, and so on. With this method of transmission, there is no need to assign addresses to the chips. The address, in fact, is the location of the pixel in the overall sequence.

SPI control can be performed using two signal wires (DATA and CLK) or only one (DATA). Tapes and modules with two control signals are characterized by more stable operation at high exchange rates and, accordingly, a lower information propagation delay and a higher update rate. How many control wires are used in a particular case depends on the type of drivers on the LED strip or in the modules. Below is a table with the main parameters of SPI drivers used in Neoncolor equipment.

Driver typeTM1804TM1812WS2801WS2811WS2812LPD6803UCS1903TLS3001
Use in equipmentTapes/modulesRibbonsModulesTapes/modulesTapes/modulesModulesModulesModules
Supply voltage for tapes and modules12/24V12V5/12V5/12/24V5V5/12/24V5/12V5V
Number of RGB LEDs per pixel for strips1 or 3 pcs.1, 2 or 3 pcs.- 3 pcs.1 PC.- - -
Control signalsDATADATADATA, CLKDATADATADATA, CLKDATADATA
Chip executionIn a separate buildingIn a separate buildingIn a separate buildingIn a separate buildingBuilt in LEDIn a separate buildingIn a separate buildingIn a separate building
Number of pixels served by the driver1 (3 channels)4 (12 channels)1 (3 channels)1 (3 channels)1 (3 channels)1 (3 channels)1 (3 channels)1 (3 channels)
Number of colors16 million16 million16 million16 million16 million32768 16 million4096

With the advent of new drivers, the list of microcircuits used is replenished.

Below are the block diagrams of SPI tapes and their connection to the controller.

Fig.1. Block diagram of SPI LED strip with two control lines (DATA and CLK)

Fig.2. SPI LED strip block diagram with one control line (DATA)

Using the DMX protocol.

Distinctive features LED strips and flash modules using DMX control - parallel supply of a control signal to all modules. As can be seen in the block diagram shown in Fig. 3, the digital signal from the controller output is fed simultaneously to all drivers.

Fig.3. Structural diagram of DMX LED strip (ADR signal is used only when writing DMX channel addresses)

In such a system, the failure of one driver does not cause the failure of all subsequent pixels. True, in order for the information to get exactly to the driver for which it is intended, the drivers must have their own personal address. If the drivers in the serial chain are swapped, the pixels in the program will also change, as a result, the lighting effect will be broken.

Neoncolor's equipment uses modern WS2821 DMX drivers. To be fair, these drivers use the DMX protocol, but don't use the full symmetrical interface that DMX systems use. The DATA+ signal is used for signal transmission and DATA- is not used.

DMX tapes, modules and "flexible neon" are supplied with DMX addresses recorded during production. By default, the addressing of the pixels of each tape coil (chain of modules or "flexible neon" coil) starts from the 1st address and is numbered consecutively up to the last pixel. If several coils or segments are connected in one line, it is necessary to record the addresses again. To do this, all connections of tape segments or modules are first performed, and then the addresses are written. In this case, addresses are automatically written sequentially to all connected pixels, starting from the one closest to the controller. Such a record eliminates the duplication of addresses and ensures the correct execution of lighting effects.

To write addresses to DMX drivers, specialized address editors are used, for example, DMX-WS2821. Some pixel controllers, such as the DMX K-1000D or DMX K-8000D, have a built-in address editor.

When writing addresses, the wire marked ADR (ADI, ADIN) is used. After the recording is done, when lighting programs are played back, the input of the ADI drivers is not used. If your controller does not have a built-in address editor and does not have an output for connecting an ADI wire, this wire must be connected to the GND wire, which will prevent it from being affected by external noise and interference.

To sum up the comparison of SPI and DMX digital interfaces used in driving LED pixels, here are the positive aspects of both.

Advantages of LED strips and modules using the SPI interface:

  • there is no need to write down the address and, accordingly, purchase an address editor;
  • there is no binding of a pixel to the place of installation in a common chain, i.e. rearrangement of modules or sections of the tape does not lead to a violation of the pattern of the program being played;
  • the ability to connect more than 1024 pixels per line, provided that such a number is supported by the controller and with thoughtful and high-quality installation.

Advantages of LED strips, modules and "flexible neon" using the DMX interface:

  • compatible with equipment using the standard DMX512 control protocol, such as DMX consoles or MADRIX system equipment.
  • if one pixel fails, all subsequent pixels continue to work, the picture is not distorted.

When controlled from equipment using the standard DMX512 protocol, a maximum of 170 pixels can be connected to one DMX bus (170 pixels at 3 addresses, 510 addresses in total). When using specialized pixel controllers for LED strips and flash modules, this number depends on the type of controller itself and is usually 1024 pixels per port.

At the end of the article, we will give a connection diagram for several LED strips "Running Fire" (Fig. 4.) and give a few recommendations that will help to correctly design and mount the system.

Fig.4. Connecting several LED strips.

  • When connecting pixels, observe the direction of data transfer indicated by the arrows on the tape or flash modules. The arrows should point in the direction away from the controller. Also, you can focus on the markings applied to the tape or modules. Contacts marked DI or DIN - input, connected to the output of the controller, contacts marked DO or DOUT - output, connected to the following pixels.
  • Never apply a voltage to the tape that exceeds the rated supply voltage, for example, connecting a tape with a supply voltage of 5V to a power source with an output voltage of 12V will inevitably lead to failure of the tape.
  • Be careful when connecting. Applying power to the data input or an error in the polarity of the power supply leads (plus and minus of the power supply) can lead to tape failure.
  • Do not power two or more tapes in series (5m or 2.5m, depending on the type of tape). Tape and "flexible neon" are supplied on spools and always have the maximum length allowed. When several tapes are connected in series, the DATA and GND wires are connected from the output of one tape to the input of another, and power is supplied to each tape separately. If a single large power supply is used to power several tapes, a separate cable must be run from it to each tape. In this case, it should be borne in mind that the current consumption of the tape can reach large values ​​and this leads to a voltage drop on the supply wires. In addition to changing the color of the glow, such a drop can cause malfunctions in pixel management. The cross section of the supply cable is calculated in the same way as for standard LED strips, based on the power consumption of the strip and the length of the cable. For calculation, you can use the wire section calculator on our website. Often, instead of one large power supply, it is more convenient to use separate small power units for each tape, placing them in close proximity to the tape. With this connection, problems caused by voltage drops do not arise.
  • When using high density tapes with low voltage (5 volts), supply power to the tape from both ends. On such tapes, due to the large current consumption and the voltage drop on the tape tracks, the color of the LEDs at the beginning and end of the tape may differ. Due to a lack of supply voltage at the end of the tape, LED control failures may occur. These effects are especially pronounced when static is turned on. white color on all LEDs. In this mode, the current consumed by the tape is maximum. On some controllers, to eliminate this effect, the brightness of the glow on white is automatically reduced when the controller is powered by 5 volts.
  • The voltage on the control lines DATA and CLK does not depend on the type of controller and its supply voltage. On all controllers, it can only take two values ​​- 0 or 5 volts (TTL levels). It follows from this that it is not necessary to power the controller and the tape from power sources with the same output voltage. For example, you can use a 5 volt tape and a 12 volt controller. The main thing is that the output voltage of the tape power supply matches the connected tape, and the output voltage of the controller power supply matches the connected controller. If the supply voltages of the controller and the tape are the same, you can use one common power supply.
  • Use a shielded cable to transfer control signals from the controller to the tape. It is possible to use a cable for computer networks UTP (twisted pair). The length of the control cable between the controller and the tape should not exceed 10 m. If it is necessary to transmit the control signal over a longer distance (up to 200 m), use TTL to RS485 signal converters from the controller side RS485 to TTL from the tape side. To transmit and receive a signal via cable, you can use the Th3010-485 converter.
  • When the number of pixels in the system is more than 1024, use controllers with multiple output ports. Distribute pixels evenly between controller ports.

www.neoncolor.ru

Connecting rgb LED strips to the controller and controlling the lead backlight with a remote control

The most modern lighting devices are LEDs: LED lamp, spotlights or modules. Although there are designs in which the elements are connected in a strip, these are LED strips. They are produced in various brightness and colors, there are also multi-color RGB tapes (R - red "red", G - green, "green", B - blue, "blue"), allowing you to change the color of the tape using an RGB controller.


Application of multi-color tape

RGB tape, due to the ability to change color and brightness, is used in many places and design solutions:

  • The main or auxiliary lighting of the room. In combination with a central chandelier, it makes the illumination more uniform, and independently creates romantic lighting or, in combination with a remote control with appropriate capabilities, provides color and music effects;
  • In the bedroom, hallway and kitchen provides emergency and full lighting. You can switch modes manually, by timer or motion sensor;
  • Shop window lighting. The shade of light is chosen at the request of the designer;
  • Computer modding. Color may vary depending on temperature or CPU usage;
  • Phytolamp. This is a convenient, but disadvantageous option - only two colors are used: red and blue.

RGB led strip design

The LED strip is a flexible strip on which there are two, and on the RGB led strips there are four conductive strips. Between these strips there are three series-connected LEDs and a current-limiting resistance in groups. The circuit elements are used in the form of SMD - surface mounted device (surface mounted device). Such designs differ in the size of the LEDs, expressed in 0.1 mm.

SMD5050 or 5*5mm elements are installed in multicolor led strips. Unlike smaller LEDs, they have three LEDs in one housing. In monochrome designs, these elements are connected in parallel, and in RGB designs, each output is connected to its own conductive strip and has its own glow color. The exception is devices in which a PWM controller is installed in each element. In such devices, there are only two conductive strips. The control is carried out using a digital signal.

In addition to the usual RGB tapes, there are RGBW devices. In them, in addition to multi-color, there are white LEDs. With their help, increased brightness and a greater amount of light reflections are achieved.

Color Management

In multi-color stripes, the brightness of each color is controlled separately. This achieves a large number of shades. When all LEDs are turned on at full power, the tape begins to glow white.

RGB controller is used for control. It can be equipped with a different type of control panel:

  • Built-in or remote on wires. It is used where constant color adjustment is not required, for example, in shop windows;
  • With IR remote. The most simple and inexpensive. The disadvantage is that such a remote control only works within the line of sight;
  • With radio control. Allows you to control the light even from the next room, but if you lose the remote control, you have to change the device;
  • With WiFi and Bluetooth. Allows you to manage with mobile phone. Can be used in the "smart home" system.

In addition to adjusting the color of the entire tape at the same time, there are devices in which each LED is equipped with a PWM controller that adjusts the color of its LED. In such designs, various color and light effects are possible: color overflows, running lights, star rain and others.


RGB controller

LED strip control with Arduino

One way to control multi-color LED devices is with Arduino boards. In such boards, a programmable microcontroller is installed, to which various sensors and output devices are connected. According to a given program, such devices control the color and brightness of the LEDs. They are equipped with analog outputs for controlling a conventional RGB tape, and digital outputs for a tape with PWM controllers.

RGB Tape Power

The most common supply voltage is = 12V, but there are bands for 24, 110 and 220V. They differ in the number of LEDs connected in series in a group.

Before you connect the rgb tape, you need to determine the required power of the power supply, taking into account the 20% margin. The power supply of such devices is carried out from power supplies of different capacities:

  • Up to 25W (2A). Such devices are similar to the power supply of a tablet or mobile phone; they are plugged into an outlet;
  • Up to 100W (9A). These are devices in a plastic case. They can be hidden in a closet or in a niche, in a plasterboard wall;
  • Over 100W. These are devices in a metal case with built-in coolers. At installation it is necessary to provide access of air. They make noise during operation, so it is more expedient to use several low-power devices instead of one powerful device in the house.

Cross-section of wires for connecting LED strips

When connecting such devices, the power supply must be placed next to the tape. This is due to the voltage drop in the connected wires.

For example, to connect 5 meters of RGB SMD5050 tape, voltage 12V, power 14.4W / meter, total power 72W and current, according to the formula I \u003d P / U \u003d 72W / 12V \u003d 6A, a wire cross section of 0.5 mm² is sufficient. But with a wire length of 10 meters, the voltage drop will be 4V, so you need to choose a cross section of at least 4 mm².

Information. To connect devices located at a distance from each other, separate power supplies and RGB repeaters are used.

It is allowed to connect tapes in series no more than 5 meters. With a longer length, the voltage drop on the current-carrying strips increases, the brightness decreases towards the end, as well as their heating. This will result in device failure.


Connecting the RGB Tape

Wire connection

For connection on conductive strips there are contact pads - extensions to which wires are connected. They are attached in two ways: soldering or connectors.

Soldering wires

To connect the strip by soldering, flexible stranded wires with a cross section of not more than 0.5 mm² are required. Larger wires can break the pads.

Flux is used only neutral. The procedure is as follows:

  1. if the tape is covered with a layer of silicone, you need to remove it without damaging the conductive layer;
  2. with a soldering iron with a power of not more than 15W, tin the contact pads;
  3. cut off pieces of wires of the required size;
  4. remove the insulation from the wire by 5 mm and tin it;
  5. cut off a piece of heat shrink tubing 25 mm long and put it on the tape;
  6. solder wires;
  7. put a heat shrink tube on the place of soldering and warm it up with a building hair dryer or a lighter.

Attention! Acid must not be used - it can destroy the conductive strips or cause a short circuit.

Connecting with connectors

In addition to soldering, the connection is made using special connectors. This is less reliable, but more simple and fast way. In addition, when connecting or repairing a tape installed in a hard-to-reach place, this is the only way.

Connectors are produced different shapes: straight, angular, T-shaped, with wires, for connecting to the network and without, for connecting strip sections to each other.


RGB connector

Tape repair

In case of failure of individual sections of the strip, there is no need to change the entire tape as a whole - it is enough to replace the damaged section. This is done using short, 10-15 mm, pieces of wire or connecting connectors.

Degree of water resistance

Tapes are produced with different degrees of protection against adverse environmental influences:

  • IP20/IP33. These are open lanes. They are used in dry places where water splashes are excluded. This is the illumination of a false ceiling, a computer keyboard or a replacement for a table lamp;
  • IP65. Covered with silicone only on the front side. They are used to illuminate baseboards, the working area in the kitchen and other places where splashes are possible, but water jets are excluded;
  • IP67/IP68. Completely covered with silicone. They are used in any conditions, including in water: in pools and aquariums.

Types of waterproof tape

Multicolor RGB LED strip is a new modern look lighting, allowing you to decorate the interior with a variety of lighting effects.

Video

elquanta.com

WS2811: Tri-color RGB LED driver | hardware

Worldsemi's WS2811 is a 3-channel constant-current LED driver, providing 256 brightness levels per channel (typically R red, G green, B blue, RGB). This article provides a translation of the datasheet "WS2811 Signal line 256 Gray level 3 channel Constant current LED drive IC".

The brightness of the LEDs connected to the WS2811 is controlled by serial digital code, which is generated by the microcontroller. Data is transmitted over only 1 wire. The digital control signal passes through the WS2811 chip, so that several WS2811 chips can be combined into a long chain while maintaining the ability to control each LED in the chain individually.

[Features of the WS2811 chip]

The operating voltage of the output port is up to 12V. There is a built-in VDD supply voltage regulator, so that you can power the microcircuit even from 24V, if you connect a voltage-quenching resistor in series. It can be set up to 256 brightness levels, and at the same time the scanning frequency is at least 400 Hz. There is a built-in node for restoring the shape of the input data signal, which ensures that there is no accumulation of distortion on the signal line. There is a built-in reset node that resets the chip when it is turned on and power is restored. The signal from one chip to another can be transmitted through one signal wire. Any two points between the signal receiver and transmitter can be more than 10 m apart without the need for additional amplifiers. At a refresh rate of 30 fps (30 fps), the low-speed cascading model allows you to chain at least 512 points, per high speed you can connect at least 1024 points. Data is transmitted at speeds up to 400 and 800 Kbps (kilobits/sec).

WS2811 can be used to create decorative lighting using light emitting diodes (LED), as well as for video screens or information boards, both indoors and outdoors.

[general description WS2811]

WS2811 has 3 output channels specifically for LED driving. The chip has a built-in advanced digital data port with the ability to amplify the signal and restore its shape. The microcircuit also has a built-in accurate internal generator and a programmable source of constant output current, designed for operating voltages up to 12V. To reduce supply voltage ripple, the 3 output channels are designed with a delay turn-on function.

The microcircuit uses NZR (Non-return-to-zero) communication mode. After a power-on reset, the DIN port receives data from the external controller, with the first chip collecting the first 24 bits of data, and then transferring them to the internal data latch, while the rest of the data is restored to shape using the recovery node and gain, and these other data are transferred to the next chip in the chain through the DOUT port. After passing through each microcircuit, the number of bits in the total stream decreases each time by 24 bits. The technology for automatic recovery of the transmitted data signal is designed in such a way that the number of cascaded microcircuits is limited only by the transmission rate and the required refresh rate of the LED brightness.

The data latched into the microcircuit (24 bits) determines the duty cycle of the signal of the output ports OUTR, OUTG, OUTB that control the LEDs - PWM (PWM, pulse-width modulation) is used, so the brightness of each channel depends on the duty cycle of the output ports. All ICs in the chain synchronously send received data to each segment when a reset signal is received on the DIN input port. Further, new data will be received again after the completion of the reset signal. Until a new reset signal arrives, the control signals of the OUTR, OUTG, OUTB ports remain unchanged. The chip transfers the available PWM data to the OUTR, OUTG, OUTB ports after receiving the reset low signal, for another 50 µs.

Often the WS2811 chip is built directly into the RGB LED housing (this solution is used in popular LED strips), such an LED is called 5050 RGB LED.

Separately, the WS2811 chip is supplied in SOP8 and DIP8 packages.

The table below shows the purpose of the WS2811 feet.

Mnemonics Output Function Description
1 OUTR PWM output signal to control the brightness of the red LED (Red).
2 OUTG PWM output signal to control the brightness of the green LED (Green).
3 OUTB PWM output signal to control the brightness of the blue LED (Blue).
4 GND Ground, common wire, minus power.
5 DOUT Data signal output (for chip cascading).
6 DIN Data signal input.
7 SET Setting the low-speed mode of the microcircuit (when SET is connected to VDD) or high-speed mode (when the SET pin is not connected anywhere).
8 VDD Plus supply voltage.
Parameter Mnemonics Meaning Unit rev.
Supply voltage VDD +6.0 .. +7.0 V
Output voltage VOUT 12 V
Input voltage VI -0.5 .. VDD+0.5 V
Working temperature Topt -25 .. +85 oC
Storage temperature Tstg -55 .. +150 oC

Note: if the voltages on the pins exceed the maximum value, then this may permanently damage the microcircuit.

[Electrical specifications]

[Dynamics]

TA = -20 .. +70oC, VDD = 4.5 .. 5.5V, VSS = 0V unless otherwise specified.

Parameter Mnemonics Condition MIN NOM MAX Unit rev.
Operating frequency Fosc1 - - 400 - kHz
Fosc2 - - 800 - kHz
Transmission delay (signal propagation time) tPLZ CL=15 pF, DIN->DOUT, RL=10 kOhm - - 300 ns
Fall time tTHZ CL=300pF, OUTR/OUTG/OUTB - - 120 ms
Transfer rate FMAX duty cycle 50% 400 - - kbps
input capacitance CI - - - 15 pF

[Time intervals for low speed mode]

This table shows the times that data bits 0 and 1 are encoded and the reset signal.

Note: for high speed mode, all time intervals are reduced by 2 times, but the reset time remains unchanged.

The diagrams explain the principles of coding and data transmission.

The microcontroller sends data to chips D1, D2, D3 and D4. The microcircuits are connected in a chain, and the data that passes through them (DIN -> DOUT) is restored and amplified. At the same time, 24 bits of data are cut off from the data sequence each time, which are intended for this particular microcircuit, after passing through the data array for all microcircuits, a reset signal RES follows (a log 0 pulse with a duration of at least 50 μs). After that, the received brightness level (24 bits per chip) is transmitted to the PWM outputs OUTR, OUTG, OUTB. This is how the 24-bit sequence is composed, which encodes the brightness levels of the OUTR, OUTG, OUTB channels of the microcircuit (the high-order MSB bit comes first):

R7 R6 R5 R4 R3 R2 R1 R0 G7 G6 G5 G4 G3 G2 G1 G0 B7 B6 B5 B4 B3 B2 B1 B0

[Standard Wiring Diagrams]

In this example, each channel in an RGB LED is driven with a constant current of 18.5 mA, with the brightness of the LED determined by the PWM duty cycle. Due to the stabilization of the current with a decrease in the supply voltage, the LEDs retain their brightness and color temperature. In order to prevent supply voltage ripples from affecting the operation of the microcircuit, it is recommended to use a filtering circuit consisting of a series resistor with a nominal value of more than 100 ohms and a blocking capacitor with a capacity of about 0.1 μF. A 33 ohm series resistor must be included in the signal path to prevent signal reflections and to allow hot-plugging.

As in the previous example, the LEDs are driven by a constant current of 18.5 mA. R1 is used for the normal operation of the internal voltage regulator of the microcircuit, its value should be 2.7 kOhm. Typically, a red LED will always drop less voltage at the same current than other colors of LED, and the red LED will glow brighter. Therefore, the OUTR channel must have an additional resistor RR, the resistance of which can be calculated using the formula:

12 - (3 * VLEDR)RR = ------------- kOhm 18.5

In this formula, VLEDR is equal to the voltage drop across one LED in the red group (usually 1.8V .. 2V).

[How the RGB LED strip works]

The photo shows a conventional waterproof RGB LED strip based on WS2811 chip technology (WS2811 waterproof LED Strip) with a length of 5 meters, model GE60RGB2811C. This tape is usually supplied wound on a reel, along with wall mounting hardware. To power the tape, you need a stabilized voltage source 5V 18A (power consumption 18 W per 1 meter). At the ends of the tape there are male input connectors (a digital signal enters here and power must be connected) and a female output (a digital signal comes out from here and power can also be connected here), so that the tapes can be connected to each other to increase the total length.


The tape is assembled on a thin textolite tape (a flexible double-sided printed circuit board) and is designed so that the tape can be cut anywhere to obtain the desired size.

To control the RGB LED strip, special controllers are used, which are programmed from a computer via USB or using an SD card. The controller can set a complex automatic tape control algorithm, some can even work as color music - using the built-in microphone, they analyze the sound and control the color of the tape to the beat of the melody.