A solar light that stays on during the day or refuses to turn on at night usually has a failed photocell. The photocell is the component that tells the light whether it is dark outside. When it fails, the light loses its dusk to dawn trigger and either runs 24 hours a day (draining the battery by noon) or never turns on at all. Most people throw the light away at this point. The photocell is a 50 cent part, and replacing it takes about 20 minutes if you know what you are doing. This guide covers how to identify the photocell, confirm it has failed, source a replacement, and solder it in.
Identifying the Photocell and Confirming It Has Failed
The photocell in a solar light is a small light sensitive component soldered to the circuit board. It is usually visible from the outside of the light, sitting behind a clear or frosted window in the housing so it can sense ambient light. On path lights, it is often a small round disc on top, near the solar panel. On motion sensor lights, it is usually a separate small lens on the front face.
There are two types of photocells used in solar lights, and you need to know which one you have before you can replace it.
Light Dependent Resistor (LDR). This is the most common type in budget and mid range solar lights. It looks like a small disc, about 5 millimeters in diameter, with a clear face showing a squiggly pattern of conductive material on top. The pattern is a serpentine trace of cadmium sulfide, which changes resistance based on light level. In bright light, the resistance drops to a few hundred ohms. In darkness, it rises to a megohm or more. The microcontroller on the board reads this resistance and decides whether to turn the LED on. LDRs are also called photoresistors or CdS cells.
Photodiode. Higher end solar lights sometimes use a photodiode instead of an LDR. A photodiode looks like a small LED, a clear or black cylindrical package about 3 millimeters in diameter with two leads. Photodiodes generate current when exposed to light, and they respond much faster than LDRs. They are more expensive and more durable, but they require a different circuit, so you cannot swap one type for the other.
To identify which type you have, look at the component on the board. If it is a flat disc with a visible serpentine pattern, it is an LDR. If it is a cylindrical part that looks like a tiny LED, it is a photodiode. Most solar lights use LDRs, so assume that unless the part clearly looks like a diode.
Confirming the failure. Before you replace anything, confirm the photocell is actually the problem. Other failures cause similar symptoms. A dead battery causes the light to never turn on. A shorted LED driver causes the light to stay on. A corroded trace can cause either symptom. Do not assume the photocell is bad just because the light stays on during the day.
The simplest test is the cover test. Take the solar light into a dark room or wait until nightfall. Cover the photocell window completely with your finger or a piece of black tape. Wait 30 seconds. If the light turns on, the photocell is working and the problem is elsewhere (probably the battery or a dirty panel causing insufficient charge). If the light does not turn on when the photocell is covered, either the photocell is dead or the battery is dead.
To distinguish between a dead photocell and a dead battery, check the battery voltage with a multimeter. A charged NiMH battery should read 1.2 to 1.4 volts. If the battery voltage is fine and the light still does not turn on when you cover the photocell, the photocell is the prime suspect.
For lights that stay on during the day, the test is the opposite. Take the light into bright sunlight or shine a bright flashlight directly at the photocell. If the light turns off, the photocell is working but may be slow or the threshold is off. If the light stays on in bright sun, the photocell is likely shorted or open.
A more definitive test requires desoldering one leg of the LDR and measuring its resistance in light and dark. Set your multimeter to resistance mode. In bright light, a working LDR reads under 1000 ohms. In darkness (cover it with your thumb), it should read over 100,000 ohms. If it reads the same in both conditions, or if it reads open (infinite resistance) in both, it is dead.
Sourcing a Replacement Photocell
Once you have confirmed the LDR is dead, you need a replacement. This is the step that trips people up because you cannot walk into a hardware store and buy a solar light photocell. You have to order online or salvage one.
Ordering online. Electronics suppliers sell LDRs for pennies. Search for “CdS photoresistor” or “GL5528 LDR” or “5528 light dependent resistor.” The GL5528 is the most common LDR used in solar lights. It has a 5 millimeter diameter face, a peak spectral response around 540 nanometers (green light, close to the peak sensitivity of human vision), and a resistance range of about 10 kilohms in bright light to 1 megohm in darkness. A pack of 20 costs about 5 dollars.
If your light uses a different LDR, check the part number printed on the back of the old one. Common alternatives are GL5516, GL5537, and GL5539. They differ in their resistance ranges and response times. The GL5528 is a safe default for most solar lights because it has a wide resistance range that works with most microcontroller circuits. If you use the wrong one, the light will probably still work, but the on/off threshold may shift. The light might turn on too early in the evening or stay on too late in the morning.
Salvaging from a dead light. If you have a dead solar light lying around (and if you are reading this article, you probably do), desolder the LDR from it. This is free and you know the part is compatible because it came from a solar light. Test it with a multimeter before you install it to make sure it actually works. Salvaged parts fail too.
Photodiode replacement. If your light uses a photodiode, sourcing is harder because photodiodes have specific characteristics that must match the circuit. Look for a part number on the diode body and order an exact replacement. Common solar light photodiodes include the TEMT6000 and the ALS-PT19. If you cannot identify the part, you are better off salvaging from an identical dead light.
Component specs to match. When ordering an LDR, match these specs as closely as possible: diameter (5mm is standard), resistance at 10 lux (typically 8 to 20 kilohms for GL5528), resistance in darkness (over 1 megohm), and maximum voltage (100V, which is way more than any solar light uses, so this is not a concern). The response time is not critical for solar lights because they only switch once per day.
Desoldering the Old Photocell
Now for the actual work. You need a soldering iron, solder wick or a solder sucker, flux, and a steady hand.
First, remove the circuit board from the light housing so you can access both sides of the board. The photocell is soldered from the bottom side, so you need to flip the board over. Take a photo of the board orientation and wire connections before you disconnect anything.
Locate the photocell leads on the bottom of the board. There will be two solder joints where the LDR leads pass through the board. Note which lead is which. On an LDR, the two leads are interchangeable (it is not polarized), so orientation does not matter for the replacement. But if you are replacing a photodiode, polarity matters, and you need to note which lead goes to the marked side.
Apply flux to both solder joints. Flux helps the solder flow and makes desoldering much easier. Heat one joint with the soldering iron. Once the solder melts, use the solder sucker or solder wick to remove it. Repeat for the second joint.
Gently push the LDR leads from the top side to pop the component out of the board. If it does not move easily, there is still solder holding it. Reheat the joint and try again. Do not force it, because pulling hard can lift the copper pad off the board, and then you have a much bigger repair problem.
Once the old LDR is out, clean the holes in the board. Heat each hole and push a wooden toothpick through it to clear residual solder. The holes need to be clear so you can insert the new component leads.
Inspect the pads where the LDR was soldered. If they are corroded or lifted, you will need to repair them before installing the new part. Clean corrosion with isopropyl alcohol and a toothbrush. If a pad is lifted, you can still solder to the remaining copper trace, but you will need to be careful to make a mechanical connection (bend the lead over on the back side) so the joint has physical strength.
Soldering the New Photocell and Testing
Take your new LDR and bend the leads to match the spacing of the holes in the board. The standard GL5528 has a 5 millimeter lead spacing. Insert the leads through the holes from the top of the board so the LDR face is pointing up (toward where it will sense light through the housing window). The LDR should sit at the same height as the original part. If it sits too high, it will press against the housing window when reassembled. If it sits too low, it will be shadowed and not sense light properly.
Bend the leads slightly on the bottom side of the board to hold the LDR in place while you solder. Apply flux to both joints. Heat the pad and the lead simultaneously with the iron, then feed a small amount of solder in. The solder should flow around the lead and form a concave fillet. Repeat for the second lead.
Inspect both joints under magnification. They should be shiny and smooth. Dull or grainy joints are cold and will fail. Reheat and add flux if needed. Trim the excess lead with flush cutters, leaving about 1 millimeter above the solder joint.
Clean the flux residue with isopropyl alcohol and a toothbrush. Flux residue is conductive when damp and can cause intermittent problems.
Testing before reassembly. Do not put the light back together yet. Test it first. Connect the battery and the solar panel to the board. Take the light to a dark room and wait 30 seconds. The LED should turn on. Bring it back into bright light. The LED should turn off within a few seconds. If the LED behaves correctly, the repair is good.
If the LED does not turn on in the dark, check your solder joints first. A cold joint on one lead means the microcontroller cannot read the LDR. Reflow both joints and test again. If the joints are good and it still does not work, the new LDR may have the wrong resistance range for your circuit. Try a different LDR.
If the LED turns on and stays on regardless of light, the LDR leads may be shorted together. Check for solder bridges between the two pads. If there is a bridge, remove it with solder wick.
Reassembly. Once the test passes, reassemble the light. Make sure the LDR face is aligned with the light sensing window in the housing. If the LDR is offset from the window, it will be shadowed and the light will turn on too early in the evening. Some housings have a clear or frosted diffuser over the LDR window. Clean it before reassembly so light reaches the sensor properly.
Seal the housing. If you had to break a gasket to open the light, replace it or seal the seam with silicone. Moisture is what kills photocells in the first place, and a new LDR will fail just as fast if water gets in.
Calibration. Most solar lights have no calibration adjustment. The on/off threshold is set by the circuit design and the LDR characteristics. If you installed a GL5528 in a light that originally used a different LDR, the threshold may be off. The light might come on at dusk when it is still fairly bright, or it might wait until it is pitch black. This is usually acceptable. If it bothers you, try a different LDR with a different resistance range. An LDR with higher dark resistance will make the light wait longer to turn on (darker threshold). An LDR with lower bright resistance will make the light turn off earlier in the morning.
One final note. Some solar lights integrate the photocell function into the solar panel itself. The panel voltage drops in darkness, and the microcontroller uses that voltage drop as the dusk signal. These lights have no separate photocell to replace. If your light has no visible LDR or photodiode on the board, and the dusk to dawn sensing is done through the panel, then a “stays on during the day” problem is caused by something else (panel failure, water in the panel junction, or a microcontroller fault). Those are harder to fix and may not be worth the effort.
Preventing future photocell failure. The photocell failed because of environmental exposure, and the replacement will fail the same way unless you take preventive steps. The LDR face is exposed to the elements through the housing window, and UV, moisture, and temperature cycling all degrade it over time.
The most effective prevention is keeping moisture out of the housing. When you reassemble the light after the repair, pay attention to the gasket. If the original gasket is compressed or cracked, replace it or add a thin bead of silicone sealant around the seam. Moisture that reaches the LDR leads causes corrosion at the solder joints, which raises contact resistance and eventually makes the LDR unreadable by the microcontroller.
A thin film of clear silicone over the LDR face (applied before reassembly, allowed to cure) can extend its life. The silicone is transparent to visible light, so it does not affect sensing, and it blocks moisture from reaching the cadmium sulfide surface. Do not use a thick layer because it will diffuse the light and change the sensing threshold. A thin wipe with a finger is enough.
Check your repaired light after the first heavy rain. Open it up and look for water inside. If you find any, the seal failed and you need to reseal before the moisture kills your new LDR. A quick check after the first storm catches sealing problems early, before they cause damage.
Common mistakes to avoid. The most common mistake is soldering the LDR in backwards. While LDRs are not polarized and will work either way, some boards have the LDR leads connected to traces that are different lengths, and installing the part rotated 90 degrees can put the leads in the wrong holes. Always match the orientation of the original part.
The second most common mistake is using too much heat. The LDR is a semiconductor, and prolonged heat from the soldering iron can damage the cadmium sulfide layer. Limit your soldering time to 3 seconds per joint. If the joint is not right, let it cool for 10 seconds before reheating.
The third mistake is forgetting to clean the flux. Flux residue between the two LDR pads can create a high resistance path that throws off the microcontroller reading. The light may turn on and off erratically. Always clean with alcohol after soldering.
Replacing a photocell is one of the simplest and most rewarding solar light repairs. The part costs almost nothing, the soldering is straightforward, and the result is immediate. A light that was headed for the trash comes back to life and runs for years. The key is confirming the photocell is actually the failed part before you start, because battery and corrosion problems mimic photocell symptoms. Test first, then repair.

