0
\$\begingroup\$

I have a Swiss flowmeter sf800 which generates 5v pulses if liquid passes through it. I want to connect it to a computer and count pulses via USB. I realize that I need some kind of converter to do so. I thought TTL to USB converter would just work, so I've got this one https://www.adafruit.com/product/3309 and tried to connect the signal wire to RXD pin. I cannot read any messages from the USB device. What am I doing wrong? Is any other way to do this?

\$\endgroup\$
5
  • 2
    \$\begingroup\$ pulses do not constitute a UART communication, so a UART-to-USB bridge is not what you need. That is wrong! \$\endgroup\$ Commented Feb 23, 2020 at 13:44
  • \$\begingroup\$ The easiest solution, now that you already have such a bridge, would probably be getting an easy-to-program microcontroller that you program to output a count via UART. Or, you drop the bridge alltogether and proigram a microcontroller that itself has USB. \$\endgroup\$ Commented Feb 23, 2020 at 13:47
  • \$\begingroup\$ I'm as a software engineer is very comfortable with programming, but I don't really understand the hardware. Is any project you know I could refer to and follow to to achieve what I need? \$\endgroup\$ Commented Feb 23, 2020 at 13:56
  • \$\begingroup\$ Neil's answer mentions one. \$\endgroup\$ Commented Feb 23, 2020 at 13:59
  • \$\begingroup\$ phidgets.com/?tier=3&catid=2&pcid=1&prodid=1043 \$\endgroup\$
    – DKNguyen
    Commented Feb 24, 2020 at 0:26

2 Answers 2

1
\$\begingroup\$

What you've bought is a USB to serial converter. The RX pin 'expects' to see serial data from a UART coming in.

You may be able to fool it into thinking the leading edge of your pulse from your flowmeter is a 'start' bit, so trying to get it to register that it's received a byte (obviously a garbage byte) for each pulse. You will need to run at a low enough baud rate so the pulse has dropped before the end of the byte, so that it can see a valid stop bit, either that or shorten the pulse with a monostable to achieve the same end. How long are the pulses?

You may be better off buying an MCU like an Arduino. They will talk serial to the PC over their USB, and are programmable to do just about anything you are likely to want with the pins. It may seem like a sledgehammer to crack a nut, but what a useful sledgehammer once you've learned how to use it, much more useful and no more expensive than a USB to parallel converter.

\$\endgroup\$
0
\$\begingroup\$

The Swiss flowmeter sf800 is a sensor that outputs 100Hz-2kHz pulses depending on flow rate. If you need to read the frequency of pulses (or count them per a period of time) over USB interface you will need a microcontroller with USB function, and write a program that count the pulses over some GPIO. You will also need to establish your data format and select USB protocol to transmit the data. Unfortunately a quick Google search didn't reveal any appropriate cheap DYI devices that are ready to go for this application. However, there are inexpensive data logger devices (such as DataQ Model DI-1110) that can do the job of interfacing SF800 flowmeter to PC.

\$\endgroup\$

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