DEKALB, Illinois—The placid cornfields of the upper Midwest have the look of a place where nothing important ever changes. But here, at a large pig farm five miles south of town, the beginnings of a small revolution are unmistakable.

My host today is Bob Johnson, a sturdy 6-footer who gives the impression he would not be rushed if he were running with the bulls in Pamplona. As president of Johnson-Pate Pork Inc., which he co-owns with two sisters and a brother-in-law, he has taken a big role in changing the way hogs are handled.

In recent years, one major food corporation after another, from McDonald's to Safeway, has announced plans to stop buying pork from suppliers that confine pregnant sows in gestation stalls—individual enclosures so tiny the pig can't turn around. Target has set a deadline of 2022, voicing an increasingly common sentiment: "We're committed to the humane treatment of animals, and believe they should be raised in clean, safe environments free from cruelty, abuse or neglect."

Johnson, who has lived on this farm since he was a teenager, saw a business opportunity in getting rid of the cramped crates, as well as eliminating the routine use of antibiotics. So in 2010, his company switched—a big undertaking for a farm that sells 20,000 pigs per year.

Traditionalists say that gestation stalls are indispensable because when pigs are housed in groups, they fight—with bigger and fiercer animals injuring smaller ones and getting more than their share of the feed.

But that's not what is on display in the gestation building, a structure about 60 feet wide and 250 feet long occupied by some 625 pregnant sows. They are walking around and lounging quietly in large group pens. Some cool off under sprinklers that go off intermittently, as a few take their turn to eat. When the weather is good, they can go into an outdoor enclosure.

Johnson says when the pigs are moved into the pens after being inseminated, there is "some fighting, as they establish their social order." Before long, each pig knows when it's her turn to eat and, equally important, when it's someone else's.

Each pig has a radio transmitter attached to her ear, which carries a ticket for one free daily meal at the electronic sow feeder—a narrow chute that dispenses an enriched mixture of corn and soy meal. Once the pigs have eaten, they understand they won't get fed again till the next day. Well, most do: As we're watching, one sow decides it's worth trying to get seconds. No luck.

Peggy Pate, Johnson's sister, has two animal science degrees from the University of Illinois and takes a hands-on role with the pigs, checking to see that they're healthy and well fed. "I'm in the pens at least twice a day," she says.

A slim woman wearing a T-shirt commemorating the 1994 Cornfest 10K, she's dwarfed by the hogs, which weigh in around 450 pounds. But she says the animals are calmer than they were in gestation stalls. Back then, she says, "I always wore earplugs to block the noise."

It's helpful to Pate when the radio transmitter indicates a pig hasn't eaten, which is sometimes a sign of illness and sometimes a sign that an ear tag has fallen off. She uses a computer to adjust the feed for specific hogs that she sees losing weight or gaining too much.

Does raising pigs more humanely cost more? Johnson reports that expenses are a little higher with the new methods, but his customers, which include Whole Foods and Fork in the Road Foods, are willing to pay a premium for his pork.

The effect is small compared to changes in the cost of feed, which adds up to 70 percent of his expenses and has doubled over the past decade. The returns are enough to make it worthwhile. "We'd do it over again," he says.

Others may want to learn from his example. Nine states have passed measures to outlaw gestation stalls. In conservative, Republican Arizona, 61 percent of voters voted for the ban.

A lot of Americans are not entirely comfortable with how farm animals are treated to maximize output and minimize costs in food production, and they are hopeful there is a better way. As it happens, there is. At the Johnson-Pate farm, there is something new in the air, and it's not the smell of pigs.