IOT Sensors - water pressure

Hello everyone,

I am looking for a solution to log water pressure variations with OpenWRT.
I am looking for compatible sensors.

I dont want to go the arduino or pi route as will need other devices. If anyone know of a solution please let me know,


I don't know about logging with OpenWRT, but generally many sensors (pressure included) output 4-20mA which few (none?) OpenWRT devices have.

I deployed a system using a comet 2520 to measure water depth, and was very satisfied. If it can help you to know what sensor I used, let me know, because I can recover that for you.

If you want the data on OpenWRT, the Comet has an API, that I guess you could access through OpenWRT for whatever reason.

I use orange pi zero with lot of io pins. There is also available SDK, so you can compile your C language source code.

Before getting to sensors, this sounds like a case of "If you've got a hammer, everything looks like a nail."

Routers generally don't provide decent access to I2C (if at all) or serial. So you're going to need either some major hardware mods or a USB dongle of some sort. Then you might need level shifters, depending on the sensor. For the price of a USB dongle alone you can buy a USB-equipped microcontroller board.

As specific examples, all of which can be "bare-metal" programmed, use Arduino framework (with either Arduino tools, or platformio), or, for the AMR parts, often support a decent RTOS:

If you have an existing code investment in AVR/Arduino

  • $4 "auction" sites -- Atmel ATmega32U4, 32 k flash, 2 k RAM, 16 MHz for 5 V parts, 8 MHz for 3.3 V parts
    "Leonardo Pro Micro ATmega32U4 8MHz 3.3V Replace ATmega328 Arduino Pro Mini DIY" as one example

I have these running four sensors each, with a JSON interface over USB.

The next step up would be something like the "blue pill" boards -- all the remaining boards are at least 32-bit (AVR is 8-bit)

  • $2 "auction" sites -- ARM Cortex-M3, 64 k flash, 20 k RAM, 72 MHz
    "STM32F103C8T6 ARM STM32 Minimum System Development Board Module For Arduino D"

Given the comparative cost of more powerful and greater resources of ARM Cortex-M0+ and Cortex-M4 devices, I'd recommend looking there. These are all available at these prices through Mouser, a major professional component supplier (they accept small orders as well). These are all tiny boards, on the order of 3/4" x 1 1/2" or less

  • $11 -- Maxim MAX32526PICO -- ARM Cortex-M4, 512 k flash, 160 k RAM, 96 MHz
  • $12 -- Adafruit ItsyBitsy M0 -- ARM Cortex-M0+ ATSAMD21G18, 256 k flash, 160 k RAM, 48 MHz, 2 MB on-board SPI flash, runs CircuitPython with drag-and-drop firmware install
  • $15 -- Adafruit ItsyBitsy M4 -- ARM Cortex-M4 ATSAMD51, 512 k flash, 192 k RAM, 120 MHz, 2 MB on-board SPI flash, runs CircuitPython with drag-and-drop firmware install

If you want integrated wireless, two popular options include:

  • $11 Mouser -- ESP32-DEVKITC-VB -- Dual-core, plenty of memory and flash, runs Espressif RTOS (a lot like FreeRTOS), FCC certified module
  • $10 various -- Raspberry Pi Zero W

Now, sensors. Not much I can say from your description other than

Some of the things needed to make any better recommendation include:

  • Working pressure
  • Absolute accuracy
  • Repeatability
  • Resolution / noise
  • Speed of response
  • How often are measurements made
  • Is power consumption a concern
  • Fitting for pressurized water
  • Temperature of water
  • Operating temperature and conditions for sensor
  • Distance from sensor to reading device (for example, I2C isn't good for much more than a meter)
  • Drinking-water contact
  • Has water been purified, distilled, deionized, or just "tap" water

Thanks guyz for the bits,
ill google some more…

Do not forget devices such as the ESP8266 or the ESP32: can be programmed like an Arduino, have lots of I/O ports, wifi is included, and they are dirty cheap... You could have one of these for each sensor, and send data directly to the IoT server by wifi.