# NRF24 custom PCB not working

**URL:** <https://forum.arduino.cc/t/nrf24-custom-pcb-not-working/957175>\
**Category:** General Electronics\
**Created:** [February 9, 2022, 1:31pm UTC](https://forum.arduino.cc/t/nrf24-custom-pcb-not-working/957175 "2022-02-09T13:31:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![laserranger](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@laserranger](https://forum.arduino.cc/u/laserranger)\
**Post date:** [February 9, 2022, 1:31pm UTC](https://forum.arduino.cc/t/nrf24-custom-pcb-not-working/957175/1 "2022-02-09T13:31:21Z")

</div>

Hi,

I've created a custom PCB with an 328p and NRF24L01+, unfortunately it's not sending anything and I'm out of ideas.  
What I've tried so far:

- breadboard setup with a generic NRF24 module and Arduino Pro Mini: working
- my PCB with identical software: not working
- no data is received, and nothing is detected with a NRF24 scanner ("spectrum scanner")
- all signals to the NRF look good and identical to the breadboard setup (MOSI, MISO, CS, CSN, SCK)
- the 16mhz clock of the NRF is oscillating correctly

-\> The HF part (NRF24 chip and all surrounding components) were assembled by JLCPCB  
-\> The NRF layout is pretty much identical to the reference from the datasheet  
-\> An antenna is connected  
Here's the link to the project:

[https://oshwlab.com/timbenning/lgb\_track\_controller](https://oshwlab.com/timbenning/lgb_track_controller)

---

<div class="post-metadata">

**Author:** ![6v6gt](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/6v6gt/32/225488_2.png) [@6v6gt](https://forum.arduino.cc/u/6v6gt)\
**Post date:** [February 9, 2022, 2:39pm UTC](https://forum.arduino.cc/t/nrf24-custom-pcb-not-working/957175/2 "2022-02-09T14:39:54Z")

</div>

Look here [Simple nRF24L01+ 2.4GHz transceiver demo - #30 by Robin2](https://forum.arduino.cc/t/simple-nrf24l01-2-4ghz-transceiver-demo/405123/30) post #30 . There is a test to see if thr mcu can communicate with the Nrf24L01 at the register level over SPI. That may help isolate the problem.

---

<div class="post-metadata">

**Author:** ![laserranger](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@laserranger](https://forum.arduino.cc/u/laserranger)\
**Post date:** [February 9, 2022, 5:07pm UTC](https://forum.arduino.cc/t/nrf24-custom-pcb-not-working/957175/3 "2022-02-09T17:07:10Z")

</div>

in my infinite wisdom, I've allocated pin 0 and 1 as CS and CSN. Therefore I can't simultaneously communicate with the NRF24 and have a serial connection for debugging.  
I can try to use the LEDs as indicator, but it's a bit difficult to read anything from it.

---

<div class="post-metadata">

**Author:** ![6v6gt](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/6v6gt/32/225488_2.png) [@6v6gt](https://forum.arduino.cc/u/6v6gt)\
**Post date:** [February 9, 2022, 5:28pm UTC](https://forum.arduino.cc/t/nrf24-custom-pcb-not-working/957175/4 "2022-02-09T17:28:43Z")

</div>

Ok. You can probably use software serial and an external USB/ UART adaptor. Use say pins pb1 abd pb2 and try to grab these at say U1.

Otherwise, debugging is not going to be easy. I tend to litter all my boards, where I am using unfamiliar chips, with jumpers so I can isolate parts. Then I sometimes omit the full integrated breadboard testing stage.

---

<div class="post-metadata">

**Author:** ![laserranger](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@laserranger](https://forum.arduino.cc/u/laserranger)\
**Post date:** [February 14, 2022, 9:09pm UTC](https://forum.arduino.cc/t/nrf24-custom-pcb-not-working/957175/5 "2022-02-14T21:09:58Z")

</div>

the software serial is not working yet. There's no signal on the allocated pins 13 and 14 whatsoever...  
maybe i have a better update in a while

---

<div class="post-metadata">

**Author:** ![srnet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/srnet/32/238868_2.png) [@srnet](https://forum.arduino.cc/u/srnet)\
**Post date:** [February 14, 2022, 9:19pm UTC](https://forum.arduino.cc/t/nrf24-custom-pcb-not-working/957175/6 "2022-02-14T21:19:34Z")

</div>

I have a small ATmega328P 3,3V based board that takes a single i

> [@laserranger](#):
>
> my infinite wisdom, I've allocated pin 0 and 1 as CS and CSN. Therefore I can't simultaneously communicate with the NRF24 and have a serial connection for debugging

You allocated pin 0 and 1 to the NRF24, but why ?

Debugging the proptotype must have been fun .............

For the normally essential debugging stuff, you can use send only software serial, only one pin needed.

---

<div class="post-metadata">

**Author:** ![laserranger](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@laserranger](https://forum.arduino.cc/u/laserranger)\
**Post date:** [February 16, 2022, 6:07pm UTC](https://forum.arduino.cc/t/nrf24-custom-pcb-not-working/957175/7 "2022-02-16T18:07:56Z")

</div>

Serial works now (although not on pin 14 for some reason).  
Anyway, the example code you mentioned doesn't work properly with software serial it seems.  
I modified it to use mySerial.println instead of Serial.println, but the radio.printDetails() function uses the normal Serial output instead of software serial it seems. Not sure how to amend the library to fix that.  
This is my code:

```cpp
// 18 Mar 2018 - simple program to verify connection between Arduino
// and nRF24L01+
// This program does NOT attempt any communication with another nRF24

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

#include <printf.h>
#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3); // RX, TX

#define CE_PIN 1
#define CSN_PIN 0

const byte thisSlaveAddress[5] = {'R','x','A','A','A'};

RF24 radio(CE_PIN, CSN_PIN);

char dataReceived[10]; // this must match dataToSend in the TX
bool newData = false;

void setup() {
    mySerial.begin(9600);
    printf_begin();

    mySerial.println("CheckConnection Starting");
    mySerial.println();
    mySerial.println("FIRST WITH THE DEFAULT ADDRESSES after power on");
    mySerial.println(" Note that RF24 does NOT reset when Arduino resets - only when power is removed");
    mySerial.println(" If the numbers are mostly 0x00 or 0xff it means that the Arduino is not");
    mySerial.println(" communicating with the nRF24");
    mySerial.println();
    radio.begin();
    radio.printDetails();
    mySerial.println();
    mySerial.println();
    mySerial.println("AND NOW WITH ADDRESS AAAxR 0x41 41 41 78 52 ON P1");
    mySerial.println(" and 250KBPS data rate");
    mySerial.println();
    radio.openReadingPipe(1, thisSlaveAddress);
    radio.setDataRate( RF24_250KBPS );
    radio.printDetails();
    mySerial.println();
    mySerial.println();
}

void loop() {

}

```

and this is the output:

```cpp
FIRST WITH THE DEFAULT ADDRESSES after power on
  Note that RF24 does NOT reset when Arduino resets - only when power is removed
  If the numbers are mostly 0x00 or 0xff it means that the Arduino is not
     communicating with the nRF24

AND NOW WITH ADDRESS AAAxR 0x41 41 41 78 52 ON P1
 and 250KBPS data rate

```

---

<div class="post-metadata">

**Author:** ![MarkT](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@MarkT](https://forum.arduino.cc/u/MarkT)\
**Post date:** [February 25, 2022, 5:04pm UTC](https://forum.arduino.cc/t/nrf24-custom-pcb-not-working/957175/8 "2022-02-25T17:04:34Z")

</div>

> [@laserranger](#):
>
> -\> The HF part (NRF24 chip and all surrounding components) were assembled by JLCPCB

Whoops. So you've really no idea if its a genuine chip or if the matching networks are correct tuned/matched?  
Why not use the nRF24L01 modules which avoid all such issues as well as being certified EMI compliant?

[For microwave stuff like this you really need RF test equipment to commission your prototype PCBs - a VNA and SA are pretty much required equipment up at 2.4GHz as the layout and PCB material have large effects on stray impedances. For instance the capacitors in an antenna matching network like this might be a couple of pF only, so stray capacitance around them, or a change in size from 0603 to 0402 has a large effect.]

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [August 24, 2022, 5:05pm UTC](https://forum.arduino.cc/t/nrf24-custom-pcb-not-working/957175/9 "2022-08-24T17:05:16Z")

</div>

Closed on August 24, 2022, 5:05pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
