The software for the robot is written in Arduino programming language. The Arduino UNO is programmed using Arduino IDE software. Atmega328 on Arduino UNO comes with a boot loader that allows you to upload new code to it without using an external hardware programmer. It uses STK500 protocol to communicate. You can bypass the boot loader and program the microcontroller through ICSP (in-circuit serial programming) header, but using boot loader programming is quick and easy. Select the correct board from ‘Tools→Board’ menu in Arduino IDE and burn the program (sketch) through standard USB port in the computer.
Download PCB and Component Layout PDFs: click here
Download Source Code: click here
The procedure for installing Android app on the phone is as follows:
1. Download the app (Android_BOT.apk) from the link and copy it to your Android smartphone (or tablet).
2. Run the file, and when it asks you ‘Complete action using,’ click on ‘Package installer’ and then click ‘Install.’
3. You also have to install voice-search and a text-to-speech app from play store if you want to control the robot through speech.
Please note, you have to change the baud rate of the Bluetooth module on the robot to 57600 using AT command.
Construction and testing
An actual-size, single-side PCB layout for the phone-controlled robot is shown in Fig. 6 and its component layout in Fig. 7. Assemble the circuit on the recommended PCB to minimise assembly errors. Use IC base for motor driver IC1.
Follow the steps below to get the robot running the first time:
1. Provide power supply to the robot by connecting the batteries.
2. Pair the Bluetooth module with Android phone. While pairing it will ask you the password. Type 1234, which is the default password of Bluetooth module.
3. Run the already installed app in the phone. Press on the welcome screen to get the main interface.
4. Select ‘Select Device’ (make sure the Bluetooth is on), then select Bluetooth module from the list of Bluetooth devices scanned and select ‘Connect.’ It will take five to ten seconds to connect. After connection, it will notify you that Bluetooth is connected. Now it is time to start playing with the robot.
5. Slide the slider to the right (or left) to set the speed, and select the arrows to move the robot in corresponding directions.
6. To control the robot with speech commands (forward, backward, left, right and stop) select ‘Say Command’on the app screen. You can also see the commands that are spoken by you. We need to pronounce the commands clearly.
To test the circuit for proper functioning, verify there is correct 5V supply for the circuit at TP1 with respect to TP0. Also verify the 9V supply for the motors at TP2. Transmitted data by the Bluetooth can be observed at TP3. Echo from the ultrasonic module can be checked at TP4 using an oscilloscope.
The author is a third-year B.Tech student of electronics and communication engineering in RVR&JC College of Engineering, Guntur