Teensy EMC sensibility (electromagnetic immunity)

Status
Not open for further replies.

Elmue

Well-known member
Hello Paul

I constructed an electronic board that contains a transformator at a distance of approx 8 cm beside a Teensy 3.2.

When I plug in the transformator into the power line I notice that the Teensy is very sensible.
Not each time, but at least each second time the Teensy reacts in a strange way:

If I have the Teensy connected via USB to a computer, the USB connection is disrupted.
This means that on the PC the COM port disappears.

After unplugging the USB cable and plugging it in anew, all works fine again.

The interesting thing is that ONLY USB is affected.
The sketch in the Teensy keeps running without errors.
All variables are fine, there is no interruption in the sketch code.

It is only USB that is disrupted.

Do you have any explanation for that ?

P.D.
It is not even necessary that the secondary site of the transformator is conencted to anything.
Just the existence of the transformator near the Teensy is already enough.
 
Last edited:
Is it a passive transformer, so no high frequency switching involved? If so, that would be strange because a regular 50/60Hz transformer doesn't radiate any meaningful power.

Is it an isolated transformer? If not, maybe your having some ground loop issues?
 
There is some missing information here can you confirm,
transformator is a transformer https://en.wikipedia.org/wiki/Transformer
Second that when you say 'secondary side' you are saying that you have input electricity into the transformer but the output is unplugged on BOTH sides?

Reading the description The first question would be around grounding arrangements, When the project is unplugged can you measure a voltage between the ground of your USB cable and ground on the project. They should be the same, but can float apart depending on power supply design. This can result in interesting results when a device at ~100 volts is plugged in, but once things stabilise can operate correctly.

Second possibility is around 5V power. Does your project provide it's own 5V power to Vin, and if so has that been disconnected in some way from the 5V supplied from USB? This is normally done by cutting a track on the underside of the USB (see reference card underside illustration).

Apologies if I have misunderstood your question.
 
There is no high frecuency.
Just 50 Hertz.

When the transformator runs normally there is no problem.
As I wrote it happens at the moment when I plug the transformator into the power line.
Whenever you plug a device into the power line there may be a little spark for a few milliseconds.
This is what the Teensy does not like.

The 5 V for the Teensy come in this test from a battery, not from the transformator.

But my question is why the USB connection fails, while the rest of the sketch keeps on running without problems ?
This is strange.

Normally if a CPU is disrupted by EMC it might completely hang up or do pure nonsense or reset itself.
But it does not make sense to me that one part fails (USB) while the other part (sketch) functions perfectly.

And if I repeat it several times it is always the same: USB connection lost, sketch running fine.
 
Last edited:
I repeat my question: is it an isolated transformer? Does the PCB share a ground in any other way with the computer/laptop chassis?

From what you describe this looks like a grounding problem.

To reduce the inrush current (causing the spark) you can use a series resistor or place a parallel PTC on the primary side of the transformer. However it seems unlikely that this current spike will produce sufficient EMI to disturb the Teensy from such a distance.
 
But my question is why the USB connection fails, while the rest of the sketch keeps on running without problems ?
This is strange.

It is strange, but it's also lacking (at least here on the forum) a lot of details that matter, like how grounding is done on the AC side, what the transformer is powering and how it connects to Teensy, and so on.

It's possible there's something specific to Teensy going on here. It's also quite possible there's an inrush current or ground loop or other power supply related problem that would disrupt *any* type of USB device. Very hard to know without looking at the actual hardware (and even then... probably not so easy to figure out what's really happening).
 
Hello Paul

I thought that anybody has reported EMC sensibility before or that you already have investigated this.
But it seems that I'am the first one.

Yes: The Teensy 3.2 is definitely EMC sensible.
And yes: the sketch keeps running while USB is disrupted.


Although people suppose that I made a design error (ground loop etc..) it is definitvely the spark that produces strange behaviour in the Teensy.

But I already found a solution.

I have a transformator near the Teensy.
When I plug in the plug into the power line (220V) a little spark at the plug is enough to make the Teensy behave the strange way that I described.

I also have a relay on the board that connects the primary side of the transformator to the power (220V).
When this relay switches there is a little spark in the relay which has the same effect on the Teensy as putting the power plug into the power line.

I solved the problem now with a condensator of 10nF switched parallel to the contacts of the relay.
This mitigates the effect of the spark and the Teensy runs without interruption.
 
Last edited:
Hello Paul
...
Although people suppose that I made a design error (ground loop etc..) it is definitvely the spark that produces strange behaviour in the Teensy.

I solved the problem now with a condensator of 10nF switched parallel to the contacts of the relay.

Thanks for confirming that assumption. Not having that capacitor is a design error ;-)
 
Hello

I just noticed that the Teensy 3.2 even loses USB connection when I turn on a neon light at a distance of half a meter from the Teensy.

Can there anything be done that future Teensy versions are less EMC sensible ?

Elmü
 
I have a few on my desk, and a desk lamp, oscilloscope, power supplies, laptops, and lots of other equipment I turn on & off regularly. So far, none has ever disconnected from the USB in response to any AC power on/off event nearby.

Likewise, many thousands of people have used Teensy over the years. Odds are good *many* have been used within half a meter of AC-power lights or other equipment that's regularly turned on/off. This particular problem hasn't been an issue reported with any significant frequency.

Perhaps something is connected or grounded differently in your setup?
 
I tried just now to reproduce the problem, but couldn't. Here's how I tested.



edit: looks like my camcord's mic didn't capture the headphone sound really well, so you might need to turn your volume up to hear the guitar sounds playing, which confirms the Teensy is still running.
 
Last edited:
Oh, maybe this needs to be done with printing to the serial monitor and a screen capture of the data? That's a bit more complicated to do and merge the 2 video streams... but if you really think it'll matter, I could try.

Is the 60W incandescent light bulb located about 10 cm away a valid test?
 
p#9 said Neon light - aren't those more like a CFL bulb with a high voltage gas system? Cheap desklamp might make sparks - but shrouded in the topside metal?

I found the sound of "Neon" - though that isn't a typical 'store window' neon sign.

It should do some minimal Serial.print( "G" ) on loop() enter or exit to show it survives.

I did those 'piezo spark' from a lighter (noise is from the lighter body where the piezo element charges the wire) - but I only tested for 'failure to blink'. The Blink was robust except for near strikes [T_3 more so than T_LC] - pretty not sure I was NOT running USB prints that might have shown more issues.
 
Last edited:
Hello

I just noticed that the Teensy 3.2 even loses USB connection when I turn on a neon light at a distance of half a meter from the Teensy.

Can there anything be done that future Teensy versions are less EMC sensible ?

Elmü

is your neon lamp complying with the radio emission rules? My experience is that most EMC problems are generated by 'not complying transmitters' and not by 'too sensitive receivers'.
 
I'm willing and happy to do another test (with shaky-cam footage), but first 2 quick questions:

1: Do I really need to monitor/record the PC's view of the USB, or is just running a sketch that plays music ok? In other words, is the problem Teensy rebooting, or is it only the USB disconnecting while Teensy continues to run its program? Obviously recording the PC screen takes more work and video editing rather than a quick-and-easy file upload from the camera... but if that's needed, I can do it.

2: If the desk lamp isn't a good test, what should I use? My workbench is mostly set up for low voltage work....
 
I use a Teensy 3.2 inside a prototype 400V 6kW bidirectional back-to-back inverter with both sides switching at 22kHz without any problems. I do use proper grounding, shielded cables and some metal and copper foil to block both magnetic and electrical fields.

Imo making a product or project involving a Teensy EMI-tolerant should be the task of the product developer, not Paul. The Teensy is just a component, not a product.
 
The problem with older Neon lamps is that these have a huge ballast inductor in series and a bimetal based "starter" which in combination generate a high voltage pulse for initial ignition, similar to the ignition in a car motor. These are prone to create all sorts of side effects which are for sure not limited to the Teensy. These starters wear out with the time because of sparks burning the bimetal and capacitance loss of the parallel spark killer capacitor which can exactly provoque the described symptoms, especially in combination with a worn out ballast inductor which has partial winding shorts due to long time thermal stress.

Schematic here

Basically, I'd say that Neon bulbs (containing Mercury and other harmful stuff) are in some way last century and should be replaced as soon as possible with more economic and ecologic LED lamps.
 
Last edited:
What kind of Neon wasn't made clear - but if you have a screw in CFL 'twisty' bulb that might be a fair test - they tend to be noisy and are high voltage. The OP was loss of USB - for a different reason - so printing millis() time and panning over to see it running in the end should be good to show it is still active. Teensy seems rugged enough that as Epyon notes a product would engineer out their added issues.
 
Imo making a product or project involving a Teensy EMI-tolerant should be the task of the product developer, not Paul. The Teensy is just a component, not a product.

My gut feeling is you're right.

But everyone who's followed this forum knows I do put engineering time into investigating reported problems, even when it's just one person, even when the cause seems very unlikely to be caused by Teensy itself. Often the final result ends up being just an improved understanding of how to avoid a certain type of problem. Some get turned into footnotes or edits on the web pages, or comments in example code... and unfortunately a huge number end up as old threads buried on this forum. At least we're no longer in the dark times before the forum, where they were lost in private email. Next month we're going to do updates on the web site, and part of that process will being the wiki that's been planned for about a year (but whether the wiki happens then or gets further delayed is anyone's guess). Even if this is utterly unrelated to anything in Teensy's design, my hope is it'll eventually become a wiki page.

I'm also willing to accept there may be some very subtle design issue. Why it hasn't come up over the last 3.5 years with so many boards into so many projects is a good question, and one I hope to answer. Obviously I'm not going to change the Teensy hardware overnight. But we did make Teensy 3.2 based on feedback and many investigations that (not so conclusively) showed the main cause of Teensy death was over-voltage, which can be short-duration transients during power supply startup. Well, and also the increasing use of power-hungry 3.3V modules like CC3000 and ESP8266.

Whatever the cause, I really do want to get to the bottom of this (and many, many others I have on a long list). That's why I took a little time today to get out the camcorder. That's why I'll do it again with some other load and perhaps screen recording. Sometimes keeping an open mind can be challenging, but that's what I really want to do here. I really do want to figure out what's wrong, partly for Elmue's sake, partly for anyone else who may happen to hit this same or similar issue in the future.
 
Paul, it's just so <expletive> impressive that you take the perspective that a reported problem is an opportunity. I read many threads on here just to try and soak in the incredible problem-solving abilities that you and others possess in this space. The future wiki will be a treasure trove of knowledge.
 
Hello

> Oh, maybe this needs to be done with printing to the serial monitor and a screen capture of the data?

I wrote that in my very first posting:

> The interesting thing is that ONLY USB is affected.
> The sketch in the Teensy keeps running without errors.
> All variables are fine, there is no interruption in the sketch code.


My lamp is similar to this one.

Lupenlampe.png

It is one year old.
You see the red arrow is the starter.
The blue arrow is an inductor (Drossel).

When the lamp turns on the spark produces a high voltage spike.


I repreat that there is no ground loop.
The Teensy is running from battery.
(I disconnected USB power from Teensy power with a cardboard cutter)
The connected notebook also runs from battery.
 
Last edited:
For USB communication to work, the devices on both ends have to work. We are assuming it is the Teensy that is dropping the ball, but is it possible that it is the laptop that is shutting off its USB port when it sees some induced voltage spike on the line?
 
That sounds plausible regarding the laptop. I have nearly the same circular CFL (not neon) with articulating arm and magnifier on my workbench. Of course I'm using 60Hz power. I haven't noticed any problems with my laptop or teensy.

Is your AC power grounded 3-wire (or whatever the proper term is)?
 
I have a similar magnifier lamp here. It has 2 lights. It's very old, using some sort of florescent lights, but I haven't really looked at where its starter is located.

The Teensy is running from battery.

So I should try testing Teensy running from battery power? You mentioned the trace is cut. Would 3 AA cells or a 3.7V lipo to VIN, with VIN-VUSB cut be a reasonable test?

The laptop should also run from its own battery power during the test? Nothing connected to AC power, other than the desk lamp?

Earlier a transformer was mentioned. Do I need that somewhere in the test?
 
Status
Not open for further replies.
Back
Top