Passing a CE test with a Photon with headers [sharing my solution]

Hi Guys,

I recently got my BrewPi Spark brewing temperature controller through a CE test.
The BrewPi Spark combines a photon with a TFT touch screen, a OneWire bus master for temperature sensors, an RS485 driver to talk to other microcontrollers, 5V output drivers for SSRs, a buzzer and a DC-DC converter.

It was not a success on first try, CE-tests are pretty brutal. They zap your board with 8 kV, test immunity to strong electromagnetic fields in a wide frequency range and of course your emissions have to be under a strict limit (among other things).

Here is a video of the CE guy zapping the board for the ESD test:

The Spark Photon is CE certified, but that does not mean if you put it on a board, it will hold up to all tests. If you change the environment, the test results change too, due to parasitic capacities.

My point of this post is to share a problem I encountered and the solution we came up with. First, let me show you a photo of the board:

When my board communicated over RS-485 (just behind the photon in the photo above), my emissions were over the limit. We narrowed down the issue to USB cable, which was plugged into the Photon. It was acting as an antenna and/or had a parasitic capacity to the environment. It was not grounded well enough.

Here is how the photon connects to the shield, with standard headers (high quality gold plated ones):

The USB connector on the Photon is connected to the ground plane, it should be fine, but it wasn’t.
Then we tried this fix:

We connected the USB connector of the photon to the BrewPi shield with a large piece of copper. The emission were much lower and the test passed.

So we narrowed down the problem: their was a difference between the Photon ground and the shield ground. These two ground planes are connected via the Photon headers, there are 2 ground pins connecting the two. But apparently, this was not enough. Maybe the ground pins are not close enough to the USB connector, maybe they have a too high resistance.

Connecting the two boards with a piece of metal is an expensive solution and I am happy to report that we found an alternative. Next to the USB connector are these pins: 3.3V, RST, VBAT, VIN (and 2x GND).
These pins are not GND, but 3.3V, RST, VBAT and VIN all have a fairly large capacitor to ground. So they are GND for high frequency signals!

The solution was therefore to also put a 100nF capacitor (low resistance for high frequencies) on the shield for these pins, close to the header. So we went from 2 ground pins to 6 for high frequencies! This brought the emissions under the limit and the board passed the tests!

This is a very cheap solution, just 4 extra capacitors. You can see 3 of them in the photo above (C16, C17, C18). So if you make a PCB for a Photon with headers, just include them.

Cheers!

12 Likes

On a related note, to simplify updating for my customers, I have written a python script that downloads our latest stable firmware and from [our GitHub releases][1] and flashes it to their photon/core. It works on Windows and Linux.

If necessary, it also downloads and flashes a new system image for the photon.
It can also put a photon in DFU mode automatically by opening the serial port at 14400 baud.

You can find the script here:
[1]: https://github.com/brewpi/firmware/releases

Oh btw, it also figures out automatically whether a Photon or Spark core is found and then detects on which serial port it is.

2 Likes

Wow. Very good to know—I can only imagine what the medical-equipment tests are!
I suspect that the CE tests are purposely designed to abuse your equipment beyond what most people are likely to do–simply so that passing equipment is far less likely to have failures down the road.

Can you give any info about CE testing? Who to contact, cost, timeframe, what’s required, etc.?

CE testing is a rather complex, and it is a voluntary system that you can do your self. You just need to know which EU directives you must comply with and this depends on the product you are going to manufacture and sell. If you are just selling a intermediate product like a part to another machinery you might get away by not doing to the whole thing. The testing must be done properly as you are personally (or one person from your company) responsible, meaning if somebody gets shocked to death then you’ll be liable in court. CE marking requires that the person lives in the EU, so Chinese companies claiming CE markings are not legal (unless they have a representative in the EU), somebody like the reseller must do even if they didn’t manufacture the product. The requirements for CE testing can be bought from any national standards institute within the EU. One of my associates has been heavily involved in this process, and my knowledge is sort of second hand.
Most likely your system will have comply with:
Low Voltage Directive
Electromagnetic compatibility
Restriction of the use of certain hazardous substances
Then there are a bunch more depending are you doing toys, medical equipment, some power electronics, etc. Some of these you can actually do yourself and save money, just be very careful, you really need to know what you are doing. Easier is just to use a company, and get the documentation. There are tons of companies that are doing this even in the US. Costs are tied really to your product. So I’m not an expert on this matter so you should consult a professional on these matters, getting CE wrong can result minimum pulling your product from the market or maximum a jail sentence and massive fines (if somebody dies).

@FistOfTheNorthStar: Thanks for your very detailed response! I understand that CE is the EU’s test; is the US equivalent test the UL listing?

I'm not 100% sure, but I thought that UL is not a legally required where FCC is. FCC, I believe it is similar to the CE EMC part only. But do not take my word as legal advice.

1 Like

@Elco do you have a schematic handy of the capacitor and ground pin section? Many thanks if so.

I just used a 100nF capacitor from the Spark pin to GND, for the pins 3.3V, RST, VBAT, VIN.

Hate to ask, but did you happen to have firmware that looped the radio through bands and channels?

None, this was not needed in the test, because the wifi module was already certified.