Project tutorial
How to Make a RC Controller

How to Make a RC Controller

This project will show you how to make a RC Controller which communicates using 2.4GHz radio signal.

  • 6 views
  • 0 comments
  • 1 respect

Components and supplies

Necessary tools and machines

3drag
3D Printer (generic)

Apps and online services

About this project

This RC controller will be use in a future project where I'll build a quadcopter. It composed of 2 joystick (one for the direction and the other for "up and down").

Design

I will focus on 3D printing and design for this project, because it took more time than the code itself. I was inspired by the PS4 controller design :

But my controller is less complete and has less buttons than this one (and is maybe kind of weird, but it works). First design :

After the printing, I saw that this design isn't adapted for a good joystick control.Here is my second design :

Code

Here is the entire code of our controller :

  • In the first part of this code, we initialize librairies (SPI, Mirf, nRF24L01 and MirfHardwareSpiDriver).
  • Then, in void setup, we define all parameters required for the sending of values. CE and CSN pins are 3 and 4.
#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>

void setup() {
Serial.begin(9600);
Mirf.cePin = 3;
Mirf.csnPin = 4;
Mirf.spi = &MirfHardwareSpi;
Mirf.init();
Mirf.channel = 1;
Mirf.payload = sizeof(int) * 5;
Mirf.config();
Mirf.setTADDR((byte *) "dron1");


}

void loop() {
int valeurs[4];
valeurs[0] = analogRead(0);
valeurs[1] = analogRead(1);
valeurs[2] = analogRead(2);
valeurs[3] = analogRead(3);

Mirf.send((byte *) &valeurs);

if(Mirf.isSending()){
Serial.println("Values are sent");
}

delay(50);
}

Connections


How to assemble this controller ?

Firstly, you'll have to print parts of this controller : the main part, the battery adapter and the arduino nano adapter.

These parts are available below.

Once you've printed arduino adapter and battery adapter, put the NRF24l01 on the slot of the arduino adapter. Then, put the arduino on the other slot beside (as shown on these screens).

Then, to mount adapters, you'll just need to screw up these parts to the main body. You'll have to use M3x20 screw. Firstly screw the main body with the arduino nano adapter, and then screw the battery adapter.

In a nutshell :

  • Step 1 :
  • Step 2 :

(the battery adapter is screwed on right joystick holes)

Then, you can connect all components and your RC Controller is finished ! ;D

Code

Remote ControlArduino
#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>

void setup() {
Serial.begin(9600);
Mirf.cePin = 3;
Mirf.csnPin = 4;
Mirf.spi = &MirfHardwareSpi;
Mirf.init();
Mirf.channel = 1;
Mirf.payload = sizeof(int) * 5;
Mirf.config();
Mirf.setTADDR((byte *) "dron1");


}

void loop() {
int valeurs[4];
valeurs[0] = analogRead(0);
valeurs[1] = analogRead(1);
valeurs[2] = analogRead(2);
valeurs[3] = analogRead(3);

Mirf.send((byte *) &valeurs);

if(Mirf.isSending()){
Serial.println("Values are sent");
}

delay(50);
}

Schematics

Remote Control
remote_control_XYweWb4v3f.fzz
Arduino Nano Support
Main part / RC Controller
Battery adapter

Comments

Similar projects you might like

Long Range Remote Controller PCB for RC Robot

Project tutorial by Jithin Sanal

  • 5,972 views
  • 2 comments
  • 19 respects

Turn your RC Car to Bluetooth RC car

Project tutorial by Prajjwal Nag

  • 28,642 views
  • 4 comments
  • 32 respects

4ws steering nano controller for 2ch radio RC models

Project tutorial by wrighi

  • 1,736 views
  • 2 comments
  • 5 respects

High Speed Arduino RC car

by Aqib

  • 42,792 views
  • 16 comments
  • 34 respects

RC LOGGERSTATION - GPS Data Logger for RC Plane

Project tutorial by yvesmorele

  • 6,356 views
  • 3 comments
  • 14 respects

How to Make a Bionic Hand Controller

Project tutorial by MisterBotBreak

  • 2,129 views
  • 0 comments
  • 3 respects
Add projectSign up / Login