# Compatibility of a pressure sensor

**URL:** <https://discuss.bluerobotics.com/t/compatibility-of-a-pressure-sensor/16274>\
**Category:** ArduSub\
**Created:** [March 14, 2024, 3:04pm UTC](https://discuss.bluerobotics.com/t/compatibility-of-a-pressure-sensor/16274 "2024-03-14T15:04:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelorisonk](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/angelorisonk/32/12848_2.png) [@angelorisonk](https://discuss.bluerobotics.com/u/angelorisonk)\
**Post date:** [March 14, 2024, 3:04pm UTC](https://discuss.bluerobotics.com/t/compatibility-of-a-pressure-sensor/16274/1 "2024-03-14T15:04:17Z")

</div>

Can i use a different pressure sensor in this [link](https://robu.in/product/1-2mpa-stainless-steel-pressure-transducer-sensor/) it only have 3 pins do i need to convert to digital or can i use pixhawk adc?

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [March 15, 2024, 12:01am UTC](https://discuss.bluerobotics.com/t/compatibility-of-a-pressure-sensor/16274/2 "2024-03-15T00:01:39Z")

</div>

Hi @angelorisonk -  
That sensor seems to have an analog voltage output. The max voltage is 4.5V, which is higher than the Pixhawk ADC can accommodate! I would recommend a voltage-divider circuit as a workaround, or if you need a sensor with higher range and rated for continuous use, the Blue Robotics[Bar100](https://bluerobotics.com/store/sensors-cameras/sensors/bar100-sensor-r2-rp/)?

---

<div class="post-metadata">

**Author:** ![angelorisonk](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/angelorisonk/32/12848_2.png) [@angelorisonk](https://discuss.bluerobotics.com/u/angelorisonk)\
**Post date:** [March 15, 2024, 3:24am UTC](https://discuss.bluerobotics.com/t/compatibility-of-a-pressure-sensor/16274/3 "2024-03-15T03:24:16Z")

</div>

Bro i would love to buy blue robotics sensor the problem i am from India after custom duties I cannot afford it and thanks for your replay there is any way to integrate this sensor can i use a voltage level translator i saw on in blue robotics store?

---

<div class="post-metadata">

**Author:** ![williangalvani](https://avatars.discourse-cdn.com/v4/letter/w/6f9a4e/32.png) [@williangalvani](https://discuss.bluerobotics.com/u/williangalvani)\
**Post date:** [March 15, 2024, 6:33pm UTC](https://discuss.bluerobotics.com/t/compatibility-of-a-pressure-sensor/16274/4 "2024-03-15T18:33:48Z")

</div>

Hi @angelorisonk ,

Unfortunately it isn’t doable straight-away.

There are currently no analog baros support in ardupilot at all.  
I can think of three alternatives:

- Use this [PR](https://github.com/ArduPilot/ardupilot/pull/25678) and write a lua script to provide pressure using a reading from the analog sensor,
- Implement a new AP\_Baro backend that takes lua script readings, similar to the link above
- Implement a new AP\_Baro backend for analog baros.

You will also need to keep [this](https://github.com/ArduPilot/ardupilot/blob/master/ArduSub/system.cpp#L109) in mind, ArduSub requires a BARO\_TYPE\_WATER driver to be happy.

---

<div class="post-metadata">

**Author:** ![angelorisonk](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/angelorisonk/32/12848_2.png) [@angelorisonk](https://discuss.bluerobotics.com/u/angelorisonk)\
**Post date:** [March 15, 2024, 8:02pm UTC](https://discuss.bluerobotics.com/t/compatibility-of-a-pressure-sensor/16274/5 "2024-03-15T20:02:01Z")

</div>

any alternative way like using a adc?

---

<div class="post-metadata">

**Author:** ![williangalvani](https://avatars.discourse-cdn.com/v4/letter/w/6f9a4e/32.png) [@williangalvani](https://discuss.bluerobotics.com/u/williangalvani)\
**Post date:** [March 15, 2024, 9:38pm UTC](https://discuss.bluerobotics.com/t/compatibility-of-a-pressure-sensor/16274/6 "2024-03-15T21:38:13Z")

</div>

not without writing some code for the pumbling. Tridge`s PR might be the easiest solution, together with supressing the TYPE\_BARO\_WATER check

---

<div class="post-metadata">

**Author:** ![angelorisonk](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/angelorisonk/32/12848_2.png) [@angelorisonk](https://discuss.bluerobotics.com/u/angelorisonk)\
**Post date:** [March 16, 2024, 3:42am UTC](https://discuss.bluerobotics.com/t/compatibility-of-a-pressure-sensor/16274/7 "2024-03-16T03:42:47Z")

</div>

Thank you for your reply. I understand now that there isn’t a straightforward way to integrate the sensor directly due to the current limitations in ArduPilot’s support for analog barometers. Editing the backend program seems like a viable path, but given my current time constraints, I’ve decided to go with a simpler solution for now. I will purchase the recommended sensor and focus on waterproofing it for my needs. Perhaps in the future, I’ll explore the more technical route you’ve outlined. Thanks again for your guidance!
