Four computer science students at MacEwan University have figured out how to use their brain waves to fly a drone.

Yes, that said "their brain waves" and "to fly a drone."

Last year, fourth-year students Stephen Doyle, Alex Crowder, John Simmonds and Mark Reid took on the project as their capstone research project.

It required knowledge of computer science, engineering, design and a bit of neuroscience.

On Tuesday morning, they demonstrated their project for the media.

MacEwan University students use brainwaves to manoeuver a drone. 1:05

"I had an idea," Simmonds recalled of how the project originated. He had been interested in robotics and drones and his professor, Jeffrey Davis, had just bought a high-tech device called an electroencephalogram (EEG) cap.

"I was like, I want to make something fly with my mind," he said.

"And then I was working with these three guys throughout the summer, so I was like, do you guys want to help me try to make a drone fly with your mind? And every single person said yes, immediately."

The students put many hours of their weekends into the project, which initially was a major source of frustration, Simmonds said. "It wasn't working at all, really," he said.

Eventually, with only about 10 days to go before they had to present their results, they met with some success.

With Doyle as the brain pilot, concentrating on "Up," they did a test.

"And it worked perfectly — all of the interface worked perfectly — and it flew right into the wall," Simmonds said.

"It flew up and right into the roof and the wall. And we were so happy, even though it broke into a million pieces.

"We were like, we can fix the drone — we can get our presentation done," he said.

"To have it just go up, we were on our knees, celebrating. It was amazing."

MacEwan University students demonstrate their ability to fly a drone using their brainwaves on Tuesday. (Sam Martin/CBC)

To get his brainwaves to influence the drone, Doyle imagined the actions in doing a push-up while wearing the EEG cap, which was monitoring electrical impulses on the surface of his scalp.

"Everybody, in their brain, has electrical movement when you think of something," Simmonds said, "so the EEG maps that to a certain part of your brain, and we determined the part that is located for movement."

Each time Doyle imagined doing a push-up, the electrical activity in his brain was recorded. That information was sent to a computer and a machine-learning algorithm that could interpret it.

"After that the computer then sends the information of 'Up' or 'Down' to the drone," Simmonds said.

Davis, an assistant professor in MacEwan's department of computer science, said each time the students got the drone off the ground using their thoughts, their excitement caused them to lose focus.

"It seems that emotion rather than science may be a better way to fly the drone," Davis said in a news release.

The group presented its project — Analysis of Imagined Movement Using EEG — in December.

Simmonds, Doyle and Reid have all graduated. Crowder is in his final year of studies.