Integrating analogue pressure/depth sensor

Hi, First post on here guys so be gentle.
I’m looking it integrate an analogue 0-5v signal pressure sensor into my BR2 build. Its a sensor ive had around from a previous project and want to know if I can I can use the readings for a depth sensor.

Hi @dmmacvicar, welcome to the forum :slight_smile:

Depth sensors need to be implemented as AP_Baro libraries in the ArduPilot firmware repository. I don’t believe any of the existing ones use an analog reading, but flight controllers often have at least one available analog to digital converter (ADC), so it should be possible to create a driver for your sensor that uses the hardware abstraction layer (HAL) to access an ADC.

Note that if you’re wanting to use it on an underwater vehicle you’ll need to set it as a water barometer.

1 Like