[ieee africon 2007 - windhoek, south africa (2007.10.26-2007.10.28)] africon 2007 - an automated...

6
1 Abstract—Measurement of milk quality is important for commercial food safety and in the dairy processing industry. Several techniques have been investigated before, and measurements range from impedance detection time [1] [2] (for shelf-life prediction just after pasteurization) and conductivity [3] [4] [5] (mostly for mastitis detection) to pH and capacitance [6]. Most techniques use invasive probes, for which a good reference in milk is not yet available. This article discusses the design and results of an automated measurement system used to characterize impedance probes for bacterial content measurement in milk. With a reliable, repeatable measurement system, probe characterization and calibration is improved, which leads to faster and more accurate measurements of bacterial content and remaining shelf-life. Index Terms—Milk safety, bacterial content measurement, automated probe controller. I. INTRODUCTION ILK quality measurement is important for food safety, as well as in the production processes of the dairy industry. Milk contains bacteria that, in time, convert lactose into lactic acid. The lactic acid lowers the pH of milk, which is perceived as sourness. Electronic measurement systems for milk quality indication exploit the effects of bacterial growth and lactic acid increase on the electrical parameters of milk. Conductivity is an easy parameter to measure [4], but it is primarily used for the detection of mastitis [3] [4] and is strongly influenced by milk fat content. Impedance measurements at ac frequencies are also sensitive to capacitance, which is influenced by bacterial content [7]. This article discusses the design and evaluation of an automated impedance probe measurement and characterization system, where the probes are used for milk bacterial content measurements. II. IMPEDANCE PROBES All probes used with the automated impedance measurement system are two-electrode devices, with the electrodes parallel to each other. Surgical stainless steel Manuscript received March 2, 2007. C. J. Fourie is with the Department of Electrical and Electronic Engineering, University of Stellenobosch, Private Bag X1, Matieland, 7602, South Africa (telephone: +27-21-808-4029; fax: +27-21-808-4981; e- mail: coenrad@ sun.ac.za). P. J. van der Westhuyzen was with the University of Stellenbosch, South Africa. He is now with UEC Technologies (Pty) Ltd, UEC House 1, Montgomery Drive, Mount Edgecombe, South Africa (telephone: +27-31- 508-2800; e-mail: [email protected]). rods are used for the probe electrodes, after experiments revealed that brass and copper probes could not detect measurable impedance changes in milk as it soured. Examination of brass and copper probes after immersion in milk revealed discolouration of the probes which could not be washed off, suggesting change at the molecular level. It is postulated that probes oxidize when current flows through the milk, and that the oxidization layer dominates the impedance of the electrode-electrolyte layer [8]. The surfaces of the stainless steel rods are mechanically polished to remove scratches and decrease surface roughness. Even small scratches lower the impedance of a probe sufficiently to necessitate higher excitation currents in order to yield measurable voltages. Current density is made independent of immersion depth by insulating all but a 15 mm section of each electrode with heat shrink. Electrode distance at 100 Hz could not be found to measurably affect probe impedance, so that probe rigidity is not important. Probe geometry is shown in Fig. 1 [8]. III. PROBE EXCITATION AND PARAMETER MEASUREMENT A. Probe model Probe excitation is crucial to obtain reliable and An automated system for impedance measurements in milk Coenrad J. Fourie, P. J. van der Westhuyzen and P. C. van Niekerk M Fig. 1. Probe geometry and dimensions in cm. 1-4244-0987-X/07/$25.00 ©2007 IEEE.

Upload: p-c

Post on 14-Mar-2017

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: [IEEE AFRICON 2007 - Windhoek, South Africa (2007.10.26-2007.10.28)] AFRICON 2007 - An automated system for impedance measurements in milk

1

Abstract—Measurement of milk quality is important for

commercial food safety and in the dairy processing industry. Several techniques have been investigated before, and measurements range from impedance detection time [1] [2] (for shelf-life prediction just after pasteurization) and conductivity [3] [4] [5] (mostly for mastitis detection) to pH and capacitance [6]. Most techniques use invasive probes, for which a good reference in milk is not yet available. This article discusses the design and results of an automated measurement system used to characterize impedance probes for bacterial content measurement in milk. With a reliable, repeatable measurement system, probe characterization and calibration is improved, which leads to faster and more accurate measurements of bacterial content and remaining shelf-life.

Index Terms—Milk safety, bacterial content measurement, automated probe controller.

I. INTRODUCTION ILK quality measurement is important for food safety, as well as in the production processes of the dairy

industry. Milk contains bacteria that, in time, convert lactose into lactic acid. The lactic acid lowers the pH of milk, which is perceived as sourness.

Electronic measurement systems for milk quality indication exploit the effects of bacterial growth and lactic acid increase on the electrical parameters of milk. Conductivity is an easy parameter to measure [4], but it is primarily used for the detection of mastitis [3] [4] and is strongly influenced by milk fat content. Impedance measurements at ac frequencies are also sensitive to capacitance, which is influenced by bacterial content [7].

This article discusses the design and evaluation of an automated impedance probe measurement and characterization system, where the probes are used for milk bacterial content measurements.

II. IMPEDANCE PROBES All probes used with the automated impedance

measurement system are two-electrode devices, with the electrodes parallel to each other. Surgical stainless steel

Manuscript received March 2, 2007. C. J. Fourie is with the Department of Electrical and Electronic

Engineering, University of Stellenobosch, Private Bag X1, Matieland, 7602, South Africa (telephone: +27-21-808-4029; fax: +27-21-808-4981; e-mail: coenrad@ sun.ac.za).

P. J. van der Westhuyzen was with the University of Stellenbosch, South Africa. He is now with UEC Technologies (Pty) Ltd, UEC House 1, Montgomery Drive, Mount Edgecombe, South Africa (telephone: +27-31-508-2800; e-mail: [email protected]).

rods are used for the probe electrodes, after experiments revealed that brass and copper probes could not detect measurable impedance changes in milk as it soured. Examination of brass and copper probes after immersion in milk revealed discolouration of the probes which could not be washed off, suggesting change at the molecular level. It is postulated that probes oxidize when current flows through the milk, and that the oxidization layer dominates the impedance of the electrode-electrolyte layer [8].

The surfaces of the stainless steel rods are mechanically polished to remove scratches and decrease surface roughness. Even small scratches lower the impedance of a probe sufficiently to necessitate higher excitation currents in order to yield measurable voltages.

Current density is made independent of immersion depth by insulating all but a 15 mm section of each electrode with heat shrink. Electrode distance at 100 Hz could not be found to measurably affect probe impedance, so that probe rigidity is not important. Probe geometry is shown in Fig. 1 [8].

III. PROBE EXCITATION AND PARAMETER MEASUREMENT

A. Probe model Probe excitation is crucial to obtain reliable and

An automated system for impedance measurements in milk

Coenrad J. Fourie, P. J. van der Westhuyzen and P. C. van Niekerk

M

Fig. 1. Probe geometry and dimensions in cm.

1-4244-0987-X/07/$25.00 ©2007 IEEE.

Page 2: [IEEE AFRICON 2007 - Windhoek, South Africa (2007.10.26-2007.10.28)] AFRICON 2007 - An automated system for impedance measurements in milk

2

repeatable measurement results. Impedance measurement relies on the excitation of current through the medium under test at ac frequencies, and a proper model for the probe-medium interface. The complete electrode-electrolyte model for the probe in milk is shown in Fig. 2(a) [9], where Cd is the cell capacitance if the electrodes are seen as parallel plates and the milk as a dielectric, Re is the resistive component of milk, and Rn and Cn represent the resistive and capacitive components of the electrode-electrolyte interface at each electrode n of an impedance probe. If the length of the electrodes is much larger than the diameter, such as the exposed parts of the probe in Fig. 1, and measurements are kept to the low frequency domain, the cell capacitance Cd can be neglected ([9], who neglect Cd at frequencies up to 20 kHz). If the electrodes are similar, the low frequency electrode-electrolyte interface can be simplified to a series resistance Rb and capacitance Cb.

B. Impedance measurement system With the addition of a well-defined resistance Rr in series

with the impedance probe, a measurement setup as shown in Fig. 2(b) is created. A low frequency sinusoidal input signal is used to excite the measurement system.

If the phasors Vt, Vr and Vb are defined as shown in Fig. 2(b), with

Vt = Vr + Vb , (1)

and the magnitudes Vt, Vr and Vb can be measured, the

phases θr and θb can be calculated from the cosine law (θt is taken as 0°). Since Rr is purely resistive,

I = r

rr

RV θ∠

. (2)

The impedance of the probe-milk interface in series with

the milk has resistive and capacitive components, so that

Zb = )( rbb

IV θθ −∠ = Rb – jXb , (3)

Xb = )sin( rbb

IV θθ −− , (4)

and

Cb =bfXπ2

1. (5)

Since Zb represents the entire probe-milk system, the

series resistance of the electrode-electrolyte interface cannot be recovered from Rb. However, Cb is half the capacitance of either electrode-electrolyte interface, and changes in capacitance brought on by bacterial growth near the interface should easily be detectable.

From (2), current magnitude is found. If we assume uniform current density over the exposed area of a submerged probe, the current density is simply the current magnitude divided by the exposed area.

C. Excitation frequency and current density Existing data for the impedance of a stainless steel

electrode interface to a 0.9 % saline solution (which approximates milk), show a strong dependence of both resistance and capacitance on excitation frequency, as well as a strong dependence of both parameters on current density above 1 mA/cm2 [9].

In order to control the reliability of measurement results, a fixed frequency is therefore selected for all measurements, and the peak current density through the electrode-electrolyte interface is kept below 2 mA/cm2. Since probe resistance and reactance (and therefore the sensitivity of measurements) decrease with increasing frequency [9], and impedance measurements below 100 Hz have been shown to suffer from nonlinear effects ascribed to electrode polarization [10], the excitation frequency is chosen as 100 Hz.

IV. INITIAL BRINE AND MILK MEASUREMENTS In order to establish a set of starting parameters to design

the measurement system, measurements with stainless steel probes were conducted in salt water. This was done to enable comparison of probes with different metals with published results, which are almost always for saline solutions (data on electrode-electrolyte impedances were not available for milk). Saline solutions of 0.5%, 1%, 2% and 5% sodium chloride in tap water were used to create different electrolytes. Probes of stainless steel, bronze and copper were tested for current densities from 0.5 mA/cm2 to 2 mA/cm2, and immersion depths from 0.5 cm to 5 cm (with no isolation, thus to change the surface area in contact with the electrolyte).

Many sets of test data were gathered, with probes always left immersed and excited for an hour before measurements were recorded (to allow the electrode-electrolyte interface to reach equilibrium). The data show that all the probes measure a decrease in impedance if either the salinity or surface area increases. The sensitivity to salinity increase suggested that milk fermentation measurements were feasible, while the surface area results set a basic reference for probe design so that detectable voltages can be measured over the electrode-electrolyte interface when the excitation current density is around 1 mA/cm2.

The measurements were repeated in fresh full cream Fig. 2(a) The complete electrode-electrolyte model for the probe-milk interface, and (b) the simplified model for the probe measurement system.

Page 3: [IEEE AFRICON 2007 - Windhoek, South Africa (2007.10.26-2007.10.28)] AFRICON 2007 - An automated system for impedance measurements in milk

3

pasteurized milk, which was contaminated with bacteria from sour milk to accelerate the souring process. Only stainless steel probes measured impedance changes as the milk soured, possibly due to oxidization of the copper and brass probes as discussed earlier. All probes are now made with stainless steel.

Other observations were also made. Probe roughness was found to have a marked effect on electrode-electrolyte interface impedance, with a strong decrease in impedance as roughness increases. Although all measurements in saline solutions and souring milk follow the same relative curves (which can be calibrated), lower impedance probes require more current to produce detectable voltage changes. In the interest of controlled current density, all probe electrodes should therefore be polished to have similarly smooth surfaces.

Voltage wave distortion was observed in some probes, but the cause could not yet be isolated. Since the flattening of a voltage wave causes inaccurate measurements, all new probes are first tested in a controlled laboratory setup with oscilloscopes. Probes that show voltage wave distortion are discarded.

Temperature has also been shown to influence measured impedance, and measurements must therefore be corrected for temperature. The effect of temperature on the average impedance measured by 16 probes in 1.6% saline solution is shown in Fig. 3.

Finally, probe cleaning with ethanol and water was found to be essential. In one experiment a stainless steel probe was left in milk as it soured over a period of days, while it measured the predicted drop in impedance. The probe was then rinsed with water only, and placed in fresh milk, where it continued (falsely) to register the impedance of sour milk. This demonstrates both that probes must be thoroughly cleaned after removal from milk, and that measurements are dominated by the impedance of the electrode-electrolyte interface.

V. AUTOMATED MEASUREMENT SYSTEM

A. Design requirements The primary function of the automated measurement

system (AMS) is to characterize probes. In order to characterize as many probes as possible, the system supports

16 probes simultaneously. Probes are excited separately, so that they can be characterized in the same volume of liquid without causing interference. Excitation signals are sinusoidal voltages with a frequency of 100 Hz.

Other design requirements include automatic adjustment of excitation voltages to control the probe current density around 1 mA/cm2, a battery power source and long battery life to allow measurements over several days in environments such as cold storage facilities, temperature sensors to allow measurements to be corrected for temperature drift, and a large non-volatile memory to store measurement results over the entire duration of an experiment.

B. Basic system components At the core of the AMS is a ubiquitous Atmel ATmega16

microcontroller, clocked at 16 MHz, and selected for its easy SPI programming interface, powerful sleep modes to reduce power consumption between measurements, analogue-to-digital converters for voltage sampling, pulse-width modulation output to generate a sinusoidal voltage signal, and RS232 serial communication capability to download measurements to a computer.

The memory size required for data storage was calculated by setting the longest characterization cycle as 10 days, with 16 probes, at a measurement interval of 1 hour. All stored data points use 2 bytes of memory, and there are three points per probe per measurement (resistance, capacitance and current density), as well as one 16-bit temperature measurement for every measurement cycle. This requires 183 kilobits of non-volatile memory, which led to the selection of a 256 kilobit EEPROM.

A 16-1 analogue multiplexer feeds the 100 Hz sine wave Vt to a selected probe. The series on resistance of the multiplexer is 0.6 Ω, which is forms part of the probe resistance Rb.

Temperature is measured with an LM74 digital temperature sensor mounted on the AMS board, and interfaced via the SPI bus to the microcontroller. The LM74 measures its own temperature with a resolution of 0.0625°C, which allows sensitive measurement of relative temperature change, even though the absolute accuracy is only ±1.25°C. The AMS is always placed in the same environment as the probes to be characterized, so that the single temperature measurement is valid for all probes.

Dual 4-cell alkaline battery packs provide power. Low on-resistance semiconductor switches disconnect the supply voltages from all components except the microcontroller in sleep mode, enabling the AMS to operate for several weeks without a battery change.

C. Sine wave generation Since the microcontroller does not have a digital-to-

analogue converter, the onboard pulse-width modulation (PWM) output is used to generate a 100 Hz sine wave. A 156-byte sine table holds amplitude values for one quarter of a sine wave. From this table the 8-bit PWM generates (through mirroring and inversion) a 625-step output that, when filtered through a fourth-order bandpass filter with Fig. 3. Temperature variations and the effects on average probe impedance

for 16 stainless steel probes in 1.6% saline solution.

Page 4: [IEEE AFRICON 2007 - Windhoek, South Africa (2007.10.26-2007.10.28)] AFRICON 2007 - An automated system for impedance measurements in milk

4

100 Hz centre frequency, yields a good sine wave. The pulse repetition frequency is 62.5 kHz, and its harmonic is already 3 dB lower than that of the 100 Hz fundamental. The filter must therefore attenuate the 62.5 kHz harmonic by at least 46 dB to push its effect below the detection threshold of an 8-bit analogue-to-digital converter. A Fourier transform of the PWM also shows that frequency components near the 100 Hz fundamental frequency are at least 48 dB, or about 250 times lower, which could cause a 1-bit inaccuracy in the last bit of an 8-bit analogue-to-digital converter.

Finally, the filtered, zero-offset sine wave is buffered with a dual-rail opamp voltage follower to provide output current without signal distortion.

The onboard control software evaluates probe current density from the amplitude measurements discussed in the next section, and adjusts the sine table values accordingly to alter the amplitude of the excitation signal.

D. Amplitude measurement The amplitudes Vt, Vr and Vb are measured with three

onboard analogue-to-digital converters. Vt and Vb are referenced to ground, and are connected through opamp voltage followers to two ADC inputs. Vb is measured through a unity-gain, high input impedance differential amplifier, of which the output is connected to an ADC.

All ADCs are used in 8-bit mode (although the ATmega16 supports 10-bit conversion) because of increased sampling speed and the limited accuracy (8-bit) of the input sine wave.

The internal 2.56 V bandgap reference is used as the ADC reference voltage. Only the positive section of a signal is sampled with a resolution of 10 mV per bit and at a rate of 1538 samples per wavelength. Thus, on average, a sine wave with amplitude 2.5 V is sampled 30 times in the peak amplitude bin.

Averaging is used to reduce noise, with the average of 128 peak value measurements of successive waves saved as a 2-byte data point.

VI. TEST SETUP A test setup was created to record the impedance

measurements of 12 probes in milk as it soured. Three gram positive (“friendly”) bacterial type concentrations were created two days in advance, namely Enterococcus spp. (HKLHS), sakei (DSM 20017) and Lactobacillus plantarum (423). Erlenmeyer flasks, cotton wool, aluminium foil and water (for rinsing probes) were autoclaved according to standard laboratory procedures. 200 ml Clover 2 % fat long life milk, with a remaining shelf life of 8 months, was added to each of 15 autoclaved Erlenmeyer flasks, after which 4 ml of bacterial concentration (consisting of 10 million cells per ml) was added to each flask. Each bacterial type was added to 5 of the 15 flasks. 13 probes were immersed in ethanol for 3 minutes, and rinsed afterwards with autoclaved water. The probes were inserted into 12 flasks, 4 of each bacterial type, and the flask openings were covered with cotton wool and aluminium foil. The three flasks without probes were kept for pH measurements. A thirteenth probe

was inserted into a 1.6 % saline solution as a control. All the flasks were then placed in a controlled environment at

Fig. 4. Averaged measurements obtained with impedance probes in milk: (a) resistance, (b) capacitance, (c) absolute impedance and pH and (d) temperature.

Page 5: [IEEE AFRICON 2007 - Windhoek, South Africa (2007.10.26-2007.10.28)] AFRICON 2007 - An automated system for impedance measurements in milk

5

27°C for accelerated fermentation. The AMS measured probe characteristics every 30

minutes (because the large starting value for bacteria and the high temperature cause accelerated fermentation), while pH was measured twice daily. The experiment ran for 72 hours, by which time all the milk had curdled.

VII. RESULTS The measurement results are shown in Fig. 4, with the

four results for each bacterial type averaged to reduce clutter. The saline control is omitted, but showed a small change in the opposite direction as all of the milk results (indicating that the stainless steel probes do indeed measure the souring process in milk). The temperature of the controlled environment was also measured (Fig. 4(d)), but the variation is small enough that the effects cannot be seen in the measured impedance, capacitance or resistance. No corrections for temperature were therefore applied to the data.

The sharp drop in impedance (Fig. 4(c)) over the first 12 hours agree very well with the 40 % decrease in measured impedance reported for E. Coli [10] growth in Columbia media. The decreasing resistance and impedance values are in line with expectations, and the minimum values reached about 25 hours before pH flattens out suggest that the measurements really do reflect bacterial volume, which leads (causes) the souring process.

Capacitance (Fig. 4(b)) increases quickly over the first 25 hours of fast bacterial growth, and flattens out after that.

VIII. CONCLUSION A battery-operated, small and cost-effective AMS was

developed that uses digital wave synthesis and measurement (and thus very few analogue components) and automatic current density adjustments to interface impedance probes in milk.

The AMS succeeded in measuring detectable changes in the properties of impedance probes in milk during fermentation. The results are in line with expectations, and show exponential change over the first 25 hours when bacterial growth is also exponential.

After 25 hours, the capacitance measurements flatten out well within the detection range, indicating that the bacterial population reaches a limit. Beyond 25 hours, the pH drops as the milk sours due to the bacterial activity, and the increased acidity shows up as a measurable decrease in impedance and resistance.

All measurements, even without averaging between probes, show little noise.

The relative difference between measurement results for the different bacterial types (especially evident in Fig. 4(a) and Fig. 4(b)) can be ascribed to differing starting values for the respective probe impedances. This is caused by uncontrollable variations in parameters such as probe surface roughness. However, the data show very similar trends, and results would fall closer together if probe calibration coefficients for impedance scaling are available.

The results show that the AMS is very effective in exciting impedance probes correctly to produce clear results on the milk fermentation process. In spite of the limited resolution of the 8-bit digital-to-analogue and analogue-to-digital converters, the results have sufficient resolution to allow conclusions to be made. The AMS therefore serves as a valuable characterization setup from which further experiments into milk fermentation measurements and spoilage prediction instruments can be undertaken.

REFERENCES [1] J. R. Bishop, C. H. White, and R. Firstenberg-Eden, “Rapid

impedimetric method for determining the potential shelf-life of pasteurized whole milk”, Journal of Food Protection, vol. 47, no. 6, pp. 471-475, June 1984.

[2] P. Cady, D. Hardy, S. Martins, S. W. Dufour, and S. J. Kraeger, “Automated impedance measurements for rapid screening of milk microbial content”, Journal of Food Protection, vol. 41, no. 4, pp. 277-283, April 1978.

[3] J. R. Lake, J. E. Hillerton, B. Ambler, and H. C. Wheeler “Trials of a novel mastitis sensor on experimentally infected cows,” Journal of Dairy Research, vol. 59, pp. 11–19, 1992.

[4] M. Nielen, H. Deluyker, Y. H. Schukken, and A. Brand, “Electrical conductivity of milk: Measurement, modifiers, and meta analysis of mastitis detection performance, Journal of Dairy Science, vol. 75, no. 2, pp. 606-614, 1992.

[5] G. Mucchetti, M. Gatti, and E. Neviani, “Electrical conductivity changes in milk caused by acidification: Determining factors,” Journal of Dairy Science, vol. 77, no. 4, pp. 940-944, 1994.

[6] G. J. Grillo, M. A. Perez, J. C. Anton, and F. J. Ferrero, “Direct-evaluation of the fresh-milk somatic cell concentration (scc) through electrical permittivity measurements”, IEEE Proceedings, Instrumentation and Measurement Technology Conference, vol. 1, pp. 153-157, 2002.

[7] C. J. Felice, R. E. Madrid, J. M. Olivera, V. I. Rotger, M. E. Valentinuzzi, “Impedance microbiology: quantification of bacterial content in milk by means of capacitance growth curves,” Journal of Microbiological Methods, vo. 35, pp. 37-42, 1998.

[8] P. J. van der Westhuyzen, “Probe characterisation, design and evaluation for the real-time quality indication of milk,” MScEng thesis, Dept. Electrical and Electronic Engineering, University of Stellenbosch, South Africa, 2007.

[9] L. A. Geddes, C. P. da Costa, and G. Wise, “The impedance of stainless-steel electrodes,” Medical & Biological Engineering, vol. 9, pp. 511-521, 1971.

[10] L. L. Hause, R. A. Komorowski, and G. Gayon, “Electrode and electrolyte impedance in the detection of bacterial growth”, IEEE Transactions on Biomedical Engineering, vol. BME-28, no. 5, pp. 403-410, May 1981.

Page 6: [IEEE AFRICON 2007 - Windhoek, South Africa (2007.10.26-2007.10.28)] AFRICON 2007 - An automated system for impedance measurements in milk

Copyright Information

© 2007 IEEE. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists,

or to reuse any copyrighted component of this work in other works must be obtained from the IEEE.