Circuit-Projects.com Logo
  Search
  Search through schematics
       
Become a reader:
 
 
Subscribe to Feed


RS232 - RS485 Converter with Automatic RX - TX Control

Print E-mail

Today, although the wireless technology grows very fast, the long distance funicular communication still keeps its popularity. The reason is obvious that cost and complexity is high at the wireless communication.

RS232 is probably one of the most used, easy to develop and easy to apply communication protocol. We generally encounter to this standard at the MCU applications. But it has some restrictions. It allows us to use maximum 15 meters cable. Good wiring, low baud rates and less noisy mediums may allow us to exceed this limit a little more. The main problem here , when the distance increases, the noise at the common ground line also increases. Another issue, RS232 allows only two devices to communicate reciprocally. More than two devices can not communicate at this line and we need another solution for this situation.

RS485 is the standard that solves this problems. The main difference is,  RS485 transfers the data depending on the potential difference between the two communication wires. The polarity defines the logic state of the signal. You can transfer data up to 1220 meters far away and with a rate up to 10 Mbs. 32 devices can join the RS485 network.


Converter Operation:

While transferring the data, MAX232 converts the signal coming from the DB9 connector to TTL/CMOS level. Then MAX485 transfers the input signal coming from the MAX232 to the RS485 line as a voltage difference. While receiving the data, MAX485 detects the data at the RS485 line and transfers it to MAX232 then output can be taken from the DB9 connector.

Converter controls the "Receive" and "Transmit" modes automatically.

Components List:

R1, R2 : 1K 1/4W Resistor
R3, R4, R5, R11 : 2.2K 1/4W Resistor
R6, R7 : 560 Ohm 1/4W Resistor
R8, R9 : 47 Ohm 1/4W Resistor
R10 : 120 Ohm Resistor
C1 : 10uF 50V Electrolytic Capacitor
C2, C4 : 100n Polyester Capacitor
C3 : 10uF 16V Electrolytic Capacitor
C5, C6, C7, C8 : 1uF 16V Electrolytic Capacitor
D1 : 1N4007 Diode
L1, L2 : Red and Green LEDs
Q1 : BC327 PNP Transistor
U1 : MAX232N
U2 : MAX485CPA
U3 : LM7805
J1 : DB9 PC Mount Female Connector
U4, U5 : 2 Terminal PCB Terminal Block

You should be careful before etching the board. Don't forget to control the ways and the thin gaps between them.

Click here to download the PCB layouts and the schematic.

RS232-RS485 Converter- Printed Board

Red LED indicates the transmitting and green one indicates the receiving process. When there is no data transfer, to keep the data line at a constant voltage leve , two 560 Ohm resistors are connected to the line. One of them is powered and the other one  is grounded.

RS232 - RS485 Converter

The main advantage of this converter is, it can detect the incoming/outgoing data and switch the TX and RX modes of MAX485. It controls the DE and RE enable bits automatically. The RS485 lines A and B are taken from the screw terminal block. The connections are shown in the layout that is inside the downloadable zip package.

Comments (19)add comment

Sergio Rodríguez said:

 
Estimados Señores, he estado tratando de descargar el archivo que contiene PCB layouts and the schematic y siempre baja roto y luego no puedo abrirlo. Le agradecería si pueden verificar el estado de ese archivo para poder descargarlo.
Muchas Gracias
Sergio
October 21, 2008

Sergio Rodríguez said:

 
Hello Sirs, I have tried to download the file with PCB layouts and the schematic and all the times is broken. I hope that you can verify that file to make a satisfactory download.
Thanks and Regards.
Sergio
October 21, 2008

jack said:

 
Hi Sergio, I just downloaded the file and no problem occured. Please try again and if you still have problems please write with more detailed description. Regards.
October 21, 2008

Sergio Rodríguez said:

 
Thanks Jack, I have tried again and file has downloaded fine now.
Best Regards.
Sergio.
October 23, 2008

Sergio Rodríguez said:

 
Congratulations Sirs. It is a very goog and useful project.
Regards.
Sergio
October 23, 2008

Sergio Rodríguez said:

 
Hello Sirs.
I am here again. I have assembled this circuit and have a problem. When I try to send data, pin 3 of MAX485 (I have used SN76175) stay in low state (0.28 volt) and MAX485 don´t work.
I hope that you have any solution.
Thanks and Best Regards.
Sergio
November 06, 2008

bigmac said:

 
Hi, are you sure that SN76175 is the equivalent of MAX485? I couldn't find any datasheets for SN76175.
November 06, 2008

Sergio Rodríguez said:

 
Sorry I have done a mistake.
I beg your pardon.
I have used SN75176 , not SN76175.
Thanks again.
Sergio
November 06, 2008

jack said:

 
Hi Sergio, I just checked the assembled circuit. When there is no transmit, the pin 3 keeps its high state (6.5V), when I transmit data it goes to low (2.3V). So it works properly. SN75176 can be used instead of MAX485 as you know. But are there any other difference in your circuit?
November 06, 2008

Sergio Rodríguez said:

 
The only diference I have is SN75176 and my LM7805 give me 5v like the most high tension. How do you have 6.5 volt.
The BC327 never change his state and pin 3 from SN75176 is ever low (0.28v). Pin 12 from MAX232 keep always BC327 in the same state.
I don´t know where is the problem.
Thanks for your answer.
November 06, 2008

Sergio Rodríguez said:

 
I have seen the tx led blinking.
But nothing in the out of SN75176
Thanks Jack.
November 06, 2008

Sergio Rodríguez said:

 
Wait a minute please.
I forget to wire TR emisor to Vcc.
November 06, 2008

jack said:

 
6.5V is the result of an input signal with a magnitude greater than 5V. It was only to show the toggle between the high and the low states. I am waiting the result after connecting the emitor :) I hope it will be ok this time.
November 06, 2008

Sergio Rodríguez said:

 
Well. It seems to be working now, may be fine.
I have not experience about this.
I think that have a weak signal level in the out of SN75176.
I have teste (pin 6-7) with a led and serial resistence (500 ohm) and blink.
In pin 3 I have 0.28v with no data and fluctuates between 0.34v - 0.56v with data trasmition. I just have a digital multimeter. 8-))
I beg your pardon again.
Best Regards.
Sergio.
November 06, 2008

Sergio Rodríguez said:

 
Hello Sirs.
I am working in a develop to connect the computer with my car.
I have a Ford car with ECC IV DCL ECU (not OBD2) that has a RS485 communication balanced lines D( ) and D(-). But my assembled circuit has between A-B 1.49V , A-Ground 3.2v and B-Ground 1.73v and the ECU has between D( )-D(-)4.53v D( )-Groung 4.77v and D(-)-Ground 0.24v
What do you think about that tensions levels.??
Could this assembled circuit work whit my ECU. ??
I have tryied to establish communication with ecu but nothing happend.
Thanks and Best Regards.
Sergio
November 08, 2008

Sergio Rodríguez said:

 
Hello Sirs.
I am working in a development to connect the computer with my car.
I have a Ford car with ECC IV DCL ECU (not OBD2) that has a RS485 communication balanced lines D( ) and D(-). But my assembled circuit has between A-B 1.49V , A-Ground 3.2v and B-Ground 1.73v and the ECU has between D( )-D(-)4.53v D( )-Groung 4.77v and D(-)-Ground 0.24v
What do you think about that tensions levels.??
Could this assembled circuit work whit my ECU. ??
I have tryied to establish communication with ecu but nothing happend.
Thanks and Best Regards.
Sergio
November 10, 2008

Sergio Rodríguez said:

 
Thank you Sirs.
I can do it work, with a few changes.
Best regards and Merry Christmas.
November 11, 2008

jack said:

 
Hi Sergio,

I couldn't write for a few days sorry. Did you change the output resistors to set the line voltage level?
November 11, 2008

Sergio Rodríguez said:

 
Hi Jack. Yes, I did it.
You can see that here
http://www.postimage.org/image.php?v=PqQCgbA
It´s the Ford way.
Regards.
November 12, 2008

Write comment

security image
Write the displayed characters


busy
 


Submit Your Project
You can share your own electronic circuit schematics/diagrams or projects with people from all around the world...
Please Click
Resistor Value Calculator
4 Band | 5 Band
B1
B2
B3
B4
Value:
Tolerance:
Circuit Categories
Home
Audio
Control
Converter
Metering
Power Supply
Radio Frequency
Miscellaneous
..................................................
Submit Circuit
Circuit Diagrams
Microcontroller
Subscribe
Google Reader or Homepage
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Add to My AOL
Subscribe in Rojo
Add to Technorati Favorites!
Add to netvibes
New Circuits

Translate This Page

12V DC to 220V AC In...
1. pls i need a design for 2000w can u help me send it
Simple Cell Phone Ja...
2. hey this is a great circuit. I am using it as an extra project in my electronics class, bu...
12V DC to 220V AC In...
3. hi dear i needed aconvertor220vdc to 220ac tank
Long Range FM Transm...
4. cn anyone help me..m goin to make a long range FM transmitter.. if anyone hav any idea abo...

 

Electronic Circuit Projects
Circuit-Projects.com is licensed under a Creative Commons Attribution-No Derivative Works 3.0 License.

 
Powered by Joomla. The original Circuit-Projects.com theme is used.