Тёмный

Arduino Underwater Ultrasonic Senor 

Martin
Подписаться 764
Просмотров 28 тыс.
50% 1

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.

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 70   
@greenfutureyt
@greenfutureyt 4 месяца назад
Excellent video, thanks Martin. This provides a lot more clarity than the ambiguity I've found elsewhere
@peterarbeitsloser1746
@peterarbeitsloser1746 2 месяца назад
Great video, were easiely explained your reasoning and math. Thanks.
@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);
@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
@notorious9159
@notorious9159 2 года назад
Hi Martin i would like to know more about your rc mapping boat project if you're available
@pierpa_76pierpaolo
@pierpa_76pierpaolo 22 дня назад
1:32 Could this component act as a transducer to detect vibrations, noises, and voices on any surface? I am not interested in proximity sensors and so on in this case. Then I can apply a 'speaker to listen to anything that will be detected, obviously making use of the heterodyne system that converts ultrasound and hears it audible to the human ear. Thank you very much.
@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 2 года назад
Hey Hoonish, I'm curious if you found a way to do that, I have similar idea too. Kindly let me know your status.
@jddr.jkindle9708
@jddr.jkindle9708 2 года назад
Luv the math equations. Well explained.
@Martin-ms4bu
@Martin-ms4bu 2 года назад
Thank you!
@alexandregadret
@alexandregadret Год назад
Awesome work!!! 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.
@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 Год назад
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 Год назад
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 2 года назад
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 2 года назад
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
@jananrao3705
@jananrao3705 Год назад
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 Год назад
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.
@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.
@chrishopper2798
@chrishopper2798 2 года назад
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 Год назад
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.
@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 Год назад
@@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 Год назад
@@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 Год назад
@@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 Год назад
@@Martin-ms4bu My idea is to make a radio controlled boat to search for drowned people in the water.
@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
@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.
@cyruis20k18
@cyruis20k18 3 месяца назад
i tried the sensor in water but it detect the water instead
@cyruis20k18
@cyruis20k18 3 месяца назад
help!!
@Martin-ms4bu
@Martin-ms4bu 3 месяца назад
What value did the sensor return? And how deep was the water you tested it in?
@cyruis20k18
@cyruis20k18 3 месяца назад
@@Martin-ms4bu 19cm
@Martin-ms4bu
@Martin-ms4bu 3 месяца назад
19 cm deep? and what value did the sensor show?
@cyruis20k18
@cyruis20k18 3 месяца назад
@@Martin-ms4bu 1ft deep and the sensor return 19cm always
@sharky9056
@sharky9056 2 года назад
Arduino code please?
@ДмитрийМохов-р5з
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.
@sernigioto
@sernigioto 2 года назад
im waiting hehehe
Далее
WHICH SODA CAN FLY THE HIGHEST?
00:48
Просмотров 7 млн
Grand Final | IEM RIO 2024 | BO5 | КРNВОЙ ЭФИР
6:35:24
Bizzare Shifter
18:04
Просмотров 333 тыс.
Sonar Depth Mapping With Autonomous GPS Boat
23:29
Просмотров 36 тыс.
DIY sonar scanner (practical experiments)
14:30
Просмотров 1 млн
My Autonomous Sonar Boat
7:46
Просмотров 14 тыс.