The ultrasonic sensor has four terminals 5v trigger echo and gnd connected as follows connect the 5v pin to 5v on your arduino board.
Ultrasonic flow sensor arduino.
One of the projects that have been done by so many students is the automated flow switch system that comes under various names like water level indicator using arduino and ultrasonic sensor water level monitor and control automatic flow switch water level sensor water level controller.
There are four pins on the hc sr04.
Therefore we can get the distance from the ultrasonic sensor by using two arduino s pins.
Arduino ultrasonic sensor arduino s pins can generate a 10 microsecond pulse and measure the pulse duration.
In this tutorial you will learn how to use one water flow sensor with an arduino board.
This economical sensor provides 2cm to 400cm of non contact measurement functionality with a ranging accuracy that can reach up to 3mm.
It emits an ultrasound at 40 000 hz 40khz which travels through the air and if there is an object or obstacle on its path it will bounce back to the module.
Ultrasonic sensor hc sr04 is a sensor that can measure distance.
The ultrasonic pulses collide an object and leaves in the other direction the echo terminals receives the ultrasound pulses and the sensor calculates the distance based on the time of the pulses.
Connect echo to digital pin 6 on your arduino board.
You can watch the video of the design here.
Circuit for controlling a water flow sensor using arduino mega arduino circuit for measuring the amount of water flowing through a pipe using arduino board.
Connect trigger to digital pin 7 on your arduino board.
The ultrasonic sensor sends 8 pulses of 40khz via the trig terminals inaudible to humans it s ultrasounds.
One pin is connected to trig pin to generate 10µs pulse to trig pin of the sensor.
The water flow sensor consists of a plastic valve body a water rotor and a hall effect sensor.
Considering the travel time and the speed of the sound you can calculate the distance.
In this project use the yf s201 1 2 inch water flow sensor to measure the water flow rate l min and display it on an lcd.