Multichannel Measuring Converter for Monitoring Soil Moisture with Capacitive Sensors
摘要
Capacitive sensors are widely used in automation and robotization systems of the agricultural sector, incl. Humidity control and management. The purpose of this work is to develop and study an algorithm for converting capacitance into binary code for a certain number of capacitive sensor probes used in soil moisture monitoring. The algorithm is built using structural and event-oriented programming methods and is implemented on the basis of an 8-bit AVR microcontroller. The conversion process engages a 16-bit timer/counter, analog multiplexer, comparator and tri-state switches built into the microcontroller. The number of sensors connected to one microcontroller is determined by the number of its multiplexer inputs. The algorithm includes a procedure for measuring the time constant of an RC circuit, one of the elements of which is the corresponding sensor. Converter resolution depends on the microcontroller clock generator frequency, the value of the reference voltage and the resistance of the RC circuit resistor. Experimental studies were carried out using the ATmega328P microcontroller (Arduino Uno) and software developed in the Arduino integrated environment. The obtained results can be used in the design of multichannel measuring transducers of capacitive sensors for monitoring systems for soil and grain moisture during storage. The novelty of this work lies in the development of algorithm for controlling the conversion process depending on the formation of certain events in the microcontroller peripheral devices. The proposed algorithm improves the reliability and accuracy of a multi-channel transducer for capacitive sensors.