1
\$\begingroup\$

Each time I wanted to hook up a micro-controller UART to my computer via serial port, I make an adapter with the following schematic:

circuit

For the capacitor, I use 47nF and for the diode, I use 1N4001. VCC is 5VDC regulated. The rest of the part values shown are self explanatory. Resistors are all 1/4 watt.

With this setup, If I deliver 5V to the TXDA net (aka output to PC), then the PC will recognize that bit as logic high. If however, I deliver only 3.3V then the PC doesn't want to recognize the bit.

The PC is able to output data to the micro through the RXDA pin just fine in all cases.

In my circuit, I connected pins 4, 1, and 6 of the serial port together and pins 7 and 8 together to make it compatible with all computers and to try to eliminate EMI.

Is there a way I can get this circuit so that it recognizes data at low voltages?

The reason I'm making such a circuit is because I'm simulating an HM-TRP wireless data module (that refuses to work at more than 3.9V) and I want to see and control the data on my computer so that later when I actually use the module instead of the computer, everything will then work.

And for those who ask, the voltage regulator I used to generate 3.3V from 5V is LM1117-3.3

\$\endgroup\$
  • \$\begingroup\$ What's wrong with using a USB-UART bridge? \$\endgroup\$ – Ignacio Vazquez-Abrams Oct 6 '17 at 22:40
  • 1
    \$\begingroup\$ @Transistor My recollection is -3 to -15, +3 to +15, with a required ability to tolerate without damage, -25 and +25. But computers have changed, USB is everywhere, and FTDI chips (and clones) abound. So I'm pretty sure the OP has little to almost no knowledge about real RS-232 specs and uses the term as a replacement for "asynch serial communications with FTDI-like ICs." If the OP really does have a true RS-232 port, I'd be shocked. My guess would be a virtual COM port, instead. \$\endgroup\$ – jonk Oct 6 '17 at 22:48
  • 2
    \$\begingroup\$ I'm doing a project that uses wireless communications via UART (which is what the HM-TRP chip runs with). My project doesn't use usb at all. Be shocked jonk, I have a true RS-232 port on my computers. \$\endgroup\$ – user152879 Oct 6 '17 at 23:03
  • 2
    \$\begingroup\$ RS-232 has the same 1.4~1.5v threshold as 74HCTxx logic and TTL. But if you put 3.3V Tx with Vcc= >4V the transistor is ON all the time. So use the same Vcc as your UART and 74HCT logic. Good enough for short haul twisted pairs. \$\endgroup\$ – Sunnyskyguy EE75 Oct 6 '17 at 23:30
  • 1
    \$\begingroup\$ Tony is right. After fiddling around and using 3.3V as VCC, I was able to read data. \$\endgroup\$ – user152879 Oct 7 '17 at 2:18
0
\$\begingroup\$

RS-232 has the same 1.4~1.5v threshold as 74HCTxx logic and TTL. This standard threshold is backwards compatible to all families of TTL but implemented many ways using diodes, 2 Vbe's etc.

But if you put 3.3V Tx with Vcc= >4V the transistor is ON all the time.

So use the same Vcc as your UART and 74HCT logic.

Good enough for short haul and better with twisted pairs Rx/gnd, Tx/gnd. 8 turns/ft

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy