STM32WB55 antenna design - Page 1
Forum section: electronics / rf-microwave

author: Curby
author_rank: Contributor
timestamp: November 03, 2020, 03:22:58 pm
content: Hi there,in my new project I'm using a STM32WB55. This microcontroller has ble support on board. My design otherwise works like mentioned but I have not tested the ble connectivity yet because i don't get it how to choose the right components.There is a keep out are around the antenna and the traces are as short as possibile. There are two pi filters, a 10nF cap and a 2.45GHz bandpass filter like on the nucleo board.What is meant with adjustment for 50Ohms? Both pi filters? Against what? And how do I measure that?Is my design somehow able to work?

author: fedgE_
author_rank: Newbie
timestamp: November 04, 2020, 12:10:54 am
content: Most likely, in your case, your system's impedance of the RF front-end is going to be 50 ohms, since it's quite common and many RFICs and RF passives come with "pre-matched" input/output impedances to 50 ohms, as is the case with your bandpass filter (https://eu.mouser.com/datasheet/2/210/kamaya_07192018_RFBPF-1381669.pdf) and your BLE IC (https://www.st.com/resource/en/datasheet/stm32wb55cc.pdf).1) Keeping traces as short as possible is good, but for best performance you should still try to use the appropriate trace width based on the characteristic impedance (50 ohms) and the PCBs stackup; this also includes selecting appropriate passives (for example a 0402 instead of a 0805), since bigger pads will create bigger parasitic capacitance. There are different formulas and tools for this depending on transmission line topology (microstrip, coplanar waveguide, etc.).2) Regarding to the adjustment you are talking about, I'm assuming it refers to the PI filters, and it means that the input/output (or source/load) impedance must be 50 ohms at the target center frequency. Again, there are formulas and calculator on how to design PI filters with a target impedance, or you could simplify matching by using tools like SimSmith. And yes, both PI Filters.Links to calculators that I found from a quick search:https://www.eeweb.com/tools/pi-match/https://www.allaboutcircuits.com/tools/pi-match-impedance-matching-calculator/https://people.physics.anu.edu.au/~dxt103/calculators/pi_tank.phpThe values you will calculate are a good starting point, but once you get your assembled PCB(s), if you want optimum performance, you will likely need to tweak those values in the lab, since it is not uncommon for antennas and other components to not be exactly matched to 50 ohms, and there are also other parasitics that need to be considered.The measurements can be done by using a 2-port VNA (Vector Network Analyzer).If you are new to RF, I'd recommend to read some literature and books about it, or application notes such ashttps://www.ti.com/lit/ml/slap127/slap127.pdfBR

author: Curby
author_rank: Contributor
timestamp: November 04, 2020, 09:10:35 am
content: Based on infineon / cypress i designed this variant. I tried to keep traces short and keep track to the design specifications.https://www.cypress.com/file/136236/downloadFor a start i would be happy if it works in general.

author: Yansi
author_rank: Super Contributor
timestamp: November 04, 2020, 12:23:01 pm
content: This kind of layout is I'd say beyond wrong at 2.4 GHz.Isn't there any manufacturer's recommended layout for it to at least copy or get an inspiration from?Also, those are 0805 or 0603 components you have there? I'd use 0603 at max for this.Also, use a 4layer board for it. On 2layer it will be very hard to layout properly. (Not saying impossible, but I say hard.)

author: Curby
author_rank: Contributor
timestamp: November 04, 2020, 01:30:17 pm
content: There is a nucleo board but that is also 2-layer. That is no "do it this way" layout in my opinion - just an example.I changed the parts to 0603. I made the traces shorter. The signal under the RF trace is an alalog voltage to a ADC pin. It is a almost never changing voltage. The antenna follows the design of cypress.

author: Yansi
author_rank: Super Contributor
timestamp: November 04, 2020, 03:32:30 pm
content: But there is a significant difference in your and their layout. Look again closely at the component placement, size an length of traces.You can't just slap a random 10mm trace of random width in there, or ground a cap through 3mm extra trace (especially, if there is shitton of area to place the via just at the edge of the PAD. )Also, if you have the board space, use a non-shorted fullsize 2.4 GHz antenna, such as PIFA/inverted F (easy to tune). This coily-springy thing is rubbish in efficiency.Also, if you don't have any vector network analyzer to do any verification, forget the PCB antennas.Also, the power supply decoupling is way too far to have any effect at 2.4 GHz an the trace, that cuts into the groundplane just under the matching network, is a crime. NEVER do this. All transmission lines must have a direct return ground path under.

author: Curby
author_rank: Contributor
timestamp: November 04, 2020, 06:31:25 pm
content: Alright, next try.1. I removed the trace that cuts the ground plane.2. I tried to place the decoupling C's as close as possibile - in case that the GND of the caps are connected with direct return to VSSRF.3. A network analyzer can be organised.4. The antenna will be replaced after this.5. The pi filter and its C's have a direct return line to VSSRF (pin 22). VSSRF was connected to the ground plane under the µC, now it goes also towards the antenna. This is the main difference i saw.6. Short traces. I read that the width is not as ciritcal as the placement. I also read it should be ~60mils width. But wouldnt that be a lot?

author: Yansi
author_rank: Super Contributor
timestamp: November 04, 2020, 07:19:56 pm
content: Better, but not enough.Try placing the green marked decoupling caps closer. The +3V3 trace is still too long to my liking. And place the GND vias even closer to the GND PAD. Place GND vias right next to any GND pad, including and especially the caps that belong to the RF section. (Same for the RF lowpass filter. Place GND via on each of its GND pads).Also try placing all components closer together. No unnecessary wire lengths in the RF circuitry, where they should not be.I know, that placing the stuff more closely together is hard, so is making this work on a 2 layer board and is why smaller (0402) components are better suited.Look for an ST application note AN5165. There are examples of layout - but I wouldn't say they are the best examples and would try to improve upon it. Of course, it will work when something is place a millimeter or two differently, but by not careful placement you are increasing chances of misbehavior or decreased performance. So unless the documentation is requesting an inductance of a piece of pcb trace, place all as close possible. Find the least offending compromise. (with 2 layer board and 0603 components, it will mostly be a compromise). But now it least your layout looks similar to what the AN5165 shows.Width of an RF trace(transmission line) depends of what the desired characteristic impedance should be. That is a design parameter. Width of trace is a product of the required impedance and PCB stackup design: dielectric material (permitivity), dielectric thickness and others.If there is a VNA available, good then for you! But remember, that you need to connect the VNA to the onboard antenna without the BLE chip, and be able to calibrate the measurement plane to the point of connection on the board. So at times, special antenna measurement boards are needed to be made. And the antenna absolutely needs to be measured in the fully assembled product, which is not always easy - as also of course the connected cable from the analyzer to the antenna acts as an antenna itself and may alter the characteristics that you will see.

author: Curby
author_rank: Contributor
timestamp: November 04, 2020, 07:43:30 pm
content: Next try! Thank you.1. Via closer o pads.2. Every GND pad a via.3. The right cap is not part of the RF design. But I placed it as close as possibile (not in this screenshot).4. Antenna in work.The ST design hast two pi filters, one 10nf cap and a bandpass. But some designs just have a pi filter. Whats the difference?

author: ThomasDK
author_rank: Regular Contributor
timestamp: November 04, 2020, 10:34:54 pm
content: You need to read the documentation for the mcu.ST provides a full guide for the RF layout:https://www.st.com/resource/en/application_note/dm00504903-development-of-rf-hardware-using-stm32wb-microcontrollers-stmicroelectronics.pdfFollow it to the letter.The Pi filter before the ceramic filter is there to match the RF output to 50R. The ceramic filter is there to suppress harmonics.You still need a Pi filter right at the antenna. This is the one you need to tune the antenna with a VNA.

author: Yansi
author_rank: Super Contributor
timestamp: November 04, 2020, 10:56:01 pm
content: Looking much better. Still mising a GND via at the GND pad of the decoupling cap at pin 20.The trace after the matching network in front of teh filter MUST be 50 ohm. The trace after the filter to the antenna must be 50 ohm impedance too. The antenna has to be correctly matched to 50ohm too and the antenna must resonate at 2440MHz and has a -3dB bandwidth at least 80MHz (whole BLE band is 2400 to 2480 MHz).

author: Curby
author_rank: Contributor
timestamp: November 05, 2020, 07:53:22 pm
content: Following this calculator, the length of a line is not important?https://www.multi-circuit-boards.eu/en/pcb-design-aid/impedance-calculation.htmlHere you can calculate a pi filter:https://www.electronicdeveloper.de/FilterPassivTiefpassLC_Pi_3O.aspxIf you look at my attachement you can see I placed letters at the conjunctions. Do i measure/calculate the impedance from point C - D and/or A - B and than fit the filter using C116/C117/L1 to match the missing impedance? What if the impedance of a trace is bigger than 50ohms?And what should I do with this 10nF capacitor? Do I calculate the impedance of a trace below or above 50 ohms? I guess below because adding it always possibile? Why does the length not matter for the impedance?Assuming i ignore the traces because i placed the components as short as possibile against each other - the calculator says:6,496 nH, 1,299 pF for 50Ohms/2,45GHz.Using this values, should the design work at least, assuming everything i placed correctly?

author: Yansi
author_rank: Super Contributor
timestamp: November 06, 2020, 12:14:18 am
content: The transmission line can of course be any length, but the longer the more loss. And at 2.4 GHz on a standard pisspoor "FR4" substrate, the losses are quite high.Whats the purpose of C115? Remove it.Why is the 32WB55 matching network copied to the antenna side? (Or just a place holder, values not final?)Quote from: Curby on November 05, 2020, 07:53:22 pmFrom point C to point F, everything shall be 50ohm trace*. Remove C115, no need for it.C118-L2-C119 can be utilized to impedance match an antenna. Can be omitted, but you can leave it on the board to be ready when needed.Length of transmission line matters only for the signal loss, and propagation delay. When everything is perfectly matched and the transmission line is 50ohms, it is transparent for the signal. No reflection, only loss and signal delay.From which point you measure the impedance? That depends, on what you want to measure. But more than likely you will need to check antenna performance and likely even the BLE transceiver. So it would make sense to place a small RF connector (such as U.FL or similar) at the node E(F) selectable via a jumper to either interface with the BLE transceiver, or antenna. (Not both at once!)//EDIT:* that is because the monolithic filter is supposed to see 50ohm impedance both sides. Also, the BLE TRX matching network C116-L1-C117 is what matches the BLE's output impedance to 50ohm.

author: Curby
author_rank: Contributor
timestamp: November 06, 2020, 08:48:07 am
content: Quote from: Yansi on November 06, 2020, 12:14:18 amThats the way ST does it on their nucleo boards.Using this calculator (https://www.multi-circuit-boards.eu/en/pcb-design-aid/impedance-calculation.html) i need about 2.950mm track width? Never seen this (1,6mm, 70µm, FR4).I now build what you can see in the attachement. There are many antenna designs for IFA, I have choosen this one:https://www.silabs.com/documents/public/application-notes/an1088-designing-with-pcb-antenna.pdfI removed the 10nF cap. Short traces, but a 3mm track from the antenna in width?What about the via grave I can see sometimes?As you can see the board is bigger than that. I removed as much material around the antenna as possibile.Can i bend the track and place the antenna in the left corner?I've seen a design with my chip, that only uses an integrated filter and nothing else. I wonder if it works.