Arduino Underwater Ultrasonic Senor

  Переглядів 23,518

Martin

Martin

2 роки тому

I was testing ultrasonic sensors for Arduino underwater to measure the depth with the goal to build an RC boat that can map shallow areas of water.

КОМЕНТАРІ: 59
@alexandregadret
@alexandregadret Рік тому
Awesome work!!! Thank You!
@yuripereira8123
@yuripereira8123 Рік тому
thank you very much for the video , I still haven't had time to translate it completely into my language , however , I already noticed a possible error in my project , obs: I want to make a sonar for fishing with arduino
@wolwerine777
@wolwerine777 Рік тому
Martin, good job, exactly right, i have the same experience with jsn-sr04t ultrasonic sensor, it works also underwater, problem is only the minimal distance.
@miltondacilva6401
@miltondacilva6401 Рік тому
Hi Peter, I'm trying and I can't measure underwater, I changed the speed of sound to water in the code and it doesn't work for me, could it be because I'm testing in a pool? If it's not a bother, could you help me with the code you used?
@wolwerine777
@wolwerine777 Рік тому
@@miltondacilva6401 hi milton,you have the same sensor? because there are more versions of the PCB board, can you provide your code
@miltondacilva6401
@miltondacilva6401 Рік тому
@@wolwerine777 If I have the same sensor, here I pass the code
@miltondacilva6401
@miltondacilva6401 Рік тому
@@wolwerine777 // Set the trigger pin LOW for 2uS digitalWrite(TRIGPIN, LOW); delayMicroseconds(2);//2 // Set the trigger pin HIGH for 20us to send pulse digitalWrite(TRIGPIN, HIGH); delayMicroseconds(20);//20 // Return the trigger pin to LOW digitalWrite(TRIGPIN, LOW); // Measure the width of the incoming pulse duration = pulseIn(ECHOPIN, HIGH); //distance = (duration / 2) * 0.0343; distance = (duration / 2) * 0.001435; // Print result to serial monitor Serial.print("distance: "); Serial.print(distance); Serial.println(" mm"); lcd.setCursor(0, 0); lcd.print("Distancia: "); lcd.print(distance); lcd.print(" cm"); delay(100); // Delay before repeating measurement delay(100);
@jddr.jkindle9708
@jddr.jkindle9708 2 роки тому
Luv the math equations. Well explained.
@Martin-ms4bu
@Martin-ms4bu 2 роки тому
Thank you!
@whyme8068
@whyme8068 2 роки тому
Nice! What are you planning to do with this? Make a multi function chart plotter?
@Martin-ms4bu
@Martin-ms4bu 2 роки тому
I want to put it on an RC boat to map shallow water.
@notorious9159
@notorious9159 Рік тому
Hi Martin i would like to know more about your rc mapping boat project if you're available
@bobidea
@bobidea 2 роки тому
Hey! Thank you for the video. I have a few questions. Hope you answer my questions. 1. So, the underwater ultrasonic sensor works and calculate the depth under the sea or swimming pool which are deeper than about 2meters? 2. Is there any way to transmit the water depth information to the other arduino or computer or mobile phone receiver outside? I'm thinking of making a small robot which can calculate the depth of shallow water or swimming pool and send the depth figure to other receivers outside water through wireless communication.
@Martin-ms4bu
@Martin-ms4bu 2 роки тому
1. I haven't done more tests yet, but so far it seems to work. I am going to test another sensor as soon as I have more time that should be able to measure also shallower depths. 2. You could use an ESP32 instead of the arduino, so you would be able to transmit the data via wifi, and maybe even to control your robot remotely.
@rohitchilakala7207
@rohitchilakala7207 Рік тому
Hey Hoonish, I'm curious if you found a way to do that, I have similar idea too. Kindly let me know your status.
@Amirali0Rezaei
@Amirali0Rezaei Рік тому
Hello, such good video! I just wanted to ask how did you manage to connect the fish finder transducer to the module? and if you can share more details about the electronics and connections
@Martin-ms4bu
@Martin-ms4bu Рік тому
Thank you very much! I did use a plug with screw terminals and wires to make the connections. I'm sorry I dont have any schematics. I will try to add something in a future video when I figured out how to make it work.
@Amirali0Rezaei
@Amirali0Rezaei Рік тому
@@Martin-ms4bu oh thanks for reply, can you give more details about the connections and the wiring pls, its a bit of emergency
@Martin-ms4bu
@Martin-ms4bu Рік тому
Which connections are you looking for? I dont have that setup anymore. Everything is dissassemled again. But I can take a look at the wires in the video.
@Amirali0Rezaei
@Amirali0Rezaei Рік тому
@@Martin-ms4bu And also it would be so much helpful if you can provide me with the code as well thanks a lot!
@Martin-ms4bu
@Martin-ms4bu Рік тому
The code is super easy: You just pull the trigger pin high for a short time to trigger the sensor, then use int duration = pulseIn(echopin, HIGH) to get the duration of the echo pins signal. I did divide that duration by 2 and again by 6.7385 (for water) to get the distance in cm.
@emiliebadert4768
@emiliebadert4768 Рік тому
Hello!! thank you for your video! How do you see the difference between a fish for exemple or the ground? Is it possible to change the code in order to detect obstacles instead of the water depth?
@Martin-ms4bu
@Martin-ms4bu Рік тому
I don''t think this is possible with this sensor. As soon as it detects an incoming echo it changes the state of its echo pin. It doesn't listen for multiple echos. So the first echo it receives could also be coming from a fish, object or something else.
@mirekcolakov1730
@mirekcolakov1730 7 місяців тому
Hello may I ask please what is the maximum depth that you have correctly measured JSN SR04T sensor? Im planning a similar project, but I am sailing mostly between 1-30m deep waters and 4m is just the tidal range here in Ireland. Thank you very much. Basically I am looking for a cheap solution. I already built my own windspeed meter, wind direction, gps all on esp32 and sending via MQTT!! Now I want want to send it to program running on my iMac and feed it to an LLM including shipping forecast and scraped nautical data. thanks!!!!
@Martin-ms4bu
@Martin-ms4bu 7 місяців тому
Hello! I'm sorry, but I haven't tested the maximum depth. I was more interested in the minimum values. It once worked in 3 m but I didn't try anything deeper than that. If you need the depth data in your setup and you already have a boat, would't it be possible to read the nmea / Seatalk data of your boats instruments?
@henrybriceno3493
@henrybriceno3493 Рік тому
Hi Martin, I liked your explanations. I am interested on building an underwater sonic-driven buoy-deployment unit, with a transducer (emitter) on my boat and another one (receiver) on the buoy on the sea bottom (max 20 m depth). The idea is to have the buoy hooked to an instrumented payload on the sea bottom, and triggering the buoy-release switch from the boat. The buoy would float to surface and I could retrieve my instruments without having to dive. Can you give me a hand by recommending inexpensive transducers for such a task? Thanks
@Martin-ms4bu
@Martin-ms4bu Рік тому
Hi Henry, I think this kind of sensor wont't be able to do the job, because they are listening only for a short time after sending their pulse. If I understood correctly you are looking for a receiver to use on the bottom side to listen all the time for a signal from the surface emitter to trigger the release mechanism. Wouldn't it be possible to use a bouy connected to your instruments on the bottom with a line to retrieve them? I guess a sound based system would need a hydrophone which is constantly monitored for incoming signals. Maybe you can just use a normal microphone inside your waterproof container and send some loud ping or morse-code like signal with a speaker from the surface?
@alexroberts1285
@alexroberts1285 Рік тому
Hi Henry, If you've managed to pull this off Id be very interested in hearing from you as I am attempting to tackle the same problem myself. Kind regards, Alex
@chrishopper2798
@chrishopper2798 Рік тому
great video. price of bathymetry usv are very $$$. Im looking at a similar project why a flight control and rtk base. then hopefully send the data back to a laptop through telemetery radios
@fachini104
@fachini104 Рік тому
Is there a way to buy only the transducer part of that fish finder that you bought? I've made a piezeo driver, now i just need a transducer that will work under water
@Martin-ms4bu
@Martin-ms4bu Рік тому
When I did my research I couldn't find one. But you can get those used fishfinders really cheap on ebay.
@fachini104
@fachini104 Рік тому
Hi, that JSN-SR04T sensor has good accuracy, but it can't measure distances smaller than 1.5m. Is there any way to make it measure smaller distances by modifying the components on the PCB or changing its programming? I'm doing a project and I would need to measure distances between 50cm and 5m more or less
@Martin-ms4bu
@Martin-ms4bu Рік тому
As far as I know it is not possible. Probably because the transducer works both as transmitter and receiver. I guess it needs some time to settle down after transmitting the sound before it can listen to it. I recently ordered some other sensors to do some testing. Maybe they will work better.
@fachini104
@fachini104 Рік тому
@@Martin-ms4bu so if i used two of this transducers i could measure smaller distances?
@fachini104
@fachini104 Рік тому
One for transmission and the other for reception
@Martin-ms4bu
@Martin-ms4bu Рік тому
That might work. When you use 2 JSN-SR04T, you would have to send a ping with one, then shortly before it actually starts listening, send a ping with the second one. The first one may miss its own echo, but pick up the echo from the second transducer. EDIT: I actually tried it, but it didn't work. I guess the pulse returned by the module is at least 1100 us long. The datasheet says it is 150 us to 25 ms, but I can't read any shorter pulse.
@jananrao3705
@jananrao3705 9 місяців тому
I want this for my project where should I buy from. Online is very expensive. At Mangalore Sotrres it's not available
@Martin-ms4bu
@Martin-ms4bu 8 місяців тому
I bought it online. The sensor seems to be around 7€ at the moment. I don't know if you can get it cheaper anywhere.
@sernigioto
@sernigioto Рік тому
im waiting hehehe
@kikiesttoujoursla
@kikiesttoujoursla Рік тому
What is the brand and model of oscilloscope please ?
@Martin-ms4bu
@Martin-ms4bu Рік тому
Sorry I dont have model and Brand at hand, but you can find them easily on ebay. They are relatively cheap.
@kikiesttoujoursla
@kikiesttoujoursla Рік тому
@@Martin-ms4bu ok found with quimat keywor, thank you
@ronaldinho430
@ronaldinho430 2 роки тому
This was such an informative video! Can’t wait to see if the new sonar sensor will work. Can you confirm it works underwater for depths greater than 13 cm?
@Martin-ms4bu
@Martin-ms4bu 2 роки тому
Thank you! I have the board with the GPS and the SD card working now, but I didn't test it yet. I will upload a video with the results.
@miltondacilva6401
@miltondacilva6401 Рік тому
Hello Martin, the video is very good, thank you very much for sharing it, I cannot make it measure the waterproof ultrasonic sensor, modify the speed of sound in the code for the speed of sound in water, and when it touches the water the measurements are checked, it would be A lot to ask for the code you use for the sensor, thank you very much in advance
@Martin-ms4bu
@Martin-ms4bu Рік тому
Hi, you just pull the trigger pin high for a short time to trigger the sensor, then use pulseIn(echopin, HIGH) to get the duration of the echo pins signal. I did divide that duration by 2 and again by 6.7385 (for water) to get the distance in cm.
@miltondacilva6401
@miltondacilva6401 7 місяців тому
@@Martin-ms4bu Hello Martin, I'm still trying to read the sensor, I followed your advice and I don't know if I'm wrong about something because I can't get it to work, I'll leave you my code to see if you can guide me, thank you very much in advance, you are a genius void loop() { long duration, distance_cm; digitalWrite(triggerPin, LOW); delayMicroseconds(2); digitalWrite(triggerPin, HIGH); delayMicroseconds(10); digitalWrite(triggerPin, LOW); duration = pulseIn(echoPin, HIGH); distance_cm = (duration / 2) / 6,7385; Serial.print("Distancia bajo el agua: "); Serial.print(distance_cm); Serial.println(" cm"); delay(100); }
@Martin-ms4bu
@Martin-ms4bu 7 місяців тому
@@miltondacilva6401 the code looks fine to me. Maybe try to read the sensor in bigger intervals. How far is the distance you want to measure? Do you get any reading at all? What values do you get for duration?
@miltondacilva6401
@miltondacilva6401 7 місяців тому
@@Martin-ms4bu Hello Martin, thank you for taking your time and guiding me, the idea is to measure from 2 meters of water onwards up to about 10 or 15 meters, I tested it in a bucket of water with 40cm of water and it is marked with a number 77 when I submerge it under water and I am applying a delay(500) . You will not have the code that worked for you in the test, thank you very much Martin and best regards
@miltondacilva6401
@miltondacilva6401 7 місяців тому
@@Martin-ms4bu My idea is to make a radio controlled boat to search for drowned people in the water.
@sharky9056
@sharky9056 Рік тому
Arduino code please?
@davidforrest937
@davidforrest937 Рік тому
If 1500m/s in water vs 343m/s in air gives a 4.37x speed difference, then your calculation @4:37 (what a coincidence!!!) shows that 3cm in air gets you 13cm in water. Why not test it in a bathtub or fishtank?
@Martin-ms4bu
@Martin-ms4bu Рік тому
I dont have a bathtub or a fishtank ;-)
@davidforrest937
@davidforrest937 Рік тому
@@Martin-ms4bu Next, you'll be saying you don't have a pot to test in.
@Martin-ms4bu
@Martin-ms4bu Рік тому
I did those tests in deeper water, because I didn't expect those sensors to work in very shallow water.
@user-mk2hk1iw2k
@user-mk2hk1iw2k Рік тому
Hi guys, has anyone tested this sensor underwater? I searched a lot of information on the Internet, someone works, someone does not, I tested it does not work for me. I started research in this area, can anyone help, which sensor to take an inexpensive one, preferably from Aliexpress, so that it works under water. The purpose of my project is to measure the speed of sound underwater, in a sewer pipe with a diameter of 11 cm and a length of 1.1m, I need your help in recommending a sensor.
@Martin-ms4bu
@Martin-ms4bu Рік тому
I just ordered some new sensors that I want to test, but I didn't have the time yet. If I find one that works for shallow water, I will make a video of it.
Waterproof Ultrasonic Distance Sensors - JSN-SR04T & A02YYUW 💧☔
32:11
DroneBot Workshop
Переглядів 164 тис.
DIY sonar scanner (practical experiments)
14:30
bitluni
Переглядів 1 млн
Спектакль для окупантів та ждунів 🤯
00:47
Радіо Байрактар
Переглядів 542 тис.
I PUT MY ARMOR ON (Creeper) (PG Version)
00:19
Sam Green
Переглядів 6 млн
Sonar Depth Mapping With Autonomous GPS Boat
23:29
Clay Builds
Переглядів 26 тис.
A02YYUW waterproof Ultrasonic Sensor UART and PWM with ESP32
6:16
Electronic Clinic
Переглядів 2 тис.
Experiment: Waterproof Ultrasonic Transducer JSN-SR04T-2.0
12:32
Becky Wonders (Becky Marshall Design)
Переглядів 37 тис.
Sonar Para Pesca - Fish Finder - Localizador de Peixe
14:13
Minha Isca
Переглядів 45 тис.
Ultrasonic Transducers - Measurements and Horn Design
30:32
Lindsay Wilson
Переглядів 203 тис.
The Basics of Ultrasonic Sensors
4:49
CUI Devices
Переглядів 13 тис.
Building a Lego-powered Submarine 4.0 - automatic depth control
7:27
Brick Experiment Channel
Переглядів 21 млн
JSN-SR04T - Better UltraSonic Sensor for the Arduino?
9:40
Brainy-Bits
Переглядів 36 тис.
Никто не жмёт ему руку 😮
0:28
RenkO
Переглядів 977 тис.
🫰🏽🫶🏽
0:20
Pavlov_family_
Переглядів 1,5 млн
Слишком много порошка...
0:35
Это точно смешно
Переглядів 4,2 млн