Older incandescent lights worked by making part of the circuit a special kind of wire that electrons really don’t like to flow through. They scrape and bang and batter as they flow through that part of wire, which creates a kind of electrical friction. That friction heats up the wire so much that it glows, like a campfire cinder. That’s why those kinds of bulbs are really hot to the touch, they’re less light-making machines as they are heat-making machines that happen to glow as a side effect.
LEDs are trickier to explain correctly. You can imagine an LED like a huge cliff, with a high end and a low end. The power source stuffs electrons onto the high side and pulls them out of the low side, creating a situation where you have a ton of electrons crowded together at the top of the cliff and almost no electrons at the base of the cliff. The electrons don’t like being crowded, they’d prefer to be down at the bottom where they can get out of the crowd. Luckily, there’s a set of playground slides that will let them slide all the way down. But to ride the slide, they have to pay a toll. The price is 1 photon of light of a certain color. So electrons “pay up”, release a photon of light, and go down the slide. Those released photons make the LED glow in a specific color.
Basically, LEDs are, at their core, two different parts of a junction (hence a di-ode) where one side can only take electrons with a certain amount of energy. The electrons coming into the other side of the diode have too much energy, so the excess energy is released as light. (the common metaphor is a hole and the electron is too large to fit, so it has to shrink size).
Interestingly, this is the same principle as photo cells, only in reverse. If you run power into a solar panel, under the right circumstances, they will emit light.
You’re asking the right question. It’s a really good question. It’s going to be really hard to make this an ELI5, because the conversion of electrical energy into light energy isn’t something humans can observe directly.
Electricity, or electric current, is the movement of electrical energy through (or around, but let’s not get nit-picky here) a conductor. Some materials are highly conductive, others are only semiconductive. We can tweak the conducting properties of a semiconductor by “doping” it with impurities, creating regions that are more favorable or less favorable to free electrons. Between the regions are *semiconductor junctions*, across which electrons can only flow in one direction. When an electric current is applied to such a material, a free electron from one region combines with an “electron hole” from another region, emitting a photon from the *depletion region* that forms between them. I can’t explain how. It’s in the realm of quantum physics.
If you really want to understand it beyond just assigning fancy names to the phenomena, these are the topics you’ll want to research:
How does an LED turn electricity into light? **Electroluminescence**.
How does electroluminescence work? **Radiative recombination** of charge carriers (e.g. electrons and electron holes in a semiconductor) produces a photon.
How does recombination produce a photon? When an electron crosses a **band gap** in a material from a higher energy level to a lower one, the excess energy is released as a photon. (We call this **spontaneous emission**.)
How does spontaneous emission work? Quantum electrodynamics.
For funzies, I’m going to try to talk in a little more detail, including some quantum mechanical effects.
The LED is made out of atoms arranged regularly in a crystal. Atoms have positively charged nuclei, and electrons around them. Each of these nuclei have a certain number of “slots” for an electron to fit. If the crystal were completely regular, these slots would all be full, and when that happens electrons can’t hop from one atom to another and electrical current won’t flow. (In metal wires the slots are partially full and electrons hop around freely.)
However, in an LED we replace some of the normal nuclei with different ones in a process called doping. The replacements have either extra electrons, or fewer. One side of the diode has extra, the other side fewer.
When you connect the LED to a power source, electrons come in on the extra side, flow over to the fewer side, and get attracted to a nucleus with an open slot. But they have too much energy to land in there-sort of like being in orbit: you have to lose kinetic energy in order to land. They get rid of that energy by emitting light.
Electrons when moving through a wire lose energy as they move. Usually they lose this energy in the form of heat, P=I^2 R power, energy lost per second is equal to thr current squared times resistance. This is exactly how a resistive space heater heats a room. We also use this to make an incandescent bulb, we just trap that heat in until the filament is so hot that it glows with black body radiation. This is the same phenomenon that makes stars glow the color they are, and makes metal being forged by a blacksmith glow red hot, and makes lava glow as well. (See black body radiation)
This process produces a lot of heat that isn’t turned into light, and therefore isn’t useful to us, which led to fluorescent bulbs. What happens there is the current flowing into a bulb excites the electrons orbiting the atoms making up the gas inside the bulb, and when those electrons drop back down to the ground state, they release the energy they gained in the form of a photon, there’s usually some sort of phosphorescent material on the glass itself to spread out the wavelengths of light being produced, because the gas in the bulb will only produce very specific wavelengths of light. This is also how neon signs work, to get different colors, just change the gas in the bulb, neon signs containing only actual neon will always be orange. And this is also the same phenomenon that determines the color of lightning. (See fluorescence)
LEDs function in a similar way to fluorescent bulbs, but without the gas. The silicon in the LED is set up in such a way that electron passing through it have to pass through an opposing electric field, which means they have to lose energy as they pass through. That amount of energy is what determines the color of an LED. White LEDs also usually have a similar phosphorescent coat to change the wavelengths of light actually emitted, but also can have many different LEDs inside of them emitting different colors to make white.
This is where you can stop reading if I sufficiently answered you question, but I gonna keep going if you’re interested.
If you’re interested in the physics/math, voltage is electrical potential, measured in volts (V), which are Joules (energy) per Coulomb (charge) (J/C). This means if you have the voltage, you can determine the potential energy a battery has E=Vq (q being charge). And the color of the photon is determined by the energy E=hf (h being Planck’s constant and f being frequency) and since every electron passing through produces a photon, we know that hf=Ve (e being the elementry charge, the charge of an electron). Therefore, the color of an LED is determined by the voltage drop across it, and we know this voltage drop cannot change because the color of an LED doesn’t change (only V and f are variables in the equation). This is actually quite unique, because in a circuit, every voltage drop across a load must add up to the voltage of the power source. If I have a 12V battery, and a 1MΩ resistor, the voltage drop must be 12V across that resistor, but if I have 2 of those resistors in series, the voltage drop will be 6V across each one. If I hook a 3V LED to the battery, it will burn it out because of the absurd amount of current coming from that battery, because the remaining 9V of voltage drop has to happen across the wires, which have so little resistance (0Ω for our purposes, even though they aren’t superconductors). However, if I have 4 of those 3V LEDs in series, it will work fine because we have the 12V drop happening with no issues. Also, if you have too little voltage, it simply will not turn on the LEDs at all.
Electrical circuits can be thought of like water circuits. Water inside a pipe with high pressure wants to get out of the pipe or move to somewhere with low pressure. The same is true of electricity. Electrical “pressure” is denoted as voltage, and electrons inside of wires with high voltage want to move their pressure/energy to somewhere with low voltage.
Batteries bestow voltage (electrical “pressure”) to the positive terminal of the circuit it’s attached to in the same way a pump bestows water pressure to the connection at its outlet. Now if you route that wire (“water pipe”) to some kind of machine or system you can make it do useful work using the higher voltage (“higher water pressure”) you’ve sent over.
So now let’s talk about our LED. The water analogy does break down a little but it’s mostly to set the stage in understanding voltage. We have our battery and some wire to send higher voltage (“higher pressure”) electrons to one side of the LED, and some return wire from the other side of the LED back to the negative side of our battery.
Most LEDs are made up of a special combination and arrangement of materials that allow only a very specific voltage change across it. It can be more – but more importantly – not less. This doesn’t stop our higher pressure electrons though. They are Stull pushed across this gap, forcing the electron to accommodate the minimum voltage change as it jumps. It loses this voltage all at once by emitting energy in the form of a light particle (photon). This is happening continuously with every electron pushed across that gap, resulting in the light we see.
By cleverly selecting the materials that make up this gap, we can dictate the electron voltage lost as it jumps across, which means the photons are released at different levels of energy, which appears as different colours.
I don’t want to overcomplicate this excellent conversation with such a small point, however, I must. The electrons barely move at all. I’m sorry, but it’s the truth. They flow at the pace of millimeters per HOUR. The electric and magnetic fields are perturbated by the motion of the electrons, and it is the energy in these fields which get to act on the LED. I have absolutely no idea how to explain field theory simply. In fact, I doubt I could give it a proper detailed explanation. All that said, however, the view of the electrons themselves as being the holders and depositors of the energy is ultimately a completely valid mathematical viewpoint, with a few caveats/extra rules it’s just a different perspective.
Also, the wires. Wires have resistance, capacitance, and indutance. Taken together we call these things that the wires have the impedence of the wire. For wires that aren’t miles long it’s so small that we just pretend it’s zero and nothing is noticably different. Unless you’re making something very small like the insides of a computer’s CPU, in which case the electrical properties of your tiny metal “wires” suddenly become of extreme importance…
Should you be asking a different question? No, it’s an excellent question that could lead you down a dozen interesting fields of study.
As for how (or rather, why) this energy getting to an LED creates light, I’m glad someone else typed that up so well already.
Visible light is released when an electron loses a ton of energy all at once. In an incandescent bulb, a piece of metal is heated to give all of the electrons a ton of energy. Light is emitted when the electrons lose that energy. It’s a very random process, so incandescent lights produce many different colors, including plenty we can’t see. an LED, there’s a “high energy” side and a “low energy” side, so the only way for an electron to pass through is to lose energy. The LED is designed so that electrons lose a specific amount of energy all at once, producing a specific color of light.
The energy is a mix of kinetic and potential energy. The kinetic energy is more like a vibrating guitar string than a ball bouncing around, since the electrons usually act more like waves than like particles. The potential energy is based on how tightly the negatively-charged electrons and positively-charged protons/nuclei are pulled together.
Latest Answers