1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Getting 5v from 9 pins serial port RS232 to power a circuit.

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by lloydi12345, Jan 16, 2011.

  1. lloydi12345

    lloydi12345 Member

    Joined:
    Aug 14, 2010
    Messages:
    268
    Likes:
    3
    Location:
    Philippines
    Hi, Is it possible to get power of 5v from the 9 pins serial port? I would like to power my circuit which is max232 and RF Transceiver module. I'm planning to make them function without using any external power supply but just to use an excess pin from DB9 and get 5v from there. I'm already using RXD, TXD and GND pins of the 9pins serial port. Is there still available 5v pin generator? Thanks a lot.
     
  2. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,044
    Likes:
    541
    Location:
    AZ 86334
    Nothing that will supply any appreciable current. Besides, some whimpy serial ports only source ~3.3V
     
  3. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,178
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi Lloyd.
    You could remove any internal wiring to pin#9 of the 9way PC's RS232 connector [ the Ring Indicator] and connect it to the PC's internal 5Vline.

    I would recommend a 500mA fuse or attach a 78L05 to the PC's internal +12V,,, these should give some protection for the PC's psu.

    http://www.aggsoft.com/rs232-pinout-cable/pinout-and-signal.htm
     
    Last edited: Jan 17, 2011
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. lloydi12345

    lloydi12345 Member

    Joined:
    Aug 14, 2010
    Messages:
    268
    Likes:
    3
    Location:
    Philippines

    Ericgibbs, what do you mean PC's internal 5vLine

    I think I can't use the 12v since I'll be using it to generate signals from VB6 going to my RF modules.
     
  6. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,178
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi,
    I mean you have two options in the way you can have +5V on pin #9.

    1. a direct connection to the PC's +5V, via a fuse.

    2. inserting a 7805 a 12v to 5v regulator, so that would have 12V in from the PC and 5v out to pin 9.
     
  7. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,777
    Likes:
    281
    Location:
    Cleveland, Ohio USA
    If you have a spare connector in the PC such as a 4 pin molex that would go to a hard or optical drive it has 4 pins (actually sockets). Standard color code is Yellow = 12 volts, Red = 5 Volts and the Blacks are ground. There are other places to get it but that is convenient.

    Ron
     
  8. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    This actually works quite well I have made devices powered from the PC serial port, on older PCs anyway (not laptops). If you only need a few mA average there is plenty of power available there to make a self contained device.

    Google for "MS Mouse Schematic" or "old-style PC mouse schematic" all the old mice used a little chip powered from the serial port usually through a couple of diodes from the RTS DTR and serial out pins. The RTS and DTR can be user controlled too if you write code, and you can also derive considerable power from the serial out wire when it is not transmitting and charge a decent size cap.

    A few mA average can power a lot of stuff thee days. :)
     
  9. Blueteeth

    Blueteeth Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    1,168
    Likes:
    34
    Location:
    Hertfordshire, UK
    You could always just use a USB-serial converter, and tap the +5V from that. I've hacked a number of them, and they cause no end of troubles if you remove the level shifter in them - seems they require a buffer that can be disabled so it doesn't get data when the USB device is shutdown. So now I keep them as RS232 (meaning I need a max232, or equivilent at circuit side) but just add a terminal block to the connector hood for 5v. :) Not pretty, but for 1.99USD from ebay, it does the job.
     
  10. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    And that plugs into the serial port on the PC and makes 5v from it?
     
  11. Blueteeth

    Blueteeth Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    1,168
    Likes:
    34
    Location:
    Hertfordshire, UK
    No, obviously not. But where there's a serial port, there's generally a host system nearby - and therefore, likely a USB port. It is no different from the suggestions to tap a PC's internal power supply, but with only a modification made to a cheap USB-serial port dongle. If the OP is connecting his 'max232 and transceiver' to another embedded device, I doubt he would ask about using it for power.

    I hate USB-serial adapters, they cause no end of trouble with host software, and latency issues, but they are necessary since the venerable serial port is being dropped from portable computers, and some desktops.

    Whilst many RF transciever's can operate at very low power using burst comms and low duty cycles, your average MAX232 equivilent uses up a fair few mA. I doubt both can be powered from a standard serial port, and I doubt even more than the serial port it is connected to is 'standard'. So, for the OP's application, I'm going to say 'no' - not without modifying the PC's serial port and/or cable.
     
  12. lloydi12345

    lloydi12345 Member

    Joined:
    Aug 14, 2010
    Messages:
    268
    Likes:
    3
    Location:
    Philippines
    Thank you for the advice Mr RB, I'll try then experimenting how it works and if there will be no problem in transmission I'll go for it.


    I think it's fine if it'll be just a few mA since the RF transceiver only operates at 30-40mA. Thank you for your reply too Blueteeth.
     
  13. Blueteeth

    Blueteeth Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    1,168
    Likes:
    34
    Location:
    Hertfordshire, UK
    By 'a few mA' I meant, literally a few.... we're talking <8mA for 5V operation at best. Plus it should be regulated in some way, so a micropower LDO regulator could be used.

    A 'standard' RS232 from a PC, as far as I'm aware, has 3 outputs. That means three pins on your connector are either driven high, or low at >+/-9v levels by the PC. The output imedance of these pins is quite high, so their voltage will drop as you drop current from them. But the PC would have to make all these outputs high, then you could tie them together and stick them into your regulator. The best way to test it would be simply to use resistors, connected from say TXD to GND, and measure the voltage across them to see the voltage and current the port can provide.

    If you manage to get 30-40mA at a workable voltage (say 4.5V minimum for your system?) you're a better man that I.
     

Share This Page