PCB review and RF layout - Page 1
Forum section: electronics / beginners

author: SierraFox
author_rank: Newbie
timestamp: April 23, 2024, 05:46:55 pm
content: 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.

author: aliarifat794
author_rank: Regular Contributor
timestamp: April 24, 2024, 11:20:32 am
content: Position the antenna (AE1) away from other components, especially noisy digital circuits, to minimize interference.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 24, 2024, 11:32:28 am
content: 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

author: tszaboo
author_rank: Super Contributor
timestamp: April 24, 2024, 11:59:20 am
content: 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.

author: shapirus
author_rank: Super Contributor
timestamp: April 24, 2024, 12:52:21 pm
content: Quote from: tszaboo on April 24, 2024, 11:59:20 amThat'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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 24, 2024, 01:12:16 pm
content: 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

author: tszaboo
author_rank: Super Contributor
timestamp: April 24, 2024, 02:22:32 pm
content: Quote from: T3sl4co1l on April 24, 2024, 01:12:16 pmGPS 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 24, 2024, 03:03:52 pm
content: 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 matchthe whole trace-components-antenna systemall 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

author: SierraFox
author_rank: Newbie
timestamp: April 24, 2024, 04:57:19 pm
content: Quote from: T3sl4co1l on April 24, 2024, 11:32:28 amYes 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.

author: SierraFox
author_rank: Newbie
timestamp: April 24, 2024, 05:01:28 pm
content: 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!!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 24, 2024, 05:18:49 pm
content: 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

author: tszaboo
author_rank: Super Contributor
timestamp: April 25, 2024, 08:00:20 am
content: Quote from: T3sl4co1l on April 24, 2024, 03:03:52 pmNo 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 25, 2024, 08:51:29 am
content: Quote from: tszaboo on April 25, 2024, 08:00:20 amSo 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?QuotePads..? These... aren't 20GHz signals here. I'm not sure what you're getting at.QuoteI 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

author: tszaboo
author_rank: Super Contributor
timestamp: April 25, 2024, 10:08:36 am
content: Quote from: T3sl4co1l on April 25, 2024, 08:51:29 amI did:https://www.eevblog.com/forum/rf-microwave/help-me-improve-this-power-splitter/msg5272458/#msg5272458Pads, yes they do matter, even at 1.5GHz.https://infocenter.nordicsemi.com/pdf/nwp_033.pdfSection 2.2.1The 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.