Interference of serial data transmission

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

Post Reply
liak
Registered User
Registered User
Posts: 195
Joined: Fri Oct 05, 2007 12:26 am

Interference of serial data transmission

Post by liak » Sat Feb 16, 2008 3:04 am

dear all,
I have been involved in a project requiring massive amount of continuous serial data transmission from a MCU to a driver IC. I believe those involved with similar projects will have encounter problems of interference.
I have done careful check on my schematics and taken all necessary measures to minimize EMF interference physically: shielding, cutting the length of transmission, etc etc, but still to no avail.
Are there any measures from the software / programming side that can help to overcome or minimize the chances of EMF corruption of serial data transmission? I suspect the vulnerable link is the clock signal, which gets corrupted when EMF interference occurs.
As my project requires runtime and continuous transmission with precision, I cannot afford any send and confirm in the program, as MCU time usage is already critical. Can anyone offer or share any experience on this.
I am sorry if this is out of the topic of discussion in this forum.

------------- Corrupted serial data is a headache -----------------

TimB
Posts: 262
Joined: Wed Oct 04, 2006 7:25 am
Location: London UK

Post by TimB » Sat Feb 16, 2008 8:50 am

Just to clarify

The serial data is RS232 or SPI.

liak
Registered User
Registered User
Posts: 195
Joined: Fri Oct 05, 2007 12:26 am

Post by liak » Mon Feb 18, 2008 2:33 am

the data is in SPI format. Can anyone offer any help?

richardb
Posts: 265
Joined: Tue Oct 03, 2006 8:54 pm

Post by richardb » Mon Feb 18, 2008 8:06 pm

To clarify further.

You're writing data from the pic to the "driver ic" ?

Are you sure the problem is noise related? does it stop if you turn off the noise source.


R
Hmmm..

liak
Registered User
Registered User
Posts: 195
Joined: Fri Oct 05, 2007 12:26 am

Post by liak » Thu Feb 21, 2008 12:13 pm

I was writing from the PIC to driver ICs. Noise occurs when fluoroscent light or any high voltage devices turned on. Data got corrupted after interruption of the continuous streams of serial data.
Can anyone offer any sites or links related to overcoming interference by such sources. I mentioned of physical shielding earlier. It didn't seem to help. Can we overcome by any form of robust programming technique?

richardb
Posts: 265
Joined: Tue Oct 03, 2006 8:54 pm

Post by richardb » Thu Feb 21, 2008 3:15 pm

are you using a ground plane on the pcb?
have you got good decoupling caps close to the chip?

Is the driver on the same PCB as the pic? if not are you using twisted pairs/screened cable? wrapping the cable round a ferrite ringa few times can reduce common mode noise significantly without affecting progagation times

Is the data rate very high ?
could you tolerate reduceing the data rate and introducing an RC filter on the clk and data lines, adding a 1nf cap from the clk/data to gnd right near the pin and adding an inline ~100R can make a huge differance without adding significant delays. If you can tolerate the delay then increase the cap value.

Or if its on 2 seperate pcb's you could use optoisolators or coupling transformers.

R
Hmmm..

liak
Registered User
Registered User
Posts: 195
Joined: Fri Oct 05, 2007 12:26 am

Post by liak » Sat May 03, 2008 3:22 am

Thanks richard for the suggestions. Sorry for late reply. Had been busy solving th interference problem by means of software. I have managed to resolved the interference on the slave circuits. But some how, our design for the controller seems prone for interference. I have to say that I am nearly a beginner in this field. I use very simple design and never thought of interference from the start. Now that I have managed to resolved the slave circuit interference, the next problem seems to be the PIC. The PIC resets itself in the presence of strong EMF. Anyone can suggest where to find good advice for EMF shielding for PIC? :oops:

User avatar
blueroomelectronics
Posts: 46
Joined: Mon Apr 23, 2007 3:48 pm
Location: Toronto
Contact:

Post by blueroomelectronics » Sat May 03, 2008 5:38 am

Can you post a schematic or photo of your project?

richardb
Posts: 265
Joined: Tue Oct 03, 2006 8:54 pm

Post by richardb » Sat May 03, 2008 10:07 am

Some questions.

Are you using vero board or a proper pcb 1 or 2 layer?

Do you have a cap to ground on the reset line?

Are you filtering the 5V line ? and using closely coupled decoupling caps?



Some tips for noisy environments.

Always try to keep signals (supply rails) as close to ground as possible.
Any separation allows for a magnetic field to thread through it and this will generate a current in the loop, the larger the loop the larger the current.

This is why twisted pair works so well for interconnections as the constantly reversing loops will cancel out the currents.


From my experience almost all noise problems are wire bourn
ALWAYS filter as best as you can on any wire coming into or out of the board. Especially power.



I have a project that I’ve almost finished which has 2 pic’s talking to each other in 2 separate enclosures via 5v rs232. one of them is on a 100x100mm pcb and the same pcb is generating 200A pulses with 100ns risetimes. So don’t give up.
Hmmm..

liak
Registered User
Registered User
Posts: 195
Joined: Fri Oct 05, 2007 12:26 am

Post by liak » Mon May 05, 2008 7:58 am

Thanks richard. I will try to work on it with your suggestions. Will get back to you with the results later.

liak
Registered User
Registered User
Posts: 195
Joined: Fri Oct 05, 2007 12:26 am

It's working for now

Post by liak » Fri May 09, 2008 3:02 am

Thanks a lot richard.
I have checked my schematics again. We are using single layer pcb without ground plane. So that may be a drawback. Because the cost for us to come up with a prototype of double layer pcb is too high.
Our earlier PIC also had not been properly decoupled from the power line. So, we added the decoupling capacitors as recommended and the problem seem to resolve!
Still we are using single layer PCB now. In the production stage, we will shift to double layer with a proper ground plane. Thanx again. Hope the ghost of EMF will not haunt us anymore. But will come back to you again if we needed more advise. :wink:

Post Reply