Arduino controlled programmable bluetooth robot
I did not build a robot or write about robots for a really long time. In fact I didn't even write a blog post for a very long time now. So, today I am going to write about a robot that I had been working on for past 4-5 days. This robot uses an Arduino as its brain and has an HC-05 bluetooth module for sending in commands through a smartphone. The main focus here in this robot is the ability to automate its motions. A user can enter a string of letters and instruct the robot to mimic the step commands entered. For example a user can enter "ssrst" which means move forward 2 steps then turn right and move one step forward again.The 't' is to instruct the robot to perform the set of motions only once. If the 't' is not entered the robot will go on executing the motion. These short-forms may seem difficult to remember but come in handy when the robot has to do a lot movements. I am presently working on an android application also to make it easy to send commands to the robot.
The program written for this robot is very easy to understand. The string entered by the user is stored in a character array named "program". Then each character is converted into an integer for easy manipulation and compared with existing set of integers which stand for particular letters. When there is a match the corresponding motion is performed. If you have a servo motor, download this sketch. If you do not have a servo motor, don't worry, it won't affect the robot, download this sketch. The L293D based motor driver is very simple to use. The motor driver I used is something similar to this one. You can adjust the delay values to further fine tune the movements of the robot as it completely depends on the motors that you use. Connect the motor driver according to the sketch. Don't forget to connect the ground of the motors' power supply with Arduino's ground pin. I used an app called BlueTerm to send commands to the robot. If you have any doubts in the build, leave it in the comment section and I will respond to it as quickly as possible.
2. HC-05 bluetooth module
3. 2 motors with wheels
4. A chassis to fit all the parts together
5. Power supply (9 volts for the motors, 7-12 volts for the Arduino)
6. 1 Servo (optional)
|HC-05 bluetooth module|