Why a camera flash will reboot your Raspberry Pi 2

The internet is full of news today that photographing your Raspberry Pi 2 with a flash on will cause the tiny computer to reboot. In the interests of science and fairness, PC Pro decided to try and replicate these results and, low and behold, the same thing happened – a close range camera flash would turn the Pi 2 off completely, while one taken from slightly further away would cause it to reboot. From a distance of about a metre, there was no effect, however.

Why a camera flash will reboot your Raspberry Pi 2

We tried the same test on a Raspberry Pi B+, but nothing happened. So what was going on?

There was speculation online about some kind of electrical discharge, perhaps from the flash’s capacitor, was to blame and was somehow overloading one of the Raspberry Pi 2’s components. Of course, there are a lot of new components on the new Pi that didn’t feature on the old one – the old dual-core processor had been replaced by a new quad-core one, and there was also a new memory chip and additional USB drive.

Raspberry Pi 2 review - three quarter view

However, a physicist at Manchester University told us it was unlikely that such a discharge could be the cause. If it was strong enough to reset the Raspberry Pi 2, it would be strong enough to reset the camera itself, and that wasn’t happening to us or to others.

Instead, she speculated, it was “probably an interaction between high-energy photons from the flash and a component on the board” – i.e. the bright intensity of the flash was itself the problem, which seemed to be backed up by our three-step proximity test.

We were slightly stumped as to what component could be causing the problem, as there’s no light sensor per-se, but figured maybe an interaction with the CPU would be a likely culprit.

As it turns out, we were right on the theory, but wrong on the component. According to the Raspberry Pi Foundation, it’s the switch mode power supply, marked U16, which is causing the problem as it’s photosensitive.

As we’d deduced, though, it’s high-energy light beams, particularly those created by lasers or, in the case of photography equipment, xenon flashes – which our test camera has – that cause the problem. This means that, normal, ambient lighting and sunlight won’t have any effect any effect, nor will bike lights (which the Pi Foundation guys tested with) or even taking it along to a strobe light-filled nightclub.

The good news is, if you have accidentally reset your Raspberry Pi 2 with your camera flash, it doesn’t cause any lasting damage to the unit itself, as far as the Foundation is aware. However, it has cautioned against doing it for fun, as it could damage your SD card.

So to help you out, here are our top-tips for protecting your Raspberry Pi from the Xenon Ray of Death:

1) Don’t flash your Pi if you don’t have to – it’s not polite

2) If it’s likely to be in an environment where lasers could regularly point at it or xenon flashes go off nearby, shield it either in a case or with a slightly-opaque wrapper (a red one will work well, our physicist tells us).

3) If you want to photograph it close up, use a flash that doesn’t use xenon. LED flashes will work without resetting the Pi. If you only have a Xenon flash, or are unsure what you have, cover the power supply with blu-tack – it may not be pretty, but it will work.

4) If you happen to be a celebrity and you’re reading this, first of all we’d like to give you big kudos for helping get kids interested in programming by setting a great example as a role model. Secondly, while you can take your Raspberry Pi 2 to the club, we’d advise against taking it on the red carpet, as the abundance of xenon flashes will probably cause your little computer to reset.

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.