Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/rangefinder: Cheap generic chinese sonar #28508

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

khancyr
Copy link
Contributor

@khancyr khancyr commented Oct 31, 2024

This is the first part of the code for https://discuss.ardupilot.org/t/cheap-waterproof-ultrasonic-sensor-modules/125049

Need to add lua and autotest and try on real device

@geofrancis
Copy link

geofrancis commented Oct 31, 2024

you will need to add a polling, most of these sonars can work in 2 modes, they either ping continuously every 100ms or they have to be polled by sending 0x55, it can usually be set with a jumper on the board, but that isn't accessible if it's been encapsulated. so for it to be fully compatible with all of them you need to send 0x55, you can send this to all of them, it will be ignored by the sonars running continuously .

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Oct 31, 2024
@rmackay9
Copy link
Contributor

Thanks for this. Instead of "generic" I wonder if we could name it after one of the more common chips or sonar models? So "A02YYUW" or "ME007YS". The only reason is that "generic" could be misinterpreted by users as supporting nearly all sonars and could lead to support issues. If we're more specific with the name we could avoid that.

@geofrancis
Copy link

geofrancis commented Oct 31, 2024

Thanks for this. Instead of "generic" I wonder if we could name it after one of the more common chips or sonar models? So "A02YYUW" or "ME007YS". The only reason is that "generic" could be misinterpreted by users as supporting nearly all sonars and could lead to support issues. If we're more specific with the name we could avoid that.

JSN-SR04T, AJ-SR04M and A02YYUW are the most common air versions, but this would also cover the GL041MT underwater sonar. The only thing thats different is the baud and poll / no poll and scaling if you want to use an air sensor in water.

@khancyr
Copy link
Contributor Author

khancyr commented Nov 1, 2024

@geofrancis do you have a docs about a sensor using the polling ?

The two sensors I got use low RX pin to get realtime measurements and high RX to get processed measurements. No idea what is processed but from the doc the rate is random between 100-300ms which can be an issue. So sending 0x55 can be an issue on such device

@khancyr
Copy link
Contributor Author

khancyr commented Nov 1, 2024

@rmackay9 Indeed, it could be a bit confusing, I will try to dig a bit more to find a another name or ask our Chinese partner if they got an idea what this protocol is called

@geofrancis
Copy link

geofrancis commented Nov 1, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants