RS-232 to LVTTL

M

Mac

Guest
I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac
 
On Sat, 09 Apr 2005 18:18:22 GMT, Mac <foo@bar.net> wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND
---
Yup!


--
John Fields
Professional Circuit Designer
 
On Sat, 09 Apr 2005 18:18:22 GMT, Mac <foo@bar.net> wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac
Looks fine. I'd go a little lower on R1 to be conservative on beta.
Some "RS-232" drivers, like from laptops and such, can be pretty
wimpy.

John
 
On Sat, 09 Apr 2005 11:33:26 -0700, John Larkin wrote:

On Sat, 09 Apr 2005 18:18:22 GMT, Mac <foo@bar.net> wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac

Looks fine. I'd go a little lower on R1 to be conservative on beta.
Some "RS-232" drivers, like from laptops and such, can be pretty
wimpy.

John
OK. I'll do 10 k. I'm glad I asked. ;-)

--Mac
 
On Sat, 09 Apr 2005 13:26:28 -0500, John Fields wrote:

On Sat, 09 Apr 2005 18:18:22 GMT, Mac <foo@bar.net> wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

---
Yup!
Thanks. ;-)
--Mac
 
On Sat, 09 Apr 2005 18:18:22 GMT, Mac <foo@bar.net> wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac
I use a very similar setup at the below link to control a servo
controller via the serial port at 9600 bps. If the max voltage
for the signal is +3.3v, then you probably need to put three
diodes in series wit the +5v power supply to drop the voltage
down. Three should give you a max of +2.9v.

http://www.geocities.com/zoomkat/ezservo.htm
 
On Sat, 09 Apr 2005 21:23:17 GMT, Mac <foo@bar.net> wrote:

On Sat, 09 Apr 2005 11:33:26 -0700, John Larkin wrote:

On Sat, 09 Apr 2005 18:18:22 GMT, Mac <foo@bar.net> wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac

Looks fine. I'd go a little lower on R1 to be conservative on beta.
Some "RS-232" drivers, like from laptops and such, can be pretty
wimpy.
Someone care to explain the purpose of R3 and R4 ?
Why not use a single 2K2 resistor ?

--
Kind regards,
Gerard Bok
 
Mac wrote:
I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac
Use VCC of 3.3 volts instead of 5 volts on R2. Remove R3 and R4.

--
Luhan Monat (luhanis 'at' yahoo 'dot' com)
"The future is not what it used to be..."
http://members.cox.net/berniekm
 
On Sat, 09 Apr 2005 22:07:49 +0000, Gerard Bok wrote:

On Sat, 09 Apr 2005 21:23:17 GMT, Mac <foo@bar.net> wrote:

On Sat, 09 Apr 2005 11:33:26 -0700, John Larkin wrote:

On Sat, 09 Apr 2005 18:18:22 GMT, Mac <foo@bar.net> wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac

Looks fine. I'd go a little lower on R1 to be conservative on beta.
Some "RS-232" drivers, like from laptops and such, can be pretty
wimpy.

Someone care to explain the purpose of R3 and R4 ?
Why not use a single 2K2 resistor ?
This is a fair question. There are two main reasons: 1) I have a reel of
1k resistors, and 2) it is very obvious with this setup that the output
Voltage, when high, is intended to be exactly 2/3 of VCC, which in my case
is 2/3 of 5V, which is very nearly exactly 3.3V.

I couldn't expect anyone else to know about reason 1, and reason 2 is
questionable. I should point out, however, that with the 2.2k resistor
you suggest, the output Voltage would nominally be 2.2/3.2 * 5V = 3.43,
which is slightly higher than the desired Voltage of 3.3V.

Anyway, my original question was will this work? I am now convinced that
it will, although I will probably change R1 to 10k, as suggested by John
Larkin.

--Mac
 
On Sat, 09 Apr 2005 15:17:02 -0700, Luhan Monat wrote:

Mac wrote:
I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac


Use VCC of 3.3 volts instead of 5 volts on R2. Remove R3 and R4.
Luhan, thanks for the suggestion, but I can't do that. This will
go onto a tiny circuit board which will then be put into a system which
doesn't have 3.3V available. I didn't mention that originally because the
original question was just "will this work?"

I could put a 5 V to 3.3 V converter on board, but that seems
like overkill for just one signal.

By the way, if you think the above circuit won't work, please say so
explicitly, giving reasons, if possible.

Thanks again. ;-)

--Mac
 
On Sat, 09 Apr 2005 22:07:03 +0000, Si Ballenger wrote:

On Sat, 09 Apr 2005 18:18:22 GMT, Mac <foo@bar.net> wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac

I use a very similar setup at the below link to control a servo
controller via the serial port at 9600 bps. If the max voltage
for the signal is +3.3v, then you probably need to put three
diodes in series wit the +5v power supply to drop the voltage
down. Three should give you a max of +2.9v.

http://www.geocities.com/zoomkat/ezservo.htm
Actually, I think R2, R3, and R4 form a divider such that the Voltage
going to the LVTTL device can never go above 2/3 of VCC.

If we imagine that Q1 is like an open circuit when off, then you
can see that the output would be 3.3333 etc. Volts, max, right?

And when Q1 is on, then the output should be very low, perhaps 0.3 V or so
(I'm not really sure). But I do know that anything below 0.8 Volts will
satisfy the downstream logic, and the output will definitely be below
that, as long as I haven't screwed something up. ;-)

regards,
Mac
 
On Sun, 10 Apr 2005 06:42:43 GMT, Mac <foo@bar.net> wrote:

On Sat, 09 Apr 2005 22:07:03 +0000, Si Ballenger wrote:

On Sat, 09 Apr 2005 18:18:22 GMT, Mac <foo@bar.net> wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac

I use a very similar setup at the below link to control a servo
controller via the serial port at 9600 bps. If the max voltage
for the signal is +3.3v, then you probably need to put three
diodes in series wit the +5v power supply to drop the voltage
down. Three should give you a max of +2.9v.

http://www.geocities.com/zoomkat/ezservo.htm

Actually, I think R2, R3, and R4 form a divider such that the Voltage
going to the LVTTL device can never go above 2/3 of VCC.

If we imagine that Q1 is like an open circuit when off, then you
can see that the output would be 3.3333 etc. Volts, max, right?

And when Q1 is on, then the output should be very low, perhaps 0.3 V or so
(I'm not really sure). But I do know that anything below 0.8 Volts will
satisfy the downstream logic, and the output will definitely be below
that, as long as I haven't screwed something up. ;-)
I'd make that part of the circuit and check it out with a meter
before connecting it to a chip to see is it works asw desired.
 
Mac wrote:
I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac
parallel a resistor with D1, to ensure the transistor stays off over
temperature with the RS232 disconnected (Icbo has to go somewhere).

Cheers
Terry
 
John Larkin wrote:
On Mon, 11 Apr 2005 11:51:01 +1200, Terry Given <my_name@ieee.org
wrote:


Mac wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac


parallel a resistor with D1, to ensure the transistor stays off over
temperature with the RS232 disconnected (Icbo has to go somewhere).

Cheers
Terry


But transistors don't leak any more. I bet the diode leaks more than
the transistor does!
A BC847BPN is spec'd at Icbo = 5uA at Tj=150C. 15nA typ.

I recently picked up a copy of RF Shea's "Transistor Circuit
Engineering" (its really a GE book), for the whopping price of NZ$0.50.
The chapter on bias stability discusses using leaky diodes to
compensate for leaky transistors over time, temperature and sock colour.

But one could replace the diode with a resistor and make everybody
happy.
yep. I'd use a single 10k quad-pack, and have a 2V5 (cf 3V3) output.

 
On Sun, 10 Apr 2005 21:56:29 +0000, Si Ballenger wrote:

On Sun, 10 Apr 2005 06:42:43 GMT, Mac <foo@bar.net> wrote:

On Sat, 09 Apr 2005 22:07:03 +0000, Si Ballenger wrote:

On Sat, 09 Apr 2005 18:18:22 GMT, Mac <foo@bar.net> wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac

I use a very similar setup at the below link to control a servo
controller via the serial port at 9600 bps. If the max voltage
for the signal is +3.3v, then you probably need to put three
diodes in series wit the +5v power supply to drop the voltage
down. Three should give you a max of +2.9v.

http://www.geocities.com/zoomkat/ezservo.htm

Actually, I think R2, R3, and R4 form a divider such that the Voltage
going to the LVTTL device can never go above 2/3 of VCC.

If we imagine that Q1 is like an open circuit when off, then you
can see that the output would be 3.3333 etc. Volts, max, right?

And when Q1 is on, then the output should be very low, perhaps 0.3 V or so
(I'm not really sure). But I do know that anything below 0.8 Volts will
satisfy the downstream logic, and the output will definitely be below
that, as long as I haven't screwed something up. ;-)

I'd make that part of the circuit and check it out with a meter
before connecting it to a chip to see is it works asw desired.
I'm going to make the whole circuit, connect up the input and power,
and check the output on an oscilloscope. But what I really want to
know is, do you have some articulable reason to believe that the
circuit won't work? If so please state it!

It's not like Voltage dividers or transistor switches are black magic or
something.

--Mac
 
On Mon, 11 Apr 2005 02:46:49 GMT, Mac <foo@bar.net> wrote:


I'd make that part of the circuit and check it out with a meter
before connecting it to a chip to see is it works asw desired.

I'm going to make the whole circuit, connect up the input and power,
and check the output on an oscilloscope. But what I really want to
know is, do you have some articulable reason to believe that the
circuit won't work? If so please state it!
All I can say is I haven't tried it. How about you trying it and
report the results.

It's not like Voltage dividers or transistor switches are black magic or
something.
Then why all the questions???? ;-)
 
On Mon, 11 Apr 2005 12:30:15 +1200, Terry Given <my_name@ieee.org>
wrote:

John Larkin wrote:
On Mon, 11 Apr 2005 11:51:01 +1200, Terry Given <my_name@ieee.org
wrote:


Mac wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

Thanks!

--Mac


parallel a resistor with D1, to ensure the transistor stays off over
temperature with the RS232 disconnected (Icbo has to go somewhere).

Cheers
Terry


But transistors don't leak any more. I bet the diode leaks more than
the transistor does!

A BC847BPN is spec'd at Icbo = 5uA at Tj=150C. 15nA typ.

I recently picked up a copy of RF Shea's "Transistor Circuit
Engineering" (its really a GE book), for the whopping price of NZ$0.50.
The chapter on bias stability discusses using leaky diodes to
compensate for leaky transistors over time, temperature and sock colour.


But one could replace the diode with a resistor and make everybody
happy.

yep. I'd use a single 10k quad-pack, and have a 2V5 (cf 3V3) output.
---
RS-232 can go as high as (IIRC) +/- 15V, and a B-E junction
reverse-biased at 7.5V isn't a good thing.

--
John Fields
Professional Circuit Designer
 
On Mon, 11 Apr 2005 02:46:49 GMT, Mac <foo@bar.net> wrote:

[snip]
On Sun, 10 Apr 2005 06:42:43 GMT, Mac <foo@bar.net> wrote:

[snip]

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

[snip]

I'm going to make the whole circuit, connect up the input and power,
and check the output on an oscilloscope. But what I really want to
know is, do you have some articulable reason to believe that the
circuit won't work? If so please state it!

It's not like Voltage dividers or transistor switches are black magic or
something.

--Mac
It'll work just fine.

My personal preference would be to make R1=10K... I like logic
situations to work with a forced beta of 10, to ensure saturation.

And, as others have pointed out, if there's a possibility of the input
floating, add a resistor in parallel with D1... say 200K.

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
 
On Mon, 11 Apr 2005 09:43:17 -0500, John Fields
<jfields@austininstruments.com> wrote:

On Mon, 11 Apr 2005 12:30:15 +1200, Terry Given <my_name@ieee.org
wrote:

John Larkin wrote:
On Mon, 11 Apr 2005 11:51:01 +1200, Terry Given <my_name@ieee.org
wrote:


Mac wrote:

I want a quick and dirty conversion of RS-232 to LVTTL. That is, it is
TTL except that the signal cannot exceed ~3.3 V.

Will this work (use courier or similar for ASCII art schematic):

VCC (5V)
|
/
\ R2 (1k)
/
|
+----------------+-> to LVTTL device
| |
R1 (22k) /c /
RS-232->---/\/\/\/\--+----| Q1 (npn) \ R3 (1k)
| \e /
--- | |
D1 / \ | /
| | \ R4 (1k)
+--+--+ /
| |
GND GND

parallel a resistor with D1, to ensure the transistor stays off over
temperature with the RS232 disconnected (Icbo has to go somewhere).


But one could replace the diode with a resistor and make everybody
happy.

yep. I'd use a single 10k quad-pack, and have a 2V5 (cf 3V3) output.

---
RS-232 can go as high as (IIRC) +/- 15V,
It's even worse. Older versions allow for + / - 30 volts :)

and a B-E junction
reverse-biased at 7.5V isn't a good thing.
It would be nice to see it, though :)
IIRC you won't get far beyond - 5.5 volt :)

--
Kind regards,
Gerard Bok
 
On Mon, 11 Apr 2005 03:57:53 GMT, shb*NO*SPAM*@comporium.net (Si
Ballenger) wrote:

On Mon, 11 Apr 2005 02:46:49 GMT, Mac <foo@bar.net> wrote:


I'd make that part of the circuit and check it out with a meter
before connecting it to a chip to see is it works asw desired.

I'm going to make the whole circuit, connect up the input and power,
and check the output on an oscilloscope. But what I really want to
know is, do you have some articulable reason to believe that the
circuit won't work? If so please state it!

All I can say is I haven't tried it. How about you trying it and
report the results.

It's not like Voltage dividers or transistor switches are black magic or
something.

Then why all the questions???? ;-)

There's a rule for this newsgroup: the more trivial the problem, the
more it needs to be discussed.

John
 

Welcome to EDABoard.com

Sponsor

Back
Top