Re: What is the best way to get a 5V Supply from PC's serial
These note take from Oreilly book: Design Embedded Hardware
_______________________________________________________
Many RS-232C signals go unused and can supply a moderate amount of current
(nominally 50 mA, but it can vary and, as always, you should check the specific device to which you are interfacing). If your embedded system requires less than this for its total current draw, you can use an RS-232C control signal for power.
For instance, the RTS (Request To Send) or DTR (Data Terminal Request) signals may not be used in many RS-232C applications. Either can be used as the power input to a voltage regulator and thereby provide the system with power. The host computer therefore uses RTS of its serial port as the power control for the embedded system. Under software, the host sends RTS high, and the embedded system is powered up. Send RTS low, and the embedded system is switched off. The catch to all this is to ensure that your embedded system's current draw is low enough so that it can be powered by RTS. The advantage of this technique is that you require no external power supply for your embedded system. It works, as if by magic, whenever plugged into a serial port. The other catch is that you can't then use that RS-232C control signal for its original purpose. It must turn on and stay on to provide your computer with power.
Explaination for the schematic below:
Note the diode, D1. Since RTS will be a
negative voltage (as low as -15V) when low, some protection is required for the voltage regulator, since it is not designed to have its input taken below zero volts. The diode can be any garden-variety power diode, such as a 1N4004, and will conduct only when RTS is positive. The voltage regulator (MAX604) converts the voltage from RTS to a supply of 3.3V for the embedded system. If we required a supply of 5V, we'd simply use a MAX603 instead. The circuit would otherwise be the same. The output of the regulator is smoothed by the capacitor C5, and a power-on LED is provided to show us when we have power. The MAX3232 sits between the RS-232C port and the processor, levelshifting the serial transmissions from the processor's logic levels to RS-232C and vice versa.
Hope theses note will help.