2.2.1. Hardware Design

(1) Missing broadcast monitoring module

The missing broadcast monitoring module includes an incremental rotary encoder, color code electric eye color fiber optic sensor, color code sensor amplifier, shielded cable, and so on. Cotton precision planters generally use hole seeding. The cotton seed slides directly into the duckbill from the seeding cavity. After the mouth is opened, it falls into the seed hole to complete the seeding operation. This greatly limits the detection space. That is, higher requirements are placed on the sensor installation location and detection method. Therefore, this study chooses the color-coded electric eye color fiber optic sensor (BV-501-RGB) and adopts the color automatic matching detection method. By comparing the two different RGB colors of the seed tray and the cotton seed, the light source is selected as three primary colors and a 4-element LED body. It solves the problem that cotton seeds are not easy to detect. The surface of the color-coded electric eye color fiber optic sensor is in the form of a cylindrical thread with a diameter of 6 mm. It is installed on the seed spacer and located in the transfer area, which requires facing the hole of the seed tray, as shown in Figure 3. It solves the problem that the sensor is not easy to install. It is connected to the color mark sensor amplifier through the shielded cable. The detection distance is 0~50 mm. It can adjust the detection height to control the spot size, ranging from 3 to 10 mm. It has the characteristics of a large light-receiving surface and multi-point collection, which can effectively reduce the misjudgment caused by uneven color.

**Figure 3.** Sensor installation diagram.

The above sensors monitor whether there are cotton seeds in the hole of the seed-taking pan, and feed back the information of the sowing quality. Among them, the color-coded sensor amplifier is set in advance by aligning the color of the cotton with the color-coded electric eye color fiber optic sensor. The color is memorized: if it is within the set color threshold range, it is considered as normal seeding. A seeding status signal is sent.

An incremental rotary encoder (AB two-phase, 100 pulses) is installed on the moving plate. It is connected with the data acquisition module through the shielded wire, which has strong anti-interference and high cost performance. The rotating grating disc and the optocoupler generate a counting pulse signal that can identify the direction. It is transmitted to the industrial computer to calculate the speed of the hole seeder (that is, the forward speed of the machine).
