Wrote serial port let s prepare the circuit.
Ultrasonic water level sensor arduino code.
1 ultrasonic sensor hc sr04 procedure.
Arduino water level sensor using ultrasonic sensor etc.
The ping sensor measures distance using sonar.
Supplies power for the sensor.
And the leds on pin 9 10 11 gets on as the water level crosses the quarter half and three quarter heights respectively.
Anyone can do it.
Follow the circuit diagram and make the connections as shown in the image given below.
Thus a 20cm is subtracted from the measured distance value.
This arduino water level indicator uses an ultrasonic sensor or ping sensor to determine the level of water in the tank.
1 arduino uno r3.
The ultrasonic module is placed 20cm above from the maximum water level.
Transmitter circuit transmitter circuit is shown in the figure below fig1 in this circuit an ultrasonic sensor is connected to pin d9 and d10 pin of arduino.
We connect the sensor to an arduino and as per the changing water level new signal readings would be sent letting us know the level.
Instead of radar wave we are sending ultrasonic wave.
Coding in the arduino language will control your circuit.
Materials needed for this arduino water level indicator and control using ultrasonic sensor hc.
This project is very basic.
This procedure is ideal for our needs because ultrasonic sensors are accessible and low priced.
An ultrasonic well above human hearing pulse is transmitted from the unit and distance to target is determined by measuring the time required for the echo return.
S this output goes to any analog signal on arduino.
Communication started with 9600 baud void loop int sensor analogread a1.
The water sensor has 3 output pins.
In this project two circuits are used.
Ultrasonic method is similar to radar.
Incoming analog signal read and appointed sensor serial println sensor.
Open a new sketch file by clicking new.
The ultrasonic sensor is not waterproof though so we will need to keep it protected.
The ultrasonic sensor we re using is the hcsr04 which is quite common and easy to find in electronic stores and also online.
Analog output will vary depending on the voltage provided to the sensor.
Arduino water level indicator and control using ultrasonic sensor hc sr04r.
We made water level meter with arduino platform we used arduino mega2560 but any arduino will work.
Arduino water level sensor.
The circuit will do basically what the aforementioned one will do rather efficiently.
Arduino water level indicator circuit.
Vcc pin is the power supply pin for the sensor.
The recommended power of the water level sensor is between 3 3v 5v.