Catching Mastitis Early With Robot and Parlour Sensor Data
In short This article explains conductivity, colour and cell-count sensor alerts, their false positive rates, and a practical protocol for acting on alerts without overusing antibiotics.
Route ahead 7 sections
- What the sensors are actually measuring
- Why most alerts are false, in plain arithmetic 2 min
- Tune the thresholds before you blame the sensor 2 min
- The protocol: alert, check, sample, then decide 3 min
- Worked example: what the protocol is worth 5 min
- What to do with the cell count alerts 6 min
- Making it stick on your farm 7 min
Your robot software flagged eleven cows this morning. If you stripped every one of them, you’d probably find abnormal milk in two, maybe three. If you tubed every one, you’d use up to 33 intramammary tubes, throw away a week of milk from each cow, and do most of that for nothing.
Mastitis detection sensors are worth having, but they aren’t a diagnosis. They are a screening tool, and screening tools produce false positives by design. The farms that get the most from them have a clear protocol for what happens between the alert and any reach for the antibiotic tubes. This post sets that protocol out, with the numbers behind it.
What the sensors are actually measuring
Every major robot and most modern parlour milk meters use some mix of three signals. They measure different things, and they go wrong in different ways.
| Signal | What it detects | Example systems | Typical weakness |
|---|---|---|---|
| Electrical conductivity | Salt (sodium and chloride) leaking into milk as udder tissue gets inflamed | Lely Astronaut MQC, DeLaval VMS and MDi, GEA DairyMilk M6850, Afimilk MPC meters | Changes with milking interval, heat stress, oestrus and stage of lactation |
| Colour | Blood and gross changes in milk appearance, read with red, green and blue light | Lely MQC, DeLaval blood detection | Good at blood, weaker at watery or clotted milk that hasn’t changed colour much |
| Somatic cell count | Immune cells in the milk, from a sample taken at milking | Lely MQC-C, DeLaval OCC (Online Cell Counter) | Usually a composite of all four quarters, often sampled at intervals rather than every milking |
Conductivity is the oldest signal and still the backbone of most alerts. Good systems don’t use a fixed threshold. They compare each quarter against that cow’s own rolling baseline, and against her other three quarters. A quarter running 15 to 20% above its own average while the other three stay flat is far more suspicious than a cow whose whole udder reads high.
Colour sensors are best thought of as a blood detector. They’re very good at that job and much less useful for picking up the flaky, slightly watery milk of a mild case.
Cell count sensors are the most useful of the three for herd management. They’re also the easiest to misuse. A DeLaval OCC or Lely MQC-C reading tells you a cow has raised cells. It doesn’t tell you she has clinical mastitis that needs treating today.
DeLaval’s MDi (Mastitis Detection Index) and Lely’s MQC attention lists combine conductivity, colour and milking interval into a single score. That helps, but it’s still a probability and not a verdict.
Why most alerts are false, in plain arithmetic
Researchers usually hold detection systems to a benchmark of at least 80% sensitivity (catching 8 in 10 real cases) and 99% specificity (wrongly flagging no more than 1 in 100 healthy cows). Published trials have found that many commercial systems fall short of one figure or the other once you get past the brochure.
Here is what that means for a 180-cow robot herd with a fairly typical UK clinical mastitis rate of 35 cases per 100 cows per year:
Clinical cases per year: 180 x 0.35 = 63
New clinical cases per day: 63 / 365 = 0.17
Healthy cow-days per day: about 180
Sensitivity 80% -> true alerts per day: 0.17 x 0.80 = 0.14
Specificity 97% -> false alerts per day: 180 x 0.03 = 5.4
Share of alerts that are a new clinical case: 0.14 / 5.54 = about 2.5%
That last line catches people out. Even a system that sounds accurate will, in a herd where new clinical cases are rare on any given day, produce alert lists that are mostly not new clinical cases. Plenty of the “false” ones aren’t pure noise. They’re chronic high-cell-count cows, cows that came in late and stretched their interval, or cows in heat. None of those should get a tube.
So the right question isn’t “how do I make the alerts more accurate”. It’s “what cheap check do I do before anything expensive happens?”
Tune the thresholds before you blame the sensor
Spend half an hour with your dealer’s technician or your vet before you write the alerts off. Three settings make a big difference.
- Require persistence. A single high conductivity reading means very little. Setting the alert to need two consecutive milkings above threshold, or a rising trend over 24 hours, cuts false alerts sharply and costs you very little in detection time.
- Separate the lists. Most software, including Lely Horizon and DeLaval DelPro, lets you build separate attention lists. Keep “possible clinical” (conductivity jump plus colour or a sudden yield drop) apart from “high cell count” (OCC or MQC-C over a set level). They need different responses.
- Exclude known chronics. A cow that has been over 400,000 cells/ml for three recordings will alert every day. Tag her, manage her through your dry-off and culling plan, and stop her cluttering the morning list.
A sensible starting point for the cell count list is anything above 200,000 cells/ml on two consecutive readings. Adjust it once you see how many cows that produces.
The protocol: alert, check, sample, then decide
This is the part that saves money and antibiotics. Print it out and stick it up by the robot office or the parlour pit.
Step 1: Strip the flagged quarter. Use a strip cup or a black-bottomed cup and look at the foremilk from every quarter the sensor flagged. If the milk looks normal, she isn’t a clinical case today, whatever the screen says.
Step 2: CMT the doubtful ones. A California Mastitis Test kit costs around £25 and does hundreds of tests. If the milk looks normal but the CMT shows a strong gel in one quarter, you’ve got a subclinical quarter. Record it and don’t tube her.
Step 3: Grade any clinical case.
- Grade 1: abnormal milk only (clots, flakes, watery).
- Grade 2: abnormal milk plus a hard, swollen or hot quarter.
- Grade 3: a sick cow (off her feed, high temperature, dull, sometimes down).
Step 4: Grade 3 gets treated now. Ring the vet, follow your herd health plan, and give systemic treatment and anti-inflammatories as prescribed. Don’t wait for a culture result on a cow that could die from toxic mastitis.
Step 5: Grades 1 and 2 get sampled first. Take a clean, aseptic sample before any treatment. Then plate it on farm with a tri-plate from your vet, or send it off. Mastatest, which some UK vet practices run, reports back in about a day with an antibiotic sensitivity result as well as the bug.
Step 6: Treat on the result, 24 hours later.
- Gram-positive growth (Strep uberis, Staph aureus, Strep dysgalactiae): treat with the intramammary your vet recommends for that bug.
- Gram-negative (E. coli, Klebsiella) in a mild case: usually no intramammary. Many clear up on their own, and most tubes don’t touch these bugs anyway.
- No growth: no antibiotic. Often the infection has already cleared.
Most vets will agree a delay of 24 hours on a grade 1 or 2 cow makes no measurable difference to her cure rate. North American trials of culture-based treatment cut intramammary use for clinical mastitis by roughly half with no loss in bacteriological cure or milk yield. Ask your own vet what the bug mix on your farm looks like first, because a herd dominated by Strep uberis will see less benefit than one with lots of E. coli.
Worked example: what the protocol is worth
Take the same 180-cow herd and its 63 clinical cases a year. Assume about 6 of those are grade 3 and get treated straight away, which leaves 57 grade 1 and 2 cases.
Blanket treatment of every clinical case:
Tubes: 3 per case x £6 = £18
Discarded milk: 28 L/day x 6 days x 40p = £67
Cost per case = £85
57 cases x £85 = £4,845
Culture first, treat Gram-positives only. Say 45% of samples come back Gram-negative or no growth, which is within the range UK vets commonly report:
Plates: 57 x £5 = £285
Cases treated: 57 x 0.55 = 31 x £85 = £2,635
Untreated cases still lose some milk while waiting
and while abnormal: 26 x 2 days x 28 L x 40p = £582
Total = £3,502
That’s a saving of about £1,340 a year, plus roughly 78 fewer tubes going into cows. The labour of plating takes about five minutes a sample once someone is practised at it. Your figures will move with your milk price, yield and bug mix, but the direction rarely changes.
The antibiotic figure matters beyond the money. Red Tractor dairy standards require an annual review of antibiotic use with your vet, and milk buyers are increasingly asking for those numbers. A herd that can show it tubes only cultured Gram-positive cases is in a strong position at that review.
What to do with the cell count alerts
The high-SCC list from an OCC or MQC-C is a different beast. Treating subclinical cows in lactation with tubes rarely pays: cure rates are modest, you lose milk to the withdrawal period, and many Staph aureus infections simply come back.
Use that list for three jobs instead:
- Keep milk out of the tank. If one or two cows are driving your bulk tank cell count towards your buyer’s penalty band, divert their milk until it settles.
- Plan selective dry cow therapy. Cows with a cell count under 200,000 for the last three recordings and no clinical case this lactation are usually candidates for teat sealant only. Cows on the high list get an antibiotic dry cow tube as well. Your sensor history gives you a much better picture here than monthly milk recording alone.
- Make culling decisions. A cow with three or more clinical cases this lactation, or one quarter that never drops below 500,000, is costing you more than she earns and infecting her neighbours in the robot or on the clusters.
If you’re also running activity collars, rumination monitoring or bolus data, the bigger picture of how those streams fit together is covered in our guide to AI livestock health monitoring. A cow whose rumination drops a day before her conductivity rises is worth a closer look than one with a conductivity blip alone.
Making it stick on your farm
The protocol only works if whoever is on the morning shift follows it the same way every time. That means a strip cup and CMT paddle kept at the robot or the pit, sterile sample pots in the fridge, and an incubator set to 37°C (a small one costs around £100 to £150). It also means one place to record the result. Most herd software has a treatment and culture field, and Lely Horizon and DelPro will both let you add a note against the cow.
Book a half-hour with your vet at your next routine visit. Take a fortnight’s alert list printed off with what you found at the strip cup for each cow. Three things should come out of that meeting: agreed thresholds, an agreed list of which bugs get which tube, and a named person on farm who does the plating. Everything else in this post depends on those three being written down.