A “potalyzer” that can detect whether a driver is under the influence by marijuana is being perfected by Stanford University researchers.

Magnetic biosensors on the mobile device developed by materials science and engineering professor Shan Wang and her team can detect the presence of THC, the psychoactive ingredient in marijuana, in saliva, according to a Stanford news release.

Like a breathalyzer is used in alcohol impairment cases, police would be able to use a cotton swab to collect a spit sample and results would be available on a smart phone or laptop in three minutes.

News of the Stanford team’s development came just before Californians voted in the November election to legalize recreational marijuana.

Under the measure, anyone 21 and older is allowed to buy an ounce of marijuana and grow up to six plants for personal use. California was the first nationwide to legalize medical marijuana.

Law enforcement, legislators and health officials have not reached a consensus on how much THC in one’s system causes impairment.

Some researchers have said that THC can be present in the body even though effects of the drug have worn off and that users can be impaired at very different limits.

California does not have a legal limit but a bill introduced this year seeks to set the legal limit at 5 nanograms per milliliter. Another pending bill would allow police to establish reasonable cause using roadside saliva tests such as the one devised by the Stanford team.

The device applies magnetic nanotechnology previously used as a cancer screen. It detects concentrations of THC between zero to 50 nanograms per milliliter of saliva.

This article was first published at MercuryNews.com.