Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to build a simple circuit for RS 232 with 2 transistors

Status
Not open for further replies.

hassana

Newbie level 6
Joined
Jan 16, 2005
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
90
About RS 232

How to build a simple circuit for RS 232 containing of two transistor the first one is for transmitting and the second one for recieveing data, instead of using {RS 232 IC}
 

About RS 232

**broken link removed**
 

Re: About RS 232

Receiving data is simple: you use a resistor and a reverse polarity diode between the RX line and the base of the RX transistor .. the collector is the OC output ..

Transmission will require + and - voltages: where are you going to get them from?
A single transistor will not do the job ..
 

Re: About RS 232

Not proper RS232 voltages, but all serial ports I've tried actually work with 0/5V. I've interfaced PICs to PC serial ports with nothing but a couple of resistors and diodes.
 

Re: About RS 232

IanP said:
Receiving data is simple: you use a resistor and a reverse polarity diode between the RX line and the base of the RX transistor .. the collector is the OC output ..

Transmission will require + and - voltages: where are you going to get them from?
A single transistor will not do the job ..

Quote from Peter Anderson' book on PIC C:
However, it is possible to perhaps eliminate the intermediate level shifter by sending the TTL inverted. That is, the idle is
near ground (close to the less than minus 3.0), the start bit is near +5 VDC which meets the greater than +3 VDC
requirement and the data bits are then transmitted inverted, followed by the idle (near ground). My confidence in taking this
short cut was considerably bolstered by the introduction of the popular BasicX BX24 which does not provide a level shifter
and this seems to work and I have introduced a number of kits that use the same technique and have had no negative
feedback. That is, PC Com ports seem to recognize near ground as being an RS232 logic one although it is a tad higher than
the specified –3 VDC. Thus, in most cases, you can simplify the circuitry in transmitting to a PC Com port by simply
sending the data as inverted. (Again, note that this inversion is not possible with the hardware UART. Indeed, one can
invert the data, but the idle condition of the UART is near +5 VDC).
When using a PIC to receive data from a PC, recognize the outputs of the PC are probably good RS232 levels. That is, the
idle logic one is less than –3.0 VDC (usually –8.0 VDC and a logic one is greater than +3.0 VDC (typically +8.0 VDC).
Here again, the PIC can interpret a level near ground (less than minus 3.0 VDC) as being a logic one and a level near +5
VDC (greater than 3.0 VDC) as a logic zero. However, note that voltages of –8.0 and +8.0 VDC are considerably outside
the specification for levels appearing at a PIC input. I usually use a series 22K resistor which in conjunction with the
internal protection diodes clips these levels to close to TTL levels.
 

Re: About RS 232

In many cases a computer COM port will accept 0-5V signal.
That is fine, but if the output (Tx line) does not produce +/- levels according to the RS-232 standard, true RS-232 devices will not accept this signal ..
Read about the RS-232 standard; it is ca.+/-3 to +/-25 ..
 

Re: About RS 232

For short distances (3m or so), usually two inverter gates (74HC14 or even 74HC04) will do the job.
Use some 47-100kΩ in series with the input of the "receiver" and 220-330Ω in series with the "transmitter".
This works because the receivers of true RS-232 transmitters also have a threshold of about 2.5V. So if you drive them with 0-5V, they will receive correctly.
Your receiver will also be driven with at least 5V (positive) and the large resistor in series with its input will limit the current through the internal Vcc and GND diodes when the input voltage is +/-12V.

So far I have not found a single RS-232 device that did not work with this arrangement. It is possible some newer laptops will interpret your 0V idle output as a "disconnected cable", but the circuit is simple and inexpensive to warrant its use even with this possible inconvenience.

I have tried this with other CMOS devices, such as PIC's, just using the resistors mentioned above. But I recommend the inverters, because they invert the signal for you (don't need to do it in software) and then they provide an extra protection: should you get a transient on the lines, the first to get damaged are the gates, not the PIC.
Speaking of transients, a 12V bidirectional TVS on each line is also highly recommended.
 

Re: About RS 232

hassana said:
How to build a simple circuit for RS 232 containing of two transistor the first one is for transmitting and the second one for recieveing data, instead of using {RS 232 IC}

At october 2004 nut & volts article there is a good schematic for doing a cheap circuit for TX and RX with two transistors. if you want it let me know to uplaod it.
 

    hassana

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top