Fonterra said it would be the first installation of its kind in the world, and would upgrade the farm battery from 10kWh to 125kWh while occupying the same amount of space - about the size of a large refrigerator.
PolyJoule chief executive Eli Paster said full operation of the new generation battery was expected in the first half of next year.
Its trial uses would vary depending on farm staff input, the local grid network and Fonterra's needs, Paster said.
"We're looking at running the farm on 100 per cent renewables, potential integration with EV charging, supporting the local grid and having the battery system pay attention to the electricity price and weather to prepare for resilient operation."
Meanwhile, at Fonterra's Waitoa site, the battery previously on the farm will trial its uninterruptible power supply and energy arbitrage applications. (Energy arbitrage is a technique where electricity is bought during off-peak hours, when grid prices are cheapest. It is then stored and used during peak hours when prices are highest.)
Paster said the trial length at Waitoa would depend on how many different use cases were applied to it.
"Typically, to test a single-use case requires two to three months of hard data and fulltime operation to understand its full benefits. The system size for the site will be 125kWh."
Paster said PolyJoule's association with Fonterra started in 2018 with a conversation in Boston with the head of Fonterra's "Disrupt" unit, and progressed as industry concerns grew about lithium ion batteries catching fire and how to dispose of them in an environmentally safe way.
However, there was already a strong connection between New Zealand, MIT and research on conductive polymers, he said.
One of a trio of chemists awarded the Nobel Prize in 2000 for their work on conductive polymers was the late Alan MacDiarmid, a New Zealander who spent much of his career working in the US.
Another connection is Kiwi Ian Hunter, a professor of mechanical engineering at MIT, under whom Paster completed his PhD. Hunter is a co-founder of PolyJoule.
Paster said Fonterra had sponsored PolyJoule for "a small amount" in return for exclusive rights in the dairy industry space to manufacture, license and distribute PolyJoule batteries.
"Within that token arrangement they sponsored an early pilot. We're not talking millions, it was a real small amount."
He said there was an "enormous" global need for energy.
"If we're going to partner with someone, we partner with leaders. Fonterra's jurisdiction is agriculture and dairy. If I was licensing technology for a drink, I'd want to be talking to Coca-Cola or Pepsi."
Fonterra declined to discuss the amount of the investment.
On the cost of the PolyJoule system, Paster said his industry referred to a "levelised" cost basis.
"Right now we're pretty close to being cost-competitive on a levelised basis over a 15-year lifetime with some of the best in the business.
"Where we expect to be at a system level in about two to three years from now is within the window of the cheapest battery systems out there, which are led by Tesla, and the more expensive systems which are led by a number of US integrators.
"Right now we're more expensive than those integrators on an upfront basis but roughly competitive on a lifetime basis.
"We're not going into cars and we're not going into cell phones. We think the need is in decarbonising the grid, which is a bigger polluter than transportation."
Paster said there was potential for parts for PolyJoule storage systems to be manufactured in New Zealand and Australia.