Connecting antenna through PCB

This probably is a stupid question, but I was hoping someone could help me out with this.

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. Instead I want to run a cable to an SMA connector - which links to another SMA connector to which I attach an antenna. Please use image below for reference:

CN1 and CN2 are female SMA connectors. I plan to use a female uFL to SMA male cable between the Electron and CN1. The center pin of CN1 is connected to the center pin of CN2. The outer pins on both are connected to GND. For CN2, I will attach an SMA male antenna, such as the TG 22.0112.

The trace width is 40mils, the length is about 3.5 inches. Regular 1oz thickness.

Would this setup work? Or am I misunderstanding here how antennas work?

So this is a stripline design and you are using the correct board with ground plane and have calculated the stripline width accordingly?

Paul__B:
So this is a stripline design and you are using the correct board with ground plane and have calculated the stripline width accordingly?

I have not done any calculations. I thought simply running a trace between CN1 and CN2 would be sufficient, but I see that was too easy thinking.

The trace between CN1 and CN2 would be surrounded by a GND plane btw.

You need a stripline calculator - and strict knowledge of the PCB material to match - to determine the characteristic impedance of your track to match the antenna and RF device, just as you have to use the correct coaxial cable.

Easier to use a pre-made adapter cable with the required socket for the antenna with a mounting nut to attach it to your panel.

I think the design shown has a high probability of working. Impedance mismatches are always created at every connector and every bend, creating reflections in the signal. So long as these aren't some exact multiple of wavelength apart, it won't be too terrible.

But for the cost of finding an online calculator, you would be silly not to at least look at the calculation.

Paul__B:
You need a stripline calculator - and strict knowledge of the PCB material to match - to determine the characteristic impedance of your track to match the antenna and RF device, just as you have to use the correct coaxial cable.

Easier to use a pre-made adapter cable with the required socket for the antenna with a mounting nut to attach it to your panel.

Thanks, so I had a look and found this calculator (is Microstrip the correct one for this?):
https://www.eeweb.com/tools/microstrip-impedance

The antenna has 50ohm impedance.

My trace thickness is 1oz, substrate height is 1.0mm, trace width is 40mils and assuming a high Substrate Dielectric of 4.5, I still end up with an impedance of 68 ohm.

If this is the correct way of calculating the impedance, then I should:
(1) Figure out the exact substrate dielectric
(2) adjust the trace width to get to 50ohm impedance?

Apologies if I'm not fully understand it again - I try my best but I'm new at this. Thanks for all the help so far.

EDIT: The dielectric constant is about 4.45 according to the producer - using the calculator, that would mean the trace width should be increased from 40 to 73mils to achieve 50 ohm impedance?

68 is probably close enough. If you have the flexibility to change the width then you shoud do so. It doesn't cost anything.

MorganS:
68 is probably close enough. If you have the flexibility to change the width then you shoud do so. It doesn't cost anything.

Thanks, Anything else to keep in mind? Is it fine to have a GND plane run around the trace? I have GND planes on both sides of the PCB, so it'd run around it + fully underneath.

A stripline can be built with two traces on the same side of the PCB. So yes, adjacent ground plane will affect the impedance. If you can't find a calculator to do this, keep the top ground plane more than 2 thicknesses away.

MorganS:
A stripline can be built with two traces on the same side of the PCB. So yes, adjacent ground plane will affect the impedance. If you can't find a calculator to do this, keep the top ground plane more than 2 thicknesses away.

So in this case, I assume instead of one trace with 72width, you would do a trace on both sides each with a 36width? Should vias be added througohut these traces?

EDIT: Sorry, misread your post. I will stick with a 72mil width trace, but remove the GND plane around it on the other layer.

So this should work? Top and Bottom GND planes are about 100mils away now from the trace. I wasn't sure though if by "2 thicknesses" you mean the actual copper thickness or the trace width? The copper thickness is 1oz = 2*1.4 = 2.8mils, which seems extremely little clearance for any trace.

Twice the trace with.

You did not mention the signal frequency. It's it WiFi, 2.4 or 5GHz?

I was doing similar calculations for LoRa 868MHz a while ago. I was surprised how wide the traces needed to be! I guess they will be less wide for 2.4GHz.

Another tip I was recommended was to place lines of vias between the ground planes on both sides of the trace.

I am not quite certain I understand what you are trying to achieve. Does this involve branching the signal to two connectors? If so, that's a problem. If both connectors will have antenna connected at the same time, the impedance of the combination will be very wrong. If only one antenna will be connected, then the other socket will need to be terminated correctly to avoid signal reflections.

I agree with you about ufl connectors. I have had so many break off their PCBs. And trying to hand solder a replacement is horrible and the result is even weaker.

PaulRB:
Twice the trace with.

You did not mention the signal frequency. It's it WiFi, 2.4 or 5GHz?

I was doing similar calculations for LoRa 868MHz a while ago. I was surprised how wide the traces needed to be! I guess they will be less wide for 2.4GHz.

Another tip I was recommended was to place lines of vias between the ground planes on both sides of the trace.

I am not quite certain I understand what you are trying to achieve. Does this involve branching the signal to two connectors? If so, that's a problem. If both connectors will have antenna connected at the same time, the impedance of the combination will be very wrong. If only one antenna will be connected, then the other socket will need to be terminated correctly to avoid signal reflections.

I agree with you about ufl connectors. I have had so many break off their PCBs. And trying to hand solder a replacement is horrible and the result is even weaker.

It's 3G, so 800/850 and 1800/1900MHz.

Here's what I'm trying to achieve: putting a uFL antenna directly onto the Electron is a no-no because it snaps off very easily. So now a cable will run from the Electron to CN1, and CN2 will have the antenna. The reason for this is that an antenna would not fit at the CN1 position, and I can't run a cable all the way to CN2 either.

So only CN2 will have the antenna, but the signal should be sent to CN1, and then through the cable to the Electron.

How would I terminate CN1 correctly? Right now both CN1 and CN2 are simply connected to the GND planes.

No, twice the PCB thickness. You entered PCB thickness as one of the major parameters in determining the impedance of the stripline above the ground plane. So you need to retain that ground plane which you used to make the calculation and keep all others away.

Your updated picture where you keep the ground plane twice the trace width away looks reasonable. But did you lose the ground plane underneath?

Think of the origin of these impedance calculations: coax cable. The diameter of the inner conductor relative to the outer conductor is what sets the impedance. The filler material does have a small effect too. You are trying to make a coax cable mashed flat onto the PCB.

The termination of the connector shells to the ground plane is not critical, so long as it does exist.

Question: does this antenna have to share the ground plane with everything else on the PCB? It might be best to run two traces for the "flat coax" and keep them separate from everything else.

So only CN2 will have the antenna, but the signal should be sent to CN1, and then through the cable to the Electron.

I get you now. No termination required.

No, twice the PCB thickness.

Ah, thanks. Good job I did not pay to have those PCBs made yet...

PaulRB:
I was doing similar calculations for LoRa 868MHz a while ago. I was surprised how wide the traces needed to be! I guess they will be less wide for 2.4GHz.

Was the frequency a factor in your calculator? I can't quite see why the frequency would be relevant to a transmission line.

MorganS:
No, twice the PCB thickness. You entered PCB thickness as one of the major parameters in determining the impedance of the stripline above the ground plane. So you need to retain that ground plane which you used to make the calculation and keep all others away.

Your updated picture where you keep the ground plane twice the trace width away looks reasonable. But did you lose the ground plane underneath?

Think of the origin of these impedance calculations: coax cable. The diameter of the inner conductor relative to the outer conductor is what sets the impedance. The filler material does have a small effect too. You are trying to make a coax cable mashed flat onto the PCB.

The termination of the connector shells to the ground plane is not critical, so long as it does exist.

Question: does this antenna have to share the ground plane with everything else on the PCB? It might be best to run two traces for the "flat coax" and keep them separate from everything else.

Ok, so to summarize what I should do:

(1) Keep the trace width (72mils) to obtain 50ohm impedance (given the PCB specs)
(2) Not alter the bottom layer GND plane (i.e. it will run underneath the trace)
(3) Place the top layer GND plane at 2*PCB thickness away from the trace
(4) Separate the termination of CN1/CN2 from other components on the GND plane

The PCB thickness is 39mils (1.0mm) so I would place the top layer GND plane 78mils away (which is slightly less than in my image, which was approx. 100mils). I will connect all the terminations of CN1/CN2 together and return them to the GND pin on my Electron in a trace separate from the GND plane?

2 and 4 are contradictory.

MorganS:
2 and 4 are contradictory.

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?

I assume it should not connect to the GND pin on my Electron either then, since it connects to the GND of the coax cable running to the antenna connector on the Electron?

I expect it must be as wide as the top trace but that depends on the particular assumptions made by the stripline calculator.

MorganS:
I expect it must be as wide as the top trace but that depends on the particular assumptions made by the stripline calculator.

I'll look into it, thanks.