MaxSonar EZ Range Finder

I have integrated a Sonar Range finder on my plane for precision landings. All the parameters are set per the book and I do see voltage read in the Flight Data Status tab.

  • RNGFND1_PIN = “14” for Pixhawk’s ADC 3.3v pin #2
  • RNGFND1_MAX_CM = “700” (i.e. 7m max range) if using EZ0 or EZ4, “1000” if using EZL0
  • RNGFND1_SCALING = “2.04” (i.e. 7m / 5v) if using EZ0 or EZ4, “4.08” (i.e. 10m / 5v) if using EZL0
  • RNGFND1_TYPE = “1” (Analog)

However, when I raise the plane high low, I don’t see any change in the voltage read. This cannot be a normal behavior because the sonar is a analog device and there should be some drastic change one would expect from the voltage readout.

Does anyone has experience this?

Hardware = Pixhawk Cube, ADC pinout
FW = 4.2.3
Sensor = MaxSonar EZ-0, PW output

Have you tested the output of the sonar with a multimeter to verify the sensor works and the voltage changes?

If it goes above 3.3v you will need to move it to the 6.6v pin.

I measured with a multimeter and it does changes the voltage output, but after moving the object 1ft it becomes unstable and jumps all over the place.

I also change RNGFND1_Pin from 14 to 15 in the parameter which seems to report some voltage variation but still quite sporadic.

@geofrancis are you suggesting increasing the input voltage from 5V to 6.6V? Not sure how to do that on Pixhawk Cube Black.

No, there are 3x adc pins on the pixhawk, 2x are rated for 3.3v max and one has a 2:1 voltage divider on it so it can handle up to 6.6v letting it work with 5v devices so if the signal voltage from the sensor is exceeding 3.3v then you need to run it on pin 15.

If the voltage is becoming unstable then you might have a faulty sensor.

clearly its a faulty sensor!