What would be the simplest way to interface custom hardware with one input to have switch somewhere in /proc?

StackOverflow https://stackoverflow.com/questions/1026435

Question

I have a device that takes low current 3-12v input signal to do it's magic and I would like to interface it to my linux box. What kind of options do I have on this? It would be great to have some low-cost possibly user-space solution.

Was it helpful?

Solution

If I understand right, you need to control your box by changing 3-12v input signals to it. Here's the choices I can think of from the top of my head:-

a: Using RS232 serial handshake lines. RTS/CTS can usually controlled programatically as "on/off" signals without driver development using IOCTL calls.

b: Use a "GPI dongle" such as the Advantech ADAM range. These typically take serial or TCP/IP inputs and convert them to suitable output signals.

c: You may be able to do something with a parallel printer port if your PC stil has such a thing.

As shodanex says, be aware that RS232 levels are NOT directly compatible with TTL/CMOS inputs so you may need some minor level shifting/clamping electronics to fix this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top