home automation is driven by a PC running Ubuntu. It currently has a 1-wire network of thermometers for managing our geysers and solar water heaters. I would like to extend it to manage our water pumps. The first problem I would like to solve is to measure the volume of water in the overhead tank. I couldn't see any 1-wire compatible distance sensor. I am ok with using a different setup to measure the water level, but would prefer if the sensors (say HC-SR04 or others) could be connected to my USB through some adapters/read made hardware.

  • Instead of setting up an Arduino or raspberry pi, etc. Any USB to general IO board adapter, that can be used to drive the sensors?

  • Any other recommended approach?

  • 1
    \$\begingroup\$ I could be wrong, but maybe look into the FT232RL drivers from FTDI... you might be able to control DTR / RTS signals in one of their off-the-shelf cables, but you might not be able to pull quickly enough to accurately measure distance from pulse echos.... \$\endgroup\$
    – vicatcu
    Apr 4, 2019 at 3:20
  • 1
    \$\begingroup\$ @vicatcu No, a USB I/O chip will not work for this, as the latency is too great. What is required is an external MCU to take the tightly timed measurement - essentially the very "Arduino" (or its functional equivalent) that the asker wants to avoid, is the precise thing that this task requires. \$\endgroup\$ Apr 4, 2019 at 5:35
  • \$\begingroup\$ For a one time design use cheapest Arduino clone that has usb connection + HC-SR04+ ping example. You can change the output format as you wish. Anything else is way more complicated and/or expensive \$\endgroup\$
    – Dorian
    Apr 4, 2019 at 7:50

1 Answer 1


I would point that Arduino + HC-SR04 + blink example is the cheapest, quickest and easiest available solution. I guess that the tank is not in the proximity of the PC and you also have to deal with the USB 5 meters max cable length which it's not the case for a serial connection + usb to serial adapter.

See here some USB distance sensors. They use serial over USB. As Chris commented, there is no simple USB interface to read pulses length.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.