Sonar JSN-SR04T

With the release of the new version of Arduover 4.1, it became possible to use HC-SR04. The principle of operation of the JS-SR04 is the same as that of the HC-SR04. I connected JS-SR04T, it works fine. The parameters are almost the same as the HC-SR04.

I compared the readings with the Mission Planner and the Laser rangefinder.

In the photo, they are directed at the ceiling in the room. This sensor can be used as a sonar, I will post the tests later.

I created ardupilot_wiki/JSN-SR04T.rst at master · AlksSAV/ardupilot_wiki · GitHub


2 Likes


just got mine working thank you

Great! I’ll try to compare its readings with Kogger Sonar.In Russia, the JS-SR04T is widely used as an echo sounder in homemade autopilots (based on STM32) for bait boats.

JS-SR04T are water proof but i dont think they work under water,

i have another sonar transducer from a fish finder im trying to make work with it.

the plan is to try and convert it so that it can be used for water depth like shown here. i went out today to test it but had no luck due to high winds and low tide.

the other problem is scaling since sound travels faster in water. i dont think the sr04 code in ardupilot supports scaling so i was going to convert it to analogue before connecting it to the pixhawk using the board off this Ultrasonic Sonar module dedicated for APM 2.5 2.6 2.8 flight controller, plug and play, no need to change hardware and software|Parts & Accessories| - AliExpress

JSR 04 T works great as an echo sounder, type in the youtube search “прикормочный кораблик глубиномер” you will see dozens of videos with examples in Russian the only one. These videos are self-made autopilots, with depth mapping on FlySky equipment only.
The speed of sound is different, but there you can change the coefficient to adjust for water.

1 Like

thats probably why i couldn’t find the videos.there are very few videos on it in English. i will do some testing with it soon to see how well it works.

i see in some videos they are adding a 47k resistor to the jsn-sro4t board, what is that for?

have your tried it with the pixhawk to see if you can scale the range finder distance to work in water? as far as i know the scaling function is only for calibrating analogue rangefinders.

i have done some testing and as i thought there is no easy way to change the scaling on a sr04 within ardupilot.I changed the sonar voltage scaling but it doesnt do anything it only effects analogue sonars thats why i was going to convert it to analogue. there was a backpack for the sr04 using a arduno that let the sr04 emulate a maxbotix i2c sonar but i cant find the code for it.

a cleaner solution would be an option in the sr04 driver to select between air and water.

based on the data to the library, the values being taken are divided by 58. Apparently this is a coefficient for air. Since the speed in the air is about 320m/s and in the water 1450m / s, it is enough to change this coefficient(58). But I don’t own Github enough to do that

I put in an issue on github, hopefully one of the devs see it.

1 Like

Can the JS-SR04T be used with a matek f405 fc?

I don’t have this device, but if it supports HC-SR04, then JSN-SR04T will work.

I have ordered one of these analogue adapters so i will update when its here.

I found the code to convert one of these to analogue to be able to adjust it in ardurover as an analogue ratio. I also got my sr04 backpack, but im having issues with my JS-SR04 so I need to wait until I get another one before I can test it.

this might be a better option for boats, the control board is sealed

I am going to get one of these to test underwater, the dual transducer version can work at much shorter distances, im going to order one to see if it works better as a depth sounder in shallower water.

support added to native driver

1 Like

Good news. Need to test

I tested the new equipment - JSN-SR20-Y1. As tests have shown, it does not cope with its task badly.
Below is a video(in Russian) with a test.
Test JSN-SR20-Y1

1 Like

I found some other sensors that could be useful, the first one converts a sr04 to i2c, freeing up gpio pins and possibly allowing scaling in ardupilot. the second is an analogue version of the sr04 called the US-016, it would need the transducers swapped for water proof versions but it should work as it runs at the same 40khz and because its analogue it would support scaling in ardupilot.