Let's primarily face the structure of the strip. There are four connections, one of them is for the + 12 V power supply, the other three connections are for the individual colours. The strip is working like this: If you apply + 12 V and then connect ground to one of the colour connections, this colour is shining. The brightness is now controlled vie PWM. To fully control the LED strip you need:
- A microcontroller (ATmega / Arduino)
- 3 bipolar transistors (NPN) which can handle enough current!
To control a single color, you have to execute:
analogWrite(8, 127);
This command will set the transistor which is connected to pin 8 to 50% (255 is the maximum), so the connected colour has 50% brightness. You can only use PWM channels for this (in the data sheet usually referred as OCR).
To achieve any color, you have to mix the colors. therefore, you have to choose a colour in the RGB space, e.g. orange: this colour is R: 255, G:255, B:0. Now you have to program this into the microcontroller:
analogWrite(RED_PIN, 255);
analogWrite(GREEN_PIN, 255);
analogWrite(BLUE_PIN, 0);
It could occur that different colours are seen at different brightness, you should test this and then set the maximum limit e.g. for green to 127 (green appears very bright for the human eye, therefore the green colour could be too bright.
what is led lighting system and how is working. Please visit us for learn more details aboit us and led lighting-EXTRUSION FOR LED STRIPS
ReplyDeleteWelcome to
Prisma Led Store
Shamim