

Since the common side is inverted, it should not be surprising that the signals we have to send the individual R-G-B legs is also inverted (+ve signals to common cathode, GND signals to common anode).įortunately, the connection patterns between the LED legs and the resistors is the same - regardless of the polarity of the common leg. In the right (common anode) the long leg needs to be connected to +ve power (5V if using an Arduino Uno).Īs you can see above, the big consequence of common cathode vs common anode is the kind of signal we need to send to the individual RGB legs to turn them on. In the left component (common cathode), the long leg needs to be connected to ground. In both cases, the LONG leg is common (wired together for all the internal LEDs). The image above shows the pinout of common cathode (left) and common anode (right) RGB LEDs. (BTW you will also see this pattern in 7-segment LEDs should you ever encounter one of those). Our RGB LEDs are identified and grouped based on which side of the LED (+ve, -ve) is common. Thus reducing the number of legs on the component. So they make a decision and wire all of the anode (+ve) legs OR all of the cathode (-ve) legs of the RGB LED together internally. Manufactures realized an LED can be controlled by changing voltage on only one side of the circuit. This would be possible but it would be a lot to keep track of AND it would be more expensive to produce. You might expect a 3-LED component to have 6 LEGs. RGB LEDs are three-in-one-LEDs arranged with each other in parallel inside a single package. At the time, I led (is that a pun?) you to believe that it would not matter if you could not remember these different labels.ĪLL LEDs have at least one anode (positive side) and one cathode (ground side). I also mentioned and repeated that this means LEDs have polarity. In the basic intro I mentioned in passing that the short / flat side leg is called the cathode, the other leg is the anode. Single color LEDs require that the shorter leg, which is below the flat side of the LED cap, faces ground.

Whats the difference between a common cathode and common anode LED? Recall from our basic LED introduction that for a single color LED we need to pay attention to which leg is facing ground. Identifying Your RGB LED Cathode vs Anode These issues are entangled - I am going to deal with the identification problem first, and the switching problem second. To gain this understanding we need to resolve two issues: identification and signal switching (a strength of the Arduino). This shipping glitch has given us a chance to explore some really interesting aspects of electronics. The take away here is, if you received a common anode (wonky) instead of a common cathode (expected) RGB LED you can still do everything I have asked - it just takes a small bit of extra understanding. We (the makerSpace team and I) have never ordered common anode RGB LEDs - so being able to deliver them to you was a genuine surprise! (After school special kind of surprise).ĭiscovering and coming to understand what happened partway through a remote class - and having no access to one for me to test with and confirm - made for a challenging pivot, as you all witnessed. (Had we been in a face-to-face class we would have just switched them). The issue with this mix up has much more to do with us being remote than it does with any actual problem with the LEDs. These differences reveal some interesting patterns that, while a bit advanced, are useful to think through. They require different wiring - and sending the same code code to one channel of each leads to opposite behaviour. However, in terms of inner connections and electrical setup they are quite different in fact, they are mirrors of each other. So, from these perspectives, common anode and common cathode are fully interchangeable. We are going to make the most of this glitch and take this opportunity to think about different ways to control LEDs.Ĭommon cathode (from class - ‘expected / normal’) and common Anode ( from class - wonky) LEDs are virtually identical in appearance and there is no difference in their spectrum of color output. As you are all aware I was surprised by the fact that, while most of the 2021 kits have common cathode RGB LEDs, a significant number have common anode RGB LEDs.
