File name How to get power from RS-232 port.pdf
How to get power from RS-232 port
Get power out of PC RS-232 port
Copyright Tomi Engdahl 1997-2000 This text tries to clear out the mystery of how to get power out of PC serial power. There are quite many small circuit which take all their operating power from serial port, where there are no real power output pin. Examples for this type of circuits are PC mouse and software protection dongle. You might wonder how this is possible. There is one way to get some power out of serial port: steal it from signal lines. When you are developing you own circuit which connects only the PC, then the only line which can be used are the output signal lines from PC serial port: DTS, RTS and TD. In normal operation situation DTR and RTS are raised so they give positive voltage output (about +12V when not loaded). TD pin is in logic 1 when no data is sent which means that it is most time at negative voltage (-12V when not loaded) most of the time. The voltage at these outputs drop quite fast when load current is increase, because they are designed to drive normally only RS-232 input circuits (3-7 kohm resistance). The voltage drops about 1-2 volts every every 1 mA of load current increase. Usually the short circuit current flow is 7-10 mA (this depends on the circuit types used in PC serial port).
PC serial mouse
PC serial mouse uses typically DRT and RTS lines for generating +5V power for microcontroller circuit in the mouse. Because typical optomechanical mouse also needs power for 4 leds in the optocoupler movement detectors, there is not much power to waste. Typical PC mouse might can have the following power requirements: "+15V 4mA -15V 4mA" (taken from Microsoft mouse bottom). A typical approach make the power for microcontroller is to use diodes to take current from DTR and RTS lines and then feed it through resistor to all of the (infrared) leds in the movement detectors. All four (infrared) LEDs are connected in series, which gives about +5V voltage drop over all leds (typical to IR LEDs used in mouse). This +5V is adequate power for low power mouse microcontroller. The serial data transmitting circuit consists of simple discrete transistor circuit to make it consume as little power as possible. The positive power supply usually taken from RTS and DRT lines (just after the diodes and before the resistor going to LEDs). The negative supply for transmitter is taken from TD pin. Typical PC serial port mouse takes 10 mA total current and operates at voltage range of 6-15V. For more information about PC mouse operation check my PC mouse protocol document. Some schematics of working PC mouse impelementation can be found from PC Mouse Implementation Using COP800 (AN-681) from National Semiconductor and Implementing a Simple Serial Mouse Controller using PIC16C5x (AN519) from Microchip.
The following circuit is an example how to get power from RS-232 serial port. It gives regulated +5V power for logic circuits and also unregulated positive