Unable to initialize nRF24L01 using ATtiny84

Continuing the discussion from Unable to program ATtiny84A with Arduino Nano as ISP – “Invalid device signature”:

Thank you all for your responses. These are very helpful, even if seemingly obvious solutions and replies. I am a high school biology teacher by trade, so programming and hardware are both new to me. To a novice who is exploring and still learning now to utilize Arduino technology. Thank you so much! I had never heard the word “Fritzing” before, and haphazardly tried to build a wiring diagram with TinkerCad. I didn’t realize the wiring diagram needed to be so accurate for your input. Feedback was certainly welcome. I have now downloaded the Fritzing Software and have taught myself the basics to post more accurate diagrams i hope.

Now my problem lies in powering and/or communicating with the NRF24L01 module using my ATTiny microcontroller. I have questions about powering the microcontroller, powering the NRF module, and how to achieve my goal while powering both. I am once again stuck.

I can confirm that my NRF module is alive and functional. And I can confirm that the ATTiny can successfully be programmed using the Tiny AVR programmer. However, I can’t seem to get the ATTiny slave to communicate with the master. I am using an Arduino Mega as the master. I have successfully communicated between a Mega master and a Nano slave, My code involves the polling of slaves and a response from each specific slave address after being polled to indicate to the master whether it has received a button press or not since the last poll. Basically I am building an interactive quiz buzzer system.

I have simplified my code for both the mega master and the ATTiny slave to test communication between the 2 NRF modules. However, I can’t seem to get the ATTiny to initialize the NRF module.

My test code is below along with the wiring diagram and my setup. The Master seems to work just fine. however my NRF module attached to the ATTiny isn’t initializing. Any advice would be invaluable.

I am currently powering the ATTiny84 using the 5v pin of the Arduino Nano. I am also powering the NRF module using the 3.3V pin of the same Arduino Nano. Is this even possible? I understand that I cannot power the NRF with 5v. I do not have a voltage divider or voltage regulator. What is the proper way to power both the ATTiny and the NRF module? Ultimately I would like to power both using batteries as this will be a wireless device. However, steps to make this battery powered will come at a later time. Right now I simply want to prototype the communication between slave and master. Ultimately I would like to configure a total of 12 slaves.

ATTiny84 code and wiring diagram is below.. When I wire everything, The LED blinks fast and the serial monitor prints radio.begin() FAILED.

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

#define CE_PIN    3     // PA3, physical pin 5
#define CSN_PIN   4     // PA4, physical pin 6
#define LED_PIN   0     // PA0, physical pin 13 on ATtiny84

RF24 radio(CE_PIN, CSN_PIN);

const byte thisAddress[5] = {'S','L','V','1','A'};

unsigned long lastSendTime = 0;
const unsigned long interval = 1000;  // 1 second

void setup() {
  pinMode(LED_PIN, OUTPUT);

  Serial.begin(9600);  // Optional: only works if UART is connected
  delay(500);          // Give things time to stabilize

  if (!radio.begin()) {
    // Blink fast forever if radio fails to initialize
    while (true) {
      digitalWrite(LED_PIN, HIGH);
      delay(100);
      digitalWrite(LED_PIN, LOW);
      delay(100);
    }
  }

  radio.setDataRate(RF24_250KBPS);
  radio.setRetries(3, 5);

  radio.openWritingPipe(thisAddress);
  radio.stopListening();  // Set as transmitter
}

void loop() {
  unsigned long now = millis();

  if (now - lastSendTime >= interval) {
    lastSendTime = now;

    const char heartbeat[] = "ALIVE";
    bool sent = radio.write(&heartbeat, sizeof(heartbeat));

    // Blink LED once for success/failure
    digitalWrite(LED_PIN, HIGH);
    delay(100);
    digitalWrite(LED_PIN, LOW);

    // Optional debug output
    if (sent) {
      Serial.println("✅ Sent heartbeat");
    } else {
      Serial.println("❌ Failed to send heartbeat");
    }
  }
}

it is doubtful if the ATtiny84A could power the NRF24L01 in particular during transmission
have a read of Power Stability Issues with RF24 Radio Modules by @gilshultz

Since @horace referenced a previous post here it is again.

Power Stability Issues with RF24 Radio Modules

As described in the RF24 Common Issues Guide, radio modules, especially the PA+LNA versions, are highly reliant on a stable power source. The 3.3V output from Arduino is not stable enough for these modules in many applications. While they may work with an inadequate power supply, you may experience lost packets or reduced reception compared to modules powered by a more stable source. 5V is also a problem

Symptoms of Power Issues:

  • Radio module performance may improve when touched, indicating power stability issues.

  • These issues are often caused by the absence of a capacitor, a common cost-saving omission by some manufacturers.

Temporary Patch:

  • Add Capacitors: Place capacitors close to the VCC and GND pins of the radio module. A 10uF capacitor is usually sufficient, but the exact value can depend on your circuit layout.

  • Use Low ESR Capacitors: Capacitors with low Equivalent Series Resistance (ESR) are recommended, as they provide better power stability and performance.

  • Be sure the transmitter and receiver are at least a meter apart, more is better.

  • RF24/COMMON_ISSUES.md at master · nRF24/RF24 · GitHub

Adding the appropriate capacitors can greatly improve the reliability of your RF24 module by ensuring a stable power supply, thus minimizing packet loss and enhancing overall performance. A separate power supply for the radios is the best solution.

These physical pins do not match either of the diagrams you supplied.

On the second diagram you appear to have interchanged the Ground and Vcc pins on the NRF24L01 module.

If the 3v3 is really derived from an Arduino Nano, as the picture suggests, then it could be that it comes from the USB/UART chip and is only about 50mA max. This applies to the original Nano but some clones have a separate 3v3 regulator and can supply up to 500mA.