Hi, IIRC the pins DTR and RTS are output pins on the PC's serial port. They are controlled by the properties SerialPort.DtrEnable and SerialPort.RtsEnable. RS232C pins carry a DC voltage, anywhere in the range (-15V,+15V). They are capable of sourcing/sinking some 10 mA and not suited for larger currents, larger voltages, or direct connection to devices that are powered by the AC mains. If your door lock is powered by 220V AC mains directly, you will need galvanic isolation (you can't connect mains to your PC!); it also will need more than 10mA so you need some switching device, either a transistor/thyristor/triac or a relay, and probably both. It somewhat depends on the specs of the lock (see documentation!), and the distance between PC and lock. [ADDED] Instead of a transistor you could use an opto-coupler, which together with a relay would be able to control almost anything; the transmitter side of the opto-coupler would very much ressemble an LED, making your initial LED experiment much more relevant.[/ADDED] :)
Luc Pattyn [Forum Guidelines] [My Articles]
Happy 2008!
modified on Friday, January 04, 2008 7:40:49 AM