One of the most amazing pieces of technology to emerge from Lockheed Martin’s laboratories is a simple circular canister designed to hold nothing more that dirt, gravel and maybe some dust. It looks like a 1960s-era slide carousel on a projector, and the concept behind it was first tested in an engineer’s driveway with his middle school-aged son.

The dirt it's designed for isn't on Earth, however. It's whizzing about in deep space on an asteroid that scientists have been observing for years. On Thursday, the device is scheduled to be launched on a United Launch Alliance rocket, eventually headed on a 509 million mile journey to the rock that it would touch for less than five seconds in an effort to extract NASA’s first-ever asteroid sample. At most it would take home about four pounds of the stuff.

The nearly $800 million-mission known as OSIRIS-REx is a highly complicated endeavor. The spacecraft will have to catch up with the asteroid, dubbed Bennu, circle it, study it for two years, and eventually find a good spot to grab some regolith—the dirt and gravel on the asteroid’s surface.

Then comes the hard part: extracting the sample. That was the challenge that officials at Bethesda-based Lockheed, the world’s biggest defense contractor, posed to its top engineers, launching an internal competition to see who could come up with the best idea, said Rich Kuhns, Lockheed’s program manager.

“A group of engineers looked at grabbers, drills, scoops,” he said. But none worked.

Drilling and scooping up the soil, even with the spacecraft flying closely by, wouldn’t work. In the micro gravity environment of space, the soil would simply float away, and the spacecraft would be pushed away on contact, the way colliding objects behave on an air hockey table.

“The problem is that you have all of this loose material on a surface with very low gravity,” said Lockheed engineer Jim Harris in a statement on the company’s website. “You can’t think of it as gravel in a driveway. As soon as you touch it, the particles may scatter.”

So he came up with the idea to suck in the sample by using a blast of nitrogen gas. Harris tested the concept in his dirt driveway, with his son at his side, by cutting holes in a plastic cup, turning it upside down and blasting a burst of air through the top. That kicked up a plume of dirt and dust, which he figured could be directed, even in a microgravity environment, making collection relatively simple.

Since then, the technology has been tested with all sorts of debris, from popcorn to lava rock, and in a variety of temperatures and environments, including in vacuum chambers and zero gravity flights. If all goes according to plan, in 2020 an 11-foot, arm with a pogostick-like spring in it would reach out from the spacecraft flying alongside Bennu and press the disc against the surface of the asteroid for a few seconds. A blast of nitrogen would kick up the dirt and blow it inside the container, which would then be retracted into a special sample return capsule.

NASA hopes to collect between two ounces and 4.4 pounds of material. Scientists chose Bennu, which has been studied with radar, because its orbit brings it relatively close to Earth, some 278,867 miles away. Scientists say since asteroids were likely part of the original building blocks of the solar system, the material from Bennu could better help them understand how it formed more than 4.5 billion years ago.

“We’re going to reach out and touch it and bring treasure back to Earth for scientific analysis,” principal scientist Dante Lauretta of the University of Arizona at Tucson, said on NASA’s website. “The asteroids record the earliest stages of the solar system so it really is a time capsule from the very dawn of the history of our solar system.”

There is also a very small chance that Bennu could hit the Earth in 150 years. While scientists don’t think that will happen, they say studying the rock will allow them to better predict how asteroids behave in space.

The samples are expected to arrive back on Earth in 2023, touching down in the Utah desert.