Author Topic: Beginner RF PCB Design & Layout Details  (Read 1026 times)

0 Members and 1 Guest are viewing this topic.

Offline DanielHeEGGTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Beginner RF PCB Design & Layout Details
« on: April 22, 2021, 07:54:39 am »
So I'm an enthusiasts who's pretty new to the field of RF and I'm currently working on a small project involving some RF stuff. Basically an RF IC, some passives, and an antenna. I've looked around online and looked at some videos of talks and lectures for guidelines and "best practices", but there seems to be a lot of conflicting information all over the place. One guy tells me "don't do this", some other guy tells me "don't do that", and a third guy tells me "it doesn't matter". I'm really not quite sure who to believe here.

I made a few exmaples of slighly different layouts (attached below), the conponent on the left is an RFIC, right is an antenna, and three 0201 passives in the middle. How would each example layout have an effect on RF performance, in what way, if any?

In my specific application, frequency's about 400~500 MHz, I didn't include ground planes in the examples, but these would all be top layer coplanar waveguides with another ground plane on layer 2.

Also, a more compact design would be optimal, given that it doesn't effect RF performance.
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7390
  • Country: nl
  • Current job: ATEX product design
Re: Beginner RF PCB Design & Layout Details
« Reply #1 on: April 22, 2021, 08:22:15 am »
The first one looks the best, and that's how I usually do it, though at different frequencies. It passes EMC testing, so it is probably OK.
One tip: Don't restrict yourself to 90 degrees component placement, when it comes to RF. 45, 30 is also fine, let the pick and place machine deal with it.
 

Offline DanielHeEGGTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: Beginner RF PCB Design & Layout Details
« Reply #2 on: April 22, 2021, 09:45:48 am »
The first one looks the best to me as well, and I see this sort of layout the most in other designs. The problem is, are the other designs in any way worse than the first one?

I would like to make my board as small as possible, so I would prefer the second layout where everything's tightly packed together, does this layout degrade RF performance?

Just intuitively, I would assume that layout 2 would be better than layout 1, since in layout 1, everytime an 0201 pad switches to a copper trace there would be an impedance discontinuity which would make the performace worse, while layout 2 directly connects each passive to the next. But I was told this might not be the case?
« Last Edit: April 22, 2021, 09:51:32 am by DanielHeEGG »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21688
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Beginner RF PCB Design & Layout Details
« Reply #3 on: April 22, 2021, 10:27:04 am »
I assume that's a tee matching network in the middle?  Assume the obvious inline pins are active, everything else ground or NC?

I like the setup by the way of rating different examples -- though, perhaps not surprisingly, they aren't as diverse (or horrible) as you might've hoped -- but a few small lessons can still be gleaned from them. :-+

So, some setup first, and then on to the rankings.


So I'm an enthusiasts who's pretty new to the field of RF and I'm currently working on a small project involving some RF stuff. Basically an RF IC, some passives, and an antenna. I've looked around online and looked at some videos of talks and lectures for guidelines and "best practices", but there seems to be a lot of conflicting information all over the place. One guy tells me "don't do this", some other guy tells me "don't do that", and a third guy tells me "it doesn't matter". I'm really not quite sure who to believe here.

Well, it may be partly that you've missed the assumptions that they're making... or they didn't mention them at all. ::)  Or, I mean, they could all be full of shit, you can never be too careful. ;D Full, that is, until you've gone and proven it all for yourself -- but that's a few hundred PCB layouts, a snappy VNA, and a suite of probes and antennas to test them all.

Which, now that I write it out, does sound rather more doable than it might at first glance -- that's "only" a few thousand dollars worth of materials and equipment; in perspective, that's easily a fraction of a college curriculum specializing in the subject.  It would take quite a lot of dedication to go that way, of course, not to mention the heavy dose of theory to know what you're even doing in the first place!

And, give or take what your existing level of experience is, in electronics in general, or even, physics more broadly; I take it you're very new to RF at least, but no idea beyond that.  (Now, electronics is, when an electron and a hole love each other very much, and... -- oh wait, I might be channeling a professor I had years ago, who liked to note that "physics is a very sexy subject." :-DD )

So -- even for the experts, experience is hard won.  And it's rarely free of confounding variables (as examples in industry go), so even the best of us may not have the clearest internalization of what's really going on.


Anyways, assumptions underlie the situations where those things are better or worse.  There are very few places where you, for example, should slot a ground plane -- but when they do apply, and all the precautions around that feature are met, it can be a net benefit.  In those particular cases.  When one misses out on all of those conditions, one might... choose poorly.

Some of those assumptions may still be taken for granted.  As suggested reading material, look up:
- transmission lines
- image currents
- wave or telegrapher's equations
- waves, wavelengths, interference (superposition)
- ports -- for making RF setups and measurements

Ports are how we abstract the connection between ideal (0-dimensional) electrical circuits, and the general networks between them, or the fields around them.  Transmission lines can be understood in a 1-dimensional manner, when used responsibly; if not, then we need to consider the 2-dimensional (within-PCB?) or 3-dimensional (full fields) environment of the system.

Waves are good for, if nothing else, hand-waving estimates for approximation methods: for example, in a controlled-impedance environment (say, 50 ohm transmission lines, sources and loads), when transmission line segments, or component lengths, etc. are much less than a wavelength long (a ballpark of 1/8 to 1/20 is often given), the transmission line effects (standing waves and phase shift) can generally be ignored, or at least approximated (as an equivalent LC).

These are more destinations than starting points -- do take the time to look up (or ask questions!) about anything on the way there.  There's years and years worth of experience to pick up; you won't do it all at once.  Try not to be intimidated, but develop the confidence to approach each little aspect at a time, and strive to understand it.


Abstraction itself, is very important, and powerful; I can think of, about four levels of abstraction in the worst part of electronics (related to fields, and not counting software of course!).  You don't have to go to this level of depth for basic RF circuits -- but just so you're aware that these things can go deep.  If you're... not great at abstraction, you'll surely be avoiding, the, like, in-depth proofs, and network analysis, and all that, but you'll need at least a couple levels to do much of anything.

If you're curious, that example probably goes something like:
1. You can't physically see or interact with the circuit, so you need an instrument to do it; the result is graphical or numerical (i.e., a voltmeter, oscilloscope, etc.).  As a result, we tend to say "things" go "up" or "down"; we're describing something about the indicated graphical or numerical quantity, naturally we adopt that terminology for the abstract quantity as well.
2. You have a circuit, which maps a graphical (schematic) or textual (netlist) representation, to the system in question.  Which, presumably, includes points you can measure in (1).  We might say that a node in a circuit "moves up|down", which is meant in the above sense; of course the circuit doesn't physically move (except when it does, heh).
2a. Optionally, there may be an equivalent schematic, which captures facets of the system not made explicit enough by the physical model.
3. Given... various constraints, we can solve for the behavior of a schematic representation.  We might construct a system of differential equations (or difference equations if we're using a numerical solver like SPICE -- the setup in that case is done automatically for us, nice eh?).
4. Differential equations can be solved in many ways (and can't be solved in even more ways..).  When even more constraints apply, relatively simple methods can be used.  As it happens, those methods use solutions to polynomial equations.  So the roots of the polynomials give the behaviors of, for example, linear RLC filter networks.  (This auxiliary polynomial might arguably be a 5th level of abstraction, but we use transforms to keep things a bit closer.)

The abstractions in 2a, 3 and 4 happen to apply to much more than just electronics -- indeed they apply in any system of linear wave equations, so we have equivalent circuits of mechanical (spring and mass) systems, or pneumatics or hydraulics (where the waves are ultimately acoustic waves in whatever medium), etc.  This falls under the field of dynamics, specialized for each domain which hosts it, of course; but underneath that, the solutions work the same way.

If you've ever heard mention of "poles" and "zeroes", these are straight out of the deepest level of abstraction -- they don't refer to anything the least bit physical at all, but as we don't have language to address nonphysical thought, they still end up as ordinary nouns, I guess.  Anyway, a "pole" is where an equation divides by zero, while a "zero" is where it's... zero.  Lumped equivalent (RLC or spring-mass) systems have properties (such as gain, or impedance) that are equivalent to rational polynomials, i.e. one polynomial divided by another.  So, when those polynomials are factored, the zeroes in the denominator are poles of the system, and the zeroes of the numerator are zeroes of the system.

So that's... maybe rather intimidating, but it is only finitely many levels (and as any mathematician knows: if it's not zero or infinity, it might as well be equal to one, right?!), and I hope more that, by seeing it listed out, I might alleviate some of the, just, outright uncertainty, about what lies under a given level of a subject?


Quote
I made a few exmaples of slighly different layouts (attached below), the conponent on the left is an RFIC, right is an antenna, and three 0201 passives in the middle. How would each example layout have an effect on RF performance, in what way, if any?

In my specific application, frequency's about 400~500 MHz, I didn't include ground planes in the examples, but these would all be top layer coplanar waveguides with another ground plane on layer 2.

Also, a more compact design would be optimal, given that it doesn't effect RF performance.

So now, on to the ranking --

The lynch pin is the frequency:
500MHz is a wavelength of about 60cm, and 1/20th of that is 3cm.
Your whole active area is a tiny fraction of this.
So, we don't really care one way or the other.

The biggest differences are:
1. Straightforward, leaves plenty of space between components (this is good for placement and soldering), and presumably the QFN has some junk around it anyway (not shown) so it helps with that.  You'll want to have vias on all nearby grounds, multiple of them in fact, and of course follow the manufacturer's datasheet/appnotes on this matter.

2. Electrically better, as it's a shorter path; but again, the path is easily short enough already, so it's not a big deal.  It's a lot harder to build though.

3. This one is actually worse, though probably again not by a whole lot.  Assuming the two inline components are routed together and the one off to the side has another trace to it, the length of this stub adds some stray inductance (ESL) to the component.  If it's a capacitor, that will add a zero to the response: that is, at some high enough frequency, the filter will stop rolling off, and gain goes back up (probably to a very small amount still, like -60dB or something).

4. Same here.  If we assume all the extra pins are grounds, the proximity of chip and socket don't matter.  With everything else filled in, it probably will, but the example in and of itself, no.

An interesting case that you missed, is all three parallel, in a stack (broadside): that is, in this one, rotate the two vertical components, and move the bottom component to the middle.  This eliminates the stub from (3) / (4).  Downside, you can probably only get one GND via to its non-signal pad, which has a similar effect to a stub trace (remember, ground traces and vias are in series with the component, too!).

I do like arranging components this way -- it gives good density and a pleasing layout.  It's not always best for signal quality (as above, or also because of coupling between adjacent components, if that should be a problem), so it might not be preferred at RF.

5, 6. If the trace is the same characteristic impedance as the connector and its transmission line (cable): no difference.  The sharp-ish corner in 6 is only slightly annoying; it will take much more than a radio modem to notice the difference!

If the trace is not impedance matched: bad!  Well, less good -- again, still not terrible just because of the wavelengths.  We might want to ask "how terrible", in case the transmission line impedance is very, very poorly matched -- as it happens, this is just about impossible on PCB (impedances from <20 to about 200 ohms are doable, and this will likely be towards the middle of that range), so there's not much concern left there.

Down at low frequencies (where the wavelength is a great many times the layout dimensions), this can be a problem again -- a good rule of thumb is to take the wavelength fraction and the impedance mismatch together, and use that as the factor for concern.  A switching circuit might be only 1cm wide, but if it's dealing with 1 ohm loads and 100MHz harmonics (3m), a 100-ohm trace has the significance of a 100cm transmission line -- much more than 1/20th or whatever of that wavelength!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: DanielHeEGG

Offline DanielHeEGGTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: Beginner RF PCB Design & Layout Details
« Reply #4 on: April 22, 2021, 12:04:18 pm »
And, give or take what your existing level of experience is, in electronics in general, or even, physics more broadly; I take it you're very new to RF at least, but no idea beyond that.  (Now, electronics is, when an electron and a hole love each other very much, and... -- oh wait, I might be channeling a professor I had years ago, who liked to note that "physics is a very sexy subject." :-DD )

That might be the best quote I've heard all week. ;D

Anyway, I wouldn't say I'm new to the field of electronics, I've been working with microcontrollers and low speed analog stuff for a few years, but this is my first RF project.

The biggest differences are:
1. Straightforward, leaves plenty of space between components (this is good for placement and soldering), and presumably the QFN has some junk around it anyway (not shown) so it helps with that.  You'll want to have vias on all nearby grounds, multiple of them in fact, and of course follow the manufacturer's datasheet/appnotes on this matter.

2. Electrically better, as it's a shorter path; but again, the path is easily short enough already, so it's not a big deal.  It's a lot harder to build though.



I was mostly concerned about these two options. Since I would like my design to be as compact as possible, I was going with option 2, but then I heard that option 2 is bad, and I didn't want to take the risk, so I had to double check. Also, the RF section is supposed to cope with input signals of -130dBm (direct quote from the IC datasheet), so I'm going to optimize the design as much as possible.

I've realized that this might not be the greatest first RF project, but I've already spent tons of time on this and I'm not giving up now.

Anyways, assumptions underlie the situations where those things are better or worse.  There are very few places where you, for example, should slot a ground plane -- but when they do apply, and all the precautions around that feature are met, it can be a net benefit.  In those particular cases.  When one misses out on all of those conditions, one might... choose poorly.

Some of those assumptions may still be taken for granted.  As suggested reading material, look up:
- transmission lines
- image currents
- wave or telegrapher's equations
- waves, wavelengths, interference (superposition)
- ports -- for making RF setups and measurements

Ports are how we abstract the connection between ideal (0-dimensional) electrical circuits, and the general networks between them, or the fields around them.  Transmission lines can be understood in a 1-dimensional manner, when used responsibly; if not, then we need to consider the 2-dimensional (within-PCB?) or 3-dimensional (full fields) environment of the system.

Waves are good for, if nothing else, hand-waving estimates for approximation methods: for example, in a controlled-impedance environment (say, 50 ohm transmission lines, sources and loads), when transmission line segments, or component lengths, etc. are much less than a wavelength long (a ballpark of 1/8 to 1/20 is often given), the transmission line effects (standing waves and phase shift) can generally be ignored, or at least approximated (as an equivalent LC).

These are more destinations than starting points -- do take the time to look up (or ask questions!) about anything on the way there.  There's years and years worth of experience to pick up; you won't do it all at once.  Try not to be intimidated, but develop the confidence to approach each little aspect at a time, and strive to understand it.


Abstraction itself, is very important, and powerful; I can think of, about four levels of abstraction in the worst part of electronics (related to fields, and not counting software of course!).  You don't have to go to this level of depth for basic RF circuits -- but just so you're aware that these things can go deep.  If you're... not great at abstraction, you'll surely be avoiding, the, like, in-depth proofs, and network analysis, and all that, but you'll need at least a couple levels to do much of anything.

If you're curious, that example probably goes something like:
1. You can't physically see or interact with the circuit, so you need an instrument to do it; the result is graphical or numerical (i.e., a voltmeter, oscilloscope, etc.).  As a result, we tend to say "things" go "up" or "down"; we're describing something about the indicated graphical or numerical quantity, naturally we adopt that terminology for the abstract quantity as well.
2. You have a circuit, which maps a graphical (schematic) or textual (netlist) representation, to the system in question.  Which, presumably, includes points you can measure in (1).  We might say that a node in a circuit "moves up|down", which is meant in the above sense; of course the circuit doesn't physically move (except when it does, heh).
2a. Optionally, there may be an equivalent schematic, which captures facets of the system not made explicit enough by the physical model.
3. Given... various constraints, we can solve for the behavior of a schematic representation.  We might construct a system of differential equations (or difference equations if we're using a numerical solver like SPICE -- the setup in that case is done automatically for us, nice eh?).
4. Differential equations can be solved in many ways (and can't be solved in even more ways..).  When even more constraints apply, relatively simple methods can be used.  As it happens, those methods use solutions to polynomial equations.  So the roots of the polynomials give the behaviors of, for example, linear RLC filter networks.  (This auxiliary polynomial might arguably be a 5th level of abstraction, but we use transforms to keep things a bit closer.)

The abstractions in 2a, 3 and 4 happen to apply to much more than just electronics -- indeed they apply in any system of linear wave equations, so we have equivalent circuits of mechanical (spring and mass) systems, or pneumatics or hydraulics (where the waves are ultimately acoustic waves in whatever medium), etc.  This falls under the field of dynamics, specialized for each domain which hosts it, of course; but underneath that, the solutions work the same way.

If you've ever heard mention of "poles" and "zeroes", these are straight out of the deepest level of abstraction -- they don't refer to anything the least bit physical at all, but as we don't have language to address nonphysical thought, they still end up as ordinary nouns, I guess.  Anyway, a "pole" is where an equation divides by zero, while a "zero" is where it's... zero.  Lumped equivalent (RLC or spring-mass) systems have properties (such as gain, or impedance) that are equivalent to rational polynomials, i.e. one polynomial divided by another.  So, when those polynomials are factored, the zeroes in the denominator are poles of the system, and the zeroes of the numerator are zeroes of the system.

So that's... maybe rather intimidating, but it is only finitely many levels (and as any mathematician knows: if it's not zero or infinity, it might as well be equal to one, right?!), and I hope more that, by seeing it listed out, I might alleviate some of the, just, outright uncertainty, about what lies under a given level of a subject?


The magical world of RF is completely new to me and just the few concepts you mentioned will take me a soild while to try and understand, I'll get started.  ^-^

Anyways, thanks so much for your help  :-+ and I'm quite relieved to know that I haven't completely messed up yet.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf