RS485 information please

Thread Starter

Nick Bacon

Joined Nov 7, 2016
130
I am interested in learning about implementation of RS485 to transmit data on various 12v 0v signals. I understand that the feeds would need to be converted to binary, then sent to a transceiver, transmitted and then decoded back to a 12v 0v signal.

Let's say that I have 8 feeds, what is the simplest way to build a circuit, or 2 (send and receive). The feeds could then be used to control leds, relays etc at the remote location.

I would like to experiment and try and build a simple circuit and then develop it further.
 

GopherT

Joined Nov 23, 2012
8,009
I am interested in learning about implementation of RS485 to transmit data on various 12v 0v signals. I understand that the feeds would need to be converted to binary, then sent to a transceiver, transmitted and then decoded back to a 12v 0v signal.

Let's say that I have 8 feeds, what is the simplest way to build a circuit, or 2 (send and receive). The feeds could then be used to control leds, relays etc at the remote location.

I would like to experiment and try and build a simple circuit and then develop it further.

You will need a circuit on the sending side to convert your analog signal (voltage?) to a binary value (analog to digital converter).

Then you will need a parallel to serial conversion (shift register).

Then some type of level shifting to get from 5V logic/5V microcontroller to 12V signal

Then a driver circuit (current amplifier) with low impedance to send the signal down the line.

On the other side, you will need receiving level shifter, decoding logic.

If you have more than one signal on the sending side, you will also need some type of "multiplexer" or control (decision making) logic that allows the signals to be collected in rotation and sent.

On the receiving side, you will need some multiplexing circuitry to decode which signal is being received and the signal.
 

MrChips

Joined Oct 2, 2009
34,807
There might be other ways to solve your problem but before we offer solutions we need to have a better understanding of what is the problem.
If I may guess your situation, you have some kind of controller (transmitter) that needs to send control information to remote stations (receiver) in order to activate 12V devices such as LEDs and relays.

Firstly, we need to know the distance separating the controller and receivers and the desired response time.
Secondly, is there a single receiver station that can feed the various devices? Or is this a multi-drop network with multiple stations that are some distance apart?

RS-485 is designed for remote networks in harsh EMI environments. It can be used to communicate data between two stations. It is also well suited for multi-drop networks for master-slave control as well as peer-to-peer communications. For these network applications a suitable communications protocol must be used. There are existing protocols such as Modbus and you can buy off-the-shelf modules for sending digital or analog data.

RS-485, while highly recommended, is not the only solution. You can use RS-232 or 4-20mA current loop. Hence knowledge of the distance and required data rates will help to decide what hardware solution is best.

For simple digital device control, a communications protocol might not be required. You can transmit a serial data stream of n-bits in order to control n digital devices. For this, shift registers can be used along with a clock, data and strobe line.

Beyond simple shift registers, you will need a microcontroller at both ends of the network if you wish to use UART style signalling.

Finally, you need to consider data corruption in harsh environments. How critical are the control devices? Do you need error detection and correction, redundancy or fail-safe operation?
 

Thread Starter

Nick Bacon

Joined Nov 7, 2016
130
There might be other ways to solve your problem but before we offer solutions we need to have a better understanding of what is the problem.
If I may guess your situation, you have some kind of controller (transmitter) that needs to send control information to remote stations (receiver) in order to activate 12V devices such as LEDs and relays.

Firstly, we need to know the distance separating the controller and receivers and the desired response time.
Secondly, is there a single receiver station that can feed the various devices? Or is this a multi-drop network with multiple stations that are some distance apart?

RS-485 is designed for remote networks in harsh EMI environments. It can be used to communicate data between two stations. It is also well suited for multi-drop networks for master-slave control as well as peer-to-peer communications. For these network applications a suitable communications protocol must be used. There are existing protocols such as Modbus and you can buy off-the-shelf modules for sending digital or analog data.

RS-485, while highly recommended, is not the only solution. You can use RS-232 or 4-20mA current loop. Hence knowledge of the distance and required data rates will help to decide what hardware solution is best.

For simple digital device control, a communications protocol might not be required. You can transmit a serial data stream of n-bits in order to control n digital devices. For this, shift registers can be used along with a clock, data and strobe line.

Beyond simple shift registers, you will need a microcontroller at both ends of the network if you wish to use UART style signalling.

Finally, you need to consider data corruption in harsh environments. How critical are the control devices? Do you need error detection and correction, redundancy or fail-safe operation?
Hi there,

I have an electronic unit that is used in power stations etc. The unit has 4 independent channels (water level sensor) each with 3 leds, steam, water and fault. The base signal comes from a comparator that gives 12v for sensing steam and 0v for water. With the use of Darlington arrays the signal is sent to leds and relays. 3 leds and one relay per channel.

I have designed a remote display but would like to take it further. There is space on the main board for a plug in card, for remote display or possibly an extra relay card or anything else that may be required. The slot have a feeds for each channel that are either 12v or 0v, so I guess a digital on or off. There are 2 signals per board so 8 in total. The extra led is a inserve of one of the other, i.e. Only steam or water can be on at any one time.

The run can be anything up to the 485 limit. There are no micrcontrollers or computers involved.

I am open to any suggestions. The idea is to reduce the cable cores for longer distances if customer requires it.
 

MrChips

Joined Oct 2, 2009
34,807
What is the RS-485 limit? To determine that you need to specify the data rate.
You still haven't told us what is your distance.
 

Thread Starter

Nick Bacon

Joined Nov 7, 2016
130
What is the RS-485 limit? To determine that you need to specify the data rate.
You still haven't told us what is your distance.
I thought that 4000 feet was the limit for RS485, therefore the maximum cable length would be this, I practice 500m is likely to be the longest used. Each application is different.
 

Thread Starter

Nick Bacon

Joined Nov 7, 2016
130
The amount of data will be minimal. I am not too concerned about data rates at the moment. It is ascertaining the work, cost and board space needed to implement.
 

MaxHeadRoom

Joined Jul 18, 2013
30,654
Let's say that I have 8 feeds, what is the simplest way to build a circuit, or 2 (send and receive). The feeds could then be used to control leds, relays etc at the remote location..

Haven't we covered this topic already in your previous thread?
If you want to send data to multiple stations then it sounds like a job for Modbus style protocol, this can be sent with RS485 and if using a Picmicro they have built in UART modules for serial data formation.
Max.
 

Thread Starter

Nick Bacon

Joined Nov 7, 2016
130
Haven't we covered this topic already in your previous thread?
If you want to send data to multiple stations then it sounds like a job for Modbus style protocol, this can be sent with RS485 and if using a Picmicro they have built in UART modules for serial data formation.
Max.
Hi, yes it was mentioned but I opted for a different approach. I would like to cover this avenue as well, more so for my learning and possibly as an option.

The data will only go to one station, a remote display or remote relay card. I will research the pimicro.

Thanks
 
Top