ER doctors and engineers have harnessed the motion-sensing technology in Nintendo Wii controllers to build a new kind of 3D body scanner.

It's not as precise as the technology in an MRI machine or a CT scan, but it's much quicker.

The new device could help some patients avoid sitting still in an MRI machine or getting exposed to the radiation of CT scans.

Sometimes, a little toying around can pay off.

Joshua Broder, an ER physician at Duke University, couldn’t understand why his son’s handheld Nintendo Wii controller was better at detecting movement than the professional ultrasound machine he used work.

One day, while his son was playing Wii, he got an idea: Why not tape this controller onto an ultrasound machine to better understand the angles at which scans were taken?

With typical ultrasound technology, doctors can only get a two-dimensional visual slice of an organ. Broder says it's easy to make mistakes about what you're seeing because there isn't much visual context in the image. But relying on more exhaustive 3D imaging systems like MRI machines and CT (also known as "CAT") scans requires patients to move into designated scanning rooms, where it often take minutes and costs thousands of dollars to get a good picture.

An attachment that could turn a 2D ultrasound machine into a 3D imaging system, then, could help patients avoid the cost and radiation of CT scans and give babies or other squirmy subjects an alternative to sitting still in an MRI machine. Making ultrasound images 3D requires knowing the exact angle the wand is oriented on the body — which is where the Wii comes in.

A handheld ultrasound device outfitted with the motion-sensing microchip and a 3-D printed sleeve to help steady the device. Duke Health Engineering the device to hospital standards was, of course, more complicated than just duct taping a Wii stick. But flash forward a few years, and Broder's patented invention, built with a team of engineers from Duke and Stanford, has been perfected into a 3D printed attachment for handheld ultrasound machines.

The device uses the same kind of $10 direction-detecting microchip that's embedded in Wii controllers and smartphones — which is also the same technology that knows when to switch your phone from ‘portrait’ to ‘landscape’ mode. That microchip registers how an ultrasound wand probe is oriented as it slides across the body. The the device then feeds that information into software that stitches hundreds of individual 2D slices of anatomy together in 3D.

The images get displayed on a computer within a few seconds — they look a bit like a 3D pop-up version of a black-and-white x-ray image. Doctors can search through the images in slices that are mapped out on an X-Y-Z coordinate plane, scanning through different areas of the body inch by inch in 3D.

The scanner is not as precise as an MRI or CT scan, because those devices can see through bones and air in the body. Ultrasound waves, on the other hand, are blocked by the "acoustic shadow" that forms around dense, non-fluid materials like bones, stones or air.

The $10 microchip that's inside. Duke Health But attaching the motion-sensing microchip to an ultrasound wand (along with a plastic casing that helps stabilize the device) nonetheless allows doctors to build a 3-D scan of the body in seconds, simply by gliding over the surface of the skin. And Broder said that in the ER, quickness really counts.

Plus, he added, this is “more comfortable and quicker than a conventional scan.”

Clinical trials of the device are ongoing, and the team is 3-D imaging nearly every region of the body — including fetal brains, kidneys, spleens, and ovaries. After testing the machine on dozens of patients at Duke and Stanford, the team is reporting that nearly all patients have found it both more comfortable and faster than a traditional scan.

Broder said the images also give many patients "an immediate recognition" of what part of the body they're looking at. A traditional ultrasound, on the other hand, can often look like a blurry, fuzzy white landscape to an untrained eye. (Think of how hard it can be to actually find a baby in ultrasound images of pregnant bellies.)

This isn't the first time doctors have used Wii controllers to help patients. In 2012, two Wii controllers were used to help doctors diagnose the eye condition ocular torticollis, The Atlantic reported. And Broder said other devices like this have been built before, but he claims none are as low-cost and efficient as his.

To get onto the market, though, the machine will have to go through the lengthy FDA approval process, since even Nintendo-inspired medical devices aren't immune to federal regulation.