Acoustic sensor setup with Pixhawk

Hi I’m working with an acoustic sensor that has 3.3v, RX, TX, and GND pins. I got it working with my Arduino MKR zero but when I tried connecting it to Pixhawk over Serial4/5 port and through the Aux out pins I didn’t get any data. I used this page as my main reference.

not sure if you have had a look here but if its an unsupported sensor then you might want to try using these setup instructions to get the data fed back to mission planner

Ill take a look thanks!

What sensor is it specifically.

This one.

Thats a sr04 v2 ultrasonic compatible sensor. What mode is it? What code did you use to test it on arduino?

You can get them with 3 modes, mode 0 is sr04 trig echo, mode 1 is automatic serial and mode 2 is triggered serial.

Mode 0 is supported as a sr04 ultrasonic GPIO rangefinder nativity by ardupilot

Mode 1 and 2 will need a converter.

I had a look again, it looks like its mode 1 automatic serial mode that DFRobot are selling.

I used this library for my arduino. When you say Id need a converter what do you mean?

Ardupilot doesn’t support the sensor natively so you will need an arduino compatible board like a pro mini 168 or 328 16mhz to act as a converter to convert it from the serial data format that it outputs to something it understands in the case of the converter I linked it emulates a Maxbotix i2c sonar.

I have an arduino Im using to get the distance readings. I dont know how to get the data from my arduino to ArduPilot.

Use the arduino sketch i posted and it will use the arduino to convert the sonars serial data to i2c maxbotix compatible data. Set ardupilot range finder to maxbotix i2c sonar.

I am using an MKR zero and the code above is for a different architecture and doesn’t work with my Arduino. I’m thinking I just get a supported sonar sensor to make this easier.