Connecting antenna through PCB

Vitesze:
Oh right, because the GND plane underneath/alongside it should connect to the terminations of CN1/CN2 only, not the rest of my components. Got it. Can this GND plane be of any size? I understand it needs to be x mils away from the signal trace, but the GND plane itself, should it have a specific width?

Yes, much wider than the microstrip itself, otherwise you have a different geometry. Basically you want
all the field lines from the strip to meet the ground plane and not anything else. Perhaps 5 times the
strip width is enough. For RF I'd just use a full ground plane, you don't want to risk generating a resonant
piece of line as your ground. No need to worry about ground loops with RF, signals travel through the
air, you block unwanted signals by full screening.

If both sides have ground you need to stitch them together along the edges of the top plane so you
don't create resonant slot antennas along the length.

People seem to be confusing MICROSTRIP (as in this question) and STRIPLINE (which is a BURIED structure
requiring 3 layers or more_

Vitesze:
I'm using the Particle Electron for a project - due to the fragility of its uFL connector, I do not want to attach an antenna directly to it however.

Seems the microstrip is a poor solution for a non-existing problem.
Do you ever connect an antenna to a uFL connector?
Most antennas for that frequency come with a flexible lead and connector (that easily comes off when pulled).
A hole in the circuitboard, and a cable tie to secure the aerial wire could be a better/easier solution.
Leo..

Wawa:
Seems the microstrip is a poor solution for a non-existing problem.
Do you ever connect an antenna to a uFL connector?
Most antennas for that frequency come with a flexible lead and connector (that easily comes off when pulled).
A hole in the circuitboard, and a cable tie to secure the aerial wire could be a better/easier solution.
Leo..

Yep, I have been using uFL antennas for about a year now, but due to the environment I'm using them in they either:
(1) disconnect over time (due to movement stress)
(2) Snap off the connector after a while if I solder/glue them

I put these sensors in remote areas. They are battery-powered with an expected lifespan of about 2 years, so the antenna solution needs to be durable.

But you're right, if I run the cable underneath my PCB and I secure the cable at some point, it should remove most of the movement stress, and there won't be conflicts with other components on the PCB.

What I will do is follow the suggestions of others in this thread, but also add some holes in my PCB so I have the uFL antenna as a fall-back if the signal trace doesn't work correctly.

I updated my PCB - I was wondering if this is what it should look like?


Top layer: Red
Bottom layer: Blue

It's a 2-layer PCB - so I assume it's a non-embedded microstrip (not a stripline?). This matters a lot for trace width calculations. The copper is located on top of the substrate, not inside it.

Using the calculator here: https://www.eeweb.com/tools/microstrip-impedance
I calculated the trace width requirement for 50ohm impedance at 72mils. PCB thickness is 39mils, so I set the distance between trace/GND to 80mils (2*thickness)

I added trace widths to the image.
Top and bottom layer GND is stitched together with vias every 100mils.

Does this look correct, or should I change something? Are the stitching vias supposed to be close to the Signal trace, or far away from it?

EDIT: Unfortunately I can't move CN2 closer to the center of the board to avoid that slanted border on the PCB.

[ Microstrip is never embedded, microstrip is a surface trace, by definition. Stripline is by definition embedded. ]

That looks good, nice clearance either side, good ground stitching, and if you've got the right permittivity
for the board material and calculated correct width, it should perform nicely.

I've found for standard 1.6mm FR4 3.2mm is a reasonable 50 ohm trace width, your board is
thinner though I think, so 1.8mm sounds plausible.

There are also SMA board-edge connectors than can be more convenient for small projects as they stick out
sideways: https://cpc.farnell.com/rf-solutions/con-sma-edge/sma-female-connector-pcb-edge/dp/CN20645

MarkT:
[ Microstrip is never embedded, microstrip is a surface trace, by definition. Stripline is by definition embedded. ]

That looks good, nice clearance either side, good ground stitching, and if you've got the right permittivity
for the board material and calculated correct width, it should perform nicely.

I've found for standard 1.6mm FR4 3.2mm is a reasonable 50 ohm trace width, your board is
thinner though I think, so 1.8mm sounds plausible.

There are also SMA board-edge connectors than can be more convenient for small projects as they stick out
sideways: https://cpc.farnell.com/rf-solutions/con-sma-edge/sma-female-connector-pcb-edge/dp/CN20645

Oh right, I was confused by this link: Microstrip Impedance Calculator - EEWeb
where it does include a calculator for an "embedded microstrip".

Yes correct, if I adjust the PCB thickness to 1.6mm the trace width for a 50 ohm impedance is around 125mils (3.2mm). So it looks like my math checks out. I manufactured my PCBs at 1.0mm thickness, as anything thicker feels too bulky/heavy to me.

Unfortunately a board-edge antenna isn't an option as these PCBs go inside an enclosure, and the only possible way to position the antenna inside them is horizontally. An antenna that protrudes outside the enclosure is definitely a no-go.

When you do have the antenna external, they are handy, they extend through enclosure wall nicely if its not
too thick and use minimal board area.

MarkT:
When you do have the antenna external, they are handy, they extend through enclosure wall nicely if its not
too thick and use minimal board area.

My devices are to be installed inside large commercial waste containers, so as you can imagine anything protruding outside the enclosure will just break off eventually. The enclosures themselves also had to be IP67 just to keep the contents free from water and grime.

For now my current solution will do; but for the future my plan is to have an embedded PCB antenna. I'll likely go with a third-party to have one designed because from what I've read it's pretty tricky to design one.

Make sure those containers are not made of metal, or you won't have any reception.

And if your antenna doesn't fit in the enclosure, use a larger enclosure.

wvmarle:
Make sure those containers are not made of metal, or you won't have any reception.

And if your antenna doesn't fit in the enclosure, use a larger enclosure.

The containers are full metal, except for the lid. Unfortunately, I have no control over the material the containers are made out of, but so far using the Taoglas PC104 antenna I haven't had too much trouble yet connecting my devices from inside them.

Vitesze:
The containers are full metal, except for the lid.

In which case it is probably completely irrelevant as to where inside the container, the antenna is.

No, its important the antenna is clear of nearby metal objects so it doesn't de-tune (from stray capacitance).

I think Paul__B refers to the waste container likely forming a Faraday cage...
OP does mention he got connections, I guess the project box is placed high up in the waste container, near the lid.

No, the point is the signals are microwave and will get out and spread out by diffraction enough to find some
nearby cell tower. After all phones work in similar situations pretty well.