Home        Store        Learn        Blog

Any experience with analog inputs for load cell

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.

1 Like

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.

Thanks William, but I’d prefer to keep this on topic. Methods of adding the capability are well established.

Hey Andrew,

Can you share more about the load cell output? Is it a raw connection to the strain gauge or do you have a load cell with a conditioned output?


1 Like

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: https://github.com/ArduPilot/ardupilot/pull/8296

This applies to pixhawk 1 i’m not sure about pixhawk 4.

We’ve decided to use a separate driver board and communicate the load cell data to the PX4 over CAN.