Sunfounder nRF24 Remote Control

Last Updated on 1 April 2022 by Suffocation

The Sunfounder remote control is powered by an Arduino Nano and an nRF24101 board. It has screw terminals for power, an on/off switch, and two slots for the aforementioned modules. For control, it uses a two-axis joystick, similar to the one found in a PS4 controller. The joystick is analogue. Two potentiometers (variable resistors) alter the output voltage depending on the joystick's position.

Views

Applications

  • Remote control
  • I'm lacking the imagination for further uses. 😉

Bill of materials

  • Sunfounder Remote Control Board
  • Arduino Nano
  • nRF24L01 Board
  • Power supply (USB interface, battery ...)
  • A receiver, e.g. nRF module, for the serial interface or for Arduino

Remote control

Internal circuit diagram

File:Nrf2.jpg
Manufacturer's circuit diagram www.sunfounder.com

Joystick Wiring

The joystick is connected to analogue ports 0 and 1. The button can be queried via digital port 2.

The values on the analogue ports are between 0 and 1023. The neutral position is around 512 (this can vary slightly depending on the potentiometer).

ArduinoJoystick
A0Y direction (up/down)
A1X direction (right/left)
D2Switch (Press on joystick)

nRF Wiring

ArduinonRFComment
D9CEEnable Tx/Rx mode
D10Counter-Strike: Global OffensiveChip select
D11MOSIData input
D12MisoData output
D13SCKClock
IRQInterrupt

Arduino Nano

nRF24 Module

Previous post on RF24

Library

There are some implementations for the nRF modules, and I have used, among others, this one advertised by Sunfounder.

http://wiki.sunfounder.cc/images/7/76/Test_Code.zip

Should there be any problems with this, I can also recommend the following LIB:

http://tmrh20.github.io/RF24

As it's always a bit critical whether the already installed libs and the new ones fit together, I've simply copied the *.h and *.cpp files into the project folders of the sender and receiver for this project. Of course, you can also simply install the RF24.

The integration of libraries in general is described under the following link, and I will not go into further detail here.
https://fambach.net/arduino-ide#Bibliotheken

Programming

I approached this project in two steps.

  • Step 1 Test the circuit board
  • Step 2 add the RF

First step – Test circuit board

The first test queries the joystick and outputs the values to the console.

Console output

Second step – RF added

The remote control sends its values directly to the receiver, which outputs the values to the console.

The transmitter shall transmit the values of the analogue ports and the switch position 1:1. For this, I have extended the first test to include the RF interface.

This is how it should then look:

Links Sender – Right Receiver

Conclusion

Sunfounder has a nice, small, and inexpensive remote control on offer here. The installation is straightforward; it's a shame the push-button doesn't work.

Problems

The push button doesn't work

Unfortunately, the push-button on the joystick on my board isn't working :(.

RF is not working

Try the following library again; it was the one I had the most success with.
http://tmrh20.github.io/RF24


Related Posts

Sources

https://www.sunfounder.com/mobile-robot-remote-controller.html

http://wiki.sunfounder.cc/index.php?title=Mobile_Robot_Remote_Controller

http://tmrh20.github.io/RF24

https://playground.boxtec.ch/doku.php/wireless/nrf24

Leave a Reply

Your email address will not be published. Required fields are marked *