My semi-autonomous tow vehicle is being fitted with a load cell to help us measure drag. Does anyone have any experience using an analog input for this type of sensor on a Pixhawk, and if so did you make any modifications to the firmware?
I know I saw some people have mapped analog sensors as hydrophones and then post processed accordingly.
Does anyone know the resolution of the A/Ds on the Pixhawk 4? It’s not in the documentation.
IIRC to get readable voltages out of this kind of sensors, you usually need a wheatstone bridge.
I have used the HX711 before (on a different project, no ardupilot involved) but that outputs SPI instead of an analog voltage.
You should be able to set up a circuit that outputs from 0 V to 3.3 V, or 0 V to 6.6 V.
I just got the specs on the load cell, and we’ll need to use an external A/D and then talk SPI to the Pixhawk. I wish there was a way to know the bits of the onboard A/D. Maybe if I took the cover off and inspected the PCB.
The A/D used on the pixhawk is the one internal to the stm32. It’s 12 bit. There’s no support for reporting the a/d measurement directly for arbitrary analog sensors. I did try to pull in support for this functionality in the past. You can find that work here: Sub: send AP_ADC by jaxxzer · Pull Request #8296 · ArduPilot/ardupilot · GitHub