Simple RS232

Started by upand_at_them February 23, 2005

I'm in need of a low temperature capable RS232 circuit and the
MAX232's that I have are only good to 0C.

I've found out that I can use a 2N3904 and two resistors to TX from
PIC to PC. It works great and should be good down to -40C. The
transistor is operating as an inverter so should I be able to use the
same setup for RX without problems or danger of ruining the PIC?

Mike


You just need then E or the M suffixes. The E is good to -40C and the
M to -55C. A shame, I just gave away a half dozen MAX232AESE to the
local high school. 2N3904's should be fine. Most everything will work
at any temp, it is just specs that slide out of limits.

Chad
--- upand_at_them <> wrote:

>
> I'm in need of a low temperature capable RS232 circuit and the
> MAX232's that I have are only good to 0C.
>
> I've found out that I can use a 2N3904 and two resistors to TX from
> PIC to PC. It works great and should be good down to -40C. The
> transistor is operating as an inverter so should I be able to use the
>
> same setup for RX without problems or danger of ruining the PIC?
>
> Mike >


=====
My software has no bugs, only undocumented features.




Yeah, but I'd have to _buy_ one of those. :) And I'd also have to
get capacitors that work below -10C. I already have a bunch of
2N3904's and 2N3906's.

I know the transistors will work at the temp range I need, but I was
just wondering about the circuit of connecting a PIC to a PC without
a MAX232. TX from PIC to PC with a 2N3904 works great, but I wasn't
sure about the other direction. I have seen some setups that tie the
PC ground to the PIC Vcc, but I'd rather have a common ground.

Mike --- In , Chad Russel <chadrussel@y...> wrote:
> You just need then E or the M suffixes. The E is good to -40C and
the
> M to -55C. A shame, I just gave away a half dozen MAX232AESE to the
> local high school. 2N3904's should be fine. Most everything will
work
> at any temp, it is just specs that slide out of limits.
>
> Chad





Re: Simple RS232

If you BUY the MAX233AEPP you get -40C without capacitors. Well,
you could probably get a sample for free.

Whether these resistor/transistor arrangements work is totally a
function of the PC implementation. Some PCs will work with 0 & 5V,
some won't. I wish the PC industry had left the RS232 spec alone.
This would have forced everyone to stay compatible with the original
voltages. --- In , "upand_at_them" <upand_at_them@y...>
wrote:
>
> Yeah, but I'd have to _buy_ one of those. :) And I'd also have
to
> get capacitors that work below -10C. I already have a bunch of
> 2N3904's and 2N3906's.
>
> I know the transistors will work at the temp range I need, but I
was
> just wondering about the circuit of connecting a PIC to a PC
without
> a MAX232. TX from PIC to PC with a 2N3904 works great, but I
wasn't
> sure about the other direction. I have seen some setups that tie
the
> PC ground to the PIC Vcc, but I'd rather have a common ground.
>
> Mike > --- In , Chad Russel <chadrussel@y...>
wrote:
> > You just need then E or the M suffixes. The E is good to -40C
and
> the
> > M to -55C. A shame, I just gave away a half dozen MAX232AESE to
the
> > local high school. 2N3904's should be fine. Most everything
will
> work
> > at any temp, it is just specs that slide out of limits.
> >
> > Chad



Hi,

The simplest method I have seen for connecting a PIC to a PC via RS-232 uses
a 4.3v or 4.7v Zener diode on the PIC RX line and a direct connection from
the PIC TX to PC RX line. The part number of the 4.3 volt Zener is 1N4731.
Do the inverting in the PIC software and you don't need the transistor at
all.

The January/February 2005 issue of the Ham radio magazine "QEX" has an
article that covers this. I've used the method and it works well. I've also
used the transistor inverter with success.

Having said that, hooking up a MAX-232 is a simple task and the 0.1uf
capacitors are easy to find. You can get 2 free MAX-232's from Maxim by
visiting their web site. They will ask you what you are going to do with
them and if they think it has merit they will send you the chips for free.

There are MAX-232's that do not require external capacitors.

Hope this helps.
Chris
KB7YOU
http://radio.rocklizard.org
http://pic.rocklizard.org
-----Original Message-----
From: upand_at_them [mailto:]
Sent: Wednesday, February 23, 2005 8:25 AM
To:
Subject: [piclist] Re: Simple RS232
Yeah, but I'd have to _buy_ one of those. :) And I'd also have to get
capacitors that work below -10C. I already have a bunch of 2N3904's and
2N3906's.

I know the transistors will work at the temp range I need, but I was just
wondering about the circuit of connecting a PIC to a PC without a MAX232.
TX from PIC to PC with a 2N3904 works great, but I wasn't sure about the
other direction. I have seen some setups that tie the PC ground to the PIC
Vcc, but I'd rather have a common ground.

Mike --- In , Chad Russel <chadrussel@y...> wrote:
> You just need then E or the M suffixes. The E is good to -40C and
the
> M to -55C. A shame, I just gave away a half dozen MAX232AESE to the
> local high school. 2N3904's should be fine. Most everything will
work
> at any temp, it is just specs that slide out of limits.
>
> Chad
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
Yahoo! Groups Links


At 12:50 PM 23/02/05, upand_at_them wrote:
>I'm in need of a low temperature capable RS232 circuit and the
>MAX232's that I have are only good to 0C.
>I've found out that I can use a 2N3904 and two resistors to TX from
>PIC to PC. It works great and should be good down to -40C. The
>transistor is operating as an inverter so should I be able to use the
>same setup for RX without problems or danger of ruining the PIC?

Mike,

If you're worried about temperatures you could do the voltage level
conversion in a dongle at the PC end of the connection. Presumably the PC
would be indoors at room temperature. Send TTL voltage levels over your
cable. Transistors as you've described can do the level shifting pretty
easily, don't really need a MAX device.

Phil.



Good point, thanks.

I should have fully explained my project. The serial interface is
going to be used to connect to another PIC or a GPS, or both, at very
cold temps. I also want to use the same interface to download data
to a PC, which will be at room temp. (Looking at the schematic for a
Basic Stamp, they don't use a MAX device at all for serial.)

And I may write up the project for other people to use, so I was
going for a) simple, b) cheap, c) wide operating temp range, and d)
low power consumption.

-Mike --- In , Phil Seakins <pseakins@a...> wrote:
> At 12:50 PM 23/02/05, upand_at_them wrote:
> >I'm in need of a low temperature capable RS232 circuit and the
> >MAX232's that I have are only good to 0C.
> >I've found out that I can use a 2N3904 and two resistors to TX
from
> >PIC to PC. It works great and should be good down to -40C. The
> >transistor is operating as an inverter so should I be able to use
the
> >same setup for RX without problems or danger of ruining the PIC?
>
> Mike,
>
> If you're worried about temperatures you could do the voltage level
> conversion in a dongle at the PC end of the connection. Presumably
the PC
> would be indoors at room temperature. Send TTL voltage levels over
your
> cable. Transistors as you've described can do the level shifting
pretty
> easily, don't really need a MAX device.
>
> Phil.



If you have the voltages available, +/-12, this is horse and buggy
stuff. I am sure there are many circuits out there. If you do not
have the + and/or -12 that is another story. The MAX just generates
the voltages rather convienently.

It depends on what resources you have with which to begin.

Chad

--- Phil Seakins <> wrote:

> At 12:50 PM 23/02/05, upand_at_them wrote:
> >I'm in need of a low temperature capable RS232 circuit and the
> >MAX232's that I have are only good to 0C.
> >I've found out that I can use a 2N3904 and two resistors to TX from
> >PIC to PC. It works great and should be good down to -40C. The
> >transistor is operating as an inverter so should I be able to use
> the
> >same setup for RX without problems or danger of ruining the PIC?
>
> Mike,
>
> If you're worried about temperatures you could do the voltage level
> conversion in a dongle at the PC end of the connection. Presumably
> the PC
> would be indoors at room temperature. Send TTL voltage levels over
> your
> cable. Transistors as you've described can do the level shifting
> pretty
> easily, don't really need a MAX device.
>
> Phil.


=====
My software has no bugs, only undocumented features.




Thanks all.

-Mike




Hi Mike-

You didn't mention that there would only be one PIC to interface
to all three devices. For the PIC to PIC, you don't need
any interface at all. The PICs are pretty hardy little critters
and they can source or sink a max. 20ma current load. So,
for example, if you have an old TTY around, they can sink that
current, although I would not suggest it.

Seriously, I would not expect any problems of having the PIC
communicate with another PIC at 25 feet or so, providing that
there are not any extraordinary voltage transients on the line.

Just wire the TX data pin to the RX data pin of the other PIC
and vice versa. They will not be RS232, but that's o.k.

If you want to interface the PIC to the PC, then the simple
NPN transistor with a suitable current limiting resistor in
the base and a relatively high value of collector resistor works
well in the PC's that I have played with. Note that it is NOT
RS232, but usually that's not a problem. Personally, I use
2N2222's but the 2N3904 is a dead knockoff in this application.

Hope that this helps.

Cheers,

Rich S.

--- In , "upand_at_them" <upand_at_them@y...>
wrote:
>
> I'm in need of a low temperature capable RS232 circuit and the
> MAX232's that I have are only good to 0C.
>
> I've found out that I can use a 2N3904 and two resistors to TX from
> PIC to PC. It works great and should be good down to -40C. The
> transistor is operating as an inverter so should I be able to use
the
> same setup for RX without problems or danger of ruining the PIC?
>
> Mike