nRF52840 PCB & Antenna Design

Hi,

I have been designed a couple of PCBs using STM32 MCUs and got them manufactured & assembled through JLCPCB and this is my first project designing a PCB using nRF SoC. I have several queries, to be honest, regarding my nRF 52840 based PCB before placing manufacturing/ assembling order at JLCPCB. I will try to give you as much detail as possible and I am following nRF52840 Reference Design Config-2.

1. Power Supply

As far as I know, there are three ways to supply power to nRF52840: VBUS (5V from USB), VDDH (roughly 2 to 5.5V) and VDD (3V3). I am using 3.7V Li-Po battery to power this SoC and, as such, connected +ve of battery to VDDH only. The screenshot of my schematic is:

  • Do I need to connect any other power supply (besides not required by me)?
  • I have not used VBUS, so I can remove C21 (4.7uF)?
  • If, I connect power to VDDH, do I get regulated VDD from SoC?
  • In Reference Design, what is meant by Vext? It is for supplying load to external components or otherwise?

2. Not Connected Components

Reference Design has several NC components and, besides, I also have several pins not connected as shown in the above screenshot.

  • Do I need NC in my design such as C10, C13, C22?
  • I do not need RTC function and, as such, not used optional 32.768KHz external oscillator. I left pins unconnected, I hope this is fine. I am using following, 32MHz crystal OSC.

  • C9 is required for this design, I have included it to be on safe side.
  • I have not used NFC, USB, DCC and DCCH pins and left them unconnected.
  • Regarding Reset pin, can I leave it unconnected?
  • Do I need Tracedata pins for debugging?

3. Battery Charging Circuit

I have used following circuit for battery charger indicator.

  • This is fine?

4. Programming through SWDIO/ SWDCLK

I will not be using USB in my first design due to space limitation and will be using SWD for this purpose. I have STLink & nRF52840 DK, can I use STLink to program (bootload/ flash) this nRF52840 by supplying VDD(3V3), Gnd, SWDIO & SWCLK?

5. Antenna

This is major area of my concern, besides, I have specific PCB dimension requirement i.e. 24x30mm. For Antenna, I have followed nRF52840 monopole anternna design and used the same components as of nRF52840 DK. Antenna's schematic and PCB are as follow:

  • Due to space/ width limitation, I have placed SMA connector at top by extending trace from C4 to SMA, this will require matching at end? If, so, what is the easiest procedure?
  • Also, as per antenna design paper, I need to keep at least 10mm distance between antenna and ground plane, this has also increased width of PCB beyond 6mm of the requirement. Which antenna would you suggest for limited space? Any reference design giving matching components and antenna design.
  • Can I connect small, wire type, antenna to SMA connector without this PCB antenna? Please provide any such antenna type.
  • Please list any other compact and reasonable chip antenna considering space limitation.

6. PCB Layout & Routing

I have followed nRF52840 Reference Design but I need to make sure everything is reasonably correct before placing order. I have attached my gerber files.

Gerber_PCB1_2023-10-09.zip

  • Please see the layout if it seems reasonable without any obvious/ significant flaw. There were few DRC errors of clearances at 0.15mm as opposed to rule having 0.152mm which I changed to 0.152mm.

I know, I have a long list of queries and would be grateful for this support.

Thanks

Shahid

  • Hi Shahid,

    Do I need to connect any other power supply (besides not required by me)?

    When only using high voltage mode(VDDH) you don't need to supply any other voltage to the SoC. But you still need to connect all the VDD pin externaly though the VDD_nRF net.

    I have not used VBUS, so I can remove C21 (4.7uF)?

    VBUS is only needed when the USB peripheral is used. If this isn't needed you can ground the VBUS pin and remove C21 and leave the DECUSB pin floating.

    If, I connect power to VDDH, do I get regulated VDD from SoC?

    Yes, the VDD pins will be the output of REG0, this output voltage can be configured through the REGOUT0 register:
    https://infocenter.nordicsemi.com/topic/ps_nrf52840/uicr.html?cp=5_0_0_3_4_0_7#register.REGOUT0

    This can be used for supplying external components, but the supply current is limited based on the radio output power. Here's a overview of the max external current draw based on the tx power used:

    https://infocenter.nordicsemi.com/topic/ps_nrf52840/power.html?cp=5_0_0_4_2_7_1#unique_1706523351

    In Reference Design, what is meant by Vext? It is for supplying load to external components or otherwise?

    Yes, Vext is for supplying external components from REG0.

    Do I need NC in my design such as C10, C13, C22?

    No, these components are not needed and can be removed from the design. Just make sure that DEC2 is floating, it should not be grounded.

    I do not need RTC function and, as such, not used optional 32.768KHz external oscillator. I left pins unconnected, I hope this is fine. I am using following, 32MHz crystal OSC.

    Leaving the XL1 and XL2 pins disconnected is OK when not using the 32.768kHz crystal. The 32MHz crystal looks OK but you have to make sure you are using the correct load capacitance(C1 and C2) for the crystal you are using. This is dependent on the CL rating of the crystal, to calculate the required load capacitance you can use the following equation:

    C_cap = 2*CL-C_pin

    For the nRF52840 C_pin is 4pF.

    C9 is required for this design, I have included it to be on safe side.

    Having C9 connected on version Fxx and newer isn't a issue, so this is OK.

    I have not used NFC, USB, DCC and DCCH pins and left them unconnected.

    This is fine, just make sure that you don't configure either of the internal regulators for DCDC mode, as this will brick the device due to the missing inductors on DCC and DCCH.

    Regarding Reset pin, can I leave it unconnected?

    If it's not needed it's OK to leave it disconnected.

    Do I need Tracedata pins for debugging?

    Debugging can be done though the SWD interface, so you don't need to use Trace.

    • This is fine?

    This looks good, but you can also sample the voltage directly from the VDDH pin internally, so this isn't strictly needed.

    https://infocenter.nordicsemi.com/topic/ps_nrf52840/saadc.html?cp=5_0_0_5_22

    I will not be using USB in my first design due to space limitation and will be using SWD for this purpose. I have STLink & nRF52840 DK, can I use STLink to program (bootload/ flash) this nRF52840 by supplying VDD(3V3), Gnd, SWDIO & SWCLK?

    I'm not sure if the STLink supports the nRF52840, but you can use the nRF52840DK to program the board. The only connections need is VDD(3V form the DK), GND, SWDIO and SWDCLK.

    Due to space/ width limitation, I have placed SMA connector at top by extending trace from C4 to SMA, this will require matching at end? If, so, what is the easiest procedure?

    The connector should be matched to 50Ohm already so it won't need a matching network. Only the antenna and the radio requires matching networks, C26 for the antenna and C3, L1 and C4 for the radio.

    Also, as per antenna design paper, I need to keep at least 10mm distance between antenna and ground plane, this has also increased width of PCB beyond 6mm of the requirement. Which antenna would you suggest for limited space? Any reference design giving matching components and antenna design.

    A meander antenna requires less space than a standard monopole antenna. The nRF52840 dongle uses one of type, you can download the design and production files for the dongle here:

    https://www.nordicsemi.com/Products/Development-hardware/nRF52840-Dongle/Download

    The antenna will require tuning, so the values of the matching components used on the dongle may not be optimal for your board. We offer radio and antenna tuning for designs using our devices free of charge, so if you don't have the equipment needed for it you can send us board samples for tuning.

    Can I connect small, wire type, antenna to SMA connector without this PCB antenna? Please provide any such antenna type.

    Any external antenna designed for the 2.4GHz ISM band will work, I don't have any specific recommendation at hand.

    Please list any other compact and reasonable chip antenna considering space limitation.

    It is probably best if you have a some antenna manufacturers help you select the antenna best suited for your board.

    Johanson technology have a handy chip antenna selection guide:

    https://www.johansontechnology.com/chip-antenna-selection

    I have followed nRF52840 Reference Design but I need to make sure everything is reasonably correct before placing order. I have attached my gerber files.

    The layout looks mostly good, only comment is that the GND cutout on the internal layers should be extended to cover the entire RF transmission line, like this:

     

    Best regards,

    Bendik

  • Thanks for your response.

    Following your guidelines, I have made following changes:

    • Ground of C3 was not connected to VSS_PA & bottom of the chip. I used cutout to remove ground plane connection and used trace to connect to chip bottom ground.
    • Added ground cutouts to both internal layers beneath transmission line.
    • VDD_NRF net was missing at VDD (A22) with C12, added it.
    • Removed C20 and left DECUSB floating.
      Removed battery measurement.


    Regarding the load capacitors, I am using the same crystal as of reference design and, as such, reference design CLs are used. So, it's fine.

    I have following queries if you could help with:

    • If I plan to use USB peripheral then I don't need USB to UART bridge? Is, so, I just need to connect VBUS to VUSB, Gnd, and D+ and D- using differential pair? So, after uploading bootloader through SWD. I can program nRF52840 using this USB?
    • If I plan to utilize bottom layer to place some components, what precautions should be followed in general?
    • In reference design, I see a transmission line width of 0.762mm & approx spacing of 0.25m from ground. Moreover, stackup shows 1.6mm thickness of the PCB. However, I calculated transmission line width under the same conditions on JLCPCB & KiCad, they show a trace width of 1.25mm. Why there is significant difference? For Radio C3, L1 & C4 are used to matching with 50ohm and C26 for radio but, in between, I need to match transmission line impedance as well. Please guide.

    Thanks for your support.

  • X4ce said:
    If I plan to use USB peripheral then I don't need USB to UART bridge? Is, so, I just need to connect VBUS to VUSB, Gnd, and D+ and D- using differential pair? So, after uploading bootloader through SWD. I can program nRF52840 using this USB?

    USB CDC can be used for a serial connection through the USB interface so there's no need to add a additional USB to UART bridge. The USB peripheral needs 5V on the VBUS pin, the 4.7uF capacitor on DECUSB and the D+ and D- lines to function. If a bootloader with USB support is flashed using the SWD interface, the application can be programmed using just USB.

    X4ce said:
    If I plan to utilize bottom layer to place some components, what precautions should be followed in general?

    No components or traces can be routed under the RF transmission line, and there should be a good GND connections to the GND vias under the SoC.

    X4ce said:
    In reference design, I see a transmission line width of 0.762mm & approx spacing of 0.25m from ground. Moreover, stackup shows 1.6mm thickness of the PCB. However, I calculated transmission line width under the same conditions on JLCPCB & KiCad, they show a trace width of 1.25mm. Why there is significant difference? For Radio C3, L1 & C4 are used to matching with 50ohm and C26 for radio but, in between, I need to match transmission line impedance as well. Please guide.

    The difference will come from the dielectric constant for the PCB substrate, I can't verify what value was used for the trace width calculations in the reference design.

    It is always best to use the transmission line dimensions provided by the PCB manufacturer as they have the data for the specific PCB substrate used. A trace impedance within +/- 5 Ohm won't result in any significant loss of transmitted power.

     

    Best regards,

    Bendik

  • I have partially modified my design as per requirement of space/ dimensions of the PCB and used a monopole antenna which is routed around a 6x14 sq.mm slit/ hole. I have attached a screenshot of the antenna for a review and additional components are essentially required for tuning by Nordic?

    Thanks

Related