Maxbotix XL-MaxSonar-EZ4 Detection/Wiring Issues

your confusing the pinout of the connector with the pinout of the chip. the list i gave is what you need to select in ardupilot not what pin on the connector it uses.

ADC Pin10 5V Sense is probably ADC1_SPARE_2

That is what I currently have the signal running to.
After looking through here: Voltage on Pixhawk ADC signal pin? - Archive - ArduPilot Discourse
(Yes I know it’s a very old post, but it still may be useful)
I then tried powering my sonar sensor from a 5v BEC that I had lying around. The sensor still displayed about the same results, but when I put my finger close to the sensor the sonarvoltage was slightly higher. When I tested the signal out pin with a multimeter, the results were much better than before, with the sonar sensor putting out consistent results.

If you connect the ADC pin on the pixhawk to 5v does it change?

The sonar sensor sends up to 5v for the signal, so I don’t think I can wire it to the 3.3v port.

ADC spare 2 has a voltage divider on it, so it can read up to 6.6v

I do currently have it connected to ADC_SPARE_2

The instructions on ardupilot say to connect it to the 3.3v ADC?

I was worried about damaging the pixhawk. I can try that next.

the sonar is 3.3v compatible so it wouldn’t need 5v to operate.

I mean that I was worried about the sonar sending 5v signals to the 3.3v input - the pinout says specifically not to do that.

Thank you @geofrancis! Once I connected it to the 3.3v input (pin6 on the ADC in) it started giving values that made sense for certain distances. This would not have been possible without your help. :heart: Thanks man!

I think the output of the sonar has a high impedance so the resistor divider on the other pin was causing issues.