Someday soon, the grounds used to make your venti caramel macchiato and the stale remains of your breakfast muffin could return to you in your laundry detergent.

Carol Lin of the City University of Hong Kong presented her vision of a "biorefinery" that transforms food waste into ingredients for bio-based products at a meeting of the American Chemical Society in Philadelphia on Monday.

Lin's laboratory has already begun developing the technology for a food biorefinery, helped out in part by Starbucks Hong Kong, which donated funds from customer purchases of a cookie gift set.

"Our new process addresses the food waste problem by turning Starbucks' trash into treasure," Lin said in a statement Monday. "The strategy reduces the environmental burden of food waste, produces a potential income from this waste and is a sustainable solution."

The biorefinery works by blending food waste with fungi that help break down the more complex carbohydrates in the food, transforming them into simple sugars. Then the resulting sugars are fermented with bacteria that can turn that sugar into succinic acid, a compound that can give beer or wine a salty, bitter or acidic taste and also has a wide range of uses in the pharmaceutical industry, and can be used to make detergents, flavors and fragrances.

Lin said in a phone interview that their lab is having a bit of trouble with using coffee grounds in their model -- they contain aromatic compounds that can inhibit the growth of the fungi used in the biorefinery -- but in general the project is going well. Companies throughout Hong Kong are interested in the biorefinery concept as a means of processing their food waste, she says.

The biggest hurdle, Lin says, is working to scale up the process to produce high yields of useful succinic acid. Another challenge is how best to separate out the trace amounts of byproducts, including acetate, generated by the fermentation process.

Once scientists have a handle on using waste food as the raw material in a biorefinery, food waste from shopping malls, cafeterias and yes, Starbucks, could replace current production methods that use corn.

"Using corn and other food crops for bio-based fuels and other products may not be sustainable in the long-run," Lin said. "Concerns exist that this approach may increase food prices and contribute to food shortages in some areas of the world."