Waterproof Ultrasonic Distance Sensors - JSN-SR04T & A02YYUW 💧☔

preview_player
Показать описание
Today we will take a look at the JSN-SR04T and A02YYUW Waterproof Ultrasonic Distance Sensors. We will see how they work outside, and we’ll even test to see if they work underwater (spoiler alert - they won’t!).

When we think of ultrasonic distance sensors, chances are we are thinking of the popular HC-SR04. After all, it’s simple to use, it works pretty well, and it is very inexpensive.

But while the HC-SR04 is a great sensor for indoor use, it isn’t really suitable for use outdoors. It is susceptible to dirt, it’s relatively fragile and, most importantly, it isn’t waterproof.

So today I’ll be examining a couple of ultrasonic distance sensors that are fully waterproof. They also are more advanced than the HC-SR04, as they are both capable of calculating the distance measurement by themselves, without the aid of a microcontroller or microcomputer.

The JSN-SR04T is an interesting sensor for a number of reasons. First, it uses a single transducer, instead of a separate transmit and receive transducer. Second, the transducer is attached to the main circuit board with a 2-meter cable, allowing you to mount the waterproof sensor remote from the non-waterproof board. And third, it actually has six modes of operation.

The A02YYUW looks a bit like a large, rubberized HC-SR-04 in that it has a separate receive and transmit transducer. But that’s where the resemblance ends. This is a smart sensor that outputs serial data, and it can run on 3.3 or 5 volts.

We’ll hook up both sensors to an Arduino Uno and write some simple code to use them. And, as the JSN-SR04 and A02YYUW both use the same format of serial data, we can even reuse the same sketch for both sensors!

Here is the table of contents for today’s video:

00:00 - Introduction
01:33 - How Ultrasonic Distance Sensors Work
04:37 - Look at the two sensors
05:50 - Using the JSN-SR04T Version 3.0
13:12 - JSN-SR04T Mode 0 Sketch & Demo (HC-SR04 Emulator)
18:01 - JSN-SR04T Mode 1 Sketch & Demo (Serial Data)
21:13 - Using the A02YYUW
26:06 - Outdoor Tests
28:18 - Underwater Tests
30:00 - Conclusion

As always you’ll find an article accompanying this video where you can grab all the code I used, as well as pick up some more information.

Hope you enjoy the video!

Bill
Рекомендации по теме
Комментарии
Автор

Hi everyone - It's come to my attention that there has been someone masquerading as myself, responding to some comments here with a link to a Telegram chat to win a prize from me. THIS IS A SCAM, I am not holding a contest, nor do I have a Telegram account. PLEASE DO NOT RESPOND TO THESE MESSAGES!!


Thanks!

Bill (The real one!)

Dronebotworkshop
Автор

I have been watching your videos for quite a while now and there is only one word to describe your content and presentation - fantastic! Well done Sir, I just wish there were more channels like this on science related topics, but for Arduino, your channel has everything covered. Chris, UK.

TheTemporalAnomaly
Автор

This has found me at just the right time. I'm planning water tank level monitors. Thanks Bill

tomstruct
Автор

sound travels much faster in the water, so that would definitely affect the sensor's ability to get responding signals. At a close distance it is possible that the sensor would get the response before the signals have all stopped sending.

opensourcefreedom
Автор

I bought a robot that comes with couple of JSN-SR04T inside. Today I met a problem that the JSN-SR04T was not working properly.
Luckily I found your video, fully explained everything. And I understand very well about the sensor now. Saved me much time from looking across massive amount of information to solve the puzzle.

sjoythehawk
Автор

Still one of the most comprehensive instructors on the internet! Thank you so much for the amazing info and time you put into the videos

heinrichhelmbold
Автор

I appreciate being able to use this device in the raining weather conditions, underwater sensor really spark the imagination, remotely monitoring your favourite fishing Hole, underwater robot etc.

drmosfet
Автор

I know I'll always get the straight dope here. Well-reasoned, detailed, rarely biased and always clear. I get all the info I need to make a decision that is best for me. Thanks.

columbiabuzz
Автор

Your video has an excellent explanation of the theory and operation of both the JSN-SR04T & A02YYUW sensors. I had an application where I needed sensors to monitor the level of solution in two hypochlorite tanks in a water system. The JSN-SR04T has a "blind spot" that is too long to the application. I originally used two HC-SR04 sensors, but I was worried about the sensors getting wet. I found versions of the A02YYUW sensors that worked using the same pulse width modulation as the HC-SR04 so they were a 'plug and play' substitution. The sensors have worked for over two years with the only problem happening when workmen accidently 'disconnected one of the sensors (broke the wire). I believe that there are versions of the A02YYUW available that operate on PWM and could be directly substituted for the HC-SP04.

richarddarling
Автор

This is the most in-depth dive on these things on the internet. Thank you for your time and effort in making this video...👍

grubboy
Автор

Thanks a lot, your projects are something which I always look for. In one of my earlier projects, I have waterproofed HC-SR04, fitted it on top of my 1000 litres water tank to find the distance between the top of the water surface and sensor. Further by putting the dimensions of my tank in the code, I calculate the exact volume of water available in my tank and using automation, turn ON / OFF the water pump to maintain the water level. Furthermore, I also calculate the flow rate of incoming and outgoing water in litre/min to know the consumption. The project also sends imp notifications on my mobile. Surprisingly the project is still working great.

rupeshkoulge
Автор

There's a problem with the A02YYUW sensor if you're trying to meausure a fluid level in a 150mm PVC pipe. The sound reflections confuse the sensor and it gives the wrong readings (something similar happens if you put it at the domed apex of a water tank, or near the corrugations at the side). I found that narrowing the sound aperture by cutting a 50mm high piece of packing foam to fit over the sensor with a similar sized rectangular window for it to hear through fixes the problem.

cjhtas
Автор

Dear Sir! Thank you a thousand times! What you present is real science work! Thank you!!

ceser
Автор

His Video workshops are really something "GOLD".
Thank you Bill

sarojdebnath
Автор

I've successfully tested the JSN-SR04T underwater although I rugged it in the rear and the sides. But if you take into account that sound speed underwater is about 4 times faster than in the air, the minimum distance it could read was about 85 centimeters. Maybe it was too long for being tested properly in a bathtub.

jaumegb
Автор

I just wanted to say that your videos are incredible. I recommend them all the time to students who are interested in anything Arduino related. You are a great teacher and an incredible resource. Thank you for all your hard work.

TommyLum
Автор

Lovely to see a new video today, thanks for the great work!

AshersPlace
Автор

Just in time! To use as water level of my RV tank. As well as depth meter for my small boat.
Thank you Master

tvnsi
Автор

Another brilliant video. I watch these things over & over, & ALWAYS check here or our forum when I get stuck on a project. I'm looking to build a weather station, & I think one of these might be perfect as an outdoor sensor!

christinewhybrow
Автор

I've used the non waterproof sensors and waterproof sensors for years in a water tank to measure water level. The non waterproof ones will fail within a few months due to corrosion of the sensors. The jsn wasn't suitable because of it's high minimum sensing distance. The a02 is easy to use and so far has been working in a hot and humid environment for a year with no issues. I've also tried the expensive maxbotix waterproof sensors, but they were unable to read distance if the water was agitated during filling. The manufacturer confirmed this. The a02 comes in pwm and uart variants, I could only get the pwm type to work, in a similar manner to the normal sensors.

ccmangb