Author's Picture
Author: Joel Gray Published: 7 July 2020 Read Time: ~3 minutes

Using LEDs in a Circuit

Some background to LEDs to help you when building circuits

Light Emitting Diodes, LEDs for short, produce light when current is passed through them. They are very popular components and feature in a lot of products which you and I both use from day to day – typically used for indicator displays. LEDs can be used in replacement for more traditional lighting solutions as a less energy hungry, smaller, and longer lifetime alternative.

Notice how one leg is longer than the other, this is to signify which is the Anode and which is the Cathode.

The longer leg of the LED is the Anode, often referred to as the Positive leg. It’s important to know this as current can only flow from the Anode to the Cathode in order for the LED to operate correctly.

How do they actually work?

LEDs are made using a compound P-N junction where it will allow flow of current through its forward direction but will not allow the flow of current in the reverse direction. LEDs are produced using compound semiconductors material which allows for light to be emitted once the forward bias voltage is met.

LEDs emit light due to the electrons from the n-type region passing through ‘recombing’ with electronic holes on the p-type region – this releases energy in the form of light photons. Electron holes are just empty locations were an electron could be. When the electrons passing through fill these gaps photons are produced.

The amount of energy required for the electrons to cross the ‘band gap’ will decide on the colour of the light emitted – colour is also determined by the semiconductor used in production of the LED.

What do I need to know as a casual circuit maker?

The LEDs typical forward voltage is anywhere between 1.8V and 3.3V, this varies depending on the LED colour (as discussed above). For example: Red is typically around 1.7V to 2V whereas blue is 3V to 3.3V.

A resistor usually couples a LED to prevent damage to the LED or rest of the circuit, 330 Ohm is a typical value which is used to limit current in simple LED circuits.

What about RGB LEDs?

Red, Green, Blue LEDs (RGB LEDs) are basically the combination of RED, GREEN and BLUE LEDs hence the name RGB. With an RGB LED we can almost produce any colour this is achieved by mixing different levels of light of the RED, GREEN and BLUE LEDs.

RGBs work with PMW signals which basically allow for different levels of current to be passed through each corresponding leg of the RGB – these different levels correspond to different colours. This will be formatted as (xxx,xxx,xxx) where (Red LED PWM level, Green LED PWM level, Blue LED PWN level).

For example: (255, 0, 0) would correspond to driving the Red LED ‘HIGH’ but not driving the green or Blue LEDs at all. Thus emitting a Red light.

Also we could drive the Red and Blue LEDs together as so: (128, 0, 128). Mixing them to emit a Purple light.

View our RGB LED project to understand this further.

Most RGB LEDs come with a pin for Red, Green, Blue and a common pin which is either Anode or Cathode. Common Anode RGB’s share a positive connection whereas Common Cathode share a negative connection. It’s important to know which type you are using so you can wire the led correctly.

Let’s wrap this up!

You now know how LEDs work and how to implement them safely into a small DC circuit. Try out some of our LED projects to become familiar with using them.

Written by Jamie Buick