I'm very new to Arduino. Discovering this fascinating world because the float switch in my rainwater tank gave up, causing my pump not to switch to tap water anymore when the tank is empty. A colleague of mine told me that he uses an ultrasonic sensor combined with a PLC to do this task. Been looking in to this for a while, but those industrial sensors and PLC's are quite expensive. He then told me that it could also be done with an Arduino...
Challenge accepted
So I started my little project by collecting the necessary components:
Arduino uno
4x20 display (I want have a visualisation of the water level and which source is used)
jsn-sr04t waterproof ultrasonic sensor
relayboard (with optocoupler) to control the pump
motion sensor (to regulate backlight of the LCD)
screw shields because I rather like to screw wires then solder them
I started reading about how to connect and program everything together.
A lot of investigation, trial & error, watching Youtube tutorials later the entire setup now works as I intended.
Now I'm at the stage of starting to build in all the components and unfortunately I started doubting about the JSN-SR04T sensor because of it's 20cm blind zone.
After some investigation I found the A02YYUW (or SEN0311) Waterproof Ultrasonic Sensor...
Looks very similar to the HC-SR04 sensor, with only 3cm blind zone, but waterproof.
However, other than the example code on the website of the fabricant, I can't find much information about this sensor, not even on this forum.
So why should I choose for one or the other (outer than the difference in the blind zone)?
Another member made more or less the same stuff recently.
Use the search function, the magnifier symbol and search for someting like "Arduino + watertank".
Why don't you just measure the water pressure at the bottom of the tank? Or simply install a redundant float switch?
In my case, I have a submersible pump in a water barrel. All I want to know is if the barrel is empty. I do this by measuring the current draw of the pump. When it starts sucking air, the current goes down.
I wouldn't trust a cheap ultrasonic ranging sensor n a wet environment. A single drop of water on either transducer will throw your calibration out the window.
Float switches are the only secure, positive way to control the water storage. My irrigation system has three 275 gallon storage totes connected in parallel for water storage. They are filled from the domestic water well.
To control the filling I have two horizontal Ebay float switches installed on a PVC pipe. One switch is at the bottom of the pipe to tell the Arduino nano to open the solenoid valve to fill the tanks. The other float switch is near the top of the pipe to tell the Arduino to stop filling.
The pipe is fastened to a hole in the top of the tote, inside the tote. Wires from the switches are inside the pipe and go to digital pins on the Arduino. One wire from each switch go to Arduino ground.
Thank you all for your reactions. But apparently I wasn't clear enough in my opening post. I'm not looking for alternatives to the ultrasonic sensor, I am actually looking for more information on the A02YYUW (or SEN0311) Waterproof Ultrasonic Sensor.
@Railroader: off course I did search the forum before starting a new thread, but as I already wrote, my setup works, just looking for info on this seemingly more accurate sensor
@SteveMann & @Paul_KD7HB: I am aware of the fact that the ultrasonic sensor probably isn't the most reliable solution, but it's a personal challenge to get it working, not only in test setup, but also in a live environment.
So why should I choose for one or the other (outer than the difference in the blind zone)?
From the information provided, the A02YYUW appears much better than the SR04 in this application. It costs more but is waterproof, and can be much closer to the water’s maximum level.
It is also intelligent in that it does the distance calculation instead of leaving that to the user’s sketch. The check digit protection will also give a warning if the connection between the sensor and Arduino is picking up interference.
What distance will there be between the sensor and the Arduino?
aarg:
What information do you need, that isn't on that page?
The technical information is indeed there. What I'm actually looking for are user experiences or insights of more exerienced users. I'm just a newbie in this matter.
6v6gt:
So why should I choose for one or the other (outer than the difference in the blind zone)?
From the information provided, the A02YYUW appears much better than the SR04 in this application. It costs more but is waterproof, and can be much closer to the water’s maximum level.
It is also intelligent in that it does the distance calculation instead of leaving that to the user’s sketch. The check digit protection will also give a warning if the connection between the sensor and Arduino is picking up interference.
What distance will there be between the sensor and the Arduino?
Thank you! This is a reaction I was looking for.
The distance between sensor and Arduino will be around 10 meters.
dave-in-nj:
Another option us to mount the sensor in a 3 inch pvc pipe that is 20cm taller than the tank.
Indeed, I've read this suggestion already somewhere on this forum and I've been considering it, but the tank is 60-70cm under ground...
kosino:
The technical information is indeed there. What I'm actually looking for are user experiences or insights of more exerienced users. I'm just a newbie in this matter.
Thank you! This is a reaction I was looking for.
The distance between sensor and Arduino will be around 10 meters.
Indeed, I've read this suggestion already somewhere on this forum and I've been considering it, but the tank is 60-70cm under ground...
All the more reason to install the riser.
It woul seem the other option is to bury the electronics.
This application seems to lend itself for a submersible water pressure sensor. That is designed to be waterproof all the way to the end of the wire.
dave-in-nj:
Serial output from the sensor to the Arduino about 10 meters ? seems a bit long.
I know... but it is what it is... The tank is in the garden, the pump in the basement. I will test if I can get it to work above ground at that distance before installing everything under ground.
Hutkikz:
I would look at Automotive sensors. definitely waterproof and a longer range than normally seen with the usual hobby sensors.
Interesting! Will keep dat in mind in case the A02YYUW I ordered fails to do its job.
dave-in-nj:
All the more reason to install the riser.
It woul seem the other option is to bury the electronics.
This application seems to lend itself for a submersible water pressure sensor. That is designed to be waterproof all the way to the end of the wire.
The sensor itself will not be submerged. The tank will never be filled till the top, there is an overflow that goes to an infiltration tank. So the sensor should be fine. The electronics will be mounted next to the pump.
Today my new A02YYUW sensor was delivered.
It is double the size of the JSN SR-04T sensor and feels to be of a way better build quality.
The back seems to be filled with some silicone-ish substance to make it waterproof.
When comparing both sensors, the A02YYUW gives a much more solid and reliable impression. Tests will show if this impression is correct or not.
Also mounting the sensor is way easier as it will take only 2 screws, while for the JSN SR-04T I still had to look for a solution to mount it at the inside of the tank.
The A02YUW doesn't need a seperate PCB, it connects directly to the Arduino.
Based on looks and feels, I'm happy with my purchase.
Now all I have to do is adapt my sketch with new code for the new sensor and start testing it.
Reading Your topic I know You have been bombarded with suggestions pointing everywhere. Well done to make a descision. Here is one more bomb before You start digging soil.
Sometimes 10 meters is the limit in specifications but if the surroundings are resonably okey it will work.
A simple test would be to connect the sensor to the 10 - 15 meter cable. Pull the cable out in the garden, 5 - 7.5 meters and test! If You want a hard test, wire the cable around Your TV, stereo, computer and check.
Railroader:
Reading Your topic I know You have been bombarded with suggestions pointing everywhere. Well done to make a descision. Here is one more bomb before You start digging soil.
Sometimes 10 meters is the limit in specifications but if the surroundings are resonably okey it will work.
A simple test would be to connect the sensor to the 10 - 15 meter cable. Pull the cable out in the garden, 5 - 7.5 meters and test! If You want a hard test, wire the cable around Your TV, stereo, computer and check.
Thank you for your reaction!
I sure will test with the long cable attached to the sensor and I might even stress test it like you suggested.
The cable I will be using is shielded cat6 cable, so normally it should be ok.
Digging soil won't be necessary, there is already a tube of 5cm diameter going from my basement to the underground watertank. The only cable running through that tube is the sensor cable.
So I don't think there will be too much interference from the environment.
I will keep you informed of the result.
I've also asked questions and received "hundreds" of suggestions.
That's convienient, a generous tube is already in place. No, I meant that You can connect the parts, sensor, cable and controller "on the table" and verify that it works well before installing it.
Sometimes I've also used shielded cables for sensors. Note that the shield should be connected to GND near the controller but not near the sensor. Maybe You already know that.
Yes, please report how things turn out.
So yesterday I finally found the time to continue with my little project.
I soldered almost 15m of CAT6 cable to the sensor and connected the sensor to my Arduino.
It seems to be working ok:
I did notice that I'm pushing the Arduino to it's limit now. When the serial monitoring is active, every now and then an 'ERROR' is printed and the frequency of the TX led on the Arduino is dropping significantly.
Now that I now it's working, I can start building in the components in their enclosures and clean up the temporary connections.