RS232 treshold revisited

R

René

Jan 1, 1970
0
I need to design a PC compatible RS232 I/F in a very small, battery
operated, cheap device. (isolated housing) 1200bd speed. RX / TX only.

The "royal way" would be obvously to use some MAX232 derivative, but
the battery drain budget (1 year out of a CR2032), BOM budget and
space budget make that highly unattractive.

As I see it I am left with 2 alternatives:

1. Hook the device ground to the minus voltage of a RS232 gate ,
and have a transistor + collector resistor switch between + and -
RS232 voltages at the collector. (or use a fet)
(use 2 any non-rx/tx RS232 pin to get steady + and - voltage out of
the PC, set dedicated RS232 PC driver to provide these voltages in a
steady mode)

Advantage: Full RS232 swing available
Disadvantage: device grounded to neg RS232 voltage, unsolid ground.

2. Use TTL method, switching between pos value (derived from
steady state RS232 pin), and true RS232 ground. Here it is assumed
most (all?) PC RS232 I/F's actually switch at TTL level tresholds.

Advantage: solid ground
Disadvantage; will not work if treshold is close to, or below 0V.

Knowing full well that both methods are sub-optimal and non-compliant,
I lean towards method 2.

Question: On which PC's will I run into trouble? Any other low cost /
low energy solutions? What's with Apple PC's?

TIA!
 
R

Roger Hamlett

Jan 1, 1970
0
René said:
I need to design a PC compatible RS232 I/F in a very small, battery
operated, cheap device. (isolated housing) 1200bd speed. RX / TX only.

The "royal way" would be obvously to use some MAX232 derivative, but
the battery drain budget (1 year out of a CR2032), BOM budget and
space budget make that highly unattractive.
Question. Is the RX line always going to be available, when the TX is
required?. RS232, is never going to be a 'low power' interface. You need
to be able to drive at least a 3K load, with +/-3v (at the receiver -
supposedly +/-5v at the transmitter), and given that the
idle condition is 'driven', you are talking a minimum of over 3mA...
As I see it I am left with 2 alternatives:

1. Hook the device ground to the minus voltage of a RS232 gate ,
and have a transistor + collector resistor switch between + and -
RS232 voltages at the collector. (or use a fet)
(use 2 any non-rx/tx RS232 pin to get steady + and - voltage out of
the PC, set dedicated RS232 PC driver to provide these voltages in a
steady mode)

Advantage: Full RS232 swing available
Disadvantage: device grounded to neg RS232 voltage, unsolid ground.

2. Use TTL method, switching between pos value (derived from
steady state RS232 pin), and true RS232 ground. Here it is assumed
most (all?) PC RS232 I/F's actually switch at TTL level tresholds.

Advantage: solid ground
Disadvantage; will not work if treshold is close to, or below 0V.

Knowing full well that both methods are sub-optimal and non-compliant,
I lean towards method 2.

Question: On which PC's will I run into trouble? Any other low cost /
low energy solutions? What's with Apple PC's?
Look at the DS275. Close to compliant, and the solution used in most low
power devices. It steals the -ve voltage, from the incoming RX line, and
uses this to drive the TX. However even with this (or your solutions), you
should consider using a protocol at the PC end, which accepts 'break'
between packets, and resynchronises when the packet starts, and then have
your driver switch off when not actually sending. Otherwise, even with a
low power solution, a CR2032, will run down too fast.

Best Wishes
 
R

Rene Tschaggelar

Jan 1, 1970
0
René said:
I need to design a PC compatible RS232 I/F in a very small, battery
operated, cheap device. (isolated housing) 1200bd speed. RX / TX only.

The "royal way" would be obvously to use some MAX232 derivative, but
the battery drain budget (1 year out of a CR2032), BOM budget and
space budget make that highly unattractive.

As I see it I am left with 2 alternatives:

1. Hook the device ground to the minus voltage of a RS232 gate ,
and have a transistor + collector resistor switch between + and -
RS232 voltages at the collector. (or use a fet)
(use 2 any non-rx/tx RS232 pin to get steady + and - voltage out of
the PC, set dedicated RS232 PC driver to provide these voltages in a
steady mode)

Advantage: Full RS232 swing available
Disadvantage: device grounded to neg RS232 voltage, unsolid ground.

2. Use TTL method, switching between pos value (derived from
steady state RS232 pin), and true RS232 ground. Here it is assumed
most (all?) PC RS232 I/F's actually switch at TTL level tresholds.

Advantage: solid ground
Disadvantage; will not work if treshold is close to, or below 0V.

Knowing full well that both methods are sub-optimal and non-compliant,
I lean towards method 2.

Question: On which PC's will I run into trouble? Any other low cost /
low energy solutions? What's with Apple PC's?


There are RS422 transceivers that have an Enable signal
and just take 30uA when disabled.

Rene
 
R

René

Jan 1, 1970
0
Question. Is the RX line always going to be available, when the TX is
required?. RS232, is never going to be a 'low power' interface. You need
to be able to drive at least a 3K load, with +/-3v (at the receiver -
supposedly +/-5v at the transmitter), and given that the
idle condition is 'driven', you are talking a minimum of over 3mA...

The idea would be to pull down a resistor connected to a voltage
"stolen' from the RS232 itself. Thus the current would not have to be
supplied by the device (other than the base / gate drive).


The device will be used stand alone, and will be "docked" to the PC
occasionally.

I need to have a feel whether the "TTL" method will work with e.g. 99%
of the PC's out there, or a significant lower number. I never met a PC
that would not accept the TTL method - but there are a lot of PC's I
didn't meet :)

I will investigate the DS275 - thanks!
 
A

Allan Herriman

Jan 1, 1970
0
I need to design a PC compatible RS232 I/F in a very small, battery
operated, cheap device. (isolated housing) 1200bd speed. RX / TX only.

The "royal way" would be obvously to use some MAX232 derivative, but
the battery drain budget (1 year out of a CR2032), BOM budget and
space budget make that highly unattractive.

As I see it I am left with 2 alternatives:

1. Hook the device ground to the minus voltage of a RS232 gate ,
and have a transistor + collector resistor switch between + and -
RS232 voltages at the collector. (or use a fet)
(use 2 any non-rx/tx RS232 pin to get steady + and - voltage out of
the PC, set dedicated RS232 PC driver to provide these voltages in a
steady mode)

Advantage: Full RS232 swing available
Disadvantage: device grounded to neg RS232 voltage, unsolid ground.

2. Use TTL method, switching between pos value (derived from
steady state RS232 pin), and true RS232 ground. Here it is assumed
most (all?) PC RS232 I/F's actually switch at TTL level tresholds.

Advantage: solid ground
Disadvantage; will not work if treshold is close to, or below 0V.

Knowing full well that both methods are sub-optimal and non-compliant,
I lean towards method 2.

Question: On which PC's will I run into trouble? Any other low cost /
low energy solutions? What's with Apple PC's?


Here's a *very* low energy solution that I came up with several years
ago. I'm not sure whether it'll be cheap enough for your needs.


The first part is a 'power sucker' that draws power from the RS232
lines from the PC. It uses a switched capacitor voltage inverter
chip to allow it to suck power from an RS232 line regardless of
whether the line is high or low. Note that this means you can suck
power from a data line which is carrying data.

It generates + and - rails to supply the RS2323 driver.

RS232 lines
from PC
+ve
--------o-->|--o-----o----o--------------o-------------
| | | | |8
------o-+-->|--' | | 2.----------.
| | | | .---| |
... | | ... z --- | | Flying |
| | A --- --- | cap |3
| | | | --- | voltage |---.
| | | | | 4| converter| |
| | === === '---| | ===
| | GND GND '----------' GND
| | |5
| '--|<--o-----o----o--------------o------------
| | | | -ve
'----|<--' | |
| |
... | |
V ---
z ---
| |
| |
=== ===
GND GND

The diodes are small schottky, the zeners are small 12 to 15V types.
The switched cap chip is an ICL7660 substitute. DON"T use an original
7660, as it can't handle the voltage. Use something like an LTC1044A.
ISTR that some of these parts wouldn't start well in this type of
application, but I can't remember the part numbers.


The second part is the RS232 driver. I chose to use an opamp here,
but there are cheaper ways. (Other posters can help you here.)
The opamp will need the following specs:
- Micropower
- Supply voltage range at least 5V to 24V.
- Doesn't mind input voltages outside its rails (for when VCC is
present, but the unit is not plugged into an RS232 port).
- slew rate at least 0.3V/us
- Can drive at least a few mA
- Rail to rail output.


+ve
.----------o-----
| |
| |
serial data | - RS232 line
from 'UART' |\| ^ to PC
---------------------|-\ ___ |
___ | >--|___|--oo---------------->
VCC-----|___|---o---|+/ |
1M | |/| -
___ | | ^
.---|___|---' | |
| 1M | | -ve
=== '-----------o----
GND
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

I hope this helps, or at least gives you some ideas.

Regards,
Allan
 
A

Adrian Jansen

Jan 1, 1970
0
René said:
I need to design a PC compatible RS232 I/F in a very small, battery
operated, cheap device. (isolated housing) 1200bd speed. RX / TX only.

The "royal way" would be obvously to use some MAX232 derivative, but
the battery drain budget (1 year out of a CR2032), BOM budget and
space budget make that highly unattractive.

As I see it I am left with 2 alternatives:

1. Hook the device ground to the minus voltage of a RS232 gate ,
and have a transistor + collector resistor switch between + and -
RS232 voltages at the collector. (or use a fet)
(use 2 any non-rx/tx RS232 pin to get steady + and - voltage out of
the PC, set dedicated RS232 PC driver to provide these voltages in a
steady mode)

Advantage: Full RS232 swing available
Disadvantage: device grounded to neg RS232 voltage, unsolid ground.

2. Use TTL method, switching between pos value (derived from
steady state RS232 pin), and true RS232 ground. Here it is assumed
most (all?) PC RS232 I/F's actually switch at TTL level tresholds.

Advantage: solid ground
Disadvantage; will not work if treshold is close to, or below 0V.

Knowing full well that both methods are sub-optimal and non-compliant,
I lean towards method 2.

Question: On which PC's will I run into trouble? Any other low cost /
low energy solutions? What's with Apple PC's?

TIA!
Almost all of the hand-held GPS receivers I have seen use 0-5 volt
levels for the 'RS232' outputs. If Garmin et al can get away with it,
you probably can too. They politely ignore complaints from laptop
owners who cant get theit units to communicate.

I personally think its a really bad idea, but they do it.

--
Regards,

Adrian Jansen adrianjansen at internode dot on dot net
Design Engineer J & K Micro Systems
Microcomputer solutions for industrial control
Note reply address is invalid, convert address above to machine form.
 
S

Spehro Pefhany

Jan 1, 1970
0
There are RS422 transceivers that have an Enable signal
and just take 30uA when disabled.

Rene

There are some 3V RS-232 driver/receivers that have auto-shutdown and
will draw only a microamp or so when the cable is unplugged.

I suggest using one of those rather than fiddling around.

But, and you probably don't want to hear this, RS-232 is a dying
interface. Most new laptops don't have serial ports. You may wish to
consider a USB interface. At least make sure your product works with
one of those cheap-ass converters.


Best regards,
Spehro Pefhany
 
P

Peter Bennett

Jan 1, 1970
0
Almost all of the hand-held GPS receivers I have seen use 0-5 volt
levels for the 'RS232' outputs. If Garmin et al can get away with it,
you probably can too. They politely ignore complaints from laptop
owners who cant get theit units to communicate.

I personally think its a really bad idea, but they do it.


Almost all the hand-held and marine GPS receivers I've seen don't
have, and don't claim to have, RS-232 outputs. They have NMEA-0183
outputs, and the NMEA-0183 spec calls for 0/+5V.
 
Spehro Pefhany skrev:
There are some 3V RS-232 driver/receivers that have auto-shutdown and
will draw only a microamp or so when the cable is unplugged.

I suggest using one of those rather than fiddling around.

I guess you could just turn on hardware flow control and steal the
negative voltage from
CTS, afaik it is negative when you are allowed to send.
But, and you probably don't want to hear this, RS-232 is a dying
interface. Most new laptops don't have serial ports. You may wish to
consider a USB interface. At least make sure your product works with
one of those cheap-ass converters.

yep, it maybe just as easy to just add a usb to serial converter on
board instead of a max232 or similar. it also means you could get
power from the pc when connected

-Lasse
 
K

Ken Smith

Jan 1, 1970
0
Spehro Pefhany said:
But, and you probably don't want to hear this, RS-232 is a dying
interface. Most new laptops don't have serial ports. You may wish to
consider a USB interface. At least make sure your product works with
one of those cheap-ass converters.

Better yet, make it plug into the net work and have a little web server in
it. This way any PC that can browse the web can be used. You won't have
to constantly change your drivers to match the latest madness from
Redmond.
 
R

René

Jan 1, 1970
0
Thanks everybody for all offered solutions so far.

The problem is that the design needs to communicate trough a docking
unit over not more than 3 contacts, There is no room on both the pcb
and in the budget to put in a dedicated chip. (we need to "refurbish"
an existing project line in an existing housing)

So I am sort of obliged to go the transistor (fet) TTL route. Let's
say the "RS232" budget is ~ $0.05 in quantities.

Given the constraints mentioned above, would one select the "negative
ground" solution (device grounded to V- to give full swing), or the
"true ground" solution (TTL treshold needed, but solid ground)?

Do some / all laptops have the treshold @ 0V?

again, TIA!
 
M

Meindert Sprang

Jan 1, 1970
0
Adrian Jansen said:
Almost all of the hand-held GPS receivers I have seen use 0-5 volt
levels for the 'RS232' outputs. If Garmin et al can get away with it,
you probably can too. They politely ignore complaints from laptop
owners who cant get theit units to communicate.

I personally think its a really bad idea, but they do it.

My Garmin GPSMAP76 outputs RS-232, levels are +5.5V and -5.5V.

Meindert
 
M

Meindert Sprang

Jan 1, 1970
0
Peter Bennett said:
Almost all the hand-held and marine GPS receivers I've seen don't
have, and don't claim to have, RS-232 outputs. They have NMEA-0183
outputs, and the NMEA-0183 spec calls for 0/+5V.

Ehhrrr, I think it's the other way around: they claim to have an NMEA-0883
output while in reality, they have an RS-232 output. A real NMEA-0183 output
is 0/+5V AND differential (two wires going in opposite direction).
My Garmin GPSMAP76 is true RS-232.

Meindert
 
R

Rene Tschaggelar

Jan 1, 1970
0
Spehro Pefhany wrote:

There are some 3V RS-232 driver/receivers that have auto-shutdown and
will draw only a microamp or so when the cable is unplugged.

For example ?
I suggest using one of those rather than fiddling around.

But, and you probably don't want to hear this, RS-232 is a dying
interface. Most new laptops don't have serial ports. You may wish to
consider a USB interface. At least make sure your product works with
one of those cheap-ass converters.

I have to interject that RS232 has some advantages
over other interfaces especially when the datarate
is low, one of which is simplicity.
You can make whatever hardware with an RS232
interface talk to the device in question. A simple
controller in a box or a PLC can control a synthesizer.
Even a Palmtop computer can control a serial device.
Whereas for USB, there is just a PC of whatever
generation. The PC generations coming up a bit too
quick.
And you need drivers fitting to this PC and its OS.
The next advantage of RS232 or its cousins the RS422
and RS485 are the cable length. USB with just 5m is
a bit on the short side for industrial environments.
No, the RS232 and its cousins are far from dead.

Rene
 
P

Peter Bennett

Jan 1, 1970
0
Ehhrrr, I think it's the other way around: they claim to have an NMEA-0883
output while in reality, they have an RS-232 output. A real NMEA-0183 output
is 0/+5V AND differential (two wires going in opposite direction).
My Garmin GPSMAP76 is true RS-232.

Meindert
I lied a bit...

According to my NMEA FAQ:

"The NMEA-0180 and 0182 standards say that the talker output may
be RS-232, or from a TTL buffer, capable of delivering 10 mA at
4 V. A sample circuit shows an open collector TTL buffer with a
680 ohm resistor to +12 V, and a diode to prevent the output
voltage from rising above +5.7 V.

NMEA-0183 accepts this, but recommends that the talker output
comply with EIA-422. This is a differential system, having two
signal lines, A and B. The voltages on the "A" line correspond
to those on the older TTL single wire, while the "B" voltages
are reversed (while "A" is at +5, "B" is at ground, and vice
versa)"

My Garmin 12XL and 168Map/sounder are both 0/+5.
 
Top