"The device could be deployed in 'smart packaging' that would offer much more accurate safety information than the expiration date on the package," said senior study author professor Timothy Swager from MIT.

It could also cut down on food waste. "People are constantly throwing things out that probably aren't bad," Swager added.

In this study, the researchers tested the sensor on four types of meat: pork, chicken, cod and salmon. They found that when refrigerated, all four types stayed fresh over four days and when left unrefrigerated, the samples all decayed, but at varying rates.

There are other sensors that can detect the signs of decaying meat but they are usually large and expensive instruments that require expertise to operate.

"The advantage we have is these are the cheapest, smallest, easiest-to-manufacture sensors," Swager said.

The new device also requires very little power and could be incorporated into a wireless platform that Swager's lab recently developed that allows a regular smartphone to read output from carbon nanotube sensors such as this one.

The paper describing the invention was published in the journal Angewandte Chemie.