Build a Telepresence Robot Controlled Through Wifi

About: Mechatronics Engineer who loves to implement new ideas. Expertise in CAD designing, electronics, 3D printing, and robotics.

This project is about building a robot that can interact with a remote environment and be controlled from any part of the world using Wifi. This is my final year engineering project and I learned a lot about electronics, IoT and programming though it. This project is focused on people with locomotion disabilities since they have a hard time moving around so a telepresence robot can assist them easily.

There are 2 systems within the project to make it successful. Motion control of your hand to move the robotic hand and mobile app which controls the base of the motor.

Below are the document and presentation of Telepresence V1 so you will get a more in-depth understanding.

Time To Build it!

Supplies:

A lot of tools and components are needed for this project. It cost me around 1000 AED (270$) so make sure you have that budget. Here are the components you will need:-

  1. Node MCU x 3
  2. L298N DC Motor Driver x 1
  3. 12V Power supply x 1
  4. LM2596 Step-Down Voltage Regulator x 1
  5. MPU9250 IMU sensors x 2
  6. Servo Motors (10-20kg Torque) x 4
  7. lightweight wood 1x1m
  8. 8M threaded metal rods 1m x 2
  9. 3D Printer (30x30cm)
  10. woodcutter and driller
  11. Electric wires, jumper wires, and breadboard
  12. Full arm sleeve
  13. 12V DC Motor (25kg.cm) x 2
  14. 3-inch caster wheel x 1
  15. 6cm rubber wheel with screw mount x 2
  16. Soldering kit

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: How It Works?

This is the communication flow chart to make you understand how components are communicating with each other. We are using Data Transfer Network called PubNub as an IoT platform that can send real-time messages in just 0.5 seconds! That's the fastest response we can get and this is even more important in our project since we will be using our hand to control the robot's arm in real-time.

All Nodemcu's are used for sending and receiving data. There are 2 individual systems involved here where Nodemcu on arm sends the motion sensor data to PubNub and that is received by Nodemcu on the robotic arm. for base movement, the mobile app sends the data for x,y coordinate from joystick and that is received by Nodemcu on the base which can control the motor through the driver. That's all for now.

Step 2: Design

The above design will give you an idea about how the structure looks like. You can download the cad files to have a better look. The base of the rover is supported by 3 wheels where 2 are DC motor at the back and one caster wheel in front. Due to movement of robotic arm, I noticed instability on the base so you might consider adding 2 caster wheels in front. Bottom and top wood base are supported by threaded rods which are sandwiched by nuts. Make sure that you use lock nut since that will make it tight permanently for the long term.

Download Design Source File - Telepresence Design

Step 3: 3D Printing of Arm and Torque Calculation

The arm of telepresence robot is a simple design in the shape of the box so that it can be 3d printed easily with minimum amount of filament. Its length is about 40cm which is as long as a human arm. The length of the robotic arm is based on the torque lifted by the servo motors. You can find the torque calculation on the above image along with the specs of the servo motor that I used so you can customize the design to your needs. But avoid using the maximum torque of servo motor since that will end up damaging the motor in the long run.

Download the 3D Printing files below, print it and keep moving forward.

Step 4: Fabrication & Assembly of Base

Here are the steps you can follow for fabrication:-

  1. Cut the threaded metal rod at the midpoint using saw
  2. Use woodcutter to make 2 wood pieces of 40x30cm
  3. Drill the necessary holes at the top and bottom base like the above drawing
  4. Start attaching the DC motor & caster wheels on the bottom base
  5. For making a rectangle hole on the top base, first make a circular hole with the driller and then insert woodcutter through the hole & trim it across the edges to make a rectangle.

if you are wondering why the right-top hole is placed backward, then it's because I was not sure if I will place the robotic arm on the right corner on at the center. Placing it at the center was a better choice due to weight balance.

Step 5: Assembly of Robotic Arm

Assembly of Robotic Arm requires special attention. Other than mechanical assembly, you have to make sure that the servo motor is at the correct angle when its assembled. Follow the above diagram to give you an idea about which angle the servo motor be set on all motors before assembling anything on top. Try to get this part right otherwise you will end up reassembling it again.

Use the below code template to set the exact servo angle using Arduino or Nodemcu. There is already alot of information about this online so I won't be going in detail.

#include <Servo.h>
Servo servo;
int pin =  ; // put the pin number where servo data pin is attached on arduino
void setup() {   
servo.attach(pin); 
}
void loop() {
  int angle = ; //angle at which you need to set 
  servo.write(angle); 
}

Step 6: Circuit of Arm Controller

Arm controller assembly is simple to do. I used a long sleeve and attached the sensors, Nodemcu & breadboard with sewing. Make sure that the sensor's orientation is in that same direction as the above controller image. Finally, follow the circuit diagram and download the code below.

Step 7: Circuit of Telepresence Robot

Follow the circuit diagram in the same way. Cross-check the pinouts of power supply which you are using to avoid short circuits. Set the buck converter output voltage to 7V since that is the average voltage of all servo motors. The only place which you might solder is the terminals of the base DC motor since it consumes a lot of current so needs to be tight with slightly thicker electric wire. Once the circuit is complete, later you will upload the 'arm_subscriber.ino' to Nodemcu which connects with arm and 'base.ino' to be uploaded on the base Nodemcu.

Step 8: Mobile App

This is the mobile to control the locomotion. When you move the joystick, it sends the X, Y coordinates on the joystick circle to Pubnub and received by Nodemcu at the base. This X, Y coordinate is converted to the angle and using it we can find which direction the robot will go. Movement is done by turning on/off & direction change of the two motors. If the command is Forward then both motors go forward at full speed, if left then the left motor will go reverse and the right motor goes forward and so on.

the above function can be simply done with buttons also instead of a joystick but I choose joystick to control the speed of the motor also. However, my enable pin didn't work with Nodemcu so I left that part. I have added a speed control code in base.ino just in case as a comment.

You can get the source file .aia below which can be edited using MIT app inventor. You will have to do a basic configuration in the app which I will tell in the next step.

Step 9: Create Account on Pubnub & Get the Keys

Now its time to do the final step which is to configure your IoT platform. Pubnub is the best because data transfer happens in real-time and takes only 0.5 seconds to transfer. Moreover, you can send 1 million data points per month so it is my personal favorite platform.

Go to PubNub and create your account. Then go to Apps menus on the left menu and click the button called "+Create New App" on the right. After naming your app, you will see the above image of the publisher and subscriber key. That is what we will be using to connect the devices.

Step 10: Add the Keys to the Code and Upload

We need 4 things so that the device can communicate with each other:- pubkey, subkey, channel & wifi.

pubkey & subkey will remain same on all the Nodemcu and mobile app. 2 devices which communicate each other should have same channel name. Since mobile app and base are communicating so that will have same channel name similar for controller and robotic hand. Finally, you have to put wifi credentials on each Nodemcu so that it can connect to wifi in the beginning. I have already added the channel name so wifi and pub/sub key is what you will have to add from your account.

Note:- Nodemcu can only connect with wifi which can be accessed without webpage as intermediate. Even for my final presentation I had to use mobile hotspot since university wifi was drag.

Step 11: Conclusion

If you reached till here then AWESOME! I hope that you gained something of value from this article. This project has small limitations which I want to tell you before you execute it. Here are some below:-

Abrupt Movement of Robotic Arm:-

There is a lot of sudden movement of the robotic arm. This is because of 0.5 seconds of lag for the sensor information to get transferred as a servo movement. I even damaged 2 of the servo motor so don't move your arm too swiftly. You can solve this problem by adding intermediate steps between the original movement to create smooth motion.

No stopping of base movement:-

when I make the robot move in one direction through a mobile app, robot keeps on moving in same direction even when I lift my fingers. This was annoying since I always had to turn the power off to stop the movement. I inserted the stopping code in the app but it still didn't work. It could be a problem in the app itself. Maybe you can try to solve it and let me know.

No Video Feed:-

Without the video feed coming from robot to person, we can never deploy on far away from user. I wanted to add this initially but would require more time and investment so left it.

You guys can take this project further by solving the above problem. When you do then let me know. Farewell

For more projects visit my portfolio website

Robotics Contest

Runner Up in the
Robotics Contest

Be the First to Share

    Recommendations

    • Instrument Contest

      Instrument Contest
    • Make it Glow Contest

      Make it Glow Contest
    • STEM Contest

      STEM Contest

    Discussions