*3.1. Design of the Detection System*

The experimental platform for poultry egg crack detection mainly consisted of five parts: a detection platform, high-voltage power supply, controller, data acquisition circuit, and industrial personal computer, as is shown in Figure 6. The detection platform was composed of a rotating mechanism, discharge electrodes, electrode adjustment mechanism, and other parts, as is shown in Figure 7a. To ensure perfect contact between the electrode and the surface of the poultry eggshell, the upper electrode was made flexible and egg-like and 10 cm wide, and it had four layers of conductive silica gel with different lengths stacked on top of each other. The lower electrode was initially designed to imitate an egg as well, but that led to uneven contact due to the different sizes of the eggs. The lower electrode was later made into a long bar shape, but this shape still did not work because the exposed part of the electrode outside the fixed seat was too short (2 mm) and required the lower electrode to reach for it flexibly, which gave the egg an upward support force and made it difficult to rotate. After a large number of experiments, we found that when the lower electrode took an arc convex shape with little contact, it provided a stable and reliable contact bottom without affecting the rotation. The rotating mechanism included three parts: a servo drive, saddle-shaped support rollers, and an upper spring roller. The servo drive provides a stable driving force to drive rollers on the left and right of the eggs and ensure that eggs of different sizes can rotate evenly without shifting, while the upper spring roller presses the egg to ensure that the eggs can still rotate evenly in place when they come into contact with the electrode and generate friction. The electrode adjustment mechanism can adjust the electrode position according to the egg so as to adapt to different egg sizes, ensure that the electrode fits the egg surface better, and thus provide stable and reliable surface contact. The data acquisition circuit used an STM32F103 microcomputer and 16-bit A/D converter as the core, and the maximum sampling frequency was 12 MHz, which could meet the requirements of the sampling speed and accuracy. The industrial personal computer was used to record and process the current sampling data. Through the analysis and processing of the current signals, it could identify whether there was a crack in the eggshell and then drive the automatic device to remove the cracked egg. The experimental device is shown in Figure 7b.

**Figure 6.** Data acquisition system block diagram.

**Figure 7.** Egg crack detection device. (**a**) Model diagram. (**b**) Physical map.

#### *3.2. Electrode Shape Design*

The eggshell is composed of a large amount of calcium carbonate containing tiny pores, and it does not conduct electricity under normal conditions. The inner membrane of the eggshell is a network of organic fibers made of keratin, which together with the egg liquid is a conductor and can conduct electricity under normal conditions. The pores are small in diameter and evenly dispersed. They usually have long and curved air paths extending through the shell toward the inside of the egg, while cracks are characterized by short air paths that extend horizontally on the shell and are concentrated along the crack. Therefore, it is notable to distinguish the pores and cracks in the design of the discharge electrode and ensure that the electric field in the egg body area is uniform. The effective area of detection is another aspect to note. The detection area covered by the electrodes in this paper did not include the tip and blunt end, and only the equatorial part of the egg and the central area between the two ends were covered for crack detection. Moreover, missing out on detection due to gaps between the electrode pieces may have occurred. All these factors mentioned above added difficulty to the design, and they should be carefully dealt with in the design of the electrode.

According to the analysis in Section 2, the charge density is proportional to the curvature of the electrode tip, which means the tip electrode is most likely to produce highvoltage and discharge phenomena. We selected six eggs randomly, made holes at the blunt ends of the eggs, and poured out the inside liquid before we tested the discharge voltages under smooth electrodes, single-tip electrodes, and multi-tip electrodes, as shown in Figure 8. The experimental data shown in Table 2 show that the smooth electrode discharge voltage matched with the polar plate discharge, and the single-tip electrode discharge voltage was slightly higher than that of the smooth electrode. As for the single-tip electrode, it may be difficult to align one end with the other end, which causes the breakdown voltage to increase. On the other hand, this may be because the energy is excessively concentrated in the tip and cannot form a large air column breakdown. The discharge voltage of the multitip electrode was close to that of the smooth electrode, which indicates that the multiple tips could reduce the breakdown voltage. Problems were still found in the experiment, such as an increased electrode distance and fewer actual effective tips. The tip electrode had the smallest coverage area on the eggshell surface. When it was in a crack-free area, it could only cover a few pores. When it was in a cracked area, the area ratio of the covered air area changed significantly, so it could effectively distinguish cracks and pores and had a high detection ability. However, the point-shaped tip electrode could only detect eggshells in a very small area near the electrode at one time, and the detection efficiency was low. The spatial electric field generated by the tip electrode was also unevenly distributed, which led to an unstable detection accuracy. Therefore, it is not an ideal electrode shape.

**Figure 8.** Tip electrode experimental set-up. (**a**) Smooth electrode. (**b**) Tip electrode. (**c**) Multi-strand tip electrode.


**Table 2.** Experimental data of tip electrode.

Conversely to the point electrodes, planar electrodes offer significant advantages in terms of detection efficiency and spatial distribution of the electric field. However, the shape and size of the egg body vary greatly, and it is difficult to make a flexible electrode that perfectly fits the surface of the egg. The accumulated value of the current generated by too many pores in the non-cracked eggs under the electrode was also close to the current value generated by the cracked egg, resulting in a significant decrease in the detection accuracy, so the planar electrode is also not an ideal shape for electrodes.

The linear electrode combines the advantages of the above two electrodes. It is better in spatial electric field uniformity, more efficient in detection, and more accurate in identification. In addition, the line contact of the conductive material, which can contain the outline of the egg and fit the surface of the eggshell, is an ideal form of contact.
