As the federal government prepares to unveil its marijuana legislation next spring, a researcher at the University of British Columbia has successfully created a breathalyzer test capable of measuring THC levels.

Engineering professor Mina Hoorfar began work on the project in 2013 with the help of PhD student Mohammad Paknahad.

Traditional drug tests rely on blood or saliva samples, which take time and are impractical in a roadside setting.

But Hoorfar’s breathalyzer can detect tetrahydrocannabinol (THC), the active ingredient in marijuana, using only the subject’s breath.

“It’s very easy to test for THC as it is a big molecule that stays in your breath for a long time,†she said in a . “There is a period of 12 hours after you have consumed THC when it can still be detected in your breath.â€

Hoorfar said the tool can help law enforcement, but is also meant to help marijuana users make an informed and responsible decision before getting behind the wheel.

“This is a tool not just for the police, but perhaps more for self-testing and self-monitoring,†she said. “People can consciously make the choice to test themselves after they have consumed THC or alcohol.â€

News of the device comes the same day as Health Minister Jane Philpott announced the federal government will introduce its much-anticipated marijuana legislation in the spring of 2017.

It also coincides with 4/20, an annual celebration of cannabis culture.

In the statement, Hoorfar said that with the legalization of cannabis on the federal government’s radar, it’s only a matter of time before driving high becomes a serious law enforcement concern.

The device costs $15 to manufacture using 3D printers at UBC’s campus in Kelowna. It is also bluetooth-compatible so results can be collected and accessed on a smartphone.

Hoorfar hasn’t been the only one working on such a device.

In 2014, Vacouver-based Cannabix Technologies announced it was working on a marijuana breathalyzer. The company expects to have a prototype complete in within the next few months.

While developing the technology for the breathalyzer, Hoorfar and Paknahad realized a similar method can be used to detect other odours.

The device is currently being developed to register ketones, meaning diabetics may soon be able to take a breathalyzer test to monitor their glucose levels instead if a finger prick test.