If you own a Raspberry Pi 2, congratulations: you’re also the proud owner of an elegant demonstration of the photoelectric effect!
At the weekend, Peter Onion, a veteran of our forums and of Raspberry Jams in Cambridge, Bletchley and surrounding areas (visible, costumed, in the background of this photo at the Christmas CamJam), discovered what we think might be the most adorable bug we’ve ever come across.
The Raspberry Pi 2 is camera-shy.
Peter’s bug report came via our forums. He’d been proudly photographing his new Raspberry Pi 2, and had discovered something peculiar: every time the flash on his camera went off, his Pi powered down.
Jonathan has spent much of the morning emitting flashes and poking an oscilloscope. We’ve found out what’s going on, and the good news is that it’s completely benign: your Pi will not suffer any permanent effects from being flashed at.
More good news: the effect only happens under VERY specific circumstances. Flashes of high-intensity, long-wave light – so laser pointers or xenon flashes in cameras – cause the device that is responsible for regulating the processor core power (it’s the chip marked U16 in the silkscreening on your Pi 2, between the USB power supply and the HDMI port – you can recognise it because it’s a bit shinier than the components around it) to get confused and make the core voltage drop. Importantly, it’s ONLY really high-intensity bursts like xenon flashes and laser pointers that will cause the issue. Other bright lights – even camera flashes using other technologies – won’t set it off. You can take your naked Pi 2 in the sunshine for a picnic or take it to a rave, and it’ll be perfectly solid. Just don’t take it on the red carpet at the Oscars. Jon is currently shining an 1800-lumen led light at a Pi 2 on his desk: not a wobble.
This component that’s causing the issue is in a WL-CSP package: a bare silicon die which has solder balls attached. This is a picture of the underside of a similar package (enormously magnified) – each circle is a minuscule ball of solder:
WL-CSP packaging is a common technique for more high-tech electronics parts, as it means no further packaging of the device is required. It is also the smallest physical package possible, which designers of mobile things (and people making very tiny computers) really care about.
What’s causing the component to behave so oddly? It’s the photoelectric effect, where metals emit electrons when hit by light. The video below is a really good tutorial on how that works.
What you’re seeing with Pi 2 and xenon flashes is the same effect, but in semiconductor material, not metal. Semiconductors, like metals, have free electrons which can be ‘knocked off’ by photons. Photodiodes, solar cells and phototransistors all use this effect to function. If you’d like to learn more about how a solar cell works, there’s a nice explanation here at Physics.org.
Silicon junctions (the types that are responsible for making diodes and transistors and other such electronic miracles function) can be ‘upset’ by this photoelectric effect if it is large enough (i.e. if enough light of the right energy [i.e. colour] is fired at them). This seems to be what is happening to our power supply chip – somewhere in the complex silicon chip circuitry there are some transistors or diodes that malfunction when hit by high energy bursts of light, causing the power supply to ‘drop out’, so the Pi reboots.
Jonathan is actively investigating exactly what happens when U16 is flashed with a high energy pulse from a xenon flash tube, and we are also looking at possible ways to make future production Pis immune to this issue if we can – we know you like to take pictures of them.
We have found no evidence that ‘flashing’ your Pi2 with a xenon flash can cause any real damage, but we still don’t recommend doing it (it will crash or reboot, and this means you may corrupt your SD card). I’ve said it above, but it bears repeating, because I’ve seen some of you mention this in the forums and in comments sections elsewhere: common everyday light sources – e.g. bright sunlight, indoor lighting, angry cyclists* – don’t cause this to happen, so please don’t worry!
If you need to use your Pi 2 in a situation where it might be flashed at, our advice is to cover U16 (make sure you get the sides too) – the current easy fix is to use a small blob of Sugru or Blu-Tak covering the whole component (someone in the forums used a pellet of bread: the first yeasted bug fix we have encountered), or simply put the Pi in an opaque case.
Secretly, I’m kind of hoping for another (similarly benign) bug this abstruse. I love writing this sort of post.
*Note to the paranoid on Twitter: I wasn’t clear enough here. We are referring to ourselves, not dissing you and your bike. We’re in Cambridge, and a lot of us cycle (aggressively) to and from work: we’ve been shining our bike lights at Pis for much of this morning, because they’re the brightest lights any of us own.