[sci.electronics] Powering circuits from serial port

lharris@gpu.utcs.toronto.edu (Leonard Harris) (07/01/88)

I have a small circuit (3 ttl) that hangs off a rs232 serial port.  Rather
than add a power supply, is it possible to power this directly by stealing
the CTS/DSR signals and converting to 5V with a zener diode?  Also, other
than using the MAX232 level converter, is there an easier (and cheaper) way
of converting ttl to rs232 levels - again without using an external power
source.  (the distance signals are travelling are less than 3 feet)
Thanks
/leonard

jimc@iscuva.ISCS.COM (Jim Cathey) (07/06/88)

In article <1988Jul1.124545.14929@gpu.utcs.toronto.edu> lharris@gpu.utcs.toronto.edu (Leonard Harris) writes:
>
>I have a small circuit (3 ttl) that hangs off a rs232 serial port.  Rather
>than add a power supply, is it possible to power this directly by stealing
>the CTS/DSR signals and converting to 5V with a zener diode?  Also, other
>than using the MAX232 level converter, is there an easier (and cheaper) way
>of converting ttl to rs232 levels - again without using an external power
>source.  (the distance signals are travelling are less than 3 feet)

You can steal power from DTR/RTS/DSR etc, but you can't draw too much.
Say a few mA from each line (it would help to know the exact number of
the driver chip(s) involved).  If you use 4000 family CMOS you don't
even need to regulate what you get!  Watch out for -12V on those lines
when negated.  So far as transmission goes, so long as you're only
going a few feet a TTL output can probably feed directly the RS-232
receivers (though you might need a pull-up if you're using real TTL and
not CMOS).  Most of those things need a few volts (like 1-2) to read
as positive, and less than that as negative.  It does depend on what 
you're driving, but 'violating' the spec often works.  

+----------------+
! II      CCCCCC !  Jim Cathey
! II  SSSSCC     !  ISC Systems Corp.
! II      CC     !  TAF-C8;  Spokane, WA  99220
! IISSSS  CC     !  UUCP: uunet!iscuva!jimc
! II      CCCCCC !  (509) 927-5757
+----------------+
			"With excitement like this, who is needing enemas?"

henry@utzoo.uucp (Henry Spencer) (07/08/88)

> I have a small circuit (3 ttl) that hangs off a rs232 serial port.  Rather
> than add a power supply, is it possible to power this directly by stealing
> the CTS/DSR signals...

You can do a little bit of this if you're careful; you will *not* get much
current.  If I recall correctly (my references aren't handy), RS232 drivers
are required to have a power-off impedance of at least 300 ohms, and the
usual approach is to put that much series resistance in the driver's output
circuit.  Draw very many mA and your voltage will go to pot quickly.  Note
also that you may see negative voltages on those lines, *and* that a good
many modern pieces of equipment will put out +9 or even +5, not the +12
or +15 that the older stuff produced.  (+5 *is* legal. However, +4.99 is
not... but cheap designers sometimes just use the TTL supply for the
positive side anyway.)

I doubt that you'll be able to run TTL very well that way.  4000-series
CMOS, okay.  (This is both because of the current limitation, and because
a Zener may not regulate well enough to keep TTL happy.)

> ...other
> than using the MAX232 level converter, is there an easier (and cheaper) way
> of converting ttl to rs232 levels...

You can often get away with just running TTL into an RS232 input, with a
pullup resistor to the TTL supply.  It does not meet the specs, but modern
RS232 receivers are so good that they will sometimes forgive your sins.

The MAX232 is far superior to all alternatives for getting real RS232
voltages.  Why do you think they're selling so many of them?
-- 
Anyone who buys Wisconsin cheese is  |  Henry Spencer @ U of Toronto Zoology
a traitor to mankind.  --Pournelle   | {ihnp4,decvax,uunet!mnetor}!utzoo!henry