Appendix A. DIY LEDs

One of the best ways to learn about LEDs is by tinkering with them. While encased in lamps, LEDs might be tiny, sensitive, and hard to understand, but when out in the wild they are affordable, easy to use, and rather simple devices. This makes them ideal for experimentation and a great way to learn the basics of electronics.

The previous mention of do-it-yourself LEDs covered the Throwie, the simplest of the LED circuits. It combines a battery and an LED into a easy to understand device that anyone can make in minutes. The next step up from that two-part project is adding a resistor to the mix. This will allow you to adjust your circuit so that the proper amount of power is going to the LEDs which will, in turn, ensure they get the maximum lifetime possible as well as the optimum brightness. Without a resistor, it’s easy to send too much power to the LEDs and shorten their lives significantly, or simply break them.

To figure out the resistor you need in your LED circuit, some basic math will be required. The formula is based on Ohm’s law, where V = voltage across the resistor, I = the current through the resistor, and R is the resistor value. Here are three ways of stating Ohm’s law:

I = V/R
V = IR
R = V/I

It’s this last one (R = V/I) we want to use:

Resistor rating = (battery voltage - LED forward voltage) / LED forward current

This means you need to know the voltage of your power supply, the forward voltage of your LED, and the forward current in amperes (amps) ...

Get LED Lighting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.