Published on

Bot Control using RF

Contributed By - Rajat Bansal

Aim

This is a basic project to control a bot or any other appliance wirelessly using RF Module. It provides 4 output channels which can be increased or decreased by minor changes in the code.

Hardware Used

  • Arduino Mega
  • Arduino Uno R3
  • RF transmitter & Receiver module 433MHz
  • Breadboard
  • DC motors
  • Some jumper wires
  • 12V adapter

Description

The transmitter was connected with the Arduino Uno and some push buttons to take inputs as a remote control.

The receiver was connected to mega and output pins were further extended to a relay board, which in this case was used as Dual H-Bridge to control motors. This relay board can be replaced with a common relay board to control electrical appliances for home automation using the same code. The relay board was powered with a 12V adapter.

Resistor

Code

Whenever a push button is pressed the corresponding pin changes it states either HIGH or LOW.

Transmitter code

Virtual Wire lib was used to use RF.

Pin no 12 was used as data pin for Tx .Pin no 7,6,5,4 were used as input pins for remote.

Code can be found here

Receiver code

The Rx receives an string of characters in a message which is stored as buf[] and buflen is the max no of characters in the string.

The Boolean data type is used to toggle state.

code can be found here