ISSN: 2319-9873

Reach Us +44 7456 035580
All submissions of the EM system will be redirected to Online Manuscript Submission System. Authors are requested to submit articles directly to Online Manuscript Submission System of respective journal.

Design and Implementation of Multipurpose Radio Controller Unit Using nRF24L01 Wireless Transceiver Module and Arduino as MCU

Mobasshir Mahbub*

Department of Electronics and Communication Engineering, East West University, Dhaka, Bangladesh

Corresponding Author:
Mobasshir Mahbub
Department of Electronics and Communication Engineering, East West University, Dhaka, Bangladesh.
E-mail: mbsrmhb@gmail.com

Received date: 11/02/2019 Accepted date: 21/02/2019 Published date: 27/02/2019

Visit for more related articles at Research & Reviews: Journal of Engineering and Technology

Abstract

Nowadays wireless technology is one of the most common technologies used in our day to day life. As wireless technology is very much easier to implement rather than wired, day by day its application is increasing. Through the continuous development of wireless communication technology, it is now highly used in wireless equipment controlling. That is we can control our electronics and electrical equipment from a certain distant part. It can be said that equipment can be controlled from a distance only with a controller in hand without being going near to that. In this design project, a control unit is built with nRF24L01 wireless transceiver module and Arduino Uno R3 to control multiple types of equipment. It is a multipurpose radio controller that means it can be used for various purposes such as light controlling, servo motor controlling, DC motor controlling in radio controlled multipurpose vehicle, quadcopter etc. The controller is consisting of a transmitter unit and a receiver unit both build with nRF24L01 and Arduino Uno R3. The receiver unit controls the attached equipment as per the transmitter’s direction.

Keywords

Microcontroller, Wireless communication, Radio controller, Arduino, nRF24L01

Introduction

In the wireless control system, the nRF24L01 wireless transceiver module controlled with Arduino MCU is more flexible, low cost and user-friendly system [1]. Using this system any electrical and electronic equipment can be controlled easily by attaching equipment/s and injecting the relevant control code into the MCU unit [2,3]. The nRF24L01 wireless transceiver module, the Arduino Uno R3 and other equipment used in the controller are easy to implement in a circuitry. That is why it can be used for multiple systems to control without being changing the circuitry. Only have to change certain control codes in the transmitter and receiver unit. The designed controller here will be used to control a LED light, a servo motor and DC motors used in multipurpose radio controlled vehicle. In the controller, the transmitter unit will send the instruction from controlling modules of the transmitter via nRF24L01 through the processing MCU called Arduino [4]. The receiver unit will receive the signal or corresponding signal (if multiple signals are transmitted for multiple types of equipment attached with the receiver) and will execute the instruction.

System Architecture and Design

Working Principle

At the transmitter unit, the controller modules attached with the controller MCU that is Arduino will receive control signals. Then it will process each corresponding signal to determine the particular signals for the receiving ends equipment. After that, the corresponding signal will be passed to the nRF24L01 wireless transceiver module to transmit [5,6].

At the receiver unit, the receiver’s nRF24L01 will receive each signal and will pass to the MCU. Then the MCU that is Arduino will process and analyze the signals to determine the corresponding signal for particular equipment and will execute the instruction that is sent from the controller (Figure 1).

engineering-technology-system

Figure 1. Overview of the system.

Required Components

Components in transmitter unit

• Arduino UNO R3 (MCU)

• nRF24L01 Wireless Transceiver Module

• 2x Thumb Joystick Module

• 2x Push Button

• Breadboard

• Wires (Male to Male, Male to Female)

Basic components of the receiver unit

• Arduino UNO R3 or Mega 2560

• nRF24L01 Wireless Transceiver Module

• Wires (Male to Male, Male to Female)

Components required at the receiver to control LED

• Arduino UNO R3 or Mega 2560

• nRF24L01 Wireless Transceiver Module

• LED

• Wires (Male to Male, Male to Female)

Components required at receiver to control servo motor

• Arduino UNO R3 or Mega 2560

• nRF24L01 Wireless Transceiver Module

• Servo motor

• Wires (Male to Male, Male to Female)

Components required at receiver to control DC motor of a multipurpose RC vehicle

• Arduino UNO R3 or Mega 2560

• nRF24L01 Wireless Transceiver Module

• 4x DC motor

• Wires (Male to Male, Male to Female)

Description of Major Components

This section will provide an overview of the required components. Short description of their working procedures, schematic of components and graphic image of those components will be in this section.

Arduino UNO R3: Arduino Uno is a microcontroller unit based on the ATmega328P chip. It has 14 digital input/output pins (among 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset button (Figure 2). This contains everything onboard needed to support the microcontroller unit; needed to connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to power up (Table 1).

engineering-technology-schematic-diagram

Figure 2. The schematic diagram of Arduino Uno board.

Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328P) of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
LED_BUILTIN 13
Length 68.6 mm
Width 53.4 mm
Weight 25 g

Table 1. Technical specification.

The "Uno" means one in Italian l'anguage and was designated to indicate the release of Arduino IDE 1.0. The newly developed Arduino Uno board and the first version of IDE, version 1.0 were the reference versions (Figures 3 and 4). The Uno board is the first in a series of USB Arduino boards and the reference model for the Arduino platform [1,2].

engineering-technology-Pinout

Figure 3. Pinout of ATMEGA328P.

engineering-technology-Arduino-Uno

Figure 4. Pinout of Arduino Uno.

Schematic

The nRF24L01 module is a single chip 2.4 GHz transceiver having embedded baseband protocol engine (Enhanced Shock-Burst™), specially designed to provide support to ultra-low power wireless applications. The nRF24L01 is designed for operation ISM frequency band at 2.400-2.4835 GHz. An MCU and few external passive components are required to design a radio communication system with the nRF24L01 [5].

The nRF24L01 module is designed to be configured and operated through a Serial Peripheral Interface. This interface has the availability of a register map. Register map contains all configuration registers and is accessible in all operation modes of the nRF24L01 module.

The embedded baseband protocol engine is based on packet communication. It supports various modes such as manual operation, advanced autonomous protocol operation etc. Internal FIFOs provide a smooth data stream between the radio front end and the MCU. The Enhanced Shock-Burst™ engine reduces system cost by controlling all the highspeed link layer operations (Figure 5).

The radio front end of nRF24L01 module uses GFSK modulation technique. The module supports user configurable parameters such as air data rate and frequency channel output power.

The air data rate supported by the module is configurable up to 2Mbps. The high data rates and two power saving modes combined makes the nRF24L01 module very compatible with ultra-low power system designs (Figure 6).

High Power Supply Rejection Ratio (PSRR) and a wide power supply range are ensured by internal voltage regulators [6].

Features of nRF24L01:

• 2.4 GHz RF transceiver Module

• Operating Voltage: 3.3 V

• Nominal current: 50 mA

• Range: 50-200 feet

• Operating current: 250 mA (maximum)

• Communication Protocol: SPI

• Baud Rate: 250 kbps-2 Mbps

• Channel Range: 125

• Maximum Pipelines/node: 6

• Low-cost wireless solution [7]

Schematic

engineering-technology-Schematic-diagram

Figure 5. Schematic diagram of nRF24L01.

Pinout

engineering-technology-Pinout

Figure 6. Pinout of nRF24L01.

Joystick Module

In electronics, there are many applications of Joystick. This module mostly used in Arduino based DIY projects and Robotic Controlling. This module provides an analog output that is why it can be applied for feeding the analog input depending on direction of movement (Figure 7).

Schematic

engineering-technology-joystick-module

Figure 7. Schematic diagram of the joystick module.

Pinout

engineering-technology-Pinout

Figure 8. Pinout of joystick module.

Joystick Module can be used with Arduino, Raspberry Pi, and any other MCUs. Simply we have to connect the X and Y axis corresponding axis Pins VRx and VRy to the ADC Pins of the MCU (Figure 8). If it needed to be used as a switch then have to connect it to the digital Pin of the MCU [8-11].

Technical Specification

• Two independent potentiometers for each of X and Y axis.

• Auto return to center position

• Operating Voltage: 5 V

• Internal Potentiometer value: 10 k

• 2.54 mm pin interface leads

• Dimensions: 1.57 in 1.02 in 1.26 in (4.0 cm 2.6 cm 3.2 cm)

• Operating tempeatue: 0 to 70°C

Push Button-Tactile Switch

Push-Button is a normally-open tactile switch. It allows us to power the circuit or make any particular connection only when the button is pressed. Simply to be said, it leads the circuit connection when it is pressed and breaks when it gets released. A push button can also be used to trigger the SCR by gate terminal. It can also be used to feed the analog or digital input system of MCU to direct the MCU for the desired decision making. It is one of the most common buttons which is used in our daily life electronic components. Its application includes use in calculators, push-button telephones, kitchen appliances, magnetic locks and various mechanical and electronic appliances in both home and commercials (Figures 9 and 10).

Technical Specification

• Mode of Operation: Tactile feedback

• P ower Rating: MAX 50 mA 24 V DC

• Insulation Resistance: 100 Mohm at 100 V

• Operating Force: 2.55 ± 0.69 N

• Contact Resistance: MAX 100 Mohm

• Operating Temperature: -20°C to+70°C

• Storage Temperature: -20°C to+70°C [12]

Schematic

engineering-technology-push-button

Figure 9. Schematic diagram of push button.

Pinout

engineering-technology-button

Figure 10. Pinout of the push button.

Servo motors are kind of DC motors that allow precise control of the angular position. Actually, they are DC motors whose speed is lowered down using the gears. Servo motors generally have a revolution cut-off from 90° to 180°. Few servos are designed to have revolution cut-off of 360° or more. But servo motors are unable to rotate constantly. Their rotation is limited on the basis of fixed angles.

A Servo Motor basically constructed with a DC Motor, a Gear system, a position sensor, and a control circuit. The DC motor gets powered and runs at a high speed with low torque. The Gear and shaft assembly connected to the DC motors is used to lower the speed into a desired sufficient speed with higher torque. Position sensor works for sensing the position of the shaft from its definite position and provides the information to the control circuit. The control circuit decodes the signals and compares the actual position of the motors with the desired position. Then according to the desired position and direction, it controls the direction of rotation of the DC motor to achieve the required position. Servo Motors are usually operated in DC supply of 4.8 V to 6 V (Figure 11. )

Servo motors application includes use in factory automation, material handling, assembly lines, and many other demanding applications robotics, CNC machinery or automated manufacturing, radio controlled airplanes to control the positioning and movement, aerospace industry to maintain hydraulic fluid and radio controlled vehicles etc [13,14].

Schematic and Pinout

engineering-technology-servo-motor

Figure 11. Schematic diagram and pinout of a servo motor.

A DC motor is a kind of rotary electrical machine that converts the direct current electrical energy into mechanical energy. The most common type is based on the forces generated by magnetic fields. DC motors have some internal mechanism, either electromechanical or electronic. This periodically changes the rotating direction of the current flow in part of the DC motor.

DC motors have different voltage and current ratings. But in the case of MCU, the motors ranging from 4.5 V to 12 V is more suitable to the MCU. Up to 24 V can also be used with MCU.

To start the DC motor’s rotation just connect the positive (+) side of the battery to one terminal and the negative (-) to the other terminal and the motor should be rotating. To reverse the rotations of the motor simply interchange the terminals and the rotating will be in reversed direction (Figure 12).

The application includes windmill projects, basic Electronics projects and as Robot wheels etc [15].

Schematic and Pinout

engineering-technology-motor

Figure 12. Schematic diagram and pinout of a DC motor.

Design and Implementation

It consists of an Arduino Uno as MCU, nRF24L01 as control signal transmitter, 2 joystick modules, and 2 push buttons to take control directions (Figures 13 and 14). The unit can be powered up using pc USB cable by connecting with MCU’s USB port and batteries ranging from 5 V-20 V. The recommended supply input is 5 V-12 V [4,6]

Breadboard Implementation

engineering-technology-transmitter-unit

Figure 13. Breadboard implementation of transmitter unit.

Schematic

engineering-technology-Schematic-diagram

Figure 14. Schematic diagram of the transmitter unit.

Basic receiver unit: The basic receiver unit consists of an Arduino Uno, nRF24L01 wireless transceiver module as a receiver. This is the basic unit (Figures 15 and 16). The user can add electrical and electronic equipment with the receiver to control by injecting the desired code or directing the developer to do to control his/her desired equipment [4,6].

Implementation

engineering-technology-Implementation

Figure 15. Implementation of basic receiver unit.

Schematic

engineering-technology-basic-receiver

Figure 16. Schematic diagram of the basic receiver unit.

Design of receiver to control LED: An LED light can be control with the designed receiver by connecting it in a proper way with the receiver. The breadboard implementation and schematic will give an overview of that connection. In this unit, user can turn on and off the LED by pressing the left push button of the transmitter unit. And can turn off the LED by again pressing the same. In the same way, a room light can also be controlled by the transmitter only connecting a relay module with the receiver and room light. As we know, the relay module is used as a bridge between low power DC MCU and high power AC modules. Any electrical appliances can be controlled in the same way (Figures 17 and 18).

Breadboard Implementation

engineering-technology-Breadboard

Figure 17. Breadboard implementation of the components.

Schematic

engineering-technology-controlling

Figure 18. Schematic diagram of LED controlling.

Servo motor control: By connecting a servo motor with the basic receiver unit we can control the servo motor (Figures 19 and 20). The breadboard implementation and schematic will give a connection overview. The wirelessly controlling of servo motor has made it more suitable in electrical and electronic systems [13].

Breadboard Implementation

engineering-technology-motor-connection

Figure 19. Breadboard implementation of a servo motor connection.

Schematic

engineering-technology-servo-motor

Figure 20. Schematic diagram of the servo motor control system with wireless controller.

DC motor control of multipurpose RC vehicle

Connecting four DC motors with the receiver unit according to the proper connection scheme we can make a multipurpose radio controlled vehicle [10]. The vehicle is named as a multipurpose vehicle because we can use it in multiple ways such as we can use it for video transmission by simply adding a video transmitter in it (Figures 21 and 22). For example, an area like a small tunnel where we are unable to go but it is possible to send a small radio controlled vehicle equipped with a video transmitter to see the scenario of the tunnel. Another example can be a determination of the condition of a toxic area where hazardous gases are present and human cannot go but we can send the vehicle equipped with gas sensors to find out and measure the amount of the gases in the area. This is only possible through the wireless system and the nRF24L01 wireless transceiver module equipped with an MCU will be much suitable [11].

Breadboard Implementation

engineering-technology-multipurpose

Figure 21. Breadboard implementation of a multipurpose RC vehicle with DC motor.

Schematic

engineering-technology-multipurpose

Figure 22. Schematic diagram of a multipurpose RC vehicle with DC motor.

MCU Programming

Sketch compiler is the trademark compiler of Arduino to write the necessary codes and inject in Arduino boards or MCUs (Figures 23 and 24). The following programming flow charts are made based on this Sketch compiler [2].

Programming Flow Chart for Transmitter

engineering-technology-flow-chart

Figure 23. Programming flow chart of the transmitter.

Programming Flow Chart for Receiver

engineering-technology-Programming

Figure 24. Programming flow chart of the receiver.

Results

Serial monitor and serial plotter of sketch compiler were used to visualize the results of the corresponding transmitted control signal. Among the above mentioned three projects, the result of the last project mentioned is dc motor control of multipurpose rc vehicle with the nrf24l01 module. Because the result and their description will provide a clear scenario of all instructions transmitted from the transmitter and receiver and executed by the receiver unit it is a project where multiple instructions are used to control equipment. Another reason is to shorten the length of the article.

A notable thing should be to keep in mind that in design that means in breadboard implementation and in the schematic, Arduino UNO is used in both transmitter unit and receiver unit. But in practical implementation and test, Arduino mega 2560 is used in the receiver unit. Because every Arduino UNO mcu uses the virtual USB communication port “COM3”. If Arduino UNO is used in both transmitter and receiver unit then the compiler’s serial monitor and serial plotter will show port “com3” for both transmitter and receiver and an individual seeing or reviewing the paper will be unable to distinguish the particular results of transmitter and receiver unit. That is why different Arduino is used in board. Now the transmitter unit will show port “COM3” and the receiver unit will show USB port “COM4” the receiver unit is connected with PC USB port “COM4” in serial monitor and plotter (Figures 25-30).

Following are the result of forwarding, backward, left and right movement control of that vehicle with joystick module.

Forward Movement

When the joystick is moved toward the negative Y-axis (-Y) MCU is programmed to rotate the motors to make the vehicle to move forward.

Corresponding Result in Serial Monitor

Transmitter unit:

engineering-technology-Serial-monitor

Figure 25. Serial monitor of transmitter.

Receiver unit:

engineering-technology-receiver

Figure 26. Serial monitor of the receiver.

Corresponding Result in Serial Plotter

Transmitter unit:

engineering-technology-plotter-transmitter

Figure 27. Serial plotter of transmitter.

Receiver unit:

engineering-technology-plotter-receiver

Figure 28. Serial plotter of receiver.

Backward Movement

When the joystick is moved toward the positive Y-axis (+Y) I have programmed the MCU to rotate the motors to make the vehicle to move forward.

Corresponding Result in Serial Monitor

Transmitter unit:

engineering-technology-Serial-monitor

Figure 29. Serial monitor of transmitter.

Receiver unit:

engineering-technology-Serial-plotter

Figure 30. Serial plotter of receiver.

Sharp Left Rotation

When the joystick is moved toward the negative X-axis (-X) I have programmed the MCU to rotate the motors to make the vehicle to move forward (Figures 31-36).

Corresponding Result in Serial Monitor

Transmitter unit:

engineering-technology-transmitter

Figure 31. Serial monitor of transmitter.

Receiver unit:

engineering-technology-monitor-receiver

Figure 32. Serial monitor of receiver.

Corresponding Result in Serial Plotter

Transmitter unit:

engineering-technology-Serial-plotter

Figure 33. Serial plotter of transmitter.

Receiver unit:

engineering-technology-receiver

Figure 34. Serial plotter of receiver.

All Control Signals in Same Plot

Transmitter signal:

engineering-technology-transmitter

Figure 35. All transmitted signals in the same plot of the transmitter.

Receiver unit:

engineering-technology-plot-receiver

Figure 36. All received signals in the same plot of the receiver.

Discussion

When the transmitter transmits a signal it gets monitored through the serial monitor and visualized by the serial plotter and the receiver’s serial monitor. Serial plotter ensures that the receiver is receiving the exact control signal that are being transmitted by the transmitter. Individual serial monitor and serial plotter monitors the result of each signal transmitted by the transmitter and received by the receiver unit and by inspecting those it can be said that the receiver is receiving the corresponding signal transmitted by the transmitter. At last, serial monitor and serial plotter result contains all control signals in the same plot also the same in both ends. So it can be declared that the results are ensuring the transmission and reception accuracy and exactness of the designed transmitter and receiver unit.

Conclusion

The developed controller is suitable for use as a flight controller of quadcopters. Users just have to change some codes to make this possible. More research and tests can be performed to develop the controller and to find out more and more applications of it. The building materials of this controller are very much cheap. An individual can easily build a controller like this and can make research and tests to make it more effective and to make it work according to his/her desire if he/she has the prior relevant technical knowledge. Radio control technology nowadays is an emerging and rapidly developing technology. There is a huge scope in this sector to work

References