Hot!485 AUTOMATIC DIRECTION CONTROL

Post
pareshic4u
Starting Member
2010/08/22 04:48:28
I want to make dsPIC work with RS485 with only RX/TX pin. How do I RE/DE pin automatic control. Any schematic if u have then pl. post it. or any link also fine. In internet web serch i found only rs232 to 485 with automatic control. But I require only 485 with dsPIC with automatic direction control
 
isa.guru
Super Member
Re:485 AUTOMATIC DIRECTION CONTROL 2010/08/22 10:16:59
You can use a light sensor and when the sun rises the RS485 chip can switch to transmit. During the night it will be only receiving.
 
You can also use a microphone pointing to the nearest highway, a preamplifier and a schmidt trigger to control the direction automatically.
 
If you need something better you will need a port pin from the uC to control the direction :)
Brick
Super Member
Re:485 AUTOMATIC DIRECTION CONTROL 2010/08/22 16:52:34
Often it is easist to do this in a master /slave sort of protocol. The master controls the direction. It sends out a request then changes the direction so it is listening to the responce...

What sort of protocol are you using?
NKurzman
A Guy on the Net
Re:485 AUTOMATIC DIRECTION CONTROL 2010/08/23 12:15:06
Use a port pin when the TX Buffer is empty switch to RX.  Switch to TX just before you transmit.

 You want full automatic you will need a mono stable multivibrator ( aka a one shot)  and set the timing to match you baud rate.
isa.guru
Super Member
Re:485 AUTOMATIC DIRECTION CONTROL 2010/08/23 13:10:40
I intentionally did not mention the one shot multivibrator option because in case of RS485 (Tx and Rx only) the multivibrator has to start at the first edge of the Tx, which in many cases may be too late. For an instance if it is a MODBUS you need to turn the transmitter ON, then wait 3.5 character time, then start transmitting. So there will be no edge to turn the Tx ON :)
The one shot MV is good when you have some of those additional to the RS232 signals (forgot exactly which one :) ). So one of them triggers the one shot MV and then Tx starts transmitting. It is typically used in RS232 to RS485 converters
 
Brick
Super Member
Re:485 AUTOMATIC DIRECTION CONTROL 2010/08/23 16:30:01
Though that ceratinly is a method used in many direction controlled converters.
 
If he/she knows and controls the protocol (master-slave)...  Then to get the very best results he/she simply changes the direction before he/she transmits then change it back again shortly after he/she finishes.
jtemples
عُضْوٌ جَدِيد
Re:485 AUTOMATIC DIRECTION CONTROL 2010/08/23 17:02:20
And there are external UARTs that will do direction control automatically.
isa.guru
Super Member
Re:485 AUTOMATIC DIRECTION CONTROL 2010/08/23 18:39:47
Brick

Though that ceratinly is a method used in many direction controlled converters.
 
If he/she knows and controls the protocol (master-slave)...  Then to get the very best results he/she simply changes the direction before he/she transmits then change it back again shortly after he/she finishes.

 
OK, but the OP is talking about Rx/Tx pins only. No pin to control the RS485 driver. So he/she is changing the direction how? By using a port pin, yes. But he does not want that, he wants it with Rx/Tx pins only :)
So here comes the light sensor or the microphone :)
Brick
Super Member
Re:485 AUTOMATIC DIRECTION CONTROL 2010/08/23 22:08:23
AAAA yes I see that now :) Well I recommend he adds a pin :)
pareshic4u
Starting Member
Re:485 AUTOMATIC DIRECTION CONTROL 2010/09/04 07:55:37
Thanks for replies. I have got automatic RX/TX control circuit and tested it with 9600 bps/19200 bps. For your info I am posting schematic for reference. If anything u want to add or suggest it is welcome!
Thanks for your discussion.

Attached Image(s)

flubydust
Super Member
Re:485 AUTOMATIC DIRECTION CONTROL 2010/09/04 09:11:50
pareshic4u
For your info I am posting schematic for reference. 


You drive spaces with RS485 and marks with 4k7 resistors - Thanks for sharing, but, no thanks.

DarioG
Allmächtig.
Re:485 AUTOMATIC DIRECTION CONTROL 2010/09/04 13:27:53
Smile there must be something that's missing !
SierraTech
Starting Member
Re:485 AUTOMATIC DIRECTION CONTROL 2010/09/21 10:28:15
If I understand the request correctly you are looking for a 2-Wire RS-485 solution (sorry If I misunderstood).

A couple of years ago I found this application note on how to do this with a PIC...

Embedded Modem Transfers RS-485 Data

I ended up doing this in a PLD, but I based my design on this application note.

-Bob
TechDpt
Starting Member
Re:485 AUTOMATIC DIRECTION CONTROL 2018/09/25 01:26:19
SierraTech
If I understand the request correctly you are looking for a 2-Wire RS-485 solution (sorry If I misunderstood).

A couple of years ago I found this application note on how to do this with a PIC...

Embedded Modem Transfers RS-485 Data

I ended up doing this in a PLD, but I based my design on this application note.

-Bob

Hi Bob
do you have a full copy (text, figure and listing) for this nice paper? I'm unable to find it on the EDN web site (figure and listing is missing).
 
Thank for cooperation!
 
Best regards