SX Affected by Sparks
william chan
Posts: 1,326
I recently noticed that the SX running at either 4Mhz or 50Mhz is affected by nearby sparks.
When this happens, the SX hangs or jumps to a random part of the program.
This spark can be from a simple switching on or off of a nearby electrical appliance.
At first I thought that the spark was transmitted through the same mains 240V supply through the adapter into the SX,
then yesterday I did another test with the SX board running from a 12V battery.
I found that the SX is still afffected by the nearby sparks even when it is battery powered !
Has anybody had the same problem?
Any filtering or shielding suggestions?
When this happens, the SX hangs or jumps to a random part of the program.
This spark can be from a simple switching on or off of a nearby electrical appliance.
At first I thought that the spark was transmitted through the same mains 240V supply through the adapter into the SX,
then yesterday I did another test with the SX board running from a 12V battery.
I found that the SX is still afffected by the nearby sparks even when it is battery powered !
Has anybody had the same problem?
Any filtering or shielding suggestions?
Comments
I'm using the SX 28 in applications where DC motors (24V, 18Amps) and various releays are turned on and off without trouble. The SX 28 is sitting on a separate small multi-layer board with two inner layers, one connected to Vdd, and the other to Vss. I have measured a capacity of about 1 nF between the Vdd an Vss terminals on an empty PCB. This capacity is caused by the two inner supply layers, and it is almost an ideal capacitor as it has ony very little parasitic series inductance. This board passed EMI approval with no problems, i.e. the radiated RF signals were below the limits, and the board could stand external bursts and spikes without abnormal operation.
Once having made this experience, I now design all my PCBs for commercial applications with two inner supply layers. Today, such boards are not much more expensive than double-sided ones.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
If it is coming through the power supply cord, use a ferrrite bead on the cord to trap it. There is a bit of possiblity that the 12 volt power cord might act as an antenna. The same is true of any long wires in or out.
Guenther's suggestion is good, but if you already have a board in use or development - you might just want to shield it. Possibly sandwitch the board between two blank copper clad printed circuit boards with stand offs and have those boards appropriately grounded. If that isn't enough, wrap it all in aluminum foil to create a complete Farraday Cage.
Honestly, I haven't found the need to try it, but it is worth a try. If you don't want to deal with the copper clad boards, throw it all in a plastic food box [noparse][[/noparse]similar to one for refrigeration of left overs] and cover that with the foil. Ground the foil. The plastic will protect the circuit from the foil and possible shorts.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Post Edited (Kramer) : 1/30/2006 11:42:36 AM GMT
The better protection against RFI is to avoid it at the source. If there is any electric device that generates sparks when turned on or off, try to attach a filter or "snubber" to that device. Ok, in case you can't modify the source of RFI, the only way is to protect the "receiver". As Kramer mentioned, power supply leads are usually pretty long, and therefore are nice antennas. Ferrite beads around the leads (as close as possible to the supplied device) sometimes help.
You mentioned that you tried to power the SX from a battery, and nearby sparks still affect the SX. Again, the lead to the battery could act as an antenna, or any other lead connected to the SX.
As usual, discussing RFI comes close to reading a crystal ball - there are so many possible sources of trouble that often a lot of try-and-error is required.
In order to avoid that the SX goes into some unpredictable state after a spark, you might consiter activating the watchdog. This - at least - should reset the SX, giving it a "clean start".
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
Jim
going into the SX board, will it help?
What about having snubber RC pairs across high voltage switches (like telephone lines)?
What would be the RC pair values?
I also found that using mechanical relays to connect and disconnect telephone lines (48V) can also produce RFI that can affect the normal execution of the SX.....
It is not the relay coil b'cos when I pull out the RJ11 cable ( phone line ) and test the same relay switching many times,
the SX is not affected.
Zener diodes are way too slow to suppress signals like the ones generated by sparks. Even fast Schottky diodes would not help much. Sometimes, I use such diodes though to protect the SX and other components against over-voltage on the supply.
Yes, I had mentioned the snubber networks in my last post. Such a combination of a resistor and a capacitor in series across the high voltage switch helps to reduce noise at the source, which is always better. I'm using one in an SX application that controls solid state relays. I have 22 nF + 47 Ohm across the relay's output pins. This value is recommended by the relay manufacturer but they say, this is just a value to start with as it depends on the specific type of load which values provide an optimum, so you might need to do some experimenting. Please note that the capacitor must stand a high voltage. For 117 V AC, it should be rated at least for 350V DC.
Sounds strange to me that switching the 48V phone line also causes trouble. Are there any longer leads connected to the SX setup going in parallel with the phone line, or a mains line?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
The "sparks" ( i didn't really see the sparks, I just assume it happens on the relay contacts ) from switching the ordinary telephone line can affect the SX's execution about 10% of the time, even when there are no parallel cables with the phone line.
That means if you switch on and off the phone line every 1 second, you might see a problem every 20 seconds.
For most ordinary use, the phone line is not switched that frequently so I guess a lot of people didn't notice it as a problem.
If I use a 22nF + 47 ohm snubber across the switch, that snubber will allow "crosstalk" to creep into the line when its supposed to be switched off by the relay ! So I guess that wouldn't do.
Of course if I use a solid state relay from Clare, there is no problem from the phone lines. No need snubbers.
Then the only problem left is the mains power switching "sparks".
How is your board built? What's attached to the MCLR pin?
Come to think of it, are you taking interrupts off pins, which are being triggered by the spark?
Steve
I think not that extreme.
My board is double sided about 3" x 3" inch only. The only "antenna" must be the 12v adapter wire ( about 3 feet long ).
The MCLR is tied to 5V via 10K resistor ( as usual ).
From my tests, I found that many different SX boards also have the same problem with sparks.
The test is simple. Plug in the adapter which powers up the SX board. Then on the same mains extension socket, plug in a 100w reading lamp.
Play with the mains socket switch ( which is just next to the SX 12V adapter ) by switching the lamp on and off every 2 seconds.
If your SX runs on watchdog, you should be able to see it restart in less than 20 seconds. ( beep the buzzer when restarting to make it easier ).
If it doesn't restart or act errratic, try placing the board nearer to the lamp. : )
I think most SX users don't test it like this, so they assume it is immune to sparks.
Why don't you test it with your board and let us know the results.
I run my boards in cars' engine bays (notoriously hostile EMC environment) and one's a power control for my TIG welder (100 amp squarewave AC, with inch-long sparks for ignition), and they don't crash. However, my power supplies are probably a bit of overkill - works for me, but I'd worry about making consumer products thas cost as much.
Similarly, we've got piles of test gear running on SX in factories where things are perpetually being plugged & unplugged. Again, no crashes. I can't help but think that you've got power supply or reset problems - no other pins should be able to cause effects like these, and, with the best will in the world, I don't believe you're inducing very many (mili)volts across the die from EMC.
Is there any way you can watch the power rail with a 'scope?
Steve
A while back I installed express PCB, and took a look at your board layout for the SX keyphone. I am thinking that this is the board you are having problems with. I intended to post a reply with a comment about the layout, but other things took precedence. Seeing this thread reminded me about that, and I finally posted that comment.
In two words: bypass caps.
You don't have any on the SX, assuming you are using the same layout as the key phone board. Likewise, you only hooked up *one* of the pairs of supply leads on the SX-52.
Bypass caps really are not an optional thing with a chip like the SX which has extremely fast swithcing going on. The bypass caps keep the supply from drooping when the SX has an instantaneous draw in current.
The multiple power and ground pins are likewise not optional, the SX is a power hog. It has to be to run so fast. Without the extra leads to reduce the supply impedance to the chip, it is starving for clean power and ground.
I suggest you jumper the other power leads to appropriate points, and solder some small bypass caps across the adjacent power and ground pins as well. That might not be practical unless you can get some .03" x .06" wide termination surface mount caps, or .02" x .01" size normal termination types.
I think if you do that, you will find that the SX is quite robust and immune to most electrical events in the neighborhood.
MRC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
MRC
I can only agree with Michael - bypass caps are of absolute importance - I assumed that you had some installed, so I did not ask, and I did not realize that you had posted your PCB design before.
I can only recommend to go back to this thread: http://forums.parallax.com/showthread.php?p=537525 where several aspects of EMI have been discussed.
As mentioned before, for commercial applications, I have completely switched to four-layer boards with two inner supply layers. These make the best bypass cap you can imagine, and the two additional layers only add marginal production costs. When using SX48/52 devices - as Michael said - all power and ground pins must be connected. When you have a look at the Parallax SX 48/52 Proto Boards, you will notice that they have added bypass caps to each power pin - I can only recommend this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
Ok I agree that my single 470nF bypass cap is nearer to the regulator than the SX.
Is 470nF multilayer better than 100nF ceramic as a bypass capacitor?
I will try to put it nearer in the next board iteration.
However I would like to dispute the notion that all the 4 Gnd and all the 4 Vdd pins on the SX48/52 needs to be connected.
Is there any mention of such requirements in the official SX Datasheet?
I also don't agree that you need 4 bypass caps for the SX48/52.... sounds like an overkill.
I believe the QFP design with a pair of Gnd-Vdd pins on each side is to allow easier PCB routing.
If we were to connect all the Gnd and all the Vdd pins together, there would be no space left to route the other pins !
Err, your board reboots unpredictably... I can't quite understand your logic here.
And yes, you absolutely do need to feed power and ground into all the pins.
If you've got access to a decent oscilloscope, you might like to have a look at the voltage across one of your 'unused' pairs of power/gnd pins. I bet you see horrendous noise - which is what that side of the chip is trying to use as a power supply.
Yes, routing power and ground to all the pins does take effort. However, it's not optional, as you've discovered.
If you think about it, the chip can't generate electricity from nowhere - if there's (say) half an ohm resistance (and inductance) on the power suply pin, if only 8 outputs switch simultaneously, delivering 30mA transiently into a capacitive load (a very likely scenario), then the power pin has to supply 8*30mA through half an ohm. That's 120mV drop, and is pretty much best case. The transient currents will actually be rather more than 30mA, and this is just a rough calculation of the power requirements from switching 8 pins - there's a lot more going on than that.
If you look at a modern CPU, you'll find hundreds of power and ground pins. The micro I'm currently working with has 357 pins, of which 57 are power and 60 are ground. They're certainly not there for my layout convenience [noparse]:)[/noparse]
Steve
in general, multilayer caps are the better choice because of less parasitic series inductance. To avoid additional parasitic series inductance, it is necessary to keep the leads as short as possible (SMTs are best as they don't have leads), and to place the cap as close as possible to the supply pins as longer PCB traces would add inductance again. You can't say as a rule of thumb that a higher cap (say 470 nF) is better than a 100 nF) cap - sometimes, smaller values even do better.
I can only agree with Michael that connecting all supply pins helps to reduce the supply impedance, and four filter caps, each of them close to a pair of supply pins are by no means an overkill. In case you did not, please check the other thread (EMI Failure) I had mentioned in my previous message. There you find a lot more information about this topic, so it is not necessary repeating it here.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
It doesn't reboot unpredictable, only 10% likelyhood if there is a switching spark really nearby. : )
Ok you guys win.
My last question :-
Why the SX48/52 datasheet makes no mention about the need to connect all VDD and GND pins?
There is no mention of 4 bypass caps requirements or their recommended values also...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
I partly agree with Paul. He is right, in general the datasheet describes the specifications of a component and not necessarily its applications. On the other hand, a special note in the datasheet that due to their high speeds, SX controllers require specific attention concerning EMI, and supply bypassing would be appropriate, or at least a reference to the EMI app note.
I know that Parallax is in a state of revising all SX datasheets, so there now is a good chance for adding such information. Rocklin - did you copy? .
Somehow, I feel like a missonary, preaching the four-layer PCB design. With the two inner supply layers, you would not have a problem, connecting all Vdd/Vss pins of the SX48/52, still leaving you enough real estate for other signal traces.
I have designed a general-purpose board for the SX28 that I call the "SX-Multi Board". Although the two inner layers look like Swiss Cheese due to the many plated-through holes for the breadboarding sections, the two inner layers build up a capacity of about 1 nF. This sounds like a pretty small value but as this is an almost ideal bypass capacitor it is more effective than a discrete bypass capacitor placed somewhere on the board. A good (bad?) example where the bypass capacitor should _NOT_ sit is the SX-Tech board. It is placed "miles away" from the Vdd and Vss pins at the left small side of the ZIF socket. Would not be a problem placing it much closer to pins 2 and 4 for better filtering. OK, the SX-Tech board is an experimental tool, not designed for commercial applications. I bet - it would fail any EMI test.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
My tin foil and box idea is obviously archaic and maybe useless. The more I read and the more I ponder, a good four layer board with appropriate by-pass capacitors seems necessary.
Originally, I had been hoping to make my own one and two layer boards for microprocessors, but now I see such as merely an educational stage. [noparse][[/noparse]Drilling all those holes by hand is a bit of chore too.]
Guenther's Multi board is quite attractive and a less expensive alternative.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Metal boxes are still useful, but it's _always_ better to design the board right in the first place. Cheaper, too.
Steve
What would you be willing to pay for the board. Me, as cheap as I am, I think $19.95 USD as a complete kit, and I mean a complete kit, would be reasonable.
Ray
Guenther stated that most, if not all the problem, originates on the EMI in the power lines. Apparently reflections from the oscillator and the reflections from switching logic at regular periods of time cause the problem. [noparse][[/noparse]I suppose that different software might exhibit different resonant peaks.]
Regarding Paul Baker's question -- I would guess the reason for 4 ply being more effective must always come down to creating a tuned circuit via a large power filter capacitor which implies an impedance effect and a resonant effect. The capacitance just knocks the tops off the high frequency resonance.
Additionally, there is might be 'a halving' of EMI created by the internal floods creating a 'semi-shield' for the individual data leads. The Vss and Vdd EMI are 180 degrees out of phase, so not much goes beyond them if the surfaces are nearly equal and nearby. Apparently this out of phase phenomenom cancels out a significant portion.· Then the division of top and bottom further help out. This would be partially similar to eliminating cross talk in ribbon cable by having alternating wires grounded.
I guess we have an entirely new electronic concept - 'the development of Autonomy of the digital information from the power source that it depends on.' That is one that the chip manufactures ponder as a speed barrier.
And, I have been as 'guilty' as William of doing everything I can to make a susceptible EMI board. In the beginning, you just think that the routing software can 'intelligently' layout a board, but there is really an art to a genuine production run, stable product. Both surface mount components and muti-layer boards enhance speed through eliminating EMI.
I suspect it is nearly all dampening, not amplfying.· Awkwardly we have both EMI going into the device and EMI coming out of the device.· When they interact, some signals might be amplified and others canceled.· Failures, like a reset seem to me to be caused by a low power glitch.· Maybe the clock temporarily halts.
It would be wonderful if the manufacturer could include a set of small by-pass capacitors within the silicon or at least the package as a 'first line of defence'. It would make a more marketable product as it wouldn't be so tricky to product a board.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Post Edited (Kramer) : 1/28/2006 9:00:40 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 1/28/2006 3:56:01 PM GMT
Paul,
don't take this for granted (you can nothing take for granted concerning EMI ) but I think the four-layer concept allows for much more parallel flood filled areas on the two inner layers than flood filling the top and bottom sides of a two-layer board. This is because these areas are cut by the various signal traces. Usually, I connect the flood-filled areas un the top and bottom layers to ground. When there are larger "islands" caused by surrounding traces, I try to place one or moe vias to connect the topy and bottom flood-fill areas if this brings the ground sinal to the isolated area.
I was thinking of a two-layer design with all the flood-filled areas on one side connedted to ground, and the areas on the other side to positive supply. These also would make a bypass capacitor. Unfortunately, in most cases, there remain many isolated areas that you now can't connect to a signal using vias. With a four-layer design, this is always possible. If we assume the flood-filled areas and the inner supplay layes being connected like this:
Vcc Layer 1
Vss Layer 2
Vcc Layer 3
Vss Layer 4
You can connect any isolated top area using vias from top to layer 3, and isolated bottom areas using vias from layer 2 to bottom.
It also might be an idea to place the signal traces on the inner two layers, and place the Vcc and Vss planes on the top and bottom layers. This way, they would shield the signal traces that are then located on the two inner layers. On the other hand, due to the larger distance between top and bottom, the resulting bypass capacity might be smaller. This now also depends on the size of the flood-filled areas on the inner layers. I never tried this arrangement of layers so far, so I can't tell if it has an advantage over the other layout.
Using supply layers, no matter at which position also causes capacities between the signal straces and the supply layers that might cause trouble with very fast switching signals, where "fast" is relative. IMO, the signals around an SX, even when clocked ato 100 MHz are still "relatively slow", so these capacities can be ignored. On the other hand, when you have a look at a modern PC main board, you will find traces shaped like meanders or coils. All this is necessary to adjust signal propagation times on these traces.
There is no simple rule of thumb here - it is a wide field for excperimenting.
As long as you do designs for private and hobby use, EMI should be a concern as far as possible but it is of less importance compared to applications that must pass the EMI approval procedures.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
you are right - as long as Multi Boards need to cross the atlantic in low vloumes, they would be way too expensive - shipping might even cost more than manufacturing the blank boards.
In the moment, I'm checking several options: On would be to distribute it through Parallax. But Parallax can't do it for free - at least, they need to add a handling charge to cover their adminitrative costs. Another option would be my daughter. She'll be back in the US next month, and plans to permanently live in the US, so she might act as "my distributor". I'll keep you posted on that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
After all, the artwork is already done. And, you own the copyright. No international shipping, NO DUTY.
I wasn't aware of the coming SX28 Protoboard.
Guenter's board can actually break apart into several different componet boards for separate purposes [noparse][[/noparse]I think it is 3 parts] or stay together as a system.
I think the world is big enough for both to exist side-by-side. I suspect there are people like me with unused DIP chips that eventually need a board.
A complete kit? It is nice, but a few capacitors, a few resistors, a voltage regulator, and an IC socket cost pennies. The labor to bag them might cost a lot unless you comit to large quatities in an automated run. Of course, if some component is hard to get [noparse][[/noparse]an odd connectors or such], then a kit is imperative.
I personally am quite happy with a bare board as I had oodles of components collecting dust.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
So, the the SX 28 Multi-Board can be used for applications in small series where a dedicated PCB design would be too expensive, or for the pre-series of a larger application. I recently used it exactly for this purpose to build an evaluation sample for one of my customers. Now, that this application is going into series production, I have replaced the SX 28 Multi-Board by a PCB especially designed for this application. I'm also using it for my RS-232/I²C Adapter/Monitor, and for various motor controllers for concrete saws where it is sitting "piggy-backed" on top of a larger board. If not needed, the "RS-232" and the "Regulator-Sections" may be cut off which I did in case of the motor controllers in order to minimize used real estate on the main board. You may ask why I did not integrate the SX parts on the main board in this case. There are two reasons: The main board is a 2-layer board, so the 4-layer SX 28 Multi-Board provides aome better EMI protection. The second reason is ease of service. People who handle such boards are used to handle heavy machinery stuff, and not small DIL packages. In case of a software update, I feel much better having them replace the whole SX 28 Multi-Board instead of pulling out the SX 28 off its socket, and inserting a new one.
I too was thinking of having the board manufactured in the US - it simply depends on the sales figures. I think I should start sending boards in bulk to a US distributor (Parallax, may daughter, or someone else), and see how things develop.
Concerning the parts kit - as this is not a prototype board on first side, a full parts kit does not make much sense because which parts are really required depends on the specific application. Maybe, it makes sense to add a socket for the SX28, and the power connector as these parts may not be available in a shop around the corner. The SX28 and the resonator should be better acquired from Parallax instead of shipping them across the atlantic twice.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
Günther