Automated Mastitis Detection


7 min read

Current cost for mastitis Potential benefits How do AMD technologies work? Measures of tech performance Skills for AMD What are the investment costs? AMD systems available in NZ

Automated mastitis detection (AMD) systems are technology tools used on dairy farms to identify signs of mastitis in cows by monitoring milk for specific indicators. This page provides insights on how AMD systems work, including different technologies and their effectiveness. It emphasizes that while AMD can significantly reduce the number of cows needing inspection, human intervention is still required for confirmation and appropriate action. Considerations for integrating AMD with existing herd management software, training needs, investment analysis, and available systems in New Zealand are also detailed. The information helps you gauge whether investing in AMD technology suits your farm's needs.

Automated mastitis detection (AMD) systems use in-line sensors to monitor milk from individual cows during milking for indicators of mastitis.

While they provide a technology-based approach to identifying mastitis ‘suspect cows’, farmers still need to inspect the alerted cows to confirm clinical mastitis (CM) and determine appropriate actions. Results from a 2013 survey indicate that approximately 5% of New Zealand dairy farms have AMD systems installed.

If you would like a copy of the DairyNZ protocols for field evaluation of in-line automated mastitis (AMD) systems, contact us on 0800 4 324 7969 or email info@dairynz.co.nz

Key messages

  • Accurate AMD systems can significantly reduce the number of cows to be inspected to find cows with clinical mastitis.
  • AMD systems vary in performance, ask the supplier and other users to gauge proof of performance.
  • Consider how this technology will integrate with existing herd management software.
  • Complete an investment analysis to determine return on investment.
  • Effective use requires new skills and/or training for you and your staff.

What is the mastitis cost?

The cost of mastitis across the New Zealand dairy industry has been estimated at $180 million per year. It is important to detect cows with CM and a high somatic cell count (SCC) to make timely management decisions, reduce the risk of infecting other cows and manage milk supply quality.

The DairyNZ SmartSAMM programme provides resources to help farmers:

  1. Estimate the value of closing the gap between current performance and industry targets using the Gap Calculator
  2. Compare current mastitis management performance with industry recommendations using Mastitis Focus

Potential options for improving mastitis management include more timely and more accurate identification of mastitis cases and adopting SmartSAMM practices for better prevention and effective treatment of mastitis. The least costly option is to improve manual practices and this should be considered first.

What are the potential benefits of mastitis detection technology?

Automated mastitis detection technology provides an objective tool to help identify mastitis, and can:

  • Improve detection of CM if current detection performance is poor
  • Reduce reliance on the person milking
  • Reduce the number of cows needing further inspection for CM compared with regular teat stripping of the herd
  • Provide a consistent level of detection

Earlier detection is another potential benefit, and may result in better mastitis management and treatment outcomes (if necessary) and animal well-being. Farmers must, still, apply best practice when decided when/if to treat cows.

The financial benefits of AMD are hard to determine, due to a lack of information on technology performance and the difficulty placing a benefit on early treatment of CM and the detection of subclinical mastitis. Cost of the AMD sensors varies significantly and has a large influence on the payback potential. Sensors specifically installed for mastitis detection can cost as much as $3,000/bail, whereas many electronic milk meters come with sensors that measure electrical conductivity of milk; this may alter how you attribute the cost. Poor performing AMD technologies can increase costs; for example, if the system generates a high number of false alerts and results in more time (labour cost) spent checking cows unnecessarily.

Tip: Consider if you can improve mastitis detection in a more cost-effective way before investing in detection technology. Examine the extent of your mastitis issue, how well your current detection process is working, and then whether the AMD systems are likely to improve detection.

How do AMD technologies work?

There are two mainstream technologies currently available for mastitis detection. One approach measures electrical properties of milk while the other estimates the somatic cell count.

Changes in somatic cell counts (SCC) in milk

Cows with CM typically have highly elevated SCC, as the cow’s immune system responds to the infection.

The rapid mastitis test (RMT) is a manual method to estimate SCC using a relationship between the viscosity of milk after adding a detergent solution and the SCC of the milk sample. An AMD system (CellsenseTM) provides an estimate of the SCC of udder milk in a similar way to the RMT, but using an automated system to collect a small sample of milk, add the detergent solution, and then estimate SCC based on the change in viscosity.

Compared with EC, it is more accurate at identifying cows with high SCC. As this system doesn’t require data from previous milking to generate an alert, it can be installed on every second or fourth bail to reduce the investment cost; there is, therefore, a trade-off between cost and timeliness of detection to consider. This system has an additional on-going cost due to the reagent used at every milking.

Changes in electrical properties of milk

This approach measures changes in the mineral concentration in milk.

Milk from infected glands has higher concentrations of sodium and chloride, which can be measured by an increase in the electrical conductivity (EC) of the milk. An alert is produced when cow EC levels exceed a user-set threshold, which typically represents a percentage change in EC above a cow’s average value over previous days (~7 days).

Monitoring of EC can be done at the udder level (EC-udder; milk from all quarters combined) or at the quarter level (EC-quarter). EC-udder measurements can produce many false alerts, due to the influence of cow-related factors that could affect her milk conductivity, such as stage of lactation, or milk temperature. But these systems are most common, as EC-udder is simple to measure and the sensors are commonly a component of electronic milk meter systems that may already be installed.

Monitoring EC at a quarter level is more accurate, as it measures changes in individual quarters without the dilution by milk from healthy quarters. It is common for robotic milking systems but is only a fairly recent option for conventional milking systems. Comparisons can also be made between quarters, eliminating the effect of non-mastitis factors. A relatively new system (Smart DTectTM) uses an EC sensor and a specialised pulsator to milk and measure each quarter individually for fifteen seconds during the first minute of milking, and then compares the measured EC between quarters. This is an effective way to reduce false alerts but can increase herd milking time slightly.

Electrical impedance is an alternative approach to measuring EC. The main difference is that there are no electrodes in contact with the milk, which avoids potential problems with degradation of the electrodes. A commercially available system (MilkHubTM) measures electrical impedance at udder-level and ranks cows at each milking according to a calculated ‘mastitis ratio’ which represents a cow’s likelihood of having mastitis rather than using a threshold for alerts like other AMD systems.

What are the measures of technology performance?

All technologies will operate at different levels of accuracy. Farmers have reported different results from their experiences using similar (or even the same) technologies. Very little objective and comparable information is available on the field performance of in-line AMD systems.

DairyNZ has developed guidelines for Field Evaluation of In-Line AMD systems.

These protocols allow companies to report on the ability of their AMD technologies to:

  1. Detect cows with CM promptly, with acceptable accuracy for timely intervention, and
  2. Detect cows with a high SCC for management of bulk SCC levels in the vat.

For CM, the key performance measures are:

  • Detection Rate (also called sensitivity) which is the percentage of cows with CM correctly alerted by the AMD system (e.g. 80%)
  • False Alert Rate (also called specificity) which is the proportion of incorrectly alerted cows, expressed as false alert rate per 1,000 cow milkings (FAR1000: a FAR1000 of 20 means 20 false positives per 1000 cows milked).

Setting the alert threshold is a trade-off between identifying animals that do have mastitis (i.e., the detection rate) and having to check a lot of cows that don’t have mastitis (i.e., the FAR1000). Lowering the alert threshold value will increase the number of cows detected with mastitis, but will also increase the number of false alerts - often quite considerably - making the inspection of alerted cows labour intensive. Sensors with a higher false alert rate may cost less, but will mean you have to spend more time checking cows.

Tip: Ask the technology supplier to provide information about these performance measures, and whether their technology has been evaluated using the DairyNZ protocols. Check with other farmers about their experiences with the AMD system

What skills will you and your staff need to make the most of AMD?

Some AMD systems are standalone and will provide an in-bail alert for milking staff, whereas others are also linked to an electronic identification (EID) system and herd management software.

Collecting data in herd management software allows you to check a cow’s mastitis history. Use of AMD will require some computer skills, for setting alerts and reviewing data on the computer.

Tip: Investigate what expertise is required to operate the AMD system, then consider which people in your farm team would be most capable and engaged with the technology and software. What training does the technology provider offer?

What are the investment costs?

Performance and cost will depend on the form of technology used. EC systems are often purchased by farmers during a dairy upgrade or with a new dairy. EC-udder measurement is most commonly available at no additional cost through the installation of electronic milk meters.

Specific AMD devices (those not housed within a milk meter) can cost $1,000 to $3,000 per bail. It is important to note accessory costs which may accompany an AMD investment. Integrated systems, those recording and analysing data for consecutive milkings, will require an EID system to identify the individual cow. An auto-drafting system may also be considered, depending on your preferred routine (e.g. send alerted cows around again in a rotary or auto-draft for assessment and/or treatment after milking).

Other costs such as maintenance and replacement of the sensor technology, time required to learn to use the system and software, and time-related costs associated with checking alerted cows can be considerable and should be accounted for.

AMD systems available in New Zealand

Most milking technology companies offer an AMD system. Check which systems are compatible with your milking plant and herd management system.

While integrated systems are preferable, there are systems that can operate independently of your herd management system and can be retro-fitted into either herringbone or rotary dairies.

Systems and suppliers as at 2016 in New Zealand include:

Supplier Product Measurement Website
GEA Milk meter EC - udder gea-farmtechnologies.com
Milfos Milk meter EC - udder www.milfos.com
Tru-Test MilkHub™ EI - udder livestock.tru-test.com
LIC Automation CellSense™ YieldSense™ SCC EC - udder licautomation.com
Waikato Milking Systems SmartD-TECT™* EC - quarter waikatomilking.com

EC = Electrical conductivity, EI = Electrical impedance, SCC = estimated somatic cell count

This research was funded by New Zealand dairy farmers through DairyNZ Inc. in partnership with Ministry of Primary Industries Primary Growth Partnership funding. We thank representatives from technology suppliers for their advice and information.

Last updated: Sep 2023

Related content

Mastitis Overview


3 min read

Somatic Cell Count


1 min read

Bulk Milk SCC


1 min read

Detecting Mastitis


1 min read

Preventing Mastitis


1 min read