View previous topic :: View next topic |
Author |
Message |
nuno12345
Joined: 16 Jul 2008 Posts: 50
|
MAX232 Alternative cheap & easy |
Posted: Mon Feb 23, 2009 8:27 pm |
|
|
Hello, I found this while I was surfing around and wanted to share with all of you, some probably already know it, still....
Simple and cheap
Taken from here
Full credits maintained |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
great othe rthan thta is not a useful design really |
Posted: Tue Feb 24, 2009 9:17 pm |
|
|
Other than the fact that this lil cheat will fail horribly if there is simultaneous Transmission during received character time, I guess it is swell enough for a design nobody should dare trust.
The link is a pointer that is more my idea of BLAME - not credit.
This ckt and similar poor quality hacks have been around for some time.
The only similar hack one i've ever seen that was not a total waste of time is the 2 Schottky diode + one resistor trick for snooping a two way RS-232 cable - to feed a Listen ( RX ) only feed to a 3rd RS-232 - RX only plug.
Lame as it is - the circuit shown here could be used for RX at low baud - short haul - but no way for simultaneous ( overlapped) TX. |
|
|
MikeW
Joined: 15 Sep 2003 Posts: 184 Location: Warrington UK
|
|
|
dbotkin
Joined: 08 Sep 2003 Posts: 197 Location: Omaha NE USA
|
|
Posted: Wed Feb 25, 2009 10:31 am |
|
|
Thanks for pointing out that link. I edited the page to show that the design was lifted from my web page. I don't mind people doing that, as long as they give me credit for the design. It's the polite thing to do.
I've been using that circuit for a long time now, probably since before 2000. It's been used in a few thousand boards, used by people with everything from laptops to desktops to dumb terminals to old Palm V's with serial adapter cables. I haven't done any long distance, high speed, full duplex testing with it, but so far I'm not aware of a single instance in which it has not worked. A 100K pull-down on the gate of Q2 would not be a bad idea, just to prevent noise from a floating gate if it's left disconnected. |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
better but still no cigar - sorry |
Posted: Wed Feb 25, 2009 11:27 am |
|
|
the later cheapo RS-232 is better but still has a serious issue or two:
1- you MUST have RTS asserted HIGH from the "host" or you can't transmit
otherwise there is 0v or - worse neg 5v as a pull up
- which will NOT xmit anything
many simple systems do not have DTR /RTS active lines guaranteed
OK - while the default for an XP or later PC operated DB-9 IS to assert RTS YOU CANT' COUNT ON IT !!! especially if using an adapter like the Edgeport etc -- where you must explicitly define the optional handshake line states.
2- it produces a NON standard RS-232 output level - that i am not delighted to see. FYI: pulling down to ground is not the -5 v min RS-232 spec for a proper 'space' level - its actually in the indeterminate range - RE the spec
i'm amazed at the lengths people will go to - to avoid doing it with proper engineering . hey to hack around your self - what the hey - but in a shipping product ????? JUST NUTZ !!!
with MAX-232 / HIN202 etc - selling for under a buck - why the resistance to doing it RIGHT?? |
|
|
dbotkin
Joined: 08 Sep 2003 Posts: 197 Location: Omaha NE USA
|
|
Posted: Wed Feb 25, 2009 4:26 pm |
|
|
1. Using RTS, or some other signal at the connector, is simply a convenience. It also gives you a received data signal level close to what you're using. If your interface happens to be spitting out a 9V signal, it will get a 9V signal back. Not that it matters, particularly; read on.
2. While the voltage does not conform to the EIA-232 specification, it's a moot point. I am not aware of a device made in the past three decades that requires a negative voltage. Read the data sheet for any RS-232 receiver made since the 1488/1489 days (including the 1488!). The spec may say -3 to -24V, but the receivers are what we care about. The receivers do NOT need a negative voltage, and in fact simply run the incoming signal through a current limiting resistor and a clamp diode to prevent any negative voltage from reaching the base of the first transistor.
As for it being "just nutz" to ship a product with the MOSFET design, I respectfully disagree. So far I have had not one single device fail to communicate with ANYTHING. Period. For this particular application I was able to save a considerable amount of cost and board space. It's been a solid, reliable, defect-free solution. So, who's avoiding "proper engineering"?
Have you ever had first hand experience of this specific design NOT working? Do you know anyone who has had such specific first hand experience? I am always amazed by people who will flame a proven, working solution just because it's not what their professor or data book told them to buy. Look, if you don't like it, you're free to never use it. Just don't go bad-mouthing designs you haven't put to the test yourself.
In the end, though, this has absolutely nothing to do with CCS PICC, so there's no real need to moan and complain here. |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed Feb 25, 2009 4:52 pm |
|
|
There's a number of professional products, that are using a 5V CMOS level on RS232 TxD, e. g. with debug interfaces or other applications not intending long cable connections.
I have done this in some cases and utilized +/-5V TxD level in much more since 20 years. I'm not aware of any failure complaints, particularly with the latter. I have seen a single case of a x386 PC mainboard with an on-board RS232 actually requiring a slightly negative idle level by design. (It was using a horribly homebrew-like receiver, I don't remember the details).
Regarding some above suggestion, I clearly prefer a self-contained 3-wire interface, not requiring any additional lines, except for special RS232-powered designs. Meaningful additional requirements are to my opinion: short-circuit proof, a certain level of overvoltage protection, sufficient low impedance TxD (below some 100 ohms) to avoid false reception at the peer due to RxD/TxD cable crosstalk. |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Wed Feb 25, 2009 4:57 pm |
|
|
nobody should take it personally
i'm not against Mosfets or any other part - heck when i started my career - they did not exist yet .
SCRs and silicon transistor discretes were brand new items circa 1966 .
Micro controllers had not been invented yet either - Nor had 'C language.
i am in favor of low cost parts that DO meet all standards and urge
forward thinking engineers to do likewise.
if you want to use a marginal voltage, cheepo ifc,
i can't stop you .
BUT--
if for any reason the RTS line from the host is
NOT at or above 5v or is floated
the design is dead. you can't transmit.
If this sort of corner cutting is such as swell idea , why would anybody bother with the silly choice of using components designed to meet the
full spec?
Why do PC manufacturers and commercial I/O product makers waste time and $$ to meet the real spec?
why do they bother to have at least +/- 7.5V
for ancient 1488 1489 if it can just be casually ignored?
In fact why is there any spec at all?
The problem this circuit has is what good engineers call an "external dependency" and good designers work hard to insure that their circuits do not have such potential single point fault possibilities.
The rule is - that if you find such a dependency - you work hard to design it out.
just because a poor design choice has not caused pain before - that does not mean it cant happen in the future. all it takes is a revision in an external specification and the dependency eats your lunch.
Lastly , if i were to simply believe that everybody ignores standards - is it fine for me to do it too?
That sounds like what youthful speeders tell the cop who pulls them
over on the interstate. ;-))
for young engineers just starting out, i want to stress that
engineers who work for me / with me would not be caught dead
cutting corners that way.
none of the arguments posted are persuasive that good practice and standards should be ignored, especially to save 50 cents.
LOL |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Feb 25, 2009 5:12 pm |
|
|
The death knell for this one is that two of them could not talk to each other. You are relying on the other guy to be more standard than you are. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
dbotkin
Joined: 08 Sep 2003 Posts: 197 Location: Omaha NE USA
|
|
Posted: Wed Feb 25, 2009 6:30 pm |
|
|
Doug, there is a dead simple fix for that (which I suspect you may already have figured out, you're a smart guy). Use your own +5 instead of the host-supplied RTS (or whatever) signal for the pullup. It's not rocket science, folks. A 5V signal even meets the spec, at least for the positive voltage.
If you're intent on following the specification, then I assume you use only 25 pin connectors? That's what the specification requires, too - or it did the last time I looked, anyway. Maybe that's changed since then.
I am a big believer in standards. I am also a big believer in using what is required to do the job. My particular design was never intended to be, nor did I ever claim it was, a 100% specification compliant solution for every application. It will work as a very simple, low cost (in terms of money, parts count and PCB real estate) interface to allow your device to talk to PCs, dumb terminals, and pretty much anything else you may encounter. Again, if you're looking for 100% standards compliance, feel free to take a different approach. |
|
|
Guest
|
|
Posted: Thu Feb 26, 2009 6:43 am |
|
|
OK, I'd like to say that while this transisitor circuit may work it really does not save any real money.Please consider the time and effort to engineeer and produce the circuit,as well as ordering the parts,inventory,assembly,etc. All of these factor into the overall cost.
I learned a long time ago(+30years) that using readily available 'proper'parts saves money in the long haul.Also consider using sockets for 'I/O' chips.Every board of mine has quick, field replaceable chips saving a lot of $$$ in service calls. |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Thu Feb 26, 2009 6:53 am |
|
|
The really cheap solution is simple, us the TI or other manufactures version of the MAX232 - they are considerably cheaper than Maxim's product. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
MikeW
Joined: 15 Sep 2003 Posts: 184 Location: Warrington UK
|
wow, this generating some heat |
Posted: Thu Feb 26, 2009 10:31 am |
|
|
The 2N7000 circuit I posted the link to (Dales original) is perfectly acceptable for the workshop/lab.
If you look at nuno12345's original post, he was just trying to post a useful circuit.
The original has problems as pointed out.
Dales 2N7000 is fine.
I also wouldn't use a discrete solution for a PCB or production design.
I have just completed my latest design which uses SP3232's and SP3243
which are cheaper SIPEX (EXAR) alternatives.
Mike |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Fri Feb 27, 2009 6:21 pm |
|
|
Serious question. Can anyone recommend an rs-232 driver IC that is capable of running off of a single 3V coin cell? I only need a single driver set (1 tx, 1 rx).
I've found the Linear LTC2801, but they're rather expensive. I don't want a homebrew solution - I want a compliant IC. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
|
|