Circuit-Projects.com New Projects
Loading the search box...
Converter

RS232 - RS485 Converter with Automatic RX - TX Control

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 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.

Component 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

The PCB file is provided in pdf format. You can apply it to the board by using the ironing method.

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 (54)

Sergio Rodríguez
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
Sergio Rodríguez
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
jack
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.
Sergio Rodríguez
Thanks Jack, I have tried again and file has downloaded fine now.
Best Regards.
Sergio.
Sergio Rodríguez
Congratulations Sirs. It is a very goog and useful project.
Regards.
Sergio
Sergio Rodríguez
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
bigmac
Hi, are you sure that SN76175 is the equivalent of MAX485? I couldn't find any datasheets for SN76175.
Sergio Rodríguez
Sorry I have done a mistake.
I beg your pardon.
I have used SN75176 , not SN76175.
Thanks again.
Sergio
jack
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?
Sergio Rodríguez
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.
Sergio Rodríguez
I have seen the tx led blinking.
But nothing in the out of SN75176
Thanks Jack.
Sergio Rodríguez
Wait a minute please.
I forget to wire TR emisor to Vcc.
jack
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 smilies/smiley.gif I hope it will be ok this time.
Sergio Rodríguez
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.
Sergio Rodríguez
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
Sergio Rodríguez
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
Sergio Rodríguez
Thank you Sirs.
I can do it work, with a few changes.
Best regards and Merry Christmas.
jack
Hi Sergio,

I couldn't write for a few days sorry. Did you change the output resistors to set the line voltage level?
Sergio Rodríguez
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.
Jorge G. Toral
Hello. What could happen if there is no resistor array on the MAX485 bus output/input? I mean, if the A-B terminals is taken directly to the bus. Is there an advantage?

Thanks in advance.
Z.R.
Hello,
I want to design a component to connect 2tx signal from 2 RS232 port to a RX of a RS232 port for communication.Can you help me?
Thanks.
jitender
Hi,
I have assembled two rs232-rs485 converter as in the circuit.
Two rs485 lines are cross connected and two rs232 ports are connected to pc.Red, Green LED's are blinking but I am not receiving any data.
I have not changed anything. any solution?
TIA.
jack
Cross connection is not the proper connection for the RS485 network. You must connect all the A outputs together and all the B outputs together. How many converters you use doesn't matter.

jitender
Hi,
I did what jack has said, but now neither led's are blinking nor I am receiving any data. this is tha connection I am using...

http://www.postimage.org/image.php?v=Pq1RHcc9

TIA
Sergio
Hi jitender. Connection seems to be OK, if your converters has no troubles when was ensambled, I think you have to review your soft.
Dilip Vora
yes i have commeted
Siddharth
Sir can we use the circuit for RS485-RS232 converter, or is it can work only as RS232-RS485 converter. Please do clarify it
Regards
Siddharth
Can the circuit given work as a RS485-RS232 converter?
Regards
Jack
Hi it is both RS485 to RS232 and RS232 to Rs485 converter. Working bidirectional.
Nischay Kumar
Hello author,

i'd like to do RS485 comm. between micros only (no PC) and since the logic high is 5+V and logic low is 0V, do i still need Max232in the above circuit ?
Hello Friends
I have tried this smart project, it is working fine for receving message from my 89S52 uC based device but i could not broadcast the msg to that device.

I have tried 00abc

my device is supposed to send back the data once received.

will there anything i need to do with uC to make it slave to lisent?

Thanks
Sebastian
In the photo te resistors color indicated that:
R1 and R2 are 10K
R3 to R4 are 33K
Please Check this values.
The color in the photo is orange, not RED. Somebody test and use this circuit?

Best Regards!
jack
They seem orange in the photo but they are red in real. Sure many people built this circuit and using it.
Sergio
To see if interface is working, anybody can add some leds over RS485 line like above in picture.
Best Regards

http://www.postimage.org/image.php?v=PqFvZur
Babak
Hi dear.
I want connect modbus with rs485 to micro.can i use this project with auto rx/tx beacuse my modbus is 2 wire.
Babak
Hi Dear.
Please send final circuits with last changs.i want build this project but i cant find last version of circuits,PCB and components list beacuse in each comment its change.
Sergio
I have tried the original circuit and think that work very very good.
babak
Hi Dear.
I have try to do this and work probably
rudy fernandez
What I like the most from this circuit is its flexibility to use the two types of communication ports. At least I won't have to rely on RS232 alone if the network equipment has only RS485 port. Thanks!
MANU
SN75176 is equivalent to MAX485 ?
Andy P
Tried to download the circuit, got the file downloaded by when trying to extract the jpg file nothing happens.
ary
can you give me information all about instalasi all component to PCB, for example Base,emiter,colector to PCB
Roel
Can I swap out the Max232 for a max3232 and the Max485 for a max3471? I want to run this off A 3v psu? Or would there be more changes?

Thanks,

j. johnson
wow! this sounds an interesting circuit. thanks for all your recommendations :)
amer
when the circuits is done, what is the baudrate of the serial com?
typhoon
the baudrate depend on you cp and mcu decide.
Tsog
Hi

This converter's schematic ?
synyuno
Hi friends,
I want to connect between microcontroller and PC with this converter. the converter responses receive or transmit data, but data is not correct. Example : when i send 'ABCD', another converter would received '????>~'.

Can anybody help me
This is my project
http://www.postimage.org/image.php?v=Ts1cxBhJ
synyuno
Hi friends,
I want to connect between microcontroller and PC with this converter. the converter responses receive or transmit data, but data is not correct. Example : when i send 'ABCD', another converter would received '????>~'.

Can anybody help me
This is my project
http://www.postimage.org/image.php?v=Ts1cxBhJ
Hexathlon
Hi Sir,
I have built the circuit with all connections as shown.
But it is working good in uni-direction only.
If i give some data from 485 to 232 it receives but don't work for reverse.I have used BC557 in place of BC327.

Please suggest me solution.

Regards,
Hexathlon.
Cassandra
Hi,

May I know what is the purpose of R10?

Thanks & Regards
Cassandra
Cassandra
Hi,

What is TR emisor that Sergio was talking about? I've built my circuit and seems like not working. Pin 3 from Max485 is always low and no outputs from Max 485. Please help me.

Thanks & Regards
Cassandra
alex
Buenas, realice el circuito pero no entiendo como probarlo. Alguien puede ayudarme?
Que se supone que debo hacer con U4 y U5? porque hay dos?
Muchas Gracias

Hi, I have donde the circuit but now i dont know how to test it. Can someone help me?
What am i suposed to do with U4 and U5? why are too of them?
Thanks

Dhaval
Hi,
Sir i am using the same circuit as shown in figure but only uni-directional communication is taking place(i.e. transmitting).Actually i have done two changes 1. i have used Transistor 2907 in place of BC237 and given supply voltage of 3V in place of 5v.

Am i doing something wrong please help me out.

Regards,
Dhaval

Write comment

smaller | bigger

busy
 
RSS
Get the latest projects to your e-mail box:
Subscribe to RSS Feed Follow us on Twitter
Contact | Privacy Policy | Advertising
Subscribe to RSS Feed