The old saw about using every part of a pig but the squeal now includes its droppings, which are producing electricity on a Yadkin County, N.C., farm. Duke University is a partner with Duke Energy and Google in testing a system that captures methane, a potent greenhouse gas, from manure. The gas fuels a small power plant that makes enough energy to run the waste-processing system and part of the farm itself.

YADKINVILLE, N.C. — The old saw about using every part of a pig but the squeal now includes its droppings, which are producing electricity on a Yadkin County farm.

Duke University is a partner with Duke Energy and Google in testing a system that captures methane, a potent greenhouse gas, from manure. The gas fuels a small power plant that makes enough energy to run the waste-processing system and part of the farm itself.

Loyd Ray Farms joins a handful of North Carolina hog farms that have become energy innovators. They're prompted by state laws aimed at boosting renewable energy and phasing out open waste pits that can taint water and release harmful ammonia into the air.

"I was kind of curious myself how it was going to do," said farm owner Loyd Bryant, who at 71 is part of the old guard. Bryant first raised hogs in the 1960s. More than 8,600 now fatten up in his row of barns.

"There will be a few more records to keep, but it's not going to be no big thing," he said. "And it might bring my power bill down."

The powerful troika collaborating on the project will also benefit. The university and Google, which owns a data center in Lenoir, score credits to offset their carbon emissions. Duke Energy gets help in meeting a state mandate that, starting in 2012, utilities make electricity from swine waste.

The university and the utility also hope for insights in how to make such innovations more affordable - the Loyd Ray project cost $1.2 million - and fit them into a slowly expanding menu of energy choices.

"This is a learning opportunity for us to get it on the ground, refine it and understand the benefits and the costs," said Tatjana Vujic, director of Duke University's Carbon Offsets Initiative. With the experience already gained, and use of off-the-shelf parts, Duke researchers believe they could build a similar system now for substantially less.

Beginning next year, North Carolina utilities have to get 0.07 percent of their electricity from hog waste. The figure rises to 0.20 percent by 2018. State law includes a similar requirement for poultry waste.