Jump to content
Electronics-Lab.com Community

failed RS-232 level converter :(


Recommended Posts

I have a circuit that already provides +12 and -12 volt supplies.
The microcontroller Vdd is 3.3v.

I tried designing a transistor / resistor system to handle the invert and voltage shifts, without using a MAX232, but unfortunately it does not work..  It overheats and I could only salvage the rest of the system by snipping off these transistors.

Before I ordered the PCBs I tested the design in LTSPICE and sure enough the TTL <-> RS232 voltage shift and invert worked great, but admittedly I didn't check the current running through the components...  simulating again I see that the lower-right-most transistor has 1.1A running through collector-emitter..

Attached is the schematic..  what did I fail to anticipate?  I'm now thinking I only need some strategically placed diodes to prevent mis-bias the transistor bases.


post-40149-14279144329063_thumb.jpg

Link to comment
Share on other sites


I was under the impression that if base voltage is equal to emitter voltage, the transistor is totally off and the collector is essentially high-Z.

That's why I have pull-ups on base-emitter of most transistors.



So you're saying that I basically have current flowing from pull-up of transistor A,  through its base/collector,  and then through the pull-up of transistor B..  and that's enough to establish an "on"  on transistor B,  because its base is also connected to this pathway?

I actually shot myself in the foot by adding all these  "safety" pull-ups?

But luckily, maybe the whole design can still work by just leaving out the pull-ups?


Back to LTSPICE to test this theory..  I'll be so relieved if that's all it is!

Link to comment
Share on other sites

Here are a couple ways to do it.

V1 is more complicated and it has the disadvantage of both output transistors being on simultaneously for a point during switching but it'll have virtually no saturation loss i.e. you'll get +/-15V out. V2 is simpler and has the advantage of not having both transistors on during switching but you loose 0.7V on either supply rail so with 15V in, you'll only get +/-14.3V out.

Link to comment
Share on other sites

Thank you Hero, I really like V2 for the benefit of no switching waste.  I'll try that design with my next attempt at a DC->AC  coil driver, where higher currents are necessary.


From simulating, my existing receiver  (RS232 -> TTL)  should work OK with ~8mA maximum switch waste (on output).


For the transmitter  (TTL -> RS232)  it looks like I can use my existing PCB layout by hacking on one new resistor, changing a couple resistor values, and removing the pull-ups and base resistors at each transistor-to-transistor.  For now, I have to stick to the original layout as much as possible since I foolishly already ordered 12 PCBs!!  This solution should work properly with only a ~40uA maximum switch waste (on output).

post-40149-1427914432957_thumb.jpg

Link to comment
Share on other sites

You need a low value pull-down resistor on the input, otherwise when there's no signal Q1 and Q4 will turn on, allowing current through Q2 and Q5 which will cause Q3 and Q6 to turn on and short circuit the power supply.

There will be switching waste because Q3 and Q6 will both turn on simultaneously when the input voltage changes from 0V to 3.3V.

Here's another idea which you should be able to cobble together on the existing PCB.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...