Author Topic: PCB review and RF layout  (Read 549 times)

0 Members and 1 Guest are viewing this topic.

Offline SierraFoxTopic starter

  • Newbie
  • Posts: 3
  • Country: ca
PCB review and RF layout
« on: April 23, 2024, 05:46:55 pm »
Hello!
I'm working on a GNSS/GPS tracking device that will transmit its location on 915mhz to a handheld unit and I'm hoping I could get some advice on my PCB.
U1 is a microcontroller and the transceiver for the 915mhz channel. U2 is the GPS receiver. AE1 is a ceramic patch antenna connected to U2 via a U.FL connector.
U3 is a 3 volt LDO and U4 is a li-ion charger.
J2 is an SMA connector to connect a whip antenna for 915mhz.
J3 and J4 are the U.FL connectors.
The battery is going to be a AAA sized li-ion battery (10440)
The left and right halves are separate boards and the back view of the PCB is flipped. I also attached screenshots with and without the ground plane visible for clarity.
I feel like the layout is quite garbage, but I also don't know how to make it better. I also don't know much about layout for 1.5ghz signals. The RF traces are 0.8mm wide and have a clearance on either size of 0.15mm.
I would love some advice and please ask if you want more pictures or details.
 

Offline aliarifat794

  • Regular Contributor
  • *
  • Posts: 52
  • Country: bd
Re: PCB review and RF layout
« Reply #1 on: April 24, 2024, 11:20:32 am »
Position the antenna (AE1) away from other components, especially noisy digital circuits, to minimize interference.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21722
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PCB review and RF layout
« Reply #2 on: April 24, 2024, 11:32:28 am »
Seems okay.

May want more vias around the MCU. Can't quite tell which pins are ground, if any, but those should have vias near them.  Same for the GPS module; it has some nearby (including flanking the antenna trace, that's nice), but I don't know at a glance what connects where.

Don't know what the datasheet says, but the GPS module might want traces out from under it, you'll want to look that up.  You have tons of routing area to run traces around the outside, and stitch ground around the traces beside, so that's no problem.

What does the purple outline imply?  Is that a courtyard that nearby components should be outside of, or something?  I'm guessing not, as capacitors are within it.

Huh... is there no input bypass cap? Hard to tell without schematic, but it looks like that is the case.  The charger and regulator likely both would appreciate having such.  Beware of mechanical switching between large reservoirs (i.e. Li cell, ceramic capacitor), as inrush and voltage overshoot can occur; some series resistance (for a low-power device like this, even just an ohm in series with the switch might be adequate -- this does depend on the 915MHz radio's transmit power, mind), or a TVS at the regulator input, may be desirable.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7402
  • Country: nl
  • Current job: ATEX product design
Re: PCB review and RF layout
« Reply #3 on: April 24, 2024, 11:59:20 am »
Download Saturn PCB toolkit, and enter that RF trace into the trace impedance calculator. You need 50 Ohm. I don't think you can get 50 Ohm on a two layer board with reasonable trace width. This is a coplanar waveguide for the calculations.
 

Online shapirus

  • Super Contributor
  • ***
  • Posts: 1416
  • Country: ua
Re: PCB review and RF layout
« Reply #4 on: April 24, 2024, 12:52:21 pm »
Download Saturn PCB toolkit, and enter that RF trace into the trace impedance calculator. You need 50 Ohm. I don't think you can get 50 Ohm on a two layer board with reasonable trace width. This is a coplanar waveguide for the calculations.
That'll be about 1.6 mm (in a microstrip arrangement; CPWG will be narrower) on a 1 mm thick board IIRC. Looks doable, as long as we're speaking only about the trace that goes to the antenna: there's plenty of room for it.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21722
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PCB review and RF layout
« Reply #5 on: April 24, 2024, 01:12:16 pm »
Yeah, board thickness can be selected, and perhaps a 1 or 0.8mm board, or even thinner, is an option here.  That scales down the Zo trace width.

I wouldn't worry about trace impedance too much, just keep trace length very short. If there's any impedance mismatch, you'll have to tweak the matching components anyway -- the TL impedance factors out entirely in the process.

This does assume you have some means of assessing antenna performance. I would guess an initial design within 2:1 SWR would be reasonable, but it would be best to test it for real, and it'll be wildly worse if the center frequency ends up wrong for example.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7402
  • Country: nl
  • Current job: ATEX product design
Re: PCB review and RF layout
« Reply #6 on: April 24, 2024, 02:22:32 pm »
I wouldn't worry about trace impedance too much, just keep trace length very short. If there's any impedance mismatch, you'll have to tweak the matching components anyway -- the TL impedance factors out entirely in the process.
GPS will have an input impedance of 50 Ohm, and typically you will match the antenna, not the trace connecting your module to the antenna. I don't really like the rule of thumb "  small traces don't matter" for GPS, because we are dealing with very small signals to start with, and no way to compensate with more power.
Plus I don't think OP has a VNA to test all this, if he is asking this.
OP, buy or rent a VNA. Or outsource the matching.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21722
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PCB review and RF layout
« Reply #7 on: April 24, 2024, 03:03:52 pm »
You misunderstand somewhat; the traces and components in-circuit are all part of the tuning/matching/filtering network.  You don't match to the trace (how would you know?), you match the whole trace-components-antenna system all at once.

A bit like the old saw of hams cutting feedlines to length to reduce SWR at the final; the line itself becomes part of the matching network (with attendant increase in losses, if one does this with a somewhat lossy medium like coax).  If one doesn't mind the losses (or reduction in maximum power due to breakdown of the cable, or both(!)), it's a perfectly valid method.

In this case, the line length is so small (under 1/4 wave; notice 1/4 wave is ~45mm, even ~30mm in a medium like FR4), it's hard to get any reactance out of it, even with fairly generous mismatch (say 2:1), let alone much loss.

I don't have a direct measurement of length here of course, but it's comparable to the base of the SMA connector, which is what, 7mm long?

Tim
« Last Edit: April 24, 2024, 03:07:32 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline SierraFoxTopic starter

  • Newbie
  • Posts: 3
  • Country: ca
Re: PCB review and RF layout
« Reply #8 on: April 24, 2024, 04:57:19 pm »

What does the purple outline imply?  Is that a courtyard that nearby components should be outside of, or something?  I'm guessing not, as capacitors are within it.

Huh... is there no input bypass cap? Hard to tell without schematic, but it looks like that is the case.  The charger and regulator likely both would appreciate having such.  Beware of mechanical switching between large reservoirs (i.e. Li cell, ceramic capacitor), as inrush and voltage overshoot can occur; some series resistance (for a low-power device like this, even just an ohm in series with the switch might be adequate -- this does depend on the 915MHz radio's transmit power, mind), or a TVS at the regulator input, may be desirable.

Yes the purple like is the courtyard. I thought it would be ok to have capacitors in the courtyard though because bypass capacitors should be as close to the VCC pin as possible.

I will add bypass capacitors to the rest of the components too. Should I avoid using a mechanical switch altogether, or just add a resistor in series? I'll add a TVS too.
 

Offline SierraFoxTopic starter

  • Newbie
  • Posts: 3
  • Country: ca
Re: PCB review and RF layout
« Reply #9 on: April 24, 2024, 05:01:28 pm »
Thank you so much for the help and advice!!! My brain feels like it has doubled in size honestly.

One more question too. Are the Pi matching networks ok? I struggle with impedance things still and I don't know if I should have one on either end of the U.FL connectors to the GPS antenna or just one.

You all rock!!
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21722
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PCB review and RF layout
« Reply #10 on: April 24, 2024, 05:18:49 pm »
The switch is fine.  Pi networks are fine too, if nothing else you can bypass it with a 0-ohm jumper.  As mentioned, you'll need a VNA (or some NA) to tune them properly; recommended values are a starting point.  If the antenna starts at 50 ohms (at target frequency(ies)) then direct connection to the feedline is fine, or if it needs a matching network to match 50 ohms, use that, and follow the recommended layout.  If the receiver is 50 ohms (probably the case), then a 50 ohm cable, connectors, and traces will be fine and no matching network will be needed at the other end.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7402
  • Country: nl
  • Current job: ATEX product design
Re: PCB review and RF layout
« Reply #11 on: April 25, 2024, 08:00:20 am »
You misunderstand somewhat; the traces and components in-circuit are all part of the tuning/matching/filtering network.  You don't match to the trace (how would you know?), you match the whole trace-components-antenna system all at once.
No you don't match to your trace, because you make the trace 50 Ohm. If your trace is not 50 Ohm, you absolutely have to match to a trace which is any considerable length. It's like trying to use a 75 Ohm coax for a 50 ohm system, you get reflections. You might even need to open up the ground plane under a component, if the size of the component pad is larger than your 50 Ohm trace. Do you think they make these recommendations based on nothing? Nobody ever say that "Oh, don't worry about that component pad, it's shorter than quarter wavelength".
The old rules of thumb don't work in practice when talking about GHz signals, especially when GPS is involved with it's -120dBm signal strength.
Here is a measurement of a RF system, that I messed up by having just 600 femtofarad extra capacitance in the connector. That's just the effect of an extra 0.4mm * 4mm pad. Much shorter than the wavelength, that's ~40mm@4GHz.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21722
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PCB review and RF layout
« Reply #12 on: April 25, 2024, 08:51:29 am »
No you don't match to your trace, because you make the trace 50 Ohm. If your trace is not 50 Ohm, you absolutely have to match to a trace which is any considerable length.

So you categorically deny the applicability of the feedline length trimming example?  Mind I don't mean as a practical basis, practically it's stupid, but on a basis of impedance. Impedance is easy to work with, and should be easy to prove or disprove.  Can you demonstrate with equations, Smith chart, etc. how it does not work?

Quote
It's like trying to use a 75 Ohm coax for a 50 ohm system, you get reflections. You might even need to open up the ground plane under a component, if the size of the component pad is larger than your 50 Ohm trace. Do you think they make these recommendations based on nothing? Nobody ever say that "Oh, don't worry about that component pad, it's shorter than quarter wavelength".

Pads..?  These... aren't 20GHz signals here. I'm not sure what you're getting at. ???


Quote
The old rules of thumb don't work in practice when talking about GHz signals, especially when GPS is involved with it's -120dBm signal strength.
Here is a measurement of a RF system, that I messed up by having just 600 femtofarad extra capacitance in the connector. That's just the effect of an extra 0.4mm * 4mm pad. Much shorter than the wavelength, that's ~40mm@4GHz.

I guess you forgot an attachment, oh well.

What difference is signal strength? Impedance is linear, it works even if it's Johnson noise.  I'm talking system dynamics, raw impedance.  Your error is apparently either a matter of impedance mismatch (600fF at 4GHz is 66Ω -- hardly negligible) or bandwidth (not also adjust nearby inductor to compensate).  Which includes the wideband case (tuning of limited use or impossible).   
I also guess that you had a multilayer board, as at K = 4.6 for example, those dimensions give a 0.1mm substrate height.  Which is also around 30 ohms microstrip, which isn't crazy, but that's a dB or two off if you don't have other compensation for it (like above).

What is the corresponding mismatch length and impedance ratio for this frequency?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7402
  • Country: nl
  • Current job: ATEX product design
Re: PCB review and RF layout
« Reply #13 on: April 25, 2024, 10:08:36 am »
No you don't match to your trace, because you make the trace 50 Ohm. If your trace is not 50 Ohm, you absolutely have to match to a trace which is any considerable length.

So you categorically deny the applicability of the feedline length trimming example?  Mind I don't mean as a practical basis, practically it's stupid, but on a basis of impedance. Impedance is easy to work with, and should be easy to prove or disprove.  Can you demonstrate with equations, Smith chart, etc. how it does not work?

Quote
It's like trying to use a 75 Ohm coax for a 50 ohm system, you get reflections. You might even need to open up the ground plane under a component, if the size of the component pad is larger than your 50 Ohm trace. Do you think they make these recommendations based on nothing? Nobody ever say that "Oh, don't worry about that component pad, it's shorter than quarter wavelength".

Pads..?  These... aren't 20GHz signals here. I'm not sure what you're getting at. ???


Quote
The old rules of thumb don't work in practice when talking about GHz signals, especially when GPS is involved with it's -120dBm signal strength.
Here is a measurement of a RF system, that I messed up by having just 600 femtofarad extra capacitance in the connector. That's just the effect of an extra 0.4mm * 4mm pad. Much shorter than the wavelength, that's ~40mm@4GHz.

I guess you forgot an attachment, oh well.
I did:
https://www.eevblog.com/forum/rf-microwave/help-me-improve-this-power-splitter/msg5272458/#msg5272458

Pads, yes they do matter, even at 1.5GHz.
https://infocenter.nordicsemi.com/pdf/nwp_033.pdf
Section 2.2.1
The pad size of GPS modules usually is quite large compared to the transmission line width. Same goes for an SMA connector pin size. Not to mention the SMA connector is a complicated 3D object, and in a lot of designs the CPW transmission line changes to a microstrip to the pin.
I just don't like this handwaving that "lambda/4 doesn't matter" when it absolutely does.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf