Copyright 22 Mar 2023, Sirous Azaruoon
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.
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
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.
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;
- Flowmeter Sensor
- Arduino Mega2560
- TFT 2.4″ Arduino Shield Touch
- Pressure Sensor
- XL4015 5A DC-DC Step Down Adjustable Power Supply Module Buck Converter
- XL6009E1 DC DC Boost Converter Module
- Li-ion rechargeable 9V batteries
- Pushbutton Switch
- Resistor And Capacitor
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):
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):
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.