I want to operate a relay with the data pin of serial port but when the relay is attached to the pin the voltage drops from 11 volts to 2 volts.The relay does not work.How can I manage the voltage drop?
The output of the serial port is a logic level voltage, and is not intended to drive a load like a relay. You would need to construct a circuit that will sense the level shift and drive the relay. An LM311 voltage comparator might be able to do this. It's output will sink 50 ma.