Shop OBEX P1 Docs P2 Docs Learn Events
RS232 to CMOS Voltage Converter — Parallax Forums

RS232 to CMOS Voltage Converter

th3jesterth3jester Posts: 81
edited 2011-05-13 16:05 in General Discussion
I need to convert RS232 to CMOS levels and vice verse. I know I can use a Max232 chip, or something similar, but I don't have to time to order any. I found this schematic and am curious if anyone has successfully used it?

I've done a few simple tests and it seems to work like it should, I just want another opinion so I don't burn out my Xbee's.

My project is interfacing the Ridgesoft Intellibrain Robot (Atmel chip, Java Programming) with LabView wirelessly. The robot com ports are -9V to +9V and the XBee's are 0V to 3.3V.
557 x 431 - 26K

Comments

  • kwinnkwinn Posts: 8,697
    edited 2011-05-13 10:44
    I have built a similar circuit using 2N3904/2N3906 transistors and it worked fine.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2011-05-13 15:39
    I've used that circuit many times. In fact, minus the diode/capacitor it is the same circuit as has been used for years on every BASIC STAMP module. The diode+capacitor make it capable of a little bit of full duplex, but if you can live with half duplex, just leave out the diode+capacitor and connect the 4.7k pulldown resistor directly to the RS232 serial input.

    A special consideration with the XBee is that its serial input (pin 3), already has a pullup resistor (unless you disable it with the "PR" command). So, it may not really need the 10k pullup resistor in the circuit for that pin.
  • stamptrolstamptrol Posts: 1,731
    edited 2011-05-13 16:05
    One point to be made is that the circuit shown (as well as the version on the Stamp) does not have any ability to generate the negative voltage necessary for true rs-232 operation. In this circuit's case the negative voltage is "stolen" from the fully-implemented serial port at the other end.
    So, Stamp p16 to PC will work but Stamp p16 to some other partially implemented device won't.

    Thus the value of the Max232, Max233, and ST232 type of chip.

    Cheers,
Sign In or Register to comment.