Stensland Family Farms, which sits in the northwest corner of Iowa, has 170 dairy cows, but nobody milks them. Robots do.

Aided by sensors, lasers, and data collection, automated technology is cropping up on dairy farms around the world. The shift offers benefits for farmers who struggle to find workers willing to do the manual labor, and, after the cows adjust, they seem to like the robots better.

Here’s how you get milk from a cow without a human ever touching her.

At the back of the enclosure where Stensland Farm’s cows live, there are three unassuming boxes. Inside await sweetened food pellets (treats).

When a cow enters to eat one, a robot scans an identification tag. Gates close around her. Robotic arms spring into action.

Based on the number on her tag, the machines know exactly the shape of her body and udder (each new cow has to do an initial scanning), as well as the last time she was milked and the quantity she’s been giving. It even knows the rate at which each individual teat gives milk.

If the cow has been milked too recently, the gates open and send her back out. But if she’s ready, here we go.

A robotic arm with a spinning orange-and-white brush extends and gently rolls along the underside of her belly, simultaneously sanitizing the teats and stimulating them, prompting the cow to let her milk down.

Then comes another arm holding four plastic tubes, which are attached to a transparent tank. One by one, it places the open ends of the tubes onto the teats. How does it find them? Lasers, of course. The robot sometimes misses the teats once or twice — nope, not quite, nope, not there either — until it finally gets the angle right.

The tubes then function as little vacuums that suck the milk out at a rate customized to each cow’s production.

The robots even test for quality.

If the milk isn’t up to par for human consumption, it gets diverted to a separate container that will get fed to the farm’s calves, who wait eagerly in pens for their bottles. If the milk’s good, it gets collected and sent straight from the udder into the farm’s mechanical processing system.

Automating the family farm

Doug Stensland is part of the third generation working on the farm. His kids work there, too, and his grandkids — the oldest is 14 — are starting to help with chores.

He grew up on the land and remembers milking cows by hand. But he says farm life has changed for the better since the family switched to robots a little over six years ago.

“One of the things we were looking at is the quality of life that we had and trying as a family to get the tedious job of milking done in a timeframe that wouldn’t be so demanding,” he says.

Doug Stensland greets a calf at Stensland Family Farms in Iowa. Dana Varinsky/Business Insider

Stensland Farms is one of about 50 farms in Iowa that have made the switch to robots. In the US, there are 2,000 robotic milking machines installed, according to estimates from Lely, the Dutch ag-tech company that makes the system Stensland uses.

Steve Fried, North America sales manager for Lely, says that about 1,200 of those robots came from Lely, which pioneered the technology and started selling robotic milkers in Europe in 1992. (Many of the rest most likely come from Sweden-based ag-equipment company DeLaval.) But the robots have only recently started to become more prevalent on US farms.

“It’s really started to accelerate in the last two or three years, and the big reason behind that is labor — the availability of labor, the quality of labor to milk cows, and the cost of labor,” Fried says. He estimates that the company has seen 10% to 15% growth year over year in the US over the past three years.

'We were able to eliminate a couple jobs'

Milking cows is hard work, though the process on most farms is probably not what you’re picturing (farmer on a stool squeezing a cow’s teats as a stream of warm, thick milk squirts into a metal pail). Instead, most dairy farms herd cows into a parlor twice a day, where workers clean their udders and attach tubes that function similarly to the ones in the Lely robots, though they’re not customized to each individual cow.

But that still requires workers willing to labor around the clock, every day of the week. It’s physically demanding, and the smell can be unpleasant — a warm, slightly fermented, beastly scent that lingers on one’s hair and clothing.

Dairy farmers struggle to fill these jobs, since younger generations are increasingly uninterested in taking up the manual labor of the family business, and it's hard to find locals willing to do the grueling work. Many farmers rely on immigrant workers, a business model that comes with its own risks, especially given President Trump’s vows to restrict immigration over the US’s southern border. The robots, however, can milk up to 60 cows per day.

“Once we got these robots in, we were able to lighten the load on the family, plus actually we were able to eliminate a couple jobs,” Stensland says, adding that he thinks the robots will make working on the farm more appealing to future generations of the family.

“I think it’ll bring back some of the children that went off to college, where they might just say, ‘I don’t want to go back to that tedious work milking the cows.’ But if they can come back and they have that technology available, I really think that's what they'll end up doing.”

Just like Fitbit

Labor isn’t the only factor that’s made Stensland happy with his decision. His farm was previously milking cows only twice a day — they didn’t have the labor to do more — but because the robotic system lets the cows enter whenever they want, the average has gone up to three milkings a day. He says that change has earned the farm an 8% increase in milk production. They’re now producing about 1,500 gallons of milk a day. (If you’re doing the mental math on that, yes — modern dairy cows can give more than 8 gallons of milk a day, which can weigh upwards of 70 pounds.)

Stensland estimates those factors have allowed the farm to pay off their investment in the machines — they paid about $190,000 a unit — in six or seven years.

“But there are other benefits that were hidden that aren't figured in there, intangible type stuff that actually probably amounts to more,” he says.

The cows’ collar trackers collect a vast quantity of data about the animals’ health and habits — “just like the Fitbit that I have around my wrist,” Fried says — including the number of steps the cow takes per day and their rumination (how much they’re chewing their cud, part of the animals’ digestive process).

“That becomes an indicator of health," Fried says. "If a cow has elevated activity and decreased rumination, chances are she's in heat."

Stensland used to artificially synchronize his cows’ fertility cycles using shots so that he could track when they were in heat and ready for insemination. Now he uses information from the trackers and he can follow the cow's natural cycles. Plus, he says, the system allows him to detect and treat illness or abnormalities better than he could before.

Old cows, new tricks

Dairy cows at Stensland Family Farms. Dana Varinsky/Business Insider

When they first installed the robots, Stensland says the family had to pitch in 24 hours a day during the first couple of weeks to help the cows get accustomed to their new milkers.

“They'd been used to a certain way and the older ones are definitely harder to train compared to when we bring younger ones in now,” he says.

Larry Tranel, a dairy specialist at Iowa State University Extension, also points out that many farmers who adopt this technology don’t yet have a good sense of the costs that repairs and upgrades will impose on them down the road.

“The robots tend to wear out in say, 13 years, then you're faced with making that big investment again, versus if you were to put a milking parlor in you'd probably have that 20 to 25 years,” he says. Tranel analyses dairy technology for a living, and has even created an online spreadsheet that farmers thinking of making the transition to automated systems can use to estimate whether the investment would work for them.

If labor becomes scarcer or the minimum wage is raised significantly, he says, that can shift the calculations. But Tranel speculates that many of the farmers using his spreadsheet aren’t considering automation solely for monetary gains.

“Even if they break even or are not as profitable, they’ll basically say well its worth it just for the quality of life of not having to milk cows twice a day and deal with all the labor,” he says. “But they're dealing with equipment in the mean time that can break down night or day. I’d definitely say I'm a lot more lukewarm when you look at all the variables.”

Thus far the robots have primarily been used on a small scale, at farms like the Stensland family’s. But that’s changing — Lely has installed 24 robots on a single farm in Plymouth, Indiana, and has plans to add 24 more there this year.

“For many years it was more directed to smaller and medium farms. You would rarely see a robotic on a large farm, but I think that’s changing somewhat,” says Jaime Castaneda, the senior vice president of strategic initiatives and trade at the National Milk Producers Federation.

Over the next five to seven years, Lely anticipates that about 40% to 50% of US cows will be milked using this type of technology. Right now, the US is at just 2%. In Holland, where the product was developed, Fried estimates that a little over 30% of the cows are already being milked by robots.

According to the National Milk Producers Federation, dairy farms employ 150,000 full-time workers. Although those people don't all milk cows, Lely's estimates suggest a significant number of them could be out of a job a decade from now. That may not be great for the humans who do that work, but Stensland says there’s reason to believe the shift will be better for the bovine animals at the heart of this whole process.

Cows prefer consistency, he says.

“When you do things with machinery, there's no human error or change that happens. It's always the same thing, and I think it’s advantageous for the animal to have that same thing all the time. They like boredom.”