Getting started with the NRF24L01 Radio Module 1


I’m asked a lot about how I get my radio control working using the NRF24 radio modules and I finally have it figured out enough to share with you. It’s taken me a while because I wanted to make sure it was right before I settled on the code. I have been using my John Deere 8360RT model as a test bed for the code and I’ve worked through various glitches, lost data as a result of poor coding and ultimately ended up with it working well enough for a small tutorial.

I’m going to locate the code on the forum here: Code for RC control using Arduinos and NRF24L01 modules

That way as you guy’s modify the code or improve it you can post your own versions. This code does not control a servo because the NRF24 library and servo library are trying to use the same timer in the Atmega chip so the code wont compile. I don’t have time to look into this because it is not needed in my full RC tractor code and I’ll be focusing on that. I think you just need to install a different servo library that uses Timer2 to get this working with a servo, if you figure it out let people know in the forum thread.

This tutorial requires the following items:
2 3.3V Arduino Pro Minis (ebay: http://goo.gl/0aTSkh)
1 FTDI cable or similar
2 NRF24L01 Modules (ebay: http://goo.gl/hbKpyL)
1 Joystick Module (ebay: http://goo.gl/f91IwV)
1 TB6612FNG dual motor driver (ebay: http://goo.gl/yFQ0lM)
1 DC motor
1 LED + resistor (ebay: http://goo.gl/79wVoS)

The first thing to do is upload the code to your Arduinos using the FTDI cable or a similar device. Then you need to connect a radio module to each arduino, here are the pinouts of each device.

You need to use 3.3 volt Arduino Pro minis because the NRF24L01 will be damaged by voltages over 3.6 volts. Connect the pins as follows:

ArduinoNRF24L01
VCCVCC
GNDGND
D8CE
D10CSN
D13SCK
D11MOSI
D12MISO

You should now have both arduinos connected to an NRF24L01 radio module, one for the controller and one for the receiver.

Take the joystick module and connect it to one of your Arduinos as follows:

ArduinoJoystick Module
VCCVCC
GNDGND
A1Joystick X Position
A0Joystick Y Position
D7Joystick Button



Arduino NRF24L01 RC Controller Circuit

This is the controller finished.

Your other Arduino must now be connected to the TB6612FNG dual motor driver as follows:

ArduinoTB6612FNG Motor Driver
VCCVCC
RAWVM
GNDGND
D5PWMA
D7AIN1
D6AIN2
VCCSTBY

Arduino NRF24L01 RC Reciever Circuit

Then you need to connect the motor to pins A01 and A02 and connect the LED and resistor in series between Pin 4 and GND.
If everything is right you should now be able to control your motor by moving the joystick up and down and turn the LED on and off using the pushbutton.
Here is the video related to this tutorial.


Leave a comment

One thought on “Getting started with the NRF24L01 Radio Module