# A Smart Sensing System of Water Quality and Intake Monitoring for Livestock and Wild Animals
## 3 Experiment Setup
Figure 7: Setup at system test site with a central electrical box and four drinking stations. Figure 9 shows a closeup of the drinking stations flow meter, which is the silver-taped pipe on the top of the picture, and the thermal sensor, which is the white pipe on the bottom of the picture. The flowmeter tracks animal water intake by refilling the station's water if the water level is below a predetermined threshold. The thermal sensor keeps constant track of the water temperature and records the value for each drinking event. Figure 10 shows the external deployment and internal structure of the junction box of one of the drinking stations. A converter board is visible on the right side of the box. It is plugged into two ethernet cables and several wires. The board is responsible for the transference of data from the sensors and camera to the Arduino Mega boards in the central circuit box; it is connected to the components via the connected wires on the right side of the board and to the Arduino Mega via the ethernet cables on the left side of it. Figure 8: The side view of the drinking station showing the Radio-Frequency Identification (RFID) reader and the motion detector triggered camera. Figure 10: The junction electrical box implemented in each drinking station. The internal structure of the central circuit box is illustrated in Figure 11. Figure 11a shows the central electrical enclosure containing all the system's Arduino Mega 2560 boards. Each board acts as the CPU of an individual drinking station. The main function includes running the operational code for each of the different components of the station, receiving the output signals from the sensors, and storing the outputs on an SD card. The SD card can store the data for more than two weeks, so the user does not need to fetch data very often. Figure 11b shows a closeup of one of the systems Arduino Mega 2560 boards. The board hosts breakout boards for an SD card, a DS3231 RTC for clock signal generation, and an LED display. The Arduino Mega operates the program for each of the drinking stations components including the camera, the thermal sensor, the flow meter, and the RFID reader. All the collected data are stored in the SD card for each drinking event. The RTC is used for tracking time and providing the time of each drinking session's beginning and end. Each board also has an LCD display screen, which shows all the current properties of the water as well as the time for the users to observe directly without having to open the SD card, as illustrated in Figure 11c. There are several additional and important requirements for the experiment setup. The first is that the system should be designed to let the livestock always have access to water even if the sensing system failed. The second is that the system should be able to withstand the harsh outdoor environment of the remote site for a long time during the experiments and data collection period. Minimum maintenance efforts are expected as the livestock experts who visit the site frequently may not be trained for operating the electrical sensing system. Figure 5.0 The central electrical box implemented for four drinking stations. (**a**) Four Arduino boards for each drinking station. (**b**) An Arduino boards with breakout boards. (**c**) Water information display on an LCD screen.