views:

73

answers:

1

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.

+3  A: 

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.

Roddy
Thanks for these. Option A seems to be the cheapest and easiest way to go as even driver compiling wouldn't be needed.
JtR
This is dangerous ! The RS232 level ar either positive or negative, and can be much higher than 12 V !
shodanex
@shodanex, I was assuming (maybe incorrectly) some basic electronics knowledge. You're right, some diode/resistor electronics would almost certainly be required to make the signals fully compatible.
Roddy
@shodanex, good remark, I was planning to use some kind of rs232-to-ttl converter with this.
JtR