Friday, December 13, 2024

Arduino Projects: RF Controlled Robot

Want to create a remote-controlled robot? It’s easier than you think! This Arduino-based robot can be wirelessly controlled from up to 100 metres distant. It’s an enjoyable and simple project for anyone interested in electronics and robotics.

Circuit Setup

The block diagram of the robot is shown in Fig. 1. It has two major sections: (a)transmitter and (b)receiver and motor driver. The transmitter circuit (Fig. 2) is built around encoder IC HT12E (IC1), 433MHz RF transmitter module (TX1) and a few discrete components. The receiver and motor driver circuit (Fig. 3) is built around Arduino UNO board (BOARD1), decoder IC HT12D (IC2), 433MHz RF receiver module (RX1), motor driver IC L293D (IC3), regulator IC 7805 (IC4) and a few discrete components.

Fig. 1: Block diagram of Arduino based RF controlled robot
Fig. 1: Block diagram of Arduino based RF controlled robot
Fig. 2: Circuit of transmitter section
Fig. 2: Circuit of transmitter section

7E6_TableArduino UNO board

The heart of the robot is Arduino UNO board. Arduino is an Open Source electronics prototyping platform based on flexible, easy-to-use hardware and software. It is intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.

- Advertisement -

The Arduino Uno board is based on the ATmega328 microcontroller. It consists of 14 digital input/output pins, six analogue inputs, a USB connection for programming the on-board microcontroller, a power jack, an ICSP header and a reset button. It is operated with a 16MHz crystal oscillator. It contains everything needed to support the microcontroller. It is very user-friendly; simply connect it to a computer with a USB cable to get started. The microcontroller on the board is programmed using the Arduino programming language and the Arduino development environment.

Remote Control

For controlling the robot remotely, Holteks’ encoder-decoder pair (HT12E and HT12D) together with a 433MHz transmitter-receiver pair is used.

- Advertisement -

HT12E and HT12D are CMOS ICs with working voltage ranging from 2.4V to 12V. Encoder HT12E has eight address and another four address/data lines. The data set on these twelve lines (address and address/data lines) is serially transmitted when transmit-enable pin TE is taken low. The data output appears serially on DOUT pin.

Fig. 3: Circuit of receiver and motor driver
Fig. 3: Circuit of receiver and motor driver

443_PartsThe data is transmitted four times in succession. It consists of differing lengths of positive-going pulses for ‘1’ and ‘0,’ the pulse-width for ‘0’ being twice the pulse-width for ‘1.’ The frequency of these pulses may lie between 1.5 and 7 kHz depending on the resistor value between OSC1 and OSC2 pins.

The internal oscillation frequency of decoder HT12D is 50 times the oscillation frequency of encoder HT12E. The HT12D receives the data from the HT12E on its DIN pin serially. If the address part of the data received matches the levels on A0 through A7 pins four times in succession, the valid transmission (VT) pin is taken high. The data on pins AD8 through AD11 of the HT12E appears on pins D8 through D11 of the HT12D. Thus the device acts as a receiver of 4-bit data (16 possible codes) with 8-bit addressing (256 possible channels).

Transmitter Circuit

Switches S1, S2, S3 and S4 are interfaced with AD8 through AD11 of encoder HT12E for forward (FWD), reverse (REV), left (LEFT) and right (RIGHT) motions, respectively. Resistor R1 is connected between oscillator pins 15 and 16 to set the transmitter frequency.

HT12E is permanently enabled for transmission by connecting its TE pin to ground. When any switch, say, S1, is pressed, the corresponding data is serially transmitted from DOUT pin through the RF ASK transmitter module. A 9V battery is used to power the circuit.

Fig. 4: An actual-size, single-side PCB for the RF transmitter
Fig. 4: A single side PCB for the RF transmitter
3F5_Fig_5
Fig. 5: Component layout for the PCB in Fig. 4
Fig. 6: An actual-size, single-side PCB for the RF receiver
Fig. 6: A single-side PCB for the RF receiver
Fig. 7: Component layout for the PCB in Fig. 6
Fig. 7: Component layout for the PCB in Fig. 6
Fig. 8: Author’s prototype
Fig. 8: Author’s prototype of the Arduino based RF controlled robot

Download PCB and component layout PDFs: click here

Receiver and motor driver circuit. Assuming that address pins on the encoder and the decoder are identical, when any of the switches on the transmitter (marked as FWD, REV, RIGHT, LEFT) is pressed, the corresponding data pin of the decoder goes low. The data outputs from D8 through D11 of HT12D (IC2) are fed to pins 2 through 5 of Arduino UNO board to generate appropriate logic outputs from pins 8 through 11 of Arduino UNO board.

Outputs from pins 8 through 11 of Arduino Uno board are fed to IN1 through IN4 of L293D (IC3) to drive both the motors M1 and M2 as shown in Fig. 3. Outputs OUT1 and OUT2 drive motor M1, and outputs OUT3 and OUT4 drive motor M2. Enable pins EN1 (pin 1) and EN2 (pin 9) are connected to Vcc for always enabled output. Regulator 7805 (IC4) provides regulated 5V to the receiver.

Construction

A single side PCB for the RF transmitter (Fig. 2) is shown in Fig. 4 and its component layout in Fig. 5. The PCB for the receiver (Fig. 3) is shown in Fig. 6 and its component layout in Fig. 7. A suitable connector arrangement has been made on the RF receiver PCB in order to extend connections to the drive motors and the battery mounted on the chassis of the RF robot.

37D_RF

Download source code: click here

Software and Programming

The source code file (RFROBOT.INO) for this project is listed at the end of this article. The Arduino Uno is programmed with Arduino IDE software. The ATmega328 on Arduino Uno comes pre-burned with a bootloader that allows you to upload new code to it without using an external hardware programmer. It communicates using the original STK500 protocol. You can also bypass the bootloader and program the microcontroller through the ICSP (in-circuit serial programming) header but using the bootloader makes the programming quick and easy.

Select Arduino Uno from the Tools→Board menu (according to the microcontroller on your board) in the Arduino IDE and burn the program through the standard USB port in the computer.

Further Advantages

  • Cost-effective and Customizable: Using commonly available parts such as Arduino, this robot is inexpensive and can be further customized.
  • Extended Range and Omnidirectional Control: With a 100m range and omnidirectional movement, it is perfect for open fields as well as close-range control.
  • Eco-Friendly Power Options: Due to its low power design, this robot may also be converted to run on solar or rechargeable battery packs.

 


This article was first published on 1 February 2017, and recently updated on 29 October 2024.

16 COMMENTS

  1. Are the inputs “latched” or can it be made to do so? I’m looking for a way to press the button (fwd), and have it keep moving without having to hold it. Then switch off when the opposite button (rev) is pressed, or add in a stop button.

    If that was silly, forgive me, I’m very new to this.

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Truly Innovative Electronics

Electronics News

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics