-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
base: master
Are you sure you want to change the base?
Conversation
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 . |
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. |
@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 |
@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 |
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