Flow Meter and Level Sensor Used in ArduPilot based Spraying Drones

Kanchan Borade
7 min readJun 21, 2023

--

Flow meters and level sensors are essential components used in spraying drones to accurately measure and control the amount of liquid being sprayed. They help maintain consistent flow rates and ensure efficient application of pesticides, fertilizers, or other liquids.

Spraying Drone with Flow Meter and Level Sensor

I) Flow Meters: Flow meters are devices that measure the flow rate of a liquid or gas passing through them. In the context of spraying drones, flow meters are used to measure the volume of liquid being sprayed per unit of time. This information is crucial for determining the application rate and achieving uniform coverage.

There are various types of flow meters that can be used in spraying drones, including:

  1. Turbine Flow Meters: These meters utilize a spinning turbine to measure the flow rate. The rotation of the turbine is directly proportional to the volume of liquid passing through the meter.
  2. Ultrasonic Flow Meters: These meters use ultrasonic waves to measure the velocity of the liquid. By combining the velocity with the cross-sectional area of the flow, the flow rate can be determined.
  3. Magnetic Flow Meters: Also known as electromagnetic flow meters, these devices use a magnetic field and electrodes to measure the flow rate. They are particularly suitable for measuring conductive liquids like water-based solutions.

Here I will take one example of flow meter and describe its connections and settings using indigenous softwares AeroGCS KEA and AeroGCS GREEN.

YF-S201: This sensor is the example of Magnetic Flow Meters

This sensor sits in line with your water line and contains a pinwheel sensor to measure how much liquid has moved through it. There’s an integrated magnetic hall effect sensor that outputs an electrical pulse with every revolution. The hall effect sensor is sealed from the water pipe and allows the sensor to stay safe and dry.

YF-S201 connection

The sensor comes with three wires: red (5–24VDC power), black (ground) and yellow (Hall effect pulse output). By counting the pulses from the output of the sensor, you can easily calculate water flow. Each pulse is approximately 2.25 millilitres. Note this isn’t a precision sensor, and the pulse rate does vary a bit depending on the flow rate, fluid pressure and sensor orientation. It will need careful calibration if better than 10% precision is required. However, its great for basic measurement tasks! Following picture shows the connections.

Spraying system used in drone can be configured with the following settings.

i. Configurations for Flow Sensor through AEROGCS KEA:

  • BATTx_MONITOR = 11 (Fuel Flow)
  • BATTx_CURR_PIN = (This is the GPIO pin where the sensor is attached) (54 if sensor pin is attached to AUX 5)
  • BATTx_AMP_PERVLT = (This is set in millilitres per pulse for fuel flow sensors) (0.44 for YF-S401 sensor).
  • SERVOx_FUNCTION = -1 (AUXx where signal pin is attached) (Servo13_function should be set to -1 if sensor pin is attached to AUX 5)

ii. Configuring Through AEROGCS GREEN:

Spraying system in AeroGCS GREEN
Spraying system in AeroGCS GREEN

iii. Flow Meter Settings:

  • Flow sensor: User can select the type of flow sensor used.
  • Flow input pin value: User can select the type of input pin value.
  • Fuel tank capacity: User can enter the amount of liquid poured into the tank or amount of liquid present in ml.
Flow Meter Settings

iv. Clear Trapped Air:

  • Make sure that the pump is turned on and drone is powered up. There should be some water in the tank to clear the trapped air.
Clear Tapped Air

v. Restore Flow Meter Default Setting: User can restore all the flow related settings.

II) Level Sensors: Level sensors are used to determine the liquid level in a tank or reservoir on the spraying drone. They provide real-time feedback on the remaining liquid volume, allowing the drone operator to monitor and manage the spray operation effectively.

Different types of level sensors can be employed, including:

  1. Ultrasonic Level Sensors: These sensors use ultrasonic waves to measure the distance between the sensor and the liquid surface. By calculating the time taken for the ultrasonic waves to bounce back, the sensor can determine the liquid level.
  2. Pressure Level Sensors: These sensors rely on pressure measurements to determine the liquid level. They typically consist of a pressure transducer submerged in the liquid, and the pressure exerted by the liquid column is used to calculate the level.
  3. Capacitive Level Sensors: Capacitive sensors work based on changes in capacitance when the liquid comes into contact with the sensor. They measure the dielectric constant of the liquid, which is related to its level.

XKC-Y25 PNP Non Contact Level Sensor is the best example of Capacitive Level Sensor and it can be easily integrated in Spraying Drone for measuring the liquid level in the tank and to take the necessary actions on drone like RTL (Return To Launch), Hover or Land.

An intelligent non-contact liquid level sensor is for detecting whether there is liquid through the water induction capacitor. When there is no liquid to approach the sensor, the sensor will generate some static capacitance due to the capacitor distribution, when the liquid rises slowly to approach the sensor, the liquid parasitic capacitor will coupling to this static capacitor so that the terminal capacitance of the sensor will increase; The changing capacitance signal will be input control IC and reach the signal switch, then transform the changing capacitance value into a variation of a certain electrical signal. Using a certain algorithm to detect and judge the degrees of the variation; when the variation has exceeded a certain threshold, then it means the liquid level reached the sensing point.

Pinout:

  1. Brown: +VCC
  2. Yellow: Output
  3. Blue: GND
  4. Black: NC
Level Sensor Connection Diagram

Configuring through AeroGCS GREEN :

  1. In level sensor settings user can set the auxiliary pin to which the sensor pin is attached.
  2. Reboot the drone and sensor will start working.

Navigate to in AeroGCS GREEN:

  1. Spray setting ==> Level sensor setting ==> Set the Auxiliary pin to which the sensor’s signal out pin is connected.
Level Sensor Settings
Level Sensor Settings

2. When Tank becomes empty the action selected in spray setting (RTL/Hover) will triggered and “LUA: Tank Empty” message will shown in a status message.

AeroGCS GREEN Fly View

III) Conclusion : In conclusion, flow meters and level sensors play crucial roles in the efficient and accurate operation of spraying drones. These devices enable precise measurement and control of liquid flow rates and ensure that the desired amount of liquid is dispensed during spraying operations. The integration of flow meters and level sensors in spraying drones offers several benefits, including:

1. Accurate Application: Flow meters allow for precise measurement of liquid flow rates, ensuring accurate application of pesticides, fertilizers, or other substances during spraying. This accuracy helps in optimizing the effectiveness of the spraying process while minimizing waste or over-application.

2. Efficient Resource Management: By monitoring the liquid levels in the spraying drone’s tank, level sensors enable efficient resource management. Operators can monitor the remaining liquid volume and plan their operations accordingly, preventing unnecessary refills or running out of liquid during critical tasks.

3. Consistent Coverage: Flow meters and level sensors help maintain a consistent coverage rate during spraying. They ensure a uniform flow of liquid, preventing under- or over-spraying in different areas. This consistency leads to improved crop protection and higher quality results.

4. Data-driven Decision Making: With the integration of flow meters and level sensors, spraying drones can collect valuable data on liquid usage and application rates. This data can be analyzed to make informed decisions regarding the quantity of liquid required, identifying areas that require more attention, and optimizing future spraying operations.

5. Enhanced Automation: Flow meters and level sensors contribute to the overall automation of spraying drones. By providing real-time feedback and control, these devices enable autonomous or semi-autonomous operation, reducing the need for constant manual monitoring and adjustment.

In summary, the incorporation of flow meters and level sensors in spraying drones enhances precision, efficiency, and data-driven decision-making. These devices ensure accurate liquid application, efficient resource management, consistent coverage, and contribute to the automation of spraying operations, ultimately leading to improved agricultural practices and more effective crop protection.

--

--

Kanchan Borade

Trekker, Drone tech engineer, AI/ML engineer and devotee of Mahadev. Passionate abt exploring the world n leveraging technology for innovative solutions