Ancient medical practitioners plied their trade by trusting their noses. They knew that diabetes could make a patient's breath smell sweet and that a wound emitting a foul odor was infected. These early doctors, lacking today's sophisticated technology, often relied on their sense of smell to diagnose illness.

Technology is now turning this ancient art into a modern science. Engineers are developing electronic versions of the human nose that will allow doctors, ever in search of less-invasive techniques, to tap into what the nose knows about the human body.

"The sense of smell has been used as a medical diagnostic tool for thousands of years," says Bill Hanson, an anesthesiologist and critical care specialist at the University of Pennsylvania in Philadelphia, who has studied whether odor can be used to diagnose an ailment. "Both diseases and bacteria that cause diseases have individual and unique odors. You can walk into a patient's room and know immediately in some cases that the patient has such and such bacteria just because of the odor."

The "odor signatures" of disease arise through one of several mechanisms. Bacteria, like all living organisms, give off unique mixtures of gases; bacterial infections may be diagnosed by the characteristic scents of these gases. Alternately, nonbacterial disorders, such as diabetes, may prompt biochemical changes that alter the smell of a patient's body. But many of these odors may be tough for the humans to detect and identify.

"The difference between normal breath and diseased breath may be very subtle," says David Walt, a chemist at Tufts University in Boston who designs chemical sensors and devices.

Enter the electronic nose, an emerging technology that can distinguish these subtle differences. There are a variety of electronic e-nose models, all of which consist of an array of olfactory sensors that are activated in unique patterns when exposed to different aromas; software identifies each odor and its source by analyzing the patterns. (The human brain uses this same pattern-recognition process to identify smells.)

Though the technology was originally designed for other tasks, such as sniffing out chemical leaks or detecting food spoilage, research is increasingly revealing its diagnostic potential. Physicians can effectively identify potential lung cancer patients, for instance, by "smelling" their breath.

"When you have an exhaled breath, there are all sorts of volatile organic compounds that are produced," says Serpil Erzurum, a pulmonologist at Cleveland Clinic and co-author of a 2005 study on the use of electronic noses to help diagnose lung cancer. "Those compounds are a result of metabolism and, when you have cancer, metabolism changes and the volatile organic compounds are altered. The changes are detectable by an electronic nose."

Hanson showed that the technology is useful for diagnosing chronic sinusitis and pneumonia, and other researchers proved that the noses can distinguish asthmatic patients from healthy ones.

And the noses don't just analyze breath. Some can also sniff out infections in urine, blood and other bodily fluids. A team of British scientists, for instance, used electronic noses to pinpoint antibiotic-resistant bacteria in the nasal swabs of hospital patients.

Combine these feats with the fact that artificial noses are faster, cheaper and less invasive than many other diagnostic tests, and it is easy to understand why physicians find the technology appealing. Erzurum says it could make a dramatic difference in the success of treatments, paving the way for early detection of lung cancer and other diseases.

"Some of the newer nose technologies are very portable," Hanson says. "They're suitable to being taken to the bedside and being handheld. You can imagine a patient breathing into one of these and getting a fast, inexpensive answer to a question you might have."

Scientists who have tested the noses envision a time in the not-too-distant future when a patient with, say, the sniffles can go to the doctor, breathe into an electronic nose, and know in a matter of minutes whether he or she has a sinus infection and needs antibiotics.

But Walt says there is still a long way to go before this scenario becomes a reality. "I've yet to be convinced,'' he says, "that there's [now] a working version of an artificial nose out there that can consistently do this."

Though far from perfect, Hanson says, the current technology can be used as a screening tool to flag patients who should undergo more advanced testing.

A number of companies manufacture electronic noses that detect explosives and other dangerous compounds, but the technology is not yet widely used in medicine. The Food and Drug Administration (FDA) has approved an electronic nose that can detect urinary tract infections, but has yet to approve one for breath analysis or other medical uses.

"It's a field that's simmering," Hanson says. "It's just waiting for somebody with deep pockets to come up with the money and focused effort to develop these noses commercially."