0
\$\begingroup\$

Is there any way to connect a sensor that outputs pulses in a PC system? For instance, it can be connected via raspi via the GPIOs. Is there another and most robust way to get the input to a PC?

\$\endgroup\$
6
  • \$\begingroup\$ What do you need to do with these pulses? Are you measuring timing? How wide are the pulses? Voltage levels? \$\endgroup\$
    – Ron Beyer
    Jan 23, 2020 at 15:02
  • 1
    \$\begingroup\$ Avoid asking "Can I..." because for sure this is possible for someone who can deal with PC hardware and software. We don't know your skill levels so maybe for you it isn't possible without studying PC IO programming. PCs aren't that suitable anymore for connecting a sensor directly. Even on your PC's motherboard there will be a chip between the (temperature, voltage) sensors and the CPU. There exist IO cards for PCs which come with a driver and perhaps examples to use the data in a program (for example Matlab). \$\endgroup\$ Jan 23, 2020 at 15:08
  • \$\begingroup\$ @Bimpelrekkie You're probably thinking of Labview? I haven't seen dedicated I/O cards for Matlab... \$\endgroup\$
    – Ron Beyer
    Jan 23, 2020 at 15:18
  • \$\begingroup\$ We need to know more about these pulses. Width, frequency, voltage. There are a number of options. \$\endgroup\$ Jan 23, 2020 at 15:18
  • 1
    \$\begingroup\$ You could do a lot worse than "read pulses on the Pi and send over a network to the PC" \$\endgroup\$
    – pjc50
    Jan 23, 2020 at 15:54

2 Answers 2

0
\$\begingroup\$

Why not connect an Arduino to the input signal. Receive it and transmit the information to the PC via serial Port?

Present your actual requirement of the pulse width, timing requirment, and frequency. Suitable solution can be found. I will update my answer accordingly.

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

You can use printer (LPT) port. It contains some input lines: ACK (pin 10), BSY (pin 11), PE (pin 12), SEL (pin 13), ERR (pin 15). These inputs are LS-TTL, and groun is on pins 18...25.

Or, alternatively, you can use some input lines of serial port (COM): CD (pin 1), DSR (pin 6), CTS (pin 8), RI (pin 9). These inputs are more safe and tolerant, the electrical "0" level is typically -12V...0V, and "1" level is 3.5V...12V. Ground on pin 5.

In both cases you can read the input lines state by software.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Of course, this is only true on systems that still have them - and their ability to handle narrow pulses under a modern operating system is not great. \$\endgroup\$
    – pjc50
    Jan 23, 2020 at 15:53
  • \$\begingroup\$ Of course, but it is still possible ;) Not too easy - I agree - but possible. \$\endgroup\$ Jan 23, 2020 at 15:55

Your Answer

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

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