A flow meter is a device used to measure the flow rate of liquids or gases within a pipe. The devices are also used to automate certain processes, such as tank filling, process mixing, and many more.
The flow meter should also be noted to have many kinds and types. One type of flow meter can only be used on clear liquids, and some meters can only measure liquids with high-viscosity. Material of the sensor should also be put into consideration, some liquids may damage the meter based in chemical reactions.
In this project, we are only going to use clear liquids, with a low-level threshold flow rate, users can take the advantage of the gen4-uLCD-43DT’s easy-adaptability with existing hardware. The Diablo16 processor is perfect for this application as it can count the pulses provided by the flow sensor while simultaneously and accurately calculating the flow rate result.
- YF-S201 Hall Effect Water Flow Sensor
- 5v Relay Module
- 30 way FFC Cable
- uSD Card
- uUSB Cable
- Connecting Wires
- Wire the project according to the fritzing diagram.
- Use a Gen4-PA board, to connect the display to the PC .
Download the project code here.
Open the project using Workshop 4. This project uses the Visi Environment.
You can modify the properties of each widget.
Click on the “Build Copy/Load” button.
Note: This step could be skipped. However, compiling is essential for debugging purposes.
- Connect the display to the PC using uUSB-PA5 and a micro USB cable. Make sure that you are connected to the right port. Red Button indicates that the device is not connected, Blue Button indicates that the device is connected to the right port.
- Now click on the “(Build) Copy/Load” button.
- Workshop 4 will prompt you to select a drive to copy the image files to a uSD Card. After selecting the correct drive, click OK.
The module will prompt you to insert the uSD card.
Properly unmount the uSD Card from the PC and insert it to the uSD Card slot of the display module. The image below must appear on your display after completing the steps above.
The gen4-uLCD-43DT will continiously read data from the flow sensor, a dedicated function called the pin_Counter function will count the pulses provided by the sensor, and in line with this, whenever the button is pressed, the alarm value will be compared versus the sensor reading, a relay will be triggered accordingly based on the results.