In this tutorial, We're going to use an RGB LED (RGB means Pink, Eco-friendly, Blue) to flash via a sequence of colours and find out about the difference between a typical Anode and Common Cathode RGB LED style.

Products

You’ll need the next products. Importantly, There's two forms of RGB LEDs—described below—so you should definitely determine which kind of RGB LED you're utilizing as it is going to impact how you configure your circuit. But don’t get worried, we’ll walk as a result of equally RGB LED types.

Frequent Anode vs. Common Cathode

Even though able to displaying thousands of color combos, RGB LEDs are actually fairly uncomplicated; they contain three separate LEDs in one offer: pink, green, and blue. Importantly but rather confusingly, There's two RGB LED styles—the Common Anode and the Widespread Cathode—which differ from the leg shared involving the 3 embedded LEDs.

Using the Typical Anode, the a few embedded LEDs share the anode leg. To regulate the RGB LED’s shade, you have to hook up the anode rgb LED to the upper voltage source and connect the purple, inexperienced, and blue legs to reduced voltage concentrations (e.g., ground). Such as, that has a 5V voltage supply connected to the common anode leg, environment the a few other legs (purple, green, blue) to 5V would, somewhat counterintuively, turn from the LED.

In distinction, the Frequent Cathode is effective way more like a typical LED (e.g., much like the crimson LED from our preceding classes). Below, all 3 embedded LEDs share the cathode leg. So, you generate Each and every unique shade leg with a greater voltage resource.

How can I explain to if I have a standard Anode or Cathode RGB LED?

You can not tell regardless of whether you have a Common Anode or Widespread Cathode RGB LED by visual inspection. Alternatively, talk to the supplier Web-site, the datasheet, or experiment With all the LED yourself (keep in mind, diodes only function in one direction so so long as you include your current limiting resistors, you need to be good!).

ommon Cathode

We’re planning to start with a standard Cathode circuit + code since it’s additional intuitive (and just like our purple LED tutorials) in advance of covering the Popular Anode Model.

Earning the circuit

With a Common Cathode layout, the 2nd leg ought to be attached to the GND pin and the 1st (pink), 3rd (blue), and 4th (inexperienced) legs need to hook up with digital I/O pins (don’t fail to remember a existing limiting resistor for every). We might have utilised any digital I/O pins; even so, we chose Pins six, five, and 3 for crimson, blue, and eco-friendly respectively (these pins help PWM and thus, we’ll be able to use the identical circuit for our up coming tutorial on cross-fading shades with RGB LEDs).

Weergaven: 4

Opmerking

Je moet lid zijn van Beter HBO om reacties te kunnen toevoegen!

Wordt lid van Beter HBO

© 2024   Gemaakt door Beter HBO.   Verzorgd door

Banners  |  Een probleem rapporteren?  |  Algemene voorwaarden