## 3 Farming Monitoring System Concepts and Methods
### Sensor Development and Deployment  
In this study, two types of sensors were deployed on the farm: (i) water inspection sensors to monitor the quality of water supply on the farm, and (ii) collar tags to monitor the behavior and health status of livestock. The development of the collar tag is out of the scope of this paper. However, for practical implementation, several collar tags are available on the market. One of them is the SODAQ solar powered LoRa cattle tracker V2, which is manufactured by Sodaq(r) in Hilversum, Netherlands [65]. The collar tag is equipped with a LoRa module microchipRN2903, uBlox 8M GPS, and LSM303 AGR accelerometer. Hence, in the simulations, a transmission range of 500 m was assumed for collar tags, which is compatible with the transmission range of water sensor nodes.  
The development of the water inspection system took place in multiple stages. Firstly, the conceptual design of the system and the required hardware were determined. This was then followed by the development of individual components to produce the water inspection system. Finally, the water sensors, wireless communication module, controller, solar panel, and power module were integrated, as shown in Figure 2.  
The utilized water sensors can sense five water quality parameters, including an ultrasonic sensor (to measure water level), pH sensor (to measure acidity/alkalinity), dissolved oxygen sensor, turbidity sensor (to measure water clarity), and electrical conductivity (EC) sensor (to measure the presence of algae). Figure 3 depicts the layout and the developed water quality monitoring system.  
Figure 1: Conceptual design of the developed farm monitoring system.  
Figure 2: Overview of sensors and hardware for the water quality monitoring system.  
The controller acts as the center to manage the water quality data. This includes handling the data from sensors and passing them to the target device, which in this case is the LoRa transmitter. The controller captures all the data from the sensors and converts them into specific units to be shown in the interface. The controller also integrates the LoRa node because it is equipped with the LoRa chip from Semtech. When all the data from the sensors involved have been captured, the data are then packed according to the LoRa format to be sent to the LoRa gateway. The frequency of sending data to the gateway can be set from the controller itself.  
The distribution of sensors in the field was based on the following factors: (i) location of farm water tributaries from the river, (ii) location of livestock watering pools, and (iii) distribution of herds on the farm.  
Figure 4 depicts a schematic of sensor deployment in the considered farm. The farm is a livestock complex with a capacity of 1000 dairy and beef cattle located in Pahang state, Malaysia. The farm area is about 3500 acres with an approximate radius of 7 km, which is considered a large-scale livestock farm [66].  
The point marked with the square indicates the location of the central receiver, which is also the takeoff and landing platform of the drone. The points marked with asterisks indicate the location of the water inspection sensors (seven sensing units located in the river and 12 sensing units located in the livestock watering pools), and the points marked with circles show the location of cattle herds (20 points), with each herd containing an average of 42 cows [67].  
To estimate the position of the herds, the movement of the cattle was monitored for several consecutive days.The location information of cattle movement was extracted from the collar tags. The data analysis showed a probability distribution of cattle movements, which after fitting to a normal distribution, the mean value was extracted and used as estimated position of herds.  
Figure 3: (**a**) Water node cabinet technical layout and (**b**) the integrated water quality monitoring system.