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.

Communication issues with RS-232 Signals and Shielded Cable

Prabhakarankft

Member level 1
Joined
Jun 22, 2019
Messages
40
Helped
0
Reputation
0
Reaction score
4
Trophy points
8
Location
Chennai, India
Activity points
472
Hello Everyone!
I have designed two PCB for Textile machineries! Application is very simple Transmitter and receiver! Based on the data We will switch on Some Relays.

Transmitter will send some data through RS232(Shielded 5 core Cable ) to receiver. Receiver will receive the data and switch ON some relays! Transmitter is getting the power from Receiver PCB. In receiver We have one SMPS 15V-23.2A. Whenever AC230V power cable and core cables are placed very near, communication is missing over RS232 Cable!
It is happening very randomly. If we separate both the cables it is working fine without any issues. In practical We could not separate the Cables due to cable laying restrictions!

What should I do for Uninterrupted RS-232 Communication!

Shielded core cables are having 5 cores (Spec: 14/36 ). Pin details as follows. Shield of Core cable is not connected anywhere and total length of the Cable is 4.4 Meter
1. 15V Positive
2. Tx(RS232 Level)
3.Rx(RS232 Level)
4. Acknowledgement Pin @ 3.3V --MCU I/O Pin
5. GND

Relimate 5 pin Connector <----Core Cable 4.4 Metre----> DB9 Female Connector
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
15,127
Helped
4,935
Reputation
9,890
Reaction score
4,742
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
128,440
Connect the shield at one end - possibly both. You don't gain anything by have a floating shield and its close proximity to the 5 wires may increase interference coupling in to them.

Sending a 3.3V signal along the same cable is asking for trouble. The threshold at which its logic level could be seen wrongly is only about 1.5V which is too small for comfort. I suggest converting it to the same signal levels as the RS232 TX and RX signals then attenuating it at the receive end.

Brian.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
20,356
Helped
4,441
Reputation
8,891
Reaction score
4,468
Trophy points
1,393
Activity points
134,577
Hi
Shield of Core cable is not connected anywhere and total length of the Cable is 4.4 Meter
You noticed that the power cable "influences" the signals on the data cable.
This "influence" is caused by current and/or voltage.

Now the idea of a shield is to prevent from this influence.
The current/voltage should be carried by the shield instead of the signals.

But without shieds connected ... how is your idea.. how can it carry current?

***
You say on the receiver side there is an SMPS. Most probably an AC/DC supply with metal case.
The metal case should be connected to EARTH_GND ... and also here the shield of the cable should be conected to EARTH_GND.

Additionally you should use some kind of EMI_connection:
use a (1nF || 1M Ohms) from SMPS_secondary_GND to EARTH_GND.

***

Pin4 of the cable is a 3V3 MCU pin signal. You should add ESD protection and EMI filters on both sides.
(RS232 transceivers usually have them built in. Check on this.)
Generally it´s no good idea to mix 3V3 signals and RS232 signals within one shielded cable. But I don´t expect problems with this.

***

Tell us the results.

If you need more detailed help, then please upload photos (100kBytes/picture are sufficient) of both receiver and transmitter wiring.

Klaus
 

Prabhakarankft

Member level 1
Joined
Jun 22, 2019
Messages
40
Helped
0
Reputation
0
Reaction score
4
Trophy points
8
Location
Chennai, India
Activity points
472
Connect the shield at one end - possibly both
Sure I will update the result after grounding the Shields! It it is happening randomly it will take time!
--- Updated ---

The threshold at which its logic level could be seen wrongly is only about 1.5V which is too small for comfort
Receiving this 3.3V Signals through optocouplers(PC817 with 100E Resistor on Anode) will improve results?? Yet now I have not received any problems on this area..

But We faced some times MCU on Tx end as well Rx end has stopped working(Completely gone off)! Sometimes only that particular Pin on MCU is not functioning! I have not doubted this is due to sending signals at 3.3V! Expecting experts advise!

It seems I have very less knowledge in designing! Since It is related to machinery related product We run many Cables(Flat cables too-- Rx end). Really I have no Idea about EMI/EMC issues! Will it cause any issue if We run Cables over Moving Metal parts!!
--- Updated ---

But without shields connected ... how is your idea.. how can it carry current?
Current consumption of Tx PCB is just 400mA( Tx getting power from Rx PCB). My Idea is 14/36 wire will be sufficient to carry this current! Among 5 Cables 2 is dedicated for Power (15V and Gnd)
 
Last edited:

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
20,356
Helped
4,441
Reputation
8,891
Reaction score
4,468
Trophy points
1,393
Activity points
134,577
Hi,

optocoupler is for isolation. But you don´t need isolation.
Often optocouplers are used and the designer is satisfied.
The reason is:
* the optocoupler is slow, thus it can´t transmit erronous pulse signals
* the optocoupler LED is more rugged than a microcontroller input. Thus a medium energy pulse does not hurt the optocoupler.

My recommendation:
* use standard ESD protection diodes and a series resistor at the transmitter
* use an RC and ESD protection at the receiver
and it will be much more rugged and cheaper (and more predictable, adjustable and faster) then the optocoupler (mis-) use.

In your case: There are multi channel RS232 transceiver ICs. Use them to transmit the addtional signal in RS232 style.

Klaus
 

Prabhakarankft

Member level 1
Joined
Jun 22, 2019
Messages
40
Helped
0
Reputation
0
Reaction score
4
Trophy points
8
Location
Chennai, India
Activity points
472
* use standard ESD protection diodes and a series resistor at the transmitter
* use an RC and ESD protection at the receiver
Shall Use these parts on Tx??

Ack _Tx_Pin(MCU) @3.3V -->100E Resistor --> PTVS15VS1UR / PTVS16VS1UR / PTVS17VS1UR ---> Data_Carrier_Cable

On Rx

Data_Carrier_Cable-->100E Resistor || (0.01uF (Other end to Gnd)-->PTVS15VS1UR / PTVS16VS1UR / PTVS17VS1UR(Other end to Gnd)-->Ack _Rx_Pin(MCU) @3.3V

Any calculations Please suggest!
--- Updated ---

the optocoupler is slow, thus it can´t transmit erroneous pulse signals
* the optocoupler LED is more rugged than a microcontroller input. Thus a medium energy pulse does not hurt the optocoupler
Being slow is not an issue for my application! This pin is used to just Identify the rotation of a Motor usually runs at 100 to 400 RPM. I need to find out exactly where the problem is ! If this will not be a cause, I will probe into some other area!

Since it is happening very randomly(Not Often), I have to wait very patiently to find the cause!
--- Updated ---

Connect the shield at one end - possibly both. You don't gain anything by have a floating shield and its close proximity to the 5 wires may increase interference coupling in to them.

Where to connect the shield! GND or Earth!! Which one will be wise option!
 
Last edited:

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
20,356
Helped
4,441
Reputation
8,891
Reaction score
4,468
Trophy points
1,393
Activity points
134,577
Hi,

ESD is low energy but high voltage.
But your suppressor diodes ar for high energy. Datasheet says: Power supply protection. But you need "signal line protection".
Additionally the 15V..17V rated voltage is too high. The clamping voltage will easily be above 20V....but you want protect a 3V3 microcontroller port. Dedending on what microcontroller you use... id´limit the current to less than 50mA peak.
50mA on a 100R means 5V. 5V above 3V3 means you have to limit the voltage to +8.3V and -5V.

Often simple diodes like BAT54S are sufficient.
In detail it depends on your expected ESD pulse waveform.
The problem is: we can not know what you have to expect. Textile industry often suffers from relatively high energy (for an ESD pulse).

Klaus
 

Prabhakarankft

Member level 1
Joined
Jun 22, 2019
Messages
40
Helped
0
Reputation
0
Reaction score
4
Trophy points
8
Location
Chennai, India
Activity points
472
Hi,

ESD is low energy but high voltage.
But your suppressor diodes ar for high energy. Datasheet says: Power supply protection. But you need "signal line protection".
Additionally the 15V..17V rated voltage is too high. The clamping voltage will easily be above 20V....but you want protect a 3V3 microcontroller port. Dedending on what microcontroller you use... id´limit the current to less than 50mA peak.
50mA on a 100R means 5V. 5V above 3V3 means you have to limit the voltage to +8.3V and -5V.

Often simple diodes like BAT54S are sufficient.
In detail it depends on your expected ESD pulse waveform.
The problem is: we can not know what you have to expect. Textile industry often suffers from relatively high energy (for an ESD pulse).

Klaus
Hello,
As per your statement Measuring ESD is mandatory? Need to get help from professionals to measure this ESD? I have no clue about How to measure ESD. Google is threatening me that measuring ESD is a big process!!

Please advice us some of TVS diodes (Low energy as well as high) for my application! We will do some trails
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
20,356
Helped
4,441
Reputation
8,891
Reaction score
4,468
Trophy points
1,393
Activity points
134,577
Hi,

No, I did not say you need to measure ESD.
But you need to be aware of the expectable ESD and then you need to design according this.
Therevare ESD protection that specify the ESD protection level.

But using a the correct diode is only half the way, you also need a suitable PCB layout and maybe additional devices, like capacitors.

Klaus
 

Prabhakarankft

Member level 1
Joined
Jun 22, 2019
Messages
40
Helped
0
Reputation
0
Reaction score
4
Trophy points
8
Location
Chennai, India
Activity points
472
But using a the correct diode is only half the way, you also need a suitable PCB layout and maybe additional devices, like capacitors.

Klaus
Hi,
It would be great, If there is any documentation related to PCB layout for ESD protections and other stuffs

I know I have to spend times hardly. Anyhow will do that
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
20,356
Helped
4,441
Reputation
8,891
Reaction score
4,468
Trophy points
1,393
Activity points
134,577
Hi,
It would be great, If there is any documentation related to PCB layout for ESD protections
I expect: any good ESD protection semicinductor manufacturer provides application notes / design notes for this.
Some even have examples in the datasheets.

Klaus
 

Prabhakarankft

Member level 1
Joined
Jun 22, 2019
Messages
40
Helped
0
Reputation
0
Reaction score
4
Trophy points
8
Location
Chennai, India
Activity points
472
Hi,

I expect: any good ESD protection semicinductor manufacturer provides application notes / design notes for this.
Some even have examples in the datasheets.

Klaus
Hello KlausST,

I have read many datasheets to find out the suitable TVS diode for my application! I am somewhat clear about Major facts need to be concentrated when you selecting a TVS diode!

According to my knowledge ,Voltage beyond IC's Maximum input voltage , it will damage ICs(For my Case MCU- PIC18F66K22) permanently.
TVS diode is having some technical factors which is making me overthinking!

For example if My aim is to protect 5V Logical Input means:

The PSD05C has the following electrical characteristics:
Rated Stand-Off Voltage (VWM): 5.0 Volts
• Minimum Breakdown Voltage (V(BR)): 6.0 Volts
• Clamping Voltage (VC ) @ 1A : 9.8 Volts
• Maximum Clamping Voltage (8/20µs) @ 28A: 14.5 Volts
• Maximum Leakage Current (ID) @VWM: 10µA The rated stand-off voltage

Clamping voltage and Min Breaking voltage is slightly higher than Rated Stand-Off Voltage. Then how it will protect the DUP(Device Under Protection) if the clamping voltage is 9.8V whereas TVS diode shunt all the excess current about 1A.

How it will treat the Excess Voltage after 5V (For example).. My expectation is that it will work like a regulator that will shunt only excess voltage .!
Where my understanding goes wrong??
1628089313320.png
 

danadakk

Advanced Member level 4
Joined
Mar 26, 2018
Messages
1,210
Helped
223
Reputation
458
Reaction score
258
Trophy points
83
Activity points
5,584
As you can see by diagram the V after clamp continues to rise if
more current is pushed thru device.

Some useful ref material -






Regards, Dana.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
20,356
Helped
4,441
Reputation
8,891
Reaction score
4,468
Trophy points
1,393
Activity points
134,577
Hi,

You did read datasheets.
But I recommended to read application notes. They explain everything.

In short:
* A TVS is only half a protection
* thinking in volts only is thinking only half of the situation.

The datasheet says
* abs max voltage on an input pin is up to 7.5V.
* the input clamp current may be +/-20mA.
So you need a resistor with (9.8V -7.5V) / 20mA = 115 Ohms.
This is a minimum value. You should use a higher value one.
This transistor has to be connected between TVS diode and microcontroller input.

For sure there are many other protection circuits and methods.

*****
I like the idea of additional schottky protection diodes against GND and VCC.
The benefit: Often microcontroller abs. max input voltage depends on VCC and GND.
Example: abs. max input voltage on I/O pin: GND - 0.4V ..... VCC + 0.4V (for 5V supply: -0.4V ... +5.4V)
if so then you have to (additionally) consider protection level when power is switched OFF.
Then VCC = 0V and thus the max I/O voltage is 0 + 0.4V = 0.4V.
The whole "safe" range when power is switched OFF is: -0.4V ... +0.4V only.
Schottky diodes work when supply is ON or OFF te same way.

This does not mean the schotty diodes are better than TVS. I´s just another way of protection. With different calculation.
Another benefit, especially for analog signals is: the reduced leakage current over the whole range of 0V ... 5V.
(silicon diodes are even better regarding leakage current, especially at higher temperatures, but suffer from higher forward voltage)

Klaus
 

Prabhakarankft

Member level 1
Joined
Jun 22, 2019
Messages
40
Helped
0
Reputation
0
Reaction score
4
Trophy points
8
Location
Chennai, India
Activity points
472
But We faced some times MCU on Tx end as well Rx end has stopped working(Completely gone off)
Hello Everyone!
After a long study about the Problem I found one real reason for Data Interference over RS232 network!

There are Some junk data's are being received from the receiver side. As per the Software code, if anything received other than Start bit, it will not consider the upcoming data. Junk data are 6-10 characters in length!!

This is happening starting time of the Machines sometimes middle of the working! Need to Check cause of junk data!!

MAXIM3232CPE+(from Element14) IC is used with 5 numbers of 0.1uF(P.No: 0805B104K500CT ) +/-10% 50V rated capacitors are used
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
20,356
Helped
4,441
Reputation
8,891
Reaction score
4,468
Trophy points
1,393
Activity points
134,577
Hi,

if anything received other than Start bit,
This makes no sense to me.
* if there is no start bit --> you dont get data
* when you receive anything --> then there surely was a start bit. = There is no "recieve without start bit"

The start bit may be caused
* by noise
* by true data transfer
* by software fails
* by hardware problems (floating node...)

Klaus
 

Prabhakarankft

Member level 1
Joined
Jun 22, 2019
Messages
40
Helped
0
Reputation
0
Reaction score
4
Trophy points
8
Location
Chennai, India
Activity points
472
"recieve without start bit"
Yes you are so correct! What I meant by Start bit is SW code continue-sly expect one constant (Character $) as a start bit. If any data other than $ means SW consider as Noise!

Transmitter PCB sends data as follows!
$(Start bit)----- {Data} ----* (stop) bit
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
20,356
Helped
4,441
Reputation
8,891
Reaction score
4,468
Trophy points
1,393
Activity points
134,577
Hi,

I guess then it´s not a "start bit".
It´s more a start_byte, a start_character or a start_token.

Using the phrase "start bit" it confusing, since this is the real start bit in a UART transfer.
Please use the phrase "start bit" only when you mean the UART_start_bit.

Klaus
 

Prabhakarankft

Member level 1
Joined
Jun 22, 2019
Messages
40
Helped
0
Reputation
0
Reaction score
4
Trophy points
8
Location
Chennai, India
Activity points
472
Please use the phrase "start bit" only when you mean the UART_start_bit.
Yes this should be corrected from my side!! Thank you!
--- Updated ---

Whenever We touch the 13th pin(R1IN) of Max3232CPE+ with piece of single wire it is starting to give any data. It is not too lengthy, but it is about 1 or 2 bytes. Here software start to misbehaving from the expected ! Actually it should check the start byte($ in my case) !
1628256003604.png

Any ways to avoid this noise other than correcting in Software code???
 
Last edited:

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top