Introduction: Build Your Own 10-Channel Universal Remote Controller - Simple, Reliable, and Accurate.

Hello,

I have been looking for a versatile radio control that can be suitable for most projects for a long time, and I have found several creations, each with its own strengths and weaknesses, but still collecting some ideas. I therefore thought of making this project in the simplest way but preserving functionality and reliability, using my skills and experience in 3D printing and prototyping. The plastic parts were designed with Fusion 360, with which I subsequently generated the STL files necessary for 3D printing. The heart of the circuit is entrusted to the ATmega 328 microcontroller, while for communication I used NRF24L01 with a 2.4 GHz band. I will try to be as clear and precise as possible.

https://youtu.be/GdkUhCDgHcE

Supplies

The plastic parts can be printed with any 3D printer with a print bed of at least 20 cm. As for the filament, since there are no particular mechanical or thermal stresses, any solution is fine; in my case I used a PLA Plus in two colors with 0.2 mm layers for the parts in black filament and 0.1 for the parts in red filament (to have greater definition). I used the heated to 60 ° to avoid excessive retractions or detachments of the piece during printing.

You will also need an Arduino / Genuino UNO board, which you will need to program the ATmega 328 processor.

Electrical circuit.

nr. 1 - ATmega 328P microcontroller

nr. 2 - joystick

nr. 2 - 10 kohm linear potentiometers

nr. 1 - NRF24L01 module

nr. 1 - 16 Mhz quartz oscillator

nr. 2 - ceramic capacitor 22 pF

nr. 1 - ceramic capacitor 100 nF

nr. 1 - resistor 10 kohm

nr. 4 - monostable switch

nr. 1 - mini voltmeter 0.28 inches

nr. 1 - DC-DC 5V power supply module

nr. 1 - DC - DC 5V-3V power supply module

nr. 1 - Lipo battery 7.4V

nr. 1 - rocker switch 21x15 (hole 19x13)

nr. 1 - LED diode 5mm

nr. 1 - resistor 390 ohm

nr. 2 - PCB board 20 x 80 mm

Box

3D printer wire black 1.75mm

3D printer wire red 1.75mm

nr. 7 - threaded inserts M3

nr. 6 - TC screw M3x12 mm nr. 1 - M3 x 6mm TC screw

Step 1: Circuito Elettronico

The circuit from which I took inspiration for this project, involved the use of an Arduino Nano board, both for the transmitter and the receiver. I thought, for this project of mine, to use a stand-alone ATMega 328P microcontroller, like the one used by Arduino Nano, but in the socket version instead of SMD. It is possible to program it through the Arduino IDE and to be able to operate it needs a 16MHz oscillator quartz combined with two 22pF ceramic capacitors, one 100nF and a 10kohm resistor (as per the attached diagram). For the power supply I used a 7.2V Lipo battery which guarantees considerable autonomy, and I provided a display voltmeter to be able to check the charge status at any time: by positioning the power switch on I the circuit is powered (the green LED lights up), while by positioning the switch on II it is possible to see the battery charge status.

For space reasons I divided the power supply part by placing it on a PCB, while the rest of the circuit is on the second PCB. In the attached photo you will see the two PCBs.

Step 2: Plastic Components

All the plastic parts were designed in Fusion 360 and printed with a 3D printer. The largest component has a size of 190x140mm, so you will need a 3D printer with a print bed of at least 200x200mm. In my case I used a PLA Plus filament with a 0.4mm nozzle. For the black parts I set 0.2mm layers, while for the red parts I wanted to give a higher resolution with 0.1mm layers. I used the print bed heated to 60° to avoid excessive retractions of the material with the risk of detaching the piece during printing. To join the two shells and the battery compartment cover I used M3 screws, so threaded inserts were inserted after printing. To do this I used the hot tip of a soldering iron (you can find several tutorials online that explain how to do it). The other components are fixed by interlocking, but to be safe you can use a few drops of plastic glue. As for the electronic components to be fixed inside the radio control, I prepared some holes for the use of small self-tapping screws for plastic, but during the assembly phase I preferred to simplify and fix each component with a few points of hot glue. The result is however the same both in terms of precision and resistance because each component has its own place to house it.

Step 3: Microcontroller ATmega Bootloader

Before uploading the sketch to the ATmega 328 microcontroller, it will need to be initialized by loading the Bootloader.

But what is the bootload?

The Bootloader is a piece of software that, once installed in the virgin microprocessor, allows you to upload any sketch via the Arduino IDE and the USB port. To simplify, we can compare it to the operating system present in our smartphones, through which the various apps are then installed.

If you have purchased Atmega microcontrollers with Bootloadr already installed, you can skip this section and go directly to uploading the sketch. However, this section may be useful if the bootloader is compromised due to an error in installing the sketch.

There are several ways to upload the bootloader, and you can find a lot of documentation and tutorials online. In my case, I used an Arduino UNO board, with a chip on a socket (it uses the same ATMega 328 microcontroller), which will act as a programmer for our microcontroller.

These are the steps you will have to follow:

  1. First you will have to connect the Arduino UNO with the ATMega 328 according to the attached diagram, being careful not to reverse the power supply to avoid compromising the microcontroller, using a breadboard and some cables.
  2. Once all the connections have been made correctly, connect Arduino UNO to your PC and open the Arduino IDE. Enter the "Tools" menu and configure "Board" Arduino UNO and the COM for communication.
  3. From the "File" menu, enter "Examples", select "ArduinoISP" and then open "ArduinoISP". Upload it to the Arduino UNO board through the "Upload" function. In this way we have transformed Arduino UNO into a programmer.
  4. Enter the "Tools" menu, "Programmer" and set "Arduino as ISP".
  5. Now all we have to do is enter the "Tools" menu and enter the "Burn Bootloader" function. Wait for the message confirming successful upload. By doing this we have loaded the Bootloader into our ATmega 328 which will be ready to receive our programming sketches.

Step 4: Upload the Sketch

We are ready to upload the Trasmitter sketch to our ATmega328 and to do so we will use the same Arduino UNO board.

Follow these steps:


  1. Disconnect the Arduino UNO board from the PC.
  2. Using the tip of a screwdriver, gently remove the microcontroller from the Arduino board (pay attention to the correct direction for reassembly, recognizable by the notch on the socket that must correspond to the notch on the microchip).
  3. Mount our ATmega328 microchip on the Arduino UNO board on which we previously installed the bootloader (pay attention to the correct direction of assembly).
  4. Connect the Arduino board to the PC and open the Arduino IDE (as in point 2 of step 3).
  5. Open the attached Trasmitter.ino sketch, load it with the Upload function and wait for confirmation of correct loading. Make sure you have loaded the RF24.h library, otherwise it will give you an error during loading.
  6. Now our ATmega is ready. Remove it from the Arduino board and reassemble the previously removed chip.

Step 5: Receiver

The receiver can be made with a stand-alone microchip or with an Arduino board, depending on the project, but in both cases using an NRF24L01 module and the attached diagram must be used.

I remind you that the numbering of the ATmega328 pins does not coincide with that of Arduino, but with a pin-out at hand you can find the correspondences (see attachment).

Once you have decided on the hardware solution you can upload the Receiver.ino sketch. If you use the stand-alone microchip you will follow the same procedure as Steps 3 and 4, otherwise if you use an Arduino board you will follow the usual IDE procedure.

To verify the correct functioning between the transmitter and receiver, the Receiver_Print_Values.ino sketch can be useful, which will allow you to verify the reception of the signals through the serial monitor.

In my case I made a receiver with an Arduino Nano and these are the steps:

Connect the receiver to your PC, open the Arduino IDE and set Board and COM according to your hardware.

Open the Receiver_Print_Values ​​sketch and load it (remember to load the RF24.h library)

Open the Serial Monitor

Set Baude date to 115,000

Turn on the transmitter and verify the communication (see video)


If everything has been done correctly we will see the values ​​of:

  1. left joystick, movement up and down
  2. left joystick, movement left and right
  3. right joystick, movement up and down
  4. right joystick, movement left and right
  5. left potentiometer
  6. right potentiometer
  7. button 1
  8. button 2
  9. button 3
  10. button 4