Photon SMD Antena, keepout zones, and ground loops

Hello folks,

I’m new to electronics in general and designing PCBs in particular. While building a PCB using the Photon SMD, I unintentionally created a ground loop around the “keep out zone”.

This was messing up the SoftAp setup process preventing my phone to connect to the Photon AP. My phone stay tuck in “Getting IP”. It seems that my phone couldn’t get an IP assigned by the Photon’s DHCP.

Once I created a dent in the upper part of the loop, the problem disappear and I was able to connect to the Photon AP and complete the SoftAP setup.

So it seems that there is more than just staying out from the “keep-out” zone.

I was wondering if some of the more experience PCB designers in the community could provide some guidance on how to prevent ground loops in a PCB?

Is it better to avoid having ground planes around the keep out zone in general?


@sazp96, I have a pre-claimed Photon running a board with a ground place around the keep-out. I’ll erase the creds on it and try setting up the wifi via the softap to see what happens. I’ll report tonight.

1 Like

Thanks @peekay123. You can find all the details of this issue here:

@peterqu found the ground loop in our design that fixed the issue for us.Thanks again Peter!

Now, I’m looking for best practices with regards to ground planes and keep out zones.

1 Like

This is my Rev1, no ground after the antenna, but traces in the non ground planed area (I misunderstood the keepout at the entire photon)

And this is my R2 with more beefy traces, but ground plane just above the antenna.

Niether of them works with the softAP setup.
So I am not convinced we have found the smoking gun yet, as yet more people are being halted by the issue.

In my 3rd rev I am planning on replacing the power circuit, but I have halted that for now since its throwing good money after bad.

IMO if the photon needs more clear space around the antenna, the keep out zone should be expanded, or explained better.


@MORA, interesting results. One thing I noticed is that in every case I have tested, the Photon has been in a socket, sitting off the board. This air gap may be the key to the SoftAP working. With the Photon (or P1 I assume) soldered to the board, this is where problems begin it seems. This issue may be related to another topic:

Also, there may be some nuggets to take away from the Keurig P1 layout of their board in this topic:

Note the ground plane weaving around the keep-out area. I don’t believe it’s a 4-layer board but I may be wrong. :wink:

I actually bought 2 antennas to see if an external one made a difference, does the listening mode still autoselect antenna ?

Maybe a hole/slot below the photon antenna would help too.

@MORA, I would manually select the antenna source using STARTUP(WiFi.selectAntenna(ANT_EXTERNAL)); :wink:

1 Like

@peekay123 I haven’t seen this issue with the old version of my PCB that uses the Photon with Headers.

I don’t know if it is the air gap or the changes in the PCBs that is making the difference, but SoftAP works perfectly in the Photon with headers.

Just completed 2 softAP setups after adding that code and putting an external antenna on it.
Its not conclusive since I have been able to complete the softAP sometimes, but looking good.

(Update) Added an antenna to my old light controller which have not been able to complete a softAP during my trials, worked on first attempt with external antenna…


@peekay123 do you know of anybody using only the Photon SMD antenna?

We could use some guidance on how to mount it properly to a PCB to avoid the DHCP error.


Hello @sazp96

Here is an good introduction on ground loop in PCB design.

1 Like

Hello @MORA,

Your Rev2 PCB has many traces that form partial circles. Those traces will be susceptible to EMI noise in the air. So, you might run into WIFI connectivity issue. If you are using analog function, analog reading might have excessive noise. If you are using digital protocol such as I2C/SPI, there could be sporadic noise-induced glitches.


I have reviewed multiple designs with surface mount Photon. Based on my experience, I have not seen any WIFI issue with surface mounted Photon on a properly designed PCB.

I have also seen many poor PCB design where the customer has encountered all kinda of weird behaviors. Here is a short list: 1) poor WIFI connectivity / software hang, 2) red SOS, 3) erratic analog reading, 4) glitch in I2C/SPI, etc. Usually in those scenarios, people spent a lot of time try to apply band-aid in software to fix the seemingly weird behavior. The reality is you can’t use software to fix a bad custom electronic/board design.

1 Like

If the photon needs specific PCB design rules, then it should be documented.
The issue is not that my I2C is not working, or my ADC is a bit off, its a complete failure to setup wifi unless using fixed ip or external antenna when mounted on a PCB.

Even ICs targeted at professionals explain in detail what parts of the design is critical, we should not need to guess.

Both revisions works after being setup, its only softAP that fails, and that can be completed successfully by setting a fixed ip, or as I tested today using an external antenna, maybe its due to packet loss since DHCP is based on UDP, but the tests I have done from a cell phone shows no dropped packets in listening mode.

My light controller using rev1 has been running 24/7 for 2months now, it works every day and thats with thin traces and without ground plane beneath the entire photon, yet softAP fails everytime untill I added an external antenna.

1 Like

Very interesting reading. Thanks @peterqu!

I unintentionally introduced several ground loops when I added a ground plane polygon in Eagle.

I think this section summarizes the issue well:

Thank you for summarizing this. Hopefully it explained some of the black magic you have experienced.

1 Like

Hey guys, for a 2 layer PCB, is it recommended to have ground pours on both layers?

I’m asking because I have a ton of traces on one side, a many on the other. So the ground pours are constantly interrupted by traces. At this point, I’m wondering if those interrupted ground planes are generating signal interference.

What is the best practice?


If you have one layer that is largely contiguous, you can use vias to provide a low impedance path between the fragmented pour on one side with the “better” pour on the other. You can add lots of them, and place them at less than quarter wavelength intervals around edges (this is called “via fencing”.) It looks like you’re using eagle, to avoid DRC violations, you need to name the vias the same as your ground pours are named.

Without expensive EDA tools, there’s a lot of experience, trail and error and/or luck involved in getting high performing designs at multi-GHz frequencies.


But the actual multi ghz design here is the photon module, the demands of the carrier PCB is hopefully less strict once the keepout area is respected ?
Maybe a slot below the antenna would help ?

You are correct, the demands of the carrier PCB are less stringent; but I believe this thread has amply demonstrated that this is not a zero-effort in all cases.

I agree that if it is possible to design a carrier where the antenna section of the module (be it P1 or Photon) can overhang that is optimal (at least electrically, if not mechanically) - but at the solution level it is still quite possible to screw up the RF environment by placing wires, metal work or other hardware in the area of the antenna.

Some validated reference designs and proven community projects will help a great deal.

I am curious what exactly it is about SoftAP mode that makes it more sensitive to problems with RF - I’d be interested in peoples opinions on that.
The AP is responsible for coordinating the packet transmissions of the client(s) - so it might be that if there is perhaps a less-than-fully-featured AP implementation in SoftAP mode, then it is easier for the wheels to fall off the coordination role.

1 Like