Lighting models III: Powering LEDs

Welcome to my article on model lighting! I cover different technologies that are useful for people who want to illuminate scale models of various kinds – cars, spaceships, dollhouses, etc.

And I don’t mean shining external lights on the model, of course. I’m referring to the technology to make tiny light sources that appear to-scale with the model itself.

CHAPTER CONTENTS

Power sources

Plain old light bulbs light up regardless of which way around the wires feed them. You can even give them direct current from a battery or alternating current from the wall, and as long as the voltage is correct for the bulb's rating, they'll work. They're relatively forgiving in terms of supply voltage, and simply burn brighter and with a shorter lifespan when given more power. Give them less power and they burn dimmer and yellower.

LEDs, however, are semiconductor diodes. This means they can only use pure direct current (DC), within very specific voltage and amperage limits. You can’t use household-type alternating current (AC) to power an LED – at least, not without converting it to DC using a transformer and other electronics.

Complicating matters, LEDs promptly burn out if you pump more power through them than they can handle, and they simply won't light up if their wires are reversed they're polarized devices.

So the key things you need to remember about wiring up an LED are the polarity, the voltage, and the amperage of the power source you're using.

The easiest way to supply an LED with direct current is to use a battery. Or you can use a special power supply that plugs into the wall and converts household power.

Polarity

This is pretty easy. LEDs usually have one lead that's longer than the other, and this is the positive connection. In the case of SMD (surface mount device) LEDs, one of the contacts is usually marked as positive, perhaps with a dot of paint or white silkscreened mark.

The positive lead, which is known as the anode, should obviously be connected to the positive side of your circuit. The negative end is the cathode. Reversing the connection shouldn't harm the LED if you’re using low voltage, but no light will be produced. Well, unless it's one of those LEDs that contains two diodes in a single housing, wired in opposite directions. Those special devices can produce light of one colour when current flows one way and a different colour when current flows the other.

Voltage

This is also fairly straightforward. LEDs are typically sold with a maximum supply voltage number, described as the "forward voltage". The specific forward voltage depends on the type and colour, but common values include:

1.7 to 1.9 volts for most red LEDs

2.0 volts for yellow and orange LEDs

2.1 volts for green LEDs

3.2 to 3.4 volts for most white and blue LEDs

Obviously there's no guarantee that your particular LED will match these numbers, and you should always go for whatever published specs you get from the seller.

Trivia note: notice how the forward voltage for an LED is directly related to its colour on the spectrum. It takes less power to illuminate an LED on the red end of the spectrum, whereas it takes more to produce blue light.

A key thing here is that you should never exceed the published forward voltage for an LED. It's also safer to go a tiny bit lower than the spec for your continuous supply. This might extend the lifespan of your LED, which is pretty important if you're going to be sealing it up inside a model. So 1.5 volts for a red LED or 3 volts for a white LED are often perfectly good choices.

Now one tricky thing is that these numbers don't always match up to common power sources. Two NiMH rechargeables might yield 2.4 volts. A USB charger will produce 5 volts. And so on.

You also need to control the amount of current, which is really important for LED lifespans – see the next section. There are two basic solutions to this problem, resistors and regulators, and they’ll be discussed later.

Current: amps and milliamps

This can be a confusing one. We're all used to electrical voltages. An alkaline AA cell puts out 1.5 volts. Cars nominally use 12 volts. Household current is 110 volts in North America, 100 in Japan, and 220-240 everywhere else.

But current, measured in amperes, is another thing. Amps are often described in terms of the traditional water pipe comparison. You can have high pressure water pipes, and low pressure water pipes. You can have a rapid rate of flow or a slow rate of flow.

So think of the pressure of the pipe as electricity voltage. The rate of flow is the amperage. Like all analogies, it's pretty imperfect, especially since electricity can behave in strange ways that don't seem intuitively obvious at first glance. But it's a useful model.

Different devices require different amounts of electricity to work, and the amount of electricity required by a small electronic component is usually described in "milliamps" or "mA". For example, grain of wheat tungsten bulbs often consume 60-70 mA each. By contrast, most LEDs require 15 to 20 mA to function, but some can light up on 5 mA, or even 1-2! More on low-current LEDs later.

This all matters since LEDs are very sensitive to the amount of current supplied to them.

Current limits and resistors

The biggest problem with LEDs is that they only produce light within specific current ranges. And if you exceed that amount they'll cease working. Permanently.

The most popular way to limit the current going to an LED is to put a resistor into the circuit. Cheap and cheerful. Resistors are simple electrical components - usually thin cylinders or sausages painted with colour-coded stripes - which absorb a bit of electricity and output it into heat. To use our water metaphor, you can think of a resistor as a bit like a water pipe flow restrictor which narrows the diameter of the pipe.

Incidentally, don't let the "heat" bit put you off. Large resistors in high power circuits can indeed become extremely hot. But the tiny resistors in our models rarely become more than slightly warm.

Many LEDs are sold with resistors already soldered to the wires. Similarly many LEDs sold in strips have resistors built right into the plastic strips. These are specifically designed to work with certain input voltages. For example, you could buy an LED with a resistor intended to drop the current from a 9 volt battery. Plug this into your 9 volt circuit and you're done! This is how you can buy LEDs advertised as 5 volt, 9 volt, or 12 volt devices.

If an LED hasn't got a resistor soldered on, you can add one yourself. The resistor must be added in series with the LED. In other words, you solder the resistor and LED inline together to form a single string. You don't wire the resistor and LED side by side, as it were. That's easy enough but there’s a catch, and that is you need to calculate the resistor value through a simple bit of arithmetic. The calculations are based around Ohm’s Law, and are actually pretty easy to do. The formula is:

Resistor value (in ohms) = ( input voltage - LED's voltage drop ) ÷ LED current in amps

If that looks daunting, here are some websites with automatic calculators:

https://www.allaboutcircuits.com/tools/led-resistor-calculator/

http://www.ohmslawcalculator.com/led-resistor-calculator

http://led.linear1.org/1led.wiz

http://ledcalc.com

https://www.digikey.co.uk/en/resources/conversion-calculators/conversion-calculator-led-series-resistor

https://www.sparkfun.com/tutorials/219

https://www.mouser.com/blog/dont-burn-out-calculating-led-current-limiting-resistor

Obviously if you have different colours and types of LEDs you'll need to perform the Ohm's Law calculation for each LED type, and you'll have to be careful not to wire the wrong resistor to a given LED.

Some people say it’s okay to use a single resistor with multiple LEDs. Others say it’s a bad idea. Personally I just think that one resistor per LED is the safest approach. Because of the way LEDs use power, they occasionally won’t function reliably with a single resistor, even if wired in parallel. Resistors are so cheap it's hardly an issue to buy a bunch of them – it's just the minor inconvenience required to solder them up.

LED current limiters

An easier and flexible, but more expensive, approach is to buy a current limiter chip. These tiny devices are sometimes called LED drivers (though not to be mistaken for the large electronic devices used for powering larger LED installations) or LED current regulators. They're surprisingly hard to find, but make wiring up an LED much less of a hassle. You simply get a limiter rated for the type of LED that you're using, solder it up in series to the LED or LEDs (most limiters can drive a few LEDs), and hook it all up to a power supply that's within the published range of the limiter. Magic!

For example, let's say you've got an LED rated at 20 mA (milliamperes) of power. You might want to feed it a little less current if brightness isn't critical but longevity is. So a 15 mA limiter is perfect. And most limiters can accept any voltage from 3 to 12 volts, making it easy to run the diode off the 5 volts from a USB charger, or off a 9 volt battery. It totally doesn't matter, as the limiter adjusts automatically. There's no need to calculate resistor values or anything like that.

2 mA, 5 mA, 10 mA, 15 mA, and 20 mA devices are available – the ones I use aren’t adjustable.

The limiter just needs to be fed more volts than the LED requires – typically around 2 volts more. As noted above, the voltage requirements for LEDs (the "forward voltage") generally depends on the colour, and thus the specific design of the LED chip. And the maximum value you can pump into a limiter isn't that high - typically around 20-24 volts. So you can't, for example, use household current on a small LED limiter without stepping the voltage way down first. One version even accepts low-voltage AC current, not just DC.

So with current limiters you can be totally loose or flexible with your input voltage. For example, four alkaline AAs put out 6 volts, whereas four NiMH rechargeable AAs put out 4.8 volts; quite different! Alkaline cells require one resistor value in this case; NiMHs require a different one. But a current limiter doesn't care and just works! Or you could have a battery pack option that puts out one voltage and a wall adapter that puts out another, and everything still works.

I always use limiters in situations where repair is difficult, or where input current may vary. For example, I once made a small model for a museum exhibition. I put a limiter on each LED for safety, and it has worked flawlessly for a couple of years.

The sole drawback with current limiters? Cost, especially if you need to drive a lot of LEDs. Well, and they're a bit wider and longer than resistors, which might be a problem in tight spaces.

The limiters I use were sold by Kokologgo of Germany, but now seem to be sold via an eBay shop called Dehso – first link below. ("Stück" means "piece" or "item", and "Konstantstromquelle" is one of those great German compound words and means "constant power source")

https://www.ebay.co.uk/sch/i.html?_dkr=1&iconV2Request=true&_blrs=recall_filtering&_ssn=dehso-shop&store_cat=0&store_name=dematrading&_oac=1&_nkw=constant%20current

http://www.hansenhobbies.com/products/lighting/electronics/

https://lighthouseleds.com/20ma-led-current-limiter-driver.html

Choosing a power source

An important decision in any electronic project is how you’ll power it. Fortunately when it comes to LEDs, you have a lot of flexibility since you’re going to have to adapt each LED to the power source using resistors or regulators anyway. So the type of power you have depends on convenience in other ways.

Portable power sources

If you're looking to illuminate a small self-contained model you have a lot of options available to you.

Cells or batteries?

This is a totally pedantic side matter... but technically a cell is a single chemical unit for storing power whereas a battery is a bunch of cells housed together. Therefore it’s an AA cell but a 9 volt battery. Technically. I mean, nobody really cares, do they?

AA and AAA cells.

These make for very handy ways to power models, because the cells are quite small and available everywhere. You can also buy plastic holders for slotting the cells into neatly - some with covers and switches. There are a few things to consider.

First, what type of cell are you going to use? Disposables (including alkalines) put out 1.5 volts per cell when new. They’re cheap and easy to find. But they generate piles of pointless non-recyclable garbage which costs more in the long run.

NiMH (nickel metal hydride) cells are what you want. They hold lots of power - you can get AA cells that hold over 2500 mAH, (milliampere hours) which is basically the same as good alkalines - and can be recharged many times, saving money and reducing waste. However, NiMH cells only put out 1.2 volts each, which represents a power shortfall over disposables, especially when using multiple cells together. So you just have to factor this into your calculations.

Whatever you do, don’t use obsolete NiCad batteries. They don’t last as long, have a lower capacity, and contain toxic cadmium metal.

Next, how many cells are you going to use? For most LED-driven projects it makes sense to have either two, three, or four AA/AAA cells. This gives you 2.4 or 3 volts for two, 3.6 or 4.5 for three, or 4.8 or 6 volts for four. The smaller output figure is for NiMHs and the larger for alkalines.

Though to be fair, as alkalines wear out their voltage output drops to something similar to NiMHs anyway. And the different battery chemistries wear out in different ways (different power curves), making them hard to compare directly.

The main issue is that white LEDs want a bit more than 3 volts, and are a bit dim if fed less. And if you’re using a limiter you’ll need to sacrifice a volt or so to the limiting device. So white LEDs with limiters powered by NiMHs will probably require three or four cells, realistically. By contrast, white LEDs with resistors powered by alkalines might need only two cells.

Lithium coin cells.

You may have seen little electronic projects where people fasten an LED, a coin cell, and a magnet together to form a glowing device that sticks to ferrous objects. These “throwies” show that LEDs can easily be powered by such small power cells. Though white LEDs can glow a bit dimly using these cells.

These can work for model projects as well, though you can’t power more than a couple regular LEDs off such a small cell for any length of time. So they’re kind of useless for anything other than a short-term installation. But they do fit in really tiny places, making them quite convenient. You can even buy small holders for them with built-in switches and presoldered wires.

Note that it may seem that such a setup would require a resistor. Fortunately because the current output by the cells is so low, you normally won’t have to bother.

IMPORTANT: If you have toddlers, small children, or pets around, beware of the safety risks of button cells. They’re tiny and easily swallowed, and the high energy density can burn a hole in the throat or stomach! (because of sodium hydroxide accumulation) Keep them away from the kids!

Rechargeable lithium polymer pack (3.6 volts).

These are great products, and come in a variety of physical sizes and capacities. They’re rectangular blocks in flexible plastic containers that can be recharged with special chargers. This is the technology used in most mobile phones these days.

Because rechargeable lithium polymers (LiPo) pack a lot of power in a small space (ie: a high energy density) they represent a fire risk. If you short, puncture or crush one they can easily ignite and cause a lot of damage. For this reason there are shipping restrictions on loose (ie: not sealed into a device) lithium packs, which may increase your shipping costs, or limit shipping options to only certain courier companies. It's a serious issues: planes have crashed from lithium cells catching fire!

The great thing about these packs is that, since they store a ton of power, they give you lots of runtime for your project. The thin shapes are also easy to install inside many models, though admittedly not inside rockets or other slender shapes. The output voltage should be enough to accommodate the volt drop of many LED current limiters, though it might be a bit low for some LEDs if you’re not using resistors.

You will, however need to make provisions for a switch and plug so you can connect a charger when necessary. Also, the packs will not last forever. All lithium cells oxidize and fade in capacity within 2-5 years, whether you use them or not, so you’ll need a way to get into your model to replace the pack when necessary - gluing things shut isn’t a great idea.

IMPORTANT: Be super careful when handling soft-sided lithium packs, especially if there are drills, craft knives, nails, samurai swords, etc. around. You don’t need to puncture one and start an eruptive fire! Or, as electronics companies euphemistically call them, “thermal events.”

9 volt battery (9 volts).

The classic 9 volt battery, which powered many a transistor radio in the 1970s, still has utility today. It’s compact, readily available, and cheap. 9 volts is a slightly odd voltage, but it obviously works fine with current limiters. And you can easily find LEDs prewired with resistors for 12 volt circuits. These light up okay when supplied with 9 volts as well. Rechargeable NiMH 9 volts are available, though compatible chargers are a little uncommon.

Wired power

When it comes to wired power sources, you basically need something that can step down household AC power (110/120 volts in North America, 100 volts in Japan, and 220/240 volts everywhere else) to manageable levels of DC power. This requires some form of transformer, plus some electronics to convert AC to DC.

IMPORTANT: It probably goes without saying that any time you're messing around with household power there's a risk of shock or fire. Self-contained power adapters which output low-voltage DC are obviously fine, but be careful with live AC power!

Regulated power.

There are two basic types of power supply: regulated and unregulated.

Unregulated power adapters are the basic wall wart sort, or simple transformers with groups of four diodes (bridge rectifiers) to turn AC into DC. They're called unregulated since the amount of power they put out is dependent on what load is put on the supply. In other words, the voltage and current can be unexpectedly high if nothing is plugged into the adapter, and can drop down if lots of things are plugged in. These are bad for LEDs.

Regulated power supplies contain additional circuitry that controls the output. Thus the voltage and current stay the same regardless of how much load there is. This is what you want. Regulated power supplies can be quite expensive if they're high-powered high-end devices. But over the past few years the technology for affordable power regulation has become quite inexpensive. The typical USB power adapter for charging phones is a case in point. Lots of hobby supply stores sell low-cost regulated power supplies for small projects.

Now I don’t go into powering large miniature projects, such as vast dollhouses or huge room-sized model railways, here. These will obviously require heavy duty transformers to step down household current, not just a few batteries. You’ll also need to use thicker wires to carry power to each set of branches. If you’re running larger numbers of programmable Neopixels you could look into the large pre-built power packs made for commercial installations like bars and retail outlets. (That said, if you’re doing this kind of intensive lighting you’re probably well advised to track down as many 1 mA and 2 mA low current LEDs as you can. Anything to reduce the load will make everything easier to wire up.)

USB (5 volts).

USB (universal serial bus) is a handy way to power a project if you don’t need the portability of batteries. It’s a "universal" way (at least on our planet) to charge phones and other devices, and thus affordable and stable USB power adapters can be bought very cheaply.

USB gives you 5 volts of regulated and very clean direct current. (there’s very little power fluctuation if it’s a half-decent charger) This type of power can easily supply all types of LEDs, plus is the same voltage required by many microcontrollers if you’re automating your lights.

The main inconveniences are the shape of the plug, and cables which are often difficult to solder to. Fortunately you can buy cables that have a USB A plug at one end and either a pair of stripped wires or else a small barrel connector on the other. These let you plug your project right into a standard USB adapter without problems.

You could even power your thing off a computer, but I don’t recommend that. If you mess up the wiring and cause a short you could wreck your cheap USB phone charger, and that’d be a shame. But blowing a USB port on a computer will likely result in expensive repairs involving the entire logic board being replaced!

USB A (the large rectangular plugs) are usually the easiest to use. I strongly recommend using a USB power adapter from a well known and respected consumer manufacturer, such as a phone brand. The reason is that a lot of cheap USB adapters are extremely badly made. They often lack proper safety features, and can occasionally catch fire or deliver lethal shocks to people. Brand chargers cost more, but are way less likely to ignite or short.

Note that if you want to use a USB C charger things can get a bit more complicated. The reason is that USB C supports the PD (Power Delivery) protocol. This is a way for accessory devices to instruct the power adapter to deliver more current than standard, or at a different voltage. As a result USB C chargers often severely limit power output when used with dumb devices, like a handful of LEDs. Normally that's okay, but if you require more output you will need to buy some additional PD circuitry to sit between the USB C plug and your LEDs. This PD device will negotiate the power settings with the charger.

Voltage converters

In the past, converting voltages was kind of a pain. You’d need a transformer or some sort of semiconductor device, and it required some knowledge of electronics.

However today there are cheap and simple converters known as “buck” converters (no, I don’t know why they’re called that) which can step voltage down quite easily and efficiently. Terrific for cases where you have a bunch of LEDs powered by USB or a 9 volt battery, for example. Synchronous buck converters can also step up.

It's common for the two-way devices to accept from 4 to 40 volts in, with the ability to put  1 to 35 volts out. These are all DC/DC devices, so won’t work with AC current.

You just wire the converter inline with your project, and turn a tiny screw on the converter to get the output voltage you need. You can even get ones with a built-in LED numeric display that shows you the output voltage: perfect if you haven’t got a voltmeter. 

These are great for installations where you don’t want some large bulky power source but want to power a device that requires a higher voltage than the one your batteries provide. Or if you’ve got a bunch of different devices in a project with different input voltage requirements. Just be careful you have the right type if you need to step up, as many are step down units only. Also, you can’t exceed the converter’s output by loading too many lights on it, or else it’ll fail.


The previous section

II: LEDs.

The next section

IV: Installing and using LEDs.