Researchers at the University of Texas at Austin have developed a new way to detect deadly nerve gases, and it involves LEGO.

The new detection device, described in a study published in the journal ACS Central Science, uses chemical sensors, a box made out of LEGO bricks, and a cell phone to identify the presence of odorless, tasteless nerve agents like VX and sarin.

Chemical weapons like sarin are extremely dangerous—even at low concentrations, a direct whiff of sarin can kill you in just minutes. So being able to identify them in the field is vital, and it has to be done fast.

The chemical-identifying sensors, developed by UT Austin chemist Xiaolong Sun and his colleagues, fluoresce in different colors and brightnesses to indicate which nerve agents are present in the air, and in what concentrations. Unfortunately, depending on where these tests are taking place, it’s not always easy to see how bright the fluorescent glow is. Expensive equipment designed to detect these changes in the lab just isn’t feasible on the battlefield or in a war-torn region.

Vivian Abagiu, University of Texas at Austin

The 320-brick LEGO structure, meanwhile, is portable and quick to assemble. It acts as a black box that blocks out light around the sensors. The top of the box has a hole in it, over which the user places a smartphone’s camera lens. Using a standard lab test plate and a UV light inside the box, the fluorescent changes can be photographed with the phone and analyzed with UT Austin's free software to determine what type and concentration of nerve agents are present in the sample.

While 3D printing could produce a cheap equivalent of the LEGO box, the toy bricks may be more accessible. Not everyone has access to a 3D printer or the same printing materials as researchers might use in the lab—but LEGOs are available across the world for a relatively low price. The software necessary to analyze the samples is available for free on GitHub, and the researchers include the LEGO assembly directions within their study.