Maker Pro
Maker Pro

Safely using an RS232 port

VirtualMonitoring

Feb 5, 2010
12
Joined
Feb 5, 2010
Messages
12
I am looking at the possibility of connecting alarm panel wiring to DB9 serial ports and want to find out which pins are safe to experiment with.

Basically, all we have to work with is either a single output that switches from 0v to 12vDC - or the other way around. Alternatively, we have dry contacts that are either normally open or normally closed.

Is there a pin, or pair of pins that we could connect to on a 9 pin DB9 in order to get the serial port to "do something" ?

By "do something", I mean send a mesage to whatever software is connected to it. It doesn't matter what the message is, just anything that lets us know that the state of one or more of the pins has changed.
 

NickS

Apr 6, 2010
367
Joined
Apr 6, 2010
Messages
367
Maxim makes a chip called MAX232 that converts what you have to RS232. I have also had luck using a 0-3.3V signal but it was a fluke and I would count on that failing more often than working. You need to be swinging ±5 V, ±10 V, ±12 V, or ±15 V are all commonly seen.

As for the wiring half way down this page you can find the mapping.

Good luck.
 

Attachments

  • RS232.png
    RS232.png
    29.8 KB · Views: 352

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
The good thing about RS232 is that the standard specifically allows you to short any pin to any other pin. A compliant device should not suffer damage from this.

That means that as long as you're monitoring stuff, you shouldn't break anything :)

Having said that, you would probably require a level shifter to ensure your signal is 0 to 12V not -x to +y volts (where x is normally equal to y but from 3 to 25 volts).

Basically you ensure that pin 7 (on DB25) is connected to your 0V rail, and connect the signal pin to the base of an NPN transistor (via a suitable resistor -- say, 10K). The emitter is grounded, and the collector connected to +12V via a 4K7 resistor. The signal is taken from the collector. It will vary between 0 and 12V (approx). You won't be able to draw much current from it, but I don't think you'll need to.
 

NickS

Apr 6, 2010
367
Joined
Apr 6, 2010
Messages
367
...Having said that, you would probably require a level shifter to ensure your signal is 0 to 12V not -x to +y volts (where x is normally equal to y but from 3 to 25 volts).

You don't think he should be level shifting to +/-V?
 
Top