Defeating MAX232 and MAX 233.....

May 19, 2007 21 Replies

Well, I have this embedded system, and only 3.3V level out on serial. Asked for a MAX233 in the shop.. needed to be ordered, was expensive... Told them: Forget it, I will use transistors.



But the second thing, No supply should be used, not even the 3.3V



My solution? I control the terminal (Linux minicom) and the RS232 port too (outb() ). So here it is folks:


Embedded connector


9 pol D connector --------0 > | c TXD 3 -------------------------- 5k6 ------------------------ b NPN | e k | Diode 1N1448 | a | | | GND 5 -------------------------------------------------------------------0 GND | | +12V | DTR 4 ---------------------- | | | | | 5k6 | c | | b ------| | e NPN | | | | | RXD 2 ------------| | | | | | e | b b ------| ----- c e----- 3k3 --------------0 < c | | | PNP c | NPN | b------| | e NPN | | | 3k3 - 12V | | | RTS 7 ------------------------------

All NPN transistors BC547, all PNP transistors BC 557.


As you can see the top is classical, but the reverse path uses a common base for level shifter :-) I start minicom, hardware flow control off, and then after that a small program that sets DTR to +12 V and RTs to -12 V, there is my supply :-)



Maxim defeated :-)


Corrected diagram, the common base is a PNP of course :-)

(outb() ).

connector

for level shifter :-)

that sets

Nice level shifter :-)

What about using MOSFETs in the output circuit to eliminate base drive? Some RS232 ports have high source impedances, and the voltage can droop quite a bit when you start drawing milliamps.

(outb() ).

I think you should have a BE resistor on the input so that touching one's finger on the TXD line won't drive it nuts with line frequency signals. You could use all 10K resistors.

You could also use the ST3232.

Embedded connector

for level shifter :-)

that sets

Best regards, Spehro Pefhany

"it\'s the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com

On a sunny day (Sat, 19 May 2007 20:13:19 +0100) it happened "Andrew Holme" wrote in :

Yes, right, I should perhaps have kept the 5k6 higher, but I am using flashing fast baudrates... and it was the second resistor I grabbed from the box... Are MOSFETS more expensive then junction stuff? I bought a load of junction PNP / NPN and they go into everything.

On a sunny day (Sat, 19 May 2007 15:32:27 -0500) it happened Spehro Pefhany wrote in :

(outb() ).

Yes, true, I looked up that data sheet, but it needs caps I think. The MAX233 does not need caps on the charge pump I think. Maybe just a few resistors and junction transistors is even cheaper then a ST3232?

This one could be integrated, if only everybody had full control of DTR and RTS.

(outb() ).

connector

for level shifter :-)

program that sets

that's cheating! :) Just hope the PC/Flap top supports the full voltages..

"I\'m never wrong, once i thought i was, but was mistaken" Real Programmers Do things like this. http://webpages.charter.net/jamie_5

The below sites have simple two transistor setups.

formatting link
formatting link

On a sunny day (Sun, 20 May 2007 01:13:38 GMT) it happened shb*NO*SPAM*@comporium.net (Si Ballenger) wrote in :

Yea that one is not to spec I think.

I had considered the 3.3V zener method, but that

1) pins you down to 3.3V (mine also works on 5V). 2) those zeners are less stable, more dificult to get. 3) an other capacitor. 4) the output impedance driving low (towards negative) is only 4k7 in that circuit. 5) it has 11 components, mine only 10. 6) 4 different types of resistors, in my circuit all can be 5k6 if must be. 7) less transistors, more looks good in the flyer. 8) was not designed by me, so no fun. 9) likely patented, mine is public domain now. 10) Will think of some more over time, yes, mine is already build... :-)

circuit.

Are your assumptions of having power available from the DTR pin supported by all serial programs?

On a sunny day (Sun, 20 May 2007 19:58:44 GMT) it happened shb*NO*SPAM*@comporium.net (Si Ballenger) wrote in :

If you re-read the thread (google?) you will find that I started out by saying that in this case I had full control over the terminal. That second circuit you referred to has the same issue.

Anyways it makes sense to supply system inclusive cable (that has actually DTR and RTS wired), and software for the PC. Won't work with a null modem cable ;-)

And it won't work in Vista... HAHHAHAHAHHAHAHAHA, I only support Linux. LOL

I have never come around to build this, but found this years ago and kept it in my ideas book. Should be independent of embedded VCC level. A shunt resistor for input static protection might be wise. This is the version with the least amount of discrete components that I have seen.

VCC + | | .-. | |2K2 | | '-' | |------ ||-+ RXD ||

Then I guess "Defeating MAX232 and MAX 233....." was an over stated bit of "fantasy thinking". ;)

On a sunny day (Sun, 20 May 2007 23:31:28 +0200) it happened Joop wrote in :

Would not a BS170 die if you connected the cable and there was some charge on it? Maybe some zener would be needed?

On a sunny day (Sun, 20 May 2007 22:13:36 GMT) it happened shb*NO*SPAM*@comporium.net (Si Ballenger) wrote in :

Nope, it is working here. Vista is an insult to computing, more hardware and power needed to to less (because of constant encryption/decryption, why the thing eats power), and can no longer be considered sane electronics / programming, so it is irrelevant to computing and electronics.

In fact this circuit is working so very good I am amazed.

Unfortunately it is far from irrelevant, but there's nothing me or you can do about it.

You sure are easily impressed.

SioL

On a sunny day (Mon, 21 May 2007 18:03:24 +0200) it happened "SioL" wrote in :

irrelevant

Well i have been programming for Linux for >10 years now, many applications, look how MS starts to screek. So I *did* something about it. that proves it is possible to do somethin gabout it, start by installing Linux, not Vista.

Not by you posts.

Bye.

>

Well, Vista is still far from irrelevant so whatever you were doing those

10 years... did not work, it seems Linux is loosing the desktop war.

I appreciate the effort, though.

SioL

sour grapes

noun Definition: affected scorn: the scornful denial that something is attractive or desirable because it is unobtainable [In allusion to Aesop's fable The Fox and the Grapes where the fox disparages some grapes as sour when he cannot reach them]

On a sunny day (Tue, 22 May 2007 00:55:09 GMT) it happened shb*NO*SPAM*@comporium.net (Si Ballenger) wrote in :

I am familiar with teh expression. But it does not apply to a disgraceful attempt to show the world bloat and misuse of processor power, distrust of people, cheap go at commercial gain, AND NO NEW FEATURES. Not to forget forced incompatibility with everything else.

No, the label 'OS' does not apply to the Vista failure.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required