Introduction: IOT BASED GESTURE CONTROLLED ROBOT
This robot is a gesture controlled one which can be controlled from anywhere by the help of internet. In this project accelerometer MPU 6050 is used for collecting data regarding our hand movements. It measures the acceleration of our hand in three axes. This data is sent to Arduino which processes this data and decides where the robot should move. This data is sent to a Bluetooth module, which in turn sends this data to our android mobile which has an app made by us. The app has been made through MIT app inventor website. This app receives this data and sends this data to thing speak website. Thingspeak.com is a free IOT website which stores this data. On the receiver side, node mcu WI-FI module receives this data and then drives the motors through motor driving board connected to it.
Step 1: Material Required
5. Jumper Wires
Step 2: Transmitter Part-
For the transmitter make the connections as follows-
1. Take a jumper wire and connect it at one of the end of the breadboard and the other end of the jumper wire to 5V pin of arduino board as shown in the figure.
2. Take another jumper wire and connect it at another end of the breadboard and the other end of the jumper wire to Gnd pin of the arduino board as shown in the figure.
3. Take another jumper wire and connect it's one end with the 5V hole of breadboard and other end to VCC pin of MPU6050.
4. Similarly, with another jumper wire to Gnd of breadboard and other end to Gnd of MPU6050.
5. Then connect SDA pin of MPU6050 to A4 pin of the Arduino and SCI pin of MPU6050 to A5 pin of the Arduino by the help of jumper wires.
6. Then take HC-05 Bluetooth module and connect it as follows-
7. Take a jumper wire and connect it's one end to VCC of breadboard and another end to VCC of the Bluetooth module.
8. Similarly take a jumper wire and connect it's one end to Gnd of Breadboard and another end to Gnd of Bluetooth module.
9. Now connect TX pin of Bluetooth module directly to pin D10 of Arduino.
10.Don't connect RX pin of Bluetooth module directly to any pin of arduino as Bluetooth module works on 3.3V level and arduino works on 5V level and hence 5V from arduino can burn the Bluetooth module. Hence to solve this problem we will make a voltage divider by the help of resistors. connect one end of 1000 ohm resistor to D11 pin of Arduino and other end to RX pin of Bluetooth module. Connect one end of 2000 ohm resistor to RX pin of Bluetooth module and other end to Gnd of breadboard.
NOTE: If you cannot find 2000 ohm resistance you can use two 1000 ohm resistances in series.
Step 3: Making Account on Thingspeak.com
Go to Thing speak website and make an account on this website.
Then follow these steps....
1. Go to my channels and create a new channel with any name and give any appropriate field name as you like....
2. Click on submit and save the channel.
3. Go to this channel and on API Keys field ,you can see write and read field keys. Copy the URL of the update channel feed on the right side of the screen.
4. Now click on the Apps option on the top of the screen and scroll down and click on the second last option i.e. Talk back option. This is the app we are going to use to feed data to this website.
5. Go to this app and click on New Talk Back for creating own app.
6. Edit the name of talk back and in the log to channel select your channel made in the previous steps.
7.Save your talk back app created.
Step 4: Making App by the MIT App Inventor Website-
Sign up into Mit app inventor website -Link of the website is http://appinventor.mit.edu/explore/
Follow these steps-
1. Create a new project and name it.
2. On screen 1 , you will see an image of an android phone.
3. First click on Label on left hand side of the screen and drag it to the android screen.
4. Then click on List Picker from the left hand side and drag it on the screen and on the right hand side go on the text option and write connected there. This list will show all the devices waiting to be connected to the android phone.
5. Click on button on the left hand side and then drag on the screen in the text field write disconnected as when we will click on this button then device will be disconnected from mobile.
6.Click on the Label on the left hand side and drag it on the screen. Then in the text field on the right side write Data.
7. Click on the Label on the left hand side and drag it on the screen. This is used to display the data received by the app.
8. Then in the connectivity option on the left hand side, click on the sub-option bluetooth client and drag on the screen.
9. Then from the same connectivity option ,click on the sub-option web and drag it on the screen.
10. Click on the sensor option in the left side of the screen and drag the suboption clock on the screen.
11. Click again on the sub-option clock and drag it on the screen.
Step 5: Block Structure of the App
Next click on the block on the right hand top corner of the screen-
Then as shown in the image above make the structure by dragging appropriate blocks from left hand side of the screen.
In the last block, there is a join sub-block where a URL is present. You have to paste the copied URL here in the block and then delete the last character of this URL.
Then click on Build on top of the screen click on save apk to computer. Then install this app on your android phone.
Step 6: Receiver Part-
Circuit for receiver part as shown in the figure is as follows-
First assemble your chassis and connect your motors in a appropriate way.
1. First connect battery to battery sniper and connect the red wire i.e. the VCC wire to one end of breadboard.
2. Similarly connect the other end of the wire to other end of breadboard.
3. Now take a jumper and connect it to VCC pin of NodeMCU and other end to VCC pin of breadboard.
4. Now take a jumper and connect it to Gnd pin of NodeMCU and other end to Gnd pin of breadboard.
5. Take your motor driving board and connect it on your chassis.
6. Take two jumper wires and connect their one end to VCC of breadboard and another to 9V pins of motor driving board.
7. Take two more jumper wires and connect their one end to Gnd of breadboard and another to Gnd of motor driving board.
8. Connect two wires of left motor to output pins of motor driving board.
9. Similarly connect two wires of right motor to output pins of motor driving board.
10. Connect four input pins on motor driving board to four digital pins of NodeMCU as shown in the figure.
11. Connect 5V pins on the motor driving board to Vout pin of NodeMCU.
Step 7: Uploading Code-
For the transmitter part the code is in the file final_wire.h-
For the receiver part the code is in the file second_part_of_final_project-
For uploading code on NodeMCU through Arduino IDE, you have to follow these steps-
1. Firstly open the Arduino IDE.
2. Go to files at the top left hand corner of the screen and click on the preference in the drop down list in Arduino IDE.
3. Copy the below code in the Additional boards Manager http://arduino.esp8266.com/stable/package_esp8266com_index.json
4. Click OK to close the preference Tab.
5. After completing the above steps , go to Tools and board, and then select board Manager.
6. Navigate to esp8266 by esp8266 community and install the software for Arduino. Once all the above process been completed we are ready to program our esp8266 with Arduino IDE.
Step 8: Robot Is Ready-
Now to start your robot follow these steps-
1. Firstly connect your arduino to laptop or to power supply and upload code to arduino.
2. Then open the app made in the previous steps and connect your mobile to Bluetooth module bu clicking on connected on your app. You will be able to see the list of devices ready to be connected.
3. Then move your accelerometer and you will be able to see the data received on the mobile screen. It may take small amount of time so try again and again to connect your mobile to the device. You can use serial monitor on the Arduino IDE to debug your circuit.
4. Then open Thing speak website and data transmitted should be uploaded to the graph.
5. Then make a hotspot and connect your NodeMCU on the internet and you will see the robot motors moving. If the robot is not moving in the right direction and change the pins on the NodeMCU where the motor wires are connected.
If you have any doubt regarding this project please mention it in the comments.
Credits to thingspeak.com and MIT app inventor website.....
Vibsi made it!
We have a be nice policy.
Please be positive and constructive.