I see there is parameters for up to 3 rangefinders and I would like to consider using 2 analogue rangefinders / echo sounders for a task. Was this carried over to ArduSub project or are they remains from the ArduCopter code?
What is the parameter RNGFND1_PIN: Rangefinder pin referring to physically? It states Airspeed ports. Which pins would need to have the analogue signals (0-5v) feed into them?, on which connectors?, on the Pixhawk in order to be able to handle multiple simultaneously? Is this even possible?
This is carried over from ArduPilot but we do plan to use it in the future to support echosounders. You can find the currently supported rangefinders on the ArduPilot page here. There are quite a few of them and they all interface differently, some with analog signals and some digital.
Do you have a particular device in mind that you want to attach?
Yeah I want to use some multibeam echo finders which are deep rated with good range I have which have multiple output options. User selectable outputs for analogue 0-5v, 0-10v, 4-20mA, or digital 232, 485. I’m just not sure if they can be interfaced directly to the pixhawk or not.
Could these output options be used to integrate directly to the pixhawk?
I’m considering a cave dive where I want to know distance both below and sideways to the walls. But I can also see application to use a second ranger to stay a set distance from say a large boat hull, or any object, for inspection purposes aswell.
Is it possible to integrate into the pixhawk or through the pi to get multiple ranges read through QGC? or even use them in auto functions?
Okay, I think 0-5v output would be the fastest to support in ArduPilot but I would guess using 232/485 would provide the most information. The echosounder we are working to support has serial port communication and we actually have it connected to the Raspberry Pi instead of the Pixhawk. A Python program on there reads in the information and sends the depth to the Pixhawk.
Does your echosounder just output a depth number over serial? Anything else?
ArduSub has support for “terrain follow” with a rangefinder so that it can maintain a constant height over the bottom. I think it will automatically switch to this if it has a rangefinder connected.
I personally think it would be great to hold a certain distance from something in front of you, so I’d love to support that eventually as well.
There is already support for rangefinders with analog output, you can plug that into the pixhawk directly. You will need to write a driver that runs on either the pi or the autopilot to support the digital options.
If using the analogue output option ( 0-5v) , which plugs on the pixhawk will work if your using 2? Would it be the 2 ADC ports? Or is only a single rangefinder supported currently?
Refer to the RNGFND group of parameters. It is possible to configure two as analog, but it is unclear if two analog sources are available on the pixhawk.
This is not likely to be a well supported use case. I recommend waiting for our own echosounder to come out and better support will be provided there. Beyond that, you will need to look at the code and hack about in your current situation.
Well that answers the physical input question.
But im assuming now your going to say this input signal is not supported in the companion and QGC software?
For example, if I input a 0-5V signal directly into the Pixhawk that i wouldnt be able to use this for an auto alt function for example? Or is the function already supported for actual use with Ardusub as well?
Do you have any further info on this?
The auto-alt function is supported by ArduSub with an external rangefinder. Please study the relationship between the software components here: https://www.ardusub.com/software/components.html