Skip to content

Latest commit

 

History

History
106 lines (55 loc) · 5.42 KB

README.md

File metadata and controls

106 lines (55 loc) · 5.42 KB

Arduino Flow Meter And Pressure Sensor:

Copyright 22 Mar 2023, Sirous Azaruoon

Arduino Flow Meter Sensor Code:

In this project, we are going to build a flow meter sensor and pressure sensor using Arduino and displaying it on a LCD display.

Flow sensor has a rotor and a Hall effect sensor. When fluid flows through the rotor and sensor, the rotor rotates. This causes the sensor to output the pulses.

The flow meter sensor outputs pulse of a variable frequency that is proportional to the rate of fluid flowing through the pipe. The number of litres flowing through the sensor can be calculated by counting the pulses from the output of the sensor. The pulse output is given to the Arduino interrupt pin using a pull-up resistor. The pulses are counted and accordingly the number of litres are calculated by the Arduino program. Thus, the number of litres is displayed on the LCD.

The Formula For The Calculation Of Flow Meter Sensor:

According to the datasheet of Flow Sensor, the output pulse frequency can be calculated with this equation:

Sensor Frequency (Hz) = k * Q (Liters/s)

Q(L/min) = f * 60 / k

Q(L/hour) = f * 60 * 60 / k

image

Arduino Pressure Sensor:

Arduino can only measure voltage signals it can not "read" current signals. All I do is use a resistor. 0 to 20 mA through a 250 Ohm precision resistor gives me 0 to 5 volts.

image image

Your uc (Micro-controller) A/D (Analog to Digital Converter) is a 10-bit device or 2^10 = 1024 so full scale is 1024 bits and if 5 volts is your reference then 0 to 5 volts = 0 to 1023 bits.

We are using the header file of the LCD, which eases our interfacing the LCD with Arduino, and the pins A0, A1, A2, A3 are allotted for data transfer between LCD and Arduino. The sensor's output pin is connected to pin A15,21 of Arduino MEGA.

Channels A15: Analog pressure transducer sensor;

Channel 21: Turbine flow Sensor;

Parts List:

  1. Flowmeter Sensor

image image

  1. Arduino Mega2560

image image

  1. TFT 2.4″ Arduino Shield Touch

image

  1. Pressure Sensor

image

  1. XL4015 5A DC-DC Step Down Adjustable Power Supply Module Buck Converter

image image

  1. XL6009E1 DC DC Boost Converter Module

image image

  1. Li-ion rechargeable 9V batteries

image

  1. Pushbutton Switch

image

  1. Resistor And Capacitor

image

Then we test the Arduino with the PWM wave generator as shown below (The frequency shown on the screen is equal to the multimeter and is 111-113 hertz):

image

image

And we measure the Arduino input and pressure sensor output voltage with a multimeter for testing according to the figure below (The voltage shown on the screen is equal to the multimeter and is 1.07 volts):

image

You can also see the complete assembly in the video and figures below. I hope you enjoyed the tutorial and the content was useful, if you have any problems, please send them to sirous_3141@yahoo.com or WhatsApp 00989373052792.

image

image

image

image

image