Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • Engineering Deep Dives
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Keypad Controlled RF based Wireless Robot

By Hai Prasaath K January 11, 2021

In robotics, wireless robots are commonly used for applications that need to be operated remotely. Usually such robots are controlled with a remote control that connects with the robot using a wireless technology like RF, Zigbee, Bluetooth, Wi-Fi or Mobile network. In this tutorial, a wireless robot will be designed that will connect with the remote control using 434 MHz RF module. The remote control will have a keypad to control the movement of the robot. Keypads are one of the commonly used Human Machine Interfaces (HMI) and play an important role in small embedded systems where human interaction or human input is needed. Matrix keypads are well known for their simple architecture and ease of interfacing. So in this project, a matrix keypad is used to control the movement of robot. The remote control also houses a character LCD which will display the current direction in which the robot is moving. From the direction, here is meant the forward, backward, left or right side of the robot.
The robot is built on a castor and two wheel body. There are two geared DC motors attached to the wheels which are controlled by L293D motor driver IC. The motor driver IC is interfaced with the RF decoder, so the driver IC is operated by the RF data passed by the remote control. While the control circuit of the robot (mounted on its body) is basically an RF receiver coupled with the motor driver circuit, the remote control is built around Atmega 32 AVR microcontroller. The program code for the AVR controller is written, compiled and transferred to the controller using AVR studio.

Prototype of AVR based Keypad Controlled Wireless Robot

Fig. 1: Prototype of AVR based Keypad Controlled Wireless Robot

Components Required –
List of Components required for AVR based Keypad Controlled Wireless Robot
 Fig. 2: List of Components required for AVR based Keypad Controlled Wireless Robot
Block Diagram –
The circuit of the remote control for the wireless robot can be represented by the following block diagram –
Block Diagram of AVR based Keypad Controlled Wireless Robot
Fig. 3: Block Diagram of AVR based Keypad Controlled Wireless Robot

The circuit of the control circuitry mounted on the robot can be represented by the following block diagram –

Block Diagram of AVR based Keypad Controlled Wireless Robot Control Circuit

Fig. 4: Block Diagram of AVR based Keypad Controlled Wireless Robot Control Circuit

Circuit Connections –

There are two electronic circuits that make up this project – one is the remote control built using AVR Atmega 32 controller, RF transmitter, RF encoder, 16X2 character LCD and 4X3 matrix keypad. The other is control circuitry or receiver circuit mounted on the robot which is built using RF receiver, RF decoder, L293D motor driver IC and geared DC motors.

The remote circuit has the following circuit connections –

Image showing AVR based Keypad Controlled Wireless Robot Remote Control Circuit
Fig. 5: Image showing AVR based Keypad Controlled Wireless Robot Remote Control Circuit

AVR Atmega 32 – This is a 8-bit AVR RISC based microcontroller. It comes in a 40-pin package and has 2KB RAM, 32KB flash memory, 1KB EEPROM, 32 General Purpose Input Output (GPIO) pins, 8 10-bit ADC channels, One SPI, one UART and one TWI interface on-chip. The controller has three in-built timers of which 2 are 8-bit timers and one is a 16-bit timer. The controller operates up to a clock frequency of 16 MHz. By executing powerful instructions in a single clock cycle, the Atmega 32 achieves throughputs approaching 1 MIPS per MHz allowing the system designers to optimize power consumption versus processing speed. The controller comes available in 40-pin Dual Inline (DIP) Package. Check out the pin diagram and pin configuration of this AVR controller here.

In the remote 22 GPIO pins of the controller are used of which 11 pins are used to interface the character LCD, 7 pins are used to interface matrix keypad and 4 pins are used to connect with the data pins of the encoder IC.
16X2 LCD: The 16X2 LCD display is used to display the current direction of the movement of robot. The direction of movement is expressed as forward, backward, left or right side of the robot. The is interfaced with the AVR microcontroller by connecting its data pins to port B of the controller. The data pins DB0 to DB7 of the character LCD are interfaced to pins PB0 to PB7 of the AVR Atmega 32 respectively. The RS, RW and E pins of the LCD are connected to pins PD0, PD1 and PD2 of the AVR respectively. The circuit connections of the character LCD with the AVR controller are summarized in the following table –
Table Listing Circuit Connections between AVR ATMega32 and Character LCD
Fig. 6: Table listing circuit connections between AVR ATMega32 and Character LCD
4X3 Matrix Keypad – A 4X3 keypad is used for human input in the remote control. The keypad has 12 buttons arranged in 4 rows and 3 columns. This is a numeric keypad which is used to control the movement of the robot. The rows and columns of the keypad are interfaced with the AVR controller in the following scheme –
Table Listing Circuit Connections between AVR ATMega32 and Keypad
Fig. 7: Table listing circuit connections between AVR ATMega32 and Keypad
Such matrix keypad operate by conducting between a unique row and column on the press of a switch. Either of the rows or columns are made digital output while the other remaining (either rows or columns) are made digital input. Suppose the rows are set digital output and columns as digital input. Now, the controller loops through the rows made digital output by setting them HIGH or LOW one after the other and simultaneously check for reception of the same logic on the columns. So, at a time a unique row is set HIGH or LOW while other rows are set inversely and on press of a key the same logic is received at a unique column. This unique combination of a row and a column allows identifying the key pressed.
HT12E Decoder IC – The HT12E IC converts the parallel data from the controller into serial data for passing it to the RF transmitter. HT12E encoder IC belongs to the 212 series of encoders. It is paired with 212 series of decoders having the same number of addresses and data format. HT12E is capable of encoding 12 bits, out of them 8 are address bits and 4 are data bits. Thus the encoded signal is a serialized 12-bit parallel data comprising of 4-bit data to be transferred appended with the address byte. The data pins D0, D1, D2 and D3 of the IC are connected to the pins PC0, PC1, PC2 and PC3 of the AVR controller respectively. All the address pins of the encoder IC are hard-wired to ground, so it has an address byte of 0x00. The pin 17 of the IC is connected to pin 2 of the RF transmitter. So, the serialized data is passed from pin 17 of the IC to data input pin of the RF transmitter.
HT12E has a transmission enable pin which is active low. When a trigger signal is received on TE pin, the programmed addresses/data are transmitted together with the header bits via an RF or an infrared transmission medium. HT12E begins a 4-word transmission cycle upon receipt of a transmission enable. This cycle is repeated as long as TE is kept low. As soon as TE returns to high, the encoder output completes its final cycle and then stops.
RF Transmitter – The RF transmitter is used to transmit the control signals for motor control. The RF transmitter module is a small PCB sub assembly. The RF module, as the name suggests, operates at Radio Frequency. The corresponding frequency range varies between 30 kHz & 300 GHz. In this RF system, the digital data is represented as variations in the amplitude of carrier wave. This kind of modulation is known as Amplitude Shift Keying (ASK). This RF module operates over 433 MHz frequency and uses ASK modulation technique. The pin configuration of transmitter module is as follow-
Table Listing Pin Configuration of RF Transmitter
Fig. 8: Table listing pin configuration of RF Transmitter
The serialized data from encoder is received at pin 2 of the module and passed on to the antenna from pin 4 of the module.
Power Supply – All the components in the remote circuit require 5V Dc for their operation. The power is drawn from a battery and is regulated to 5V DC using 7805 IC. The 7805 is voltage regulator IC having three terminals. The pin 1 of the IC is connected to the anode of the battery and pin 2 is connected to the ground. The voltage output is drawn from pin 3 of the IC. An LED along with a 10K Ω pull-up resistor is also connected between common ground and output pin to get a visual hint of supply continuity.
The control circuit of the robot has the following circuit connections –
Image of AVR based Keypad Controlled Wireless Robot Control Circuit
Fig. 9: Image of AVR based Keypad Controlled Wireless Robot Control Circuit

RF Receiver – The RF receiver detects the radio signal carrying the motor control signals. The RF receiver module has 8 pins and has following pin configuration –

Table Listing Pin Configuration of RF Receiver
Fig. 10: Table listing pin configuration of RF Receiver
The RF receiver passes the serial data received over RF frequency from its pin 2 to pin 16 of the decoder IC.
HT12D Decoder – The signal detected from the RF receiver is passed to the HT12D decoder. It converts the serial data back to the parallel data after separating data and addresses. HT12D belongs to the 212 series of decoders and can be paired with 212 series of encoders having the same number of addresses and data format. HT12D is capable of decoding 12 bits, out of them 8 are address bits and 4 are data bits. The 4-bit data is of latch type and when passed to the output data pins it remains unchanged until the new data is received.
The serial data received by the RF receiver is parallel output from its data pins as it is. The data pins of the decoder IC are interfaced with input pins of the L293D motor driver IC. So the digital logic at the data pins of the decoder control the rotation of the DC motors. All the address pins of the decoder IC are connected to ground to match the address byte to 0x00 same as of the transmitter circuit.
L293D DC Motor Driver IC – The L293D is a dual H-bridge motor driver integrated circuit (IC). The Motor drivers act as current amplifiers since they take a low-current control signal and provide a higher-current signal. This higher current signal is used to drive the motors. It has 16 pins with following pin configuration:
Table Listing Pin Configuration of L293D Motor Driver IC
Fig. 11: Table listing pin configuration of L293D Motor Driver IC
There are two DC motors used for making the robotic car. The DC motors are interfaced between pins 3 and 6 and pins 14 and 11 of the motor driver IC.
The L293D IC controls the DC Motors according to the following truth tables:
Truth Table of L293D Motor Driver IC
Fig. 12: Truth Table of L293D Motor Driver IC
The pin 4, 5, 13 and 12 of the L293D are grounded while pin 1, 16 and 9 are connected to 5V DC and pin 8 is connected to 12V DC. The pins 2, 7, 10 and 15 of the motor driver IC are connected to data pins D0, D1, D2 and D3 of the decoder IC. The DC motor attached to right wheel is connected to pins 11 and 14 while motor attached to left wheel is connected to pins 3 and 6 of the motor driver IC.
Geared DC Motors – In this robot, 12V geared DC motors are attached to the wheels. Geared DC motors are available with wide range of RPM and Torque, which allow a robot to move based on the control signal it receives from the motor driver IC.
Power Supply – In the receiver circuit the motor driver IC needs 12V DC while the RF receiver and decoder IC need 5V DC for their operation. The robot gets power from a 12V NIMH battery. The supply from the battery is regulated to 5V and 12V using 7805 and 7812 ICs. The pin 1 of both the voltage regulator ICs is connected to the anode of the battery and pin 2 of both ICs is connected to ground. The respective voltage outputs are drawn from pin 3 of the respective voltage regulator ICs. An LED along with a 10K Ω pull-up resistor is also connected between common ground and output pin to get a visual hint of supply continuity. Despite using 12V battery, 7812 is used to provide a regulated and stable supply to the motor driver IC.
How the circuit works –
When the battery is attached to the robot, it gets ready to receive RF data. The RF data directly controls the robot and there is no controller used on the robot electronics. As the robot gets powered, its RF receiver circuit pairs with the RF transmitter circuit of the remote control and waits for user input. The remote control is also battery operated and as the battery is attached in the remote control, first some messages are flashed on its LCD display indicating the application of the project. Now the user can press the keypad keys to move the robot in different directions. The following keys are assigned for the navigation of the robot –
Table Listing Key Assignment for Remote Control of Arduino Robot
Fig. 13: Table listing key assignment for remote control of Arduino Robot
When a key is pressed on the remote control, it is detected by the program code and the direction assigned to that pin is display on the LCD. At the same time motor control signals are passed to the decoder IC by the AVR controller. The robot is moved forward, backward, left or right by implementing the following input logic at the motor driver pins –
Logic Table of L293D Motor Driver IC for Arduino Robot
Fig. 14: Logic Table of L293D Motor Driver IC for Arduino Robot
The input pins of the motor driver IC are connected to the AVR pins and by changing the digital logic at the AVR pins, respective logic is implemented at the input pins of the motor driver IC. So, the user can navigate the robot with the help of matrix keypad.
Programming Guide –
Only the remote control is based on controller. The controller used on the remote control is AVR Atmega 32. The ATmega32 microcontroller can be programmed and loaded with the executable code with the help of AVR studio 4 and GCC compiler. Check out the following guide on programming AVR controllers using AVR studio –
Working with AVR Studio
In the program code, library for digital input and output is imported followed by importing library for generating time delays. Then, the constants representing matrix keypad connections are declared and functions for getting user input from the keypad are declared. The constants representing LCD connections are defined and functions used for displaying messages on the LCD are declared. The functions for controlling the movement of the robot are then declared.

Screenshot of AVR Code for Keypad Controlled Wireless Robot

 

Fig. 15: Screenshot of AVR Code for Keypad controlled Wireless Robot

 

The main function is called in which first some initial messages are displayed on the LCD.
Screenshot of Main Function in AVR Code for Keypad Controlled Wireless Robot
Fig. 16: Screenshot of Main function in AVR Code for Keypad controlled Wireless Robot
Inside the main function, an infinite while loop is called in which the functions to read the user input are called. Based on the user input, functions to display the direction of motion on the LCD display and the functions to send the motor control signal to the pins connecting with the decoder IC are called.
Screenshot of Infinite while Loop in AVR Code for Keypad Controlled Wireless Robot
Fig. 17: Screenshot of infinite while loop in AVR Code for Keypad controlled Wireless Robot

This completes the AVR code for the remote control. Check out the complete code in the code section. The control circuit of the robot is a simple RF receiver coupled with L293D motor driver IC and it does not have any code involved. So, quickly get your hands dirty. It will be fun making this keypad controlled wireless AVR robot.

You may also like:


  • Understanding the degree of freedom in robots

  • What are different types of industrial robots?

  • What battery chemistries are used in electric vehicles?

  • What are the different types of EV charging connectors?

  • What are the components of robotic arms and industrial robots?

  • Choosing Batteries for Robots

Project Source Code

###



//Program to
#include

#include


#define F_CPU 1000000


#define USART_BAUDRATE 9600

#define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE*16UL))) - 1)


#define pad PORTA

#define r1 PA0

#define r2 PA1

#define r3 PA2

#define r4 PA3


#define c1 PA4

#define c2 PA5

#define c3 PA6



// Function prototype to check key pressed from keypad 

void check1(void);

void check2(void);  

void check3(void);

void check4(void);


#define LCD_DATA PORTB //LCD data port


#define ctrl PORTD

#define en PD2 //enable signal

#define rw PD1 //read/write signal

#define rs PD0 //resister select signal


#define CONTROL_OUTPUT PORTC // output port for wireless transmission


void LCD_cmd(unsigned char cmd);

void init_LCD(void);

void LCD_write(unsigned char data);


void move_forward();

void move_backward();

void turn_left();

void turn_right();


unsigned int press;


int main()

{

    unsigned char value; 

    DDRC=0x0f; //LCD_DATA port as output port

    DDRB=0xFF; //signal

    DDRA = 0X0F;

    DDRD = 0X07; 


    pad = 0xF0;

    init_LCD(); //initialization of LCD

    _delay_ms(50);

    LCD_write_string("EngineersGarage");

    _delay_ms(1000);

    LCD_cmd(0x01);

    LCD_write_string("Keypad Cntrld");

    LCD_cmd(0xC0);

    LCD_write_string("Wireless Robot");


    while(1)

    {

PORTA=0xF0; //set all the input to one

value=PINA; //get the PORTD value in variable “value”

if(value!=0xf0) //if any key is pressed value changed

{

    check1();

    check2();

    check3();

    check4();

}

    }

    return 0;

}


void check1(void)

{

    pad =0b11111110;

    _delay_us(10);


    if(bit_is_clear(PINA,c2))

    {

move_forward();

    }

}



void check2(void)

{

    pad=0b11111101;

    _delay_us(10);


    if(bit_is_clear(PINA,c3))

    {

turn_right();

    }

}


void check3(void)

{

    pad=0b11111011;

    _delay_us(10);


    if(bit_is_clear(PINA,c2))

    {

move_backward();

    }

}


void check4(void)

{

    pad =0b11110111;

    _delay_us(10);


    if(bit_is_clear(PINA,c2))

    {

robo_stop();

    }

}




void init_LCD(void)

{


    LCD_cmd(0x38); //initializtion of 16X2 LCD in 8bit mode

    _delay_ms(1);


    LCD_cmd(0x01); //clear LCD

    _delay_ms(1);


    LCD_cmd(0x0E); //cursor ON

    _delay_ms(1);


    LCD_cmd(0x80); // ---8 go to first line and --0 is for 0th position

    _delay_ms(1);

    return;

}



void LCD_cmd(unsigned char cmd)

{

    LCD_DATA=cmd;

    ctrl =(0<

 


Circuit Diagrams

Circuit-Diagram-Remote-Control-Keypad-Controlled-AVR-ATMega32-Wireless-Robot
Circuit-Diagram-Keypad-Controlled-AVR-ATMega32-Wireless-Robot

Project Video


Filed Under: Electronic Projects, Featured Contributions

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

Log in to leave a comment:

Lost your password?

Don't have an account? Register here

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Wide Bandgap Semiconductors
Moving from silicon to GaN or SiC feels like a whole new ballgame, doesn’t it? It isn’t just about faster switching; it’s about managing the layout parasitics and thermal realities that come with that speed. This month’s Tech Toolbox features a curated eBook that tackles these design hurdles head-on.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions.

RSS Electro-Tech-Online.com Discussions

Featured Tutorials

Learn - AWS IoT Tutorials

  • How to enable device-to-device messaging on AWS IoT Core using MQTT
    How to enable device-to-device messaging on AWS IoT Core using MQTT
  • How to connect Raspberry Pi to Amazon AWS IoT Core using MQTT
    How to connect Raspberry Pi to Amazon AWS IoT Core using MQTT
  • How to connect ESP32 to AWS IoT Core using MQTT
    How to connect ESP32 to AWS IoT Core using MQTT
  • How to connect a computer to AWS IoT Core
    How to connect a computer to AWS IoT Core
  • Arduino compatible coding 02: Getting started with Arduino
    Arduino compatible coding 02: Getting started with Arduino
  • Arduino compatible coding 03: Basics of Arduino sketches and Embedded C
    Arduino compatible coding 03: Basics of Arduino sketches and Embedded C
More Tutorials >

Recent Articles

  • Rambus DDR5 chipset supports 9600 MT/s RDIMMs
  • Designing embedded systems with MicroPython and NodeMCU (Part 7)
  • AOS launches 80 V half-bridge MOSFET
  • TDK-Lambda adds 340–528 Vac 3000 W supplies
  • Coilcraft ferrite beads target CISPR 25 compliance

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • Engineering Deep Dives
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
  • Guest Post Guidelines
  • Advertise
  • Subscribe