How a Colour Changing Led Works
Colour changing LEDs are commonly used in a lot of technology, they look good, provide a modern touch to your electronics and allows for some customisable choice in how they look. However, a lot of people don’t know how these brilliant little pieces of technology work. Colour changing LEDs house Red, Green and Blue LEDs inside them, and it is the mixing of these colours which allows us to perceive the different colours. While the method behind the ways that different colour changing LEDs work, we are going to look at two different types of these LEDs that are controlled differently, the first being controlled by a microcontroller and the second being controlled by sharing a common cathode.
The microcontroller versions of colour changing LEDs, as the name suggests makes use of a microcontroller to control the colour produced by the LEDs. The legs on this version of the LED are attached to the microcontroller which in turn is able to supply power to the red, green and blue LEDs that are attached to it. Some of the more cheaper variants of these LEDs or ones you might find in a child's toy have preset light patterns programmed in which will rotate the colours, whereas more expensive versions and ones that you find in LED light strips allow the user to use libraries as NeoPixel or DotStar along with a microcontroller in order to program each individual LED to change the colours or pattern/sequences created.
Comparing this to the LEDs that share a common cathode, these LEDs give the user more physical control over the produced colours. These LEDs have 4 legs one for each colour (red, green, blue) and the fourth leg is the shared common cathode. While these types of LEDs can also be controlled by a microcontroller, they can also be controlled by using items such as potentiometers, this gives the user more control over the LEDs physically as they are able to manually control the amount of power supplied to the individual LEDs which in turn adjusts the mix of colours created.