RS-232 to LVTTL

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

Reply to
John Larkin
Loading thread data ...

--
Yup!
Reply to
John Fields

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..."
 Click to see the full signature
Reply to
Luhan Monat

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

Reply to
Mac

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

--Mac

Reply to
Mac

Thanks. ;-)

--Mac

Reply to
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.

formatting link

Reply to
Si Ballenger

Someone care to explain the purpose of R3 and R4 ? Why not use a single 2K2 resistor ?

--
Kind regards,
Gerard Bok
Reply to
Gerard Bok

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

Reply to
Mac

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

Reply to
Mac

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

Reply to
Mac

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

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

John

Reply to
John Larkin

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.

Reply to
Si Ballenger

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

Reply to
Mac

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

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

Reply to
Si Ballenger
[snip]
[snip]
[snip]

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      |
 Click to see the full signature
Reply to
Jim Thompson

--
RS-232 can go as high as (IIRC) +/- 15V, and a B-E junction
reverse-biased at 7.5V isn\'t a good thing.
Reply to
John Fields

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

John

Reply to
John Larkin

And how many RS-232 receivers commonly work at 150C? Even at 5 uA, it would still deliver a perfectly good high. And who cares what the logic level is when nothing's connected?

You wear sox in NZ?

Let's see if we can make a 500-post thread out of this circuit.

John

Reply to
John Larkin

Zenering the b-e junction progressively degrades beta, although I haven't seen (or measured) the magnitude of the effect.

John

Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.