Android smartphones are undoubtedly the most popular gadgets these days. You will find various apps on the Internet that exploit inbuilt hardware in these mobile phones, such as Bluetooth and Wi-Fi, to control other devices. Presented here is a phone controlled robot that can be controlled via an app on your mobile. The control commands are sent via Bluetooth and the robot has such features as:

1. It can be controlled from Android smartphones by touch or voice commands
2. The speed of the robot can also be controlled
3. The robot will sense and inform to the phone its distance from the nearest obstacle
4. It will also send information about the direction in which it is moving

Fig. 1 shows the author’s prototype of the robot and Fig. 2 shows the app running on an Android phone to control the robot.

Fig. 1: The author’s prototype
Fig. 1: The author’s prototype
Fig. 2: Android app interface
Fig. 2: Android app interface

Circuit and working
Fig. 3 shows circuit diagram of the Android phone-controlled robot. The circuit is built around an Arduino UNO board (BOARD1), ultrasonic transceiver module HC-SR04, Bluetooth module JY MCU BT, motor driver L293D (IC1), DC motors M1 and M2, and a few common components.

Fig. 3: Circuit of the Android phone-controlled robot
Fig. 3: Circuit of the Android phone-controlled robot
Fig. 4: Bluetooth module
Fig. 4: Bluetooth module

The circuit uses two 9V batteries—one to power the Arduino board and the other to power the motors, as shown in Fig. 3. Regulated 5V supply for rest of the circuit is provided by the Arduino board itself. LED on the board indicates presence of power supply.

Bluetooth module. Bluetooth module JY MCU BT used in the project can be connected to any device, via built-in UART interface, to communicate with other Bluetooth-enabled devices such as mobile phones, handheld computers and laptops. The module runs on a 3.6V to 6V supply. Fig. 4 shows a picture of the Bluetooth module.

Ultrasonic transceiver module. Ultrasonic transceiver module HC-SR04 uses sonar, like bats and dolphins, to determine distance to an object. It offers excellent non-contact range-detection of 2cm to 400cm with high accuracy and stable readings in an easy-to-use package. It comes complete with an ultrasonic transmitter and a receiver module. Fig. 5 shows the ultrasonic transceiver module.


To start the measurement of distance, pin 2 (TRIG) of the module should receive a high pulse for at least ten microseconds. The pulse will initiate the module to transmit eight cycles of ultrasonic burst at 40 kHz and wait for the reflected ultrasonic burst. When the sensor detects the reflected ultrasonic burst, it sets pin 3 (ECHO) to ‘high’state. Duration of the reflected pulse depends on the distance from the obstacle, which can be easily calculated as:
Distance (in centimetres) = T/58
where, T = Width of pulse at ECHO pin in microseconds

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.

Fig. 5: Ultrasonic transceiver module HC-SR04
Fig. 5: Ultrasonic transceiver module HC-SR04

Arduino Uno is a board based on ATmega328 microcontroller. It has 14 digital input/output pins, six analogue inputs, a USB connection for programming the on-board microcontroller, power jack, an ICSP header and a reset button. It is operated with a 16MHz crystal oscillator and contains everything needed to support the microcontroller.

The board is very easy to use as the user simply needs to connect it to a computer with a USB cable, or power it with an AC-to-DC adaptor or battery to get started. The microcontroller on the board is programmed using Arduino programming language using Arduino development environment.

Pins 8 and 9 of BOARD1 are connected to pins Tx and Rx of the Bluetooth module, respectively. Pins 10 and 11 are connected to trigger (TRIG) and echo (ECHO) pins of HC-SR04, respectively. Pins 2 through 7 of BOARD1 are the output pins, which are connected to IC1 for controlling the motors. Pins 2, 3 and 4 of BOARD1 are connected to IN3, EN2 and IN4 of IC1 to control motor M1, and pins 5, 6 and 7 are connected to IN1, EN1 and IN2 of IC1 to control motor M2. EN1 and EN2 are used to control the speeds of the motors.

The control commands for the robot are sent from the phone using the app shown in Fig. 2. You can send the commands either by touching on various options on the phone’s screen or through speech commands. Corresponding to control commands you select on the app, the related data is sent through Bluetooth of the phone. Data transmitted by the phone is received by Bluetooth module at the robot end. The received data is fed to pin 8 of BOARD1. The microcontroller on BOARD1 processes the received data and drives motors accordingly.

The robot also sends back the status. In the app you can see label ‘Robot Status,’ below which you can see the direction in which robot is moving. The robot continuously sends back information about the distance from the closest obstacle to the phone, and if it reaches too close to an obstacle the robot stops automatically.


  1. No. If you use HC-05 module, you have to use 5V to 3.3V level converter or some other arrangement. HC-05 bluetooth module should not be directly interfaced to 5V TTL level on Arduino board.

    • Same query was asked by one of the memebers before. The answer is no. If you use HC-05 module, you have to use 5V to 3.3V level converter or some other arrangement. HC-05 bluetooth module should not be directly interfaced to 5V TTL level on Arduino board.

  2. Is it necessary to change baud rate of the bluetooth module. If I do not change the baud rate and let it be default what will happen? if I arrange separate 3.3v supply for bluetooth module, then can I use ‘HC-05’ module?

  3. Sir,
    Will you please tell me that how much cost it would take to make?
    And from where I can buy it?
    I live in Kanpur.
    Can I get your contact no.

    • The approx. cost of the project with simple chassis will be below Rs 3000. We do not have the complete kit of this project right now and also we have no idea where you can buy this project, sorry.

  4. The source code given above is of invalid format and cant be opened .Plz help me regarding this so as to get the project completed.

  5. Hello,
    I tried the whole setup given by this article, it worked at the first time (with HC-05) ! but after replacing the 9V motor and battery with 6V gear motor and battery it behave weird! I took the 9V supply to arduino same, just change the motor n battery. Motor driver indicator continuously blinking but motor doesn’t move. After that android apps connect with BT Module and while i press any key the BT automatically disconnect! And showing this message: Error 516:Unable to write:Broken pipe.
    Help please ASAP. Thanks


Please enter your comment!
Please enter your name here