|
|
View previous topic :: View next topic |
Author |
Message |
ljb
Joined: 19 Nov 2003 Posts: 30
|
PIC and interference |
Posted: Thu May 12, 2005 9:28 am |
|
|
I have a PIC16f876 which is powered from the mains. When florecent light and the like are switched then the software crashes. I have noticed that the interrupt pin is very sensitive to noise, are other pins also prone to pickup interference.
Any tips on good practice for using PICs in noisey environment would be great.
Many thanks
Les |
|
|
Charles Linquist
Joined: 07 May 2005 Posts: 28 Location: Campbell, CA
|
|
Posted: Thu May 12, 2005 9:58 am |
|
|
I have had good luck with protecting every input with a .1uF ceramic right at the input pin and a 2K in series with that input.
It also helps if you are on a 4-layer board, and have lots of power supply bypass caps (.1 and 10uF) near the chip.
We have hundreds of units in the field, and no crashes - ever. |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Thu May 12, 2005 10:06 am |
|
|
Hi Les,
1) If you can't ovoid the causes, try to minimize the effects.
2) Donīt know what your application is, but can you impliment the watch
dog function to reset the micro once it crashed ?
Humberto |
|
|
bfemmel
Joined: 18 Jul 2004 Posts: 40 Location: San Carlos, CA.
|
|
Posted: Thu May 12, 2005 1:02 pm |
|
|
ljb,
Look at your circuit as amplifiers with antennaes connected to them. Every logic input is a high speed amp, every trace is an antennae. You can't change the way the amplifiers work but if you can minimize the antennae, you can minimize the noise. Think of every trace as a LOOP antennae with the trace, the PIC, the power returns and ground. If you use a four layer board, you have very small loops because the distance from the trace to the other side of the loop, the ground, is very small. With a two layer board, the trace is VERY large. This kind of four layer layout where every part is continually in "contact" with the ground plane is the best defense against radiated emmissions.
For conducted emissions, where lines run off you board, remember that you are fighting common mode noise, not differential mode noise. The bypass caps, around 1000pF is good, should connect from each line coming onto the board to the CHASSIS ground, not the logic ground. This means that a signal pair coming in, (signal and ground), both get terminated with the bypass cap to chassis ground.
There's a whole lot more to this than just what I have told you so far but most of it is common sense if you look at the board as a bunch of antennaes and amplifiers.
Good Luck!
Bruce |
|
|
valemike Guest
|
Re: PIC and interference |
Posted: Thu May 12, 2005 1:23 pm |
|
|
We use the FN406 filter from Schaffner to filter the mains.
To reduce EMI, most inputs have an LC filter, which is overkill i know. MCLR is also filtered according to the PIC manual's reset circuit illustration, minus the diode.
if you're interested in taking a peek at parts of the schematic, like the power supply, send me an email at michael_valencia at yahoo dot com. |
|
|
mike holeton Guest
|
EMC and sytem noise |
Posted: Sat May 14, 2005 10:34 am |
|
|
Hello,
I'm a Sr. Electrical Design Engineer with many practical applications in the automotive industry. I have read all the suggestions for EMC and would agree with most of them. Spending thousands of dollars a day ($3750.00/day) at the Elite Engineering test facility and working out board design and placement issues has been trying at times. So many people think the problems are "black magic" in nature as for the problem and solution. The general engineer will add a capactor, inductor in places around there DUT(device under test) and seeming remove the problem. This process has seemingly sovled the emidiate issue, but usually they have only "pushed" the problem to another area of the DUT.
When most circuits are designed, they are tested on the bench with a stable DC power supply, nothing connected the D.U.T., and without consideration for other devices that may be producing undesirable effects in the final placement of the device.
The following are my standard list of must do's when designing any new product (there are others, but I think you'll get the idea):
1. All Digital components are placed together with isolation to any analog devices. This includes the prower source.
2. All traces on the board are to be as short and wide as possible. Space constraints must be taken into this practice.
3. A (4) layer or higher board must be used in all but the most simple designs when analog and digital components are on a board. On a simple board you may make power and gound layers on each side of the board. The power and ground layers "form" around the component traces.
4. Decoupling capacitors must be placed as near to each active component as possible. .1uf standard and .001uf to 10 uf optional depending on the component.
5. Filter and spike protection must be placed on all inputs and outputs to the outside world.
6. Any device that has analog circuitry must have shielding (enclosure) to the rest of the world.
7. shielded cable must be used for transmitting signals to other devices or sensors back to the device.
I could add many more general rules to follow, but each design has it's own characteristics.
By the way, any device I build must meet J1113 SAE emmisions specs and not be effected by suseptability of 200volts@ 1 meter through frequency range of 10KHz to 4GHz.
All Commnets welcome
Mike |
|
|
mike holeton Guest
|
EMC and sytem noise |
Posted: Sat May 14, 2005 10:34 am |
|
|
Hello,
I'm a Sr. Electrical Design Engineer with many practical applications in the automotive industry. I have read all the suggestions for EMC and would agree with most of them. Spending thousands of dollars a day ($3750.00/day) at the Elite Engineering test facility and working out board design and placement issues has been trying at times. So many people think the problems are "black magic" in nature as for the problem and solution. The general engineer will add a capactor, inductor in places around there DUT(device under test) and seeming remove the problem. This process has seemingly sovled the emidiate issue, but usually they have only "pushed" the problem to another area of the DUT.
When most circuits are designed, they are tested on the bench with a stable DC power supply, nothing connected the D.U.T., and without consideration for other devices that may be producing undesirable effects in the final placement of the device.
The following are my standard list of must do's when designing any new product (there are others, but I think you'll get the idea):
1. All Digital components are placed together with isolation to any analog devices. This includes the prower source.
2. All traces on the board are to be as short and wide as possible. Space constraints must be taken into this practice.
3. A (4) layer or higher board must be used in all but the most simple designs when analog and digital components are on a board. On a simple board you may make power and gound layers on each side of the board. The power and ground layers "form" around the component traces.
4. Decoupling capacitors must be placed as near to each active component as possible. .1uf standard and .001uf to 10 uf optional depending on the component.
5. Filter and spike protection must be placed on all inputs and outputs to the outside world.
6. Any device that has analog circuitry must have shielding (enclosure) to the rest of the world.
7. shielded cable must be used for transmitting signals to other devices or sensors back to the device.
I could add many more general rules to follow, but each design has it's own characteristics.
By the way, any device I build must meet J1113 SAE emmisions specs and not be effected by suseptability of 200volts@ 1 meter through frequency range of 10KHz to 4GHz.
All Commnets welcome
Mike |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|