A new matchbox-sized nanosensor can scan for the presence of bacteria and tell if an antibiotic is effective within a few minutes, rather than the days or weeks that conventional testing methods require.

Researchers at EPFL, the Swiss Federal Institute of Technology in Lausanne, developed a lever the width of a human hair that vibrates when it senses bacteria’s tiniest metabolic movements. The vibrations are then measured via a laser that reflects off the lever, turning them into an electrical current that can be read by a doctor like an EKG. When the signal flattens, it means the bacteria are dead. The system is described in a paper published online this week in Nature Nanotechnology.

Bacteria On Nanolever

The sensor could be used to monitor treatments of antibiotic-resistant bacteria, especially those that are slow to grow and take a long time to test with conventional methods–which involve culturing the bacteria in the lab. The researchers also suggest the technique could one day be applied to cancer treatment, to measure tumor cells in place of bacteria.