These resistors keep the voltage at an acceptable working range for the LED. I have found that a 150 Ω resistor works well for the red LED and a 100 Ω resistor for the blue and green LED.Īs shown in the diagram these are placed between the Arduino pins and the positive pin of the LED. This means that to ensure I give the LED the correct operating voltage I will need to use a resistor. I am going to be using the digitalWrite Arduino function which will provide 5 volts from the pin. Going left to right in this orientation the pins are the red LED, common cathode (longest pin), green LED and blue LED. If you turn the LED so the longest PIN is the second from left as in my diagram the leftmost pin is the red LED. When looking at the LED the longest PIN is the common cathode. To programmatically change the colour of the LED I am wiring the three positive pins to pin 11, 12, and 13 of the Arduino. This means that when powering the LED’s you will need to ensure that the resistors are keyed so they LED’s receive the correct voltage. What makes it more tricky is that the red LED accepts voltages in a completely different range to the green and blue LED’s. The important thing to remember when using the RGB LED is that the different colour LED’s require different voltages. This means you will only need one GND connection for all the LED’s. This LED has 4 pins, a common cathode and a pin for each colour (red, green and blue).Ĭommon cathode means that each LED shares a common GND connection. Instead of having a single colour there are 3 different LED’s packed into a single one. The RGB common cathode light emitting diode works just like a standard LED but there is one small difference. This includes schematics for using it with an Arduino and code examples.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |