Articles

It only fails in sunlight

The report usually sounds like this: the product works on every bench, passes every lab test, and then acts up in the field. Not all the time. Resets now and then, a sensor reading that drifts, a wake-up that never comes, a battery that drains faster than it should. Someone notices it happens outside. Eventually someone notices it happens only in direct sun.

By then the team has usually spent weeks on the likely suspects: firmware timing, noise, a marginal supply, temperature. Sun does warm things up, so heat is a reasonable guess, and it is often wrong. I have tracked this down to light itself several times, and it is one of my favorite problems, because the physics is simple once you see it and almost nobody looks for it.

Every junction is a photodiode

A photodiode is just a PN junction built to let light in. Photons with enough energy knock electrons loose in the silicon and create electron-hole pairs. Near a junction, especially a reverse-biased one, the field sweeps those carriers apart and they show up as current. Silicon responds from visible light out into the near infrared, to about 1100 nm.

Nothing about that is special to photodiodes. Every diode, every transistor, every ESD structure and every well in an integrated circuit is a junction, and every one of them makes photocurrent when light reaches it. Designers of ICs know this, which is why nearly all chips come in packages that keep the light out.

Why small packages are exposed

In a conventional molded package, the die sits inside black epoxy. The mold compound is thick and loaded with carbon black, and very little light gets through it.

Wafer-level chip-scale packages (WLCSP) and similar minimal packages save board area by dropping most of that. The die is the package: solder balls go on the active face, the part is flipped onto the board, and the back and sides of the silicon face the world. Some have a thin backside coating; some have bare silicon. Near-infrared light goes a long way into silicon before it is absorbed, so light that lands on the back of the die, or slips in at the edges, can reach the junctions on the other side.

Sunlight on a molded package and on a chip-scale partTwo cross-sections side by side. On the left, a molded package on a board: sun rays stop at the top of the black mold body, and the die inside stays dark. On the right, a chip-scale part flipped onto solder balls: sun rays reach its bare back and edge and pass into the silicon, reaching the junctions on the face nearest the board, where it makes photocurrent.Molded packageChip-scale partLight stops at the moldPhotocurrent at the junctionsDie
A molded package keeps light off the die. A chip-scale part is mostly bare silicon, and near-infrared light that reaches its back or edges can get through to the junctions on the board side. Schematic, not to scale.

Packages like these show up exactly where space is tight: small regulators, supervisors, load switches, sensors, and the processors in wearables and compact devices. Many datasheets for these parts note that the die is light sensitive. Few teams read that line until they have the problem.

Which circuits feel it

Photocurrent from sunlight on a small die is tiny, often well under a microamp. Most circuits never notice. The ones that do are the circuits running on tiny currents of their own:

  • High-impedance nodes. A few nanoamps into a megohm divider or a weak pull-up moves a voltage. Feedback dividers, enable and reset inputs, and battery monitors all live here.
  • Low-power references and bias circuits. Parts built to draw nanoamps in sleep are biased with currents of the same order as the photocurrent. Thresholds and references shift.
  • Supervisors and reset circuits. A shifted threshold on a reset or brown-out detector means resets that seem random.
  • Oscillators. Crystal oscillator circuits are high impedance by design. Disturb them and timing drifts or the oscillator stops.
  • Leakage budgets. In a product that sleeps for months on a coin cell, a few extra microamps is the battery life.

Why it is so hard to find

Lab lighting is dim compared with the sun, and almost none of it is infrared. A bench under office lights sees on the order of a few hundred lux. Direct sun is a few hundred times that, with a large share of its energy in exactly the near infrared that gets into silicon best.

So the fault never appears on the bench, no matter how long the test runs. Outside, it depends on the sun angle, cloud cover, the time of day, how the unit is held, and which way it faces. Whether a given photon makes it to a given junction is random, so the effect does not show up as a clean on and off. The symptom looks intermittent and environmental, which points everyone at temperature, noise, and firmware. Nothing in the schematic or the code points to light, because light is not in the schematic.

Junior engineers usually think I’m wrong when I suggest it. That is fair: they have not seen it before, and they are not thinking about the physics of the parts, they are thinking about the circuit. A test settles it quickly.

The cardboard test

Take the product outside, into direct sun, and get the fault to happen. Then shade the board with a piece of cardboard, or a hand, or anything opaque, without changing anything else. If the fault goes away while the board is shaded, and comes back when the shade comes off, light is the cause. The temperature has not changed in those few seconds. The supply, the firmware, and the noise environment have not changed either.

It costs nothing and it takes a minute. It is also the moment the room usually goes quiet.

To narrow it down to a part, stay in the sun and shade smaller and smaller areas of the board until the fault goes away with only one part covered. Indoor lamps and flashlights rarely reproduce it; they are too dim and have too little infrared. When the fault follows the shade to one part, that part’s datasheet often has a line about light sensitivity in it.

Fixing it

The right fix depends on where the program is and what it costs to change.

  • The enclosure. Dark plastic blocks most light, though not always completely: some black resins pass near infrared, and that is exactly the band that matters. White and light-colored plastics pass much more light than they look like they should, especially in thin walls. If the enclosure is the fix, test the actual material and wall thickness in the sun.
  • A shield over the part. An opaque coating, a dab of black encapsulant, a label, or a small internal shield over the sensitive part. Cheap and fast, and it can usually go into production without changing the board.
  • A different package. The same function in a molded package, or a part whose datasheet says the backside is coated against light. This needs a board change, so it is easiest early.
  • The circuit. Lower the impedance of the sensitive node, add filtering, or move a threshold, so the photocurrent no longer matters. This treats the symptom at the node that feels it, and it holds up even if the light gets in another way later.

Often the answer is two of these: a shield or a darker resin now, and a circuit or package change in the next revision.

Put light on the requirements list

The cheapest fix is the one made before layout. If the product will be used outdoors, or near windows, or under strong lights, say so in the environment requirements, then check the package choices and the enclosure material against it. It belongs in the design review alongside temperature and moisture, and in environmental testing during DVT, where an hour in real sun with units in the real enclosure would catch it.

What I look for in a hardware design review covers the rest of what a review checks, and From prototype to production: EVT, DVT, and PVT explained covers where environmental testing fits.

All articles

Have a project in mind?

Based in southern Indiana. Working with clients anywhere.