NRF24L01+ With ATtiny85 3 Pins




About: 27. Web, Mobile and Desktop Developer. Hacker. Gamer. IoT Enthusiast. Electronics for Hobby and Fun.

ATtiny85 is a cheap and powerful alternate when u don't need too many PWM pins. For a project just to read and transmit some sensor data ATtiny85 was enough for me. With cheaper ATtiny85 in place I was looking for cheaper ways to transmit the sensor data. Which brought me to nRF24L01+ a cheap, low power RF transceiver. This seemed to be the better solution for me. But there was one problem, limitation in number pins in ATtiny85. I can't connect both nRF24L01+ and the sensor in it. So I was looking out for solutions and came across "nrf24l01+ control with 3 ATtiny85 pins". Here I discuss how I implemented it.


There will be two modules in here transmitter and receiver. The transmitter would be a ATtiny85 sending some data and the receiver would be Arduino Uno receiving the data via nRF25L01+. I utilize the RF24 library ( Follow the instructions given there and add it to Arduino IDE before getting started with this. I won't be explaining much about RF24 as there is a very good documentation on it.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: ​Transmitter

The transmitter transmits a incrementing number every second. The ATtiny85 will send the data via nRF24L01+ using only 3 pins. The components required would be

  • ATtiny85
  • nRF24L01+
  • Ceramic Capacitor - 10nF
  • Carbon Film Resistor - 22kΩ
  • Switching Diode - 1n4148

Upload the code in sender.ino to ATtiny85. ( Connect the components as shown in the diagram. If its not clear refer the fritzing file (nRF24L01+(With Socket) Attiny85.fzz) attached here. When power source is connected, the transmitter will start sending sequence of number every 1 second.

Note: Though rest of the nRF24L01+ 's pins are 5v tolerant you should always give 3v3 power to the Vcc or else you will damage it.

Step 2: Receiver

The receiver receives the data sent by the transmitter and received data can be seen in the Serial Monitor.

The components required would be

Upload the code in receiver.ino to Uno. Connect the components as shown in the attached images. If the image is not clear refer the fritzing file (nRF24L01+ Arduino Uno.fzz) attached here.

Please note that Vcc should be always 3v3. In some Arduino Uno clones the 3v3 power might not have enough current which results in nRF24L01+ not working. Any one of the below methods are recommended to resolve this

  • Use a separate 3v3 power supply
  • Add a 10uF capacitor between Vcc and Gnd in the module itself
  • Use a nRF24L01+ Socket Adapter

With the transmitter and receiver ready now it time to test. Make sure the power supply to transmitter in ON. Connect the Arduino Uno to PC and open serial monitor in arduino ide. It should work as shown in the attached video.

Step 3: Making It Permanent

Here is the circuit soldered on the perf board.

This is a simpler module to demonstrate how the nRF24L01+ and how we can utilize only 3 pins of ATtiny85 to connect it so that the rest of the pins are available for reading sensor data.

Step 4: Power Consumption

nRF24L01+ draws ~900nA when powered down, and ~15mA when awake/sending. As for ATtiny85 it consumes 0.005mA at sleep state and 10mA when awake.

If you application doesn't require the ATtiny85 to be active always then you can bring ATtiny85 to sleep every now and then depending on your requirement which will save a lot of power. You can use a watchdog timer to bring ATtiny85 to sleep state.

Here is an article explaining it in detail

First Time Authors Contest 2016

Participated in the
First Time Authors Contest 2016

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    8 Discussions


    8 weeks ago

    This is showing me error while trying to upload Code on Attiny 85 .

    invalid conversion from 'byte* {aka unsigned char*}' to
    'uint64_t {aka long long unsigned int}' [-fpermissive]


    1 year ago

    I have a question, pins ATtiny 5 is MOSI and 6 is MISO, in Nrf24l01 are connected upside down in MOSI and MISO. It is correct?


    2 years ago


    Thanks for this sharing, it's really useful :) But I have some questions:

    In the sender code the CE, CS pins are defined as pin 3 (which is attiny pin 2), but in the circuit this pin is not connected. The other question is that we're connecting wires to the attiny pins: 5, 6, 7 (which are i/o pins 0, 1, 2) but in the code theese are not defined. Can you explain a bit please?

    2 replies

    Reply 2 years ago

    Those pins 5,6,7 are Serial Peripheral Interface (SPI) Pins which allow transfer of data in a particular manner (which is what they call "SPI protocol") If you look closely, MOSI of NRF24l01 is connected to MOSI of ATTiny85 (pin 5), MISO to MISO (pin 6), and SCK to SCK (pin 7). So for any ATTiny85, these pins remain same (or for any microcontroller for that matter) and hence are defined inbuilt in the library files which we import them in the program. So no need to define them in the program as the program uses only those pins for transferring the data wirelessly.

    The CSN (Chip Select NOT) and CE pin vary with your program and needs to be defined.

    Hope this helps!!!


    Reply 2 years ago

    I tested and it worked, but I am trying to figure this out too...


    2 years ago

    I have tha same question with atiyka . Physical pin is not connected, why is it defined in your code.


    2 years ago

    Thank you for this instructable! I've looked at the NRF parts, and have 10(!), but haven't really used them in a project. I've thought about a multi-node temp/humidity sensor project, and I finally figurred out how to use ATtiny85 for projects (see I think I can use your start to get my idea going more quickly!


    2 years ago

    Thanks for sharing :)