Introduction: IoT Robotic Arm Controlled by Web Interface

About: I am young developer. I am working in robotics, web and a bit desktop and mobile programming. I always try to find ideas for my projects!

It's an IoT project of small robotic arm, which you can control via the Internet, using our special web interface. It's fully open source project, and of course you can easily find it on GitHub! All communications of RoboArm and Internet works throw Wi-Fi. RoboArm is divided on two parts: mechanics and server (to not overload the chip, I have used external server). Full presentation of RoboArm you can watch here.

Step 1: What Do We Need?

RoboArm doesn't have a lot of electronic components, that's why it isn't so expensive, and can be build by child!

Electronic parts:

  1. WittyCloud (ESP8266 based chip).
  2. 5V charger.
  3. PCB (optional, if you would power it from battery).

Devices:

  1. Wi-Fi router
  2. Web server (with Apache or NGINX + MySQL + PHP 7.0)

Files:

  1. STL file for 3D printing the RoboArm (we didn't designed our own .stl file), to buy it use this link (you would need to buy Download 3D STL Files for Original LittleArm")
  2. RoboArm code (free), to download use this link.

Step 2: Assembling Circuit

To assemble the circuit, just follow the pictures. Instead ESP8266 "vanilla" we are using WittyCloud! (It's doesn't matter, what will you use, pinouts are the same!).

Step 3: Creating Web Server

Before uploading our server part you need to setup something like LAMP server, there is link for setting up LAMP.

After setting server up:

  1. Download source code of RoboArm from our GitHub. And unpack it.

  2. Prepare your webserver files, which are located in roboarm web-interface
    folder, upload them on the web server and don't forget about /var/www/ permissions (if you are on Linux, just find in the internet how to give Apache permissions or NGINX (depend which server do you use)), because it will have a problems

  3. Rename web-server roboarm web-interface to robot_arm (access will be like: example.com/robot_arm). Don't make robot_arm as main site directory, it have to be subfolder in your main site folder!

  4. If you have an IP camera you need to check RoboArm interface file, which named as index.html and change source of WebCam block (which start from "image" and then like this "id="web_cam" width="50%" height="55%" src="http://192.168.5.2:81/videostream.cgi?loginuse=andrei&loginpas=robot") web camera image source address.

  5. Go to the settings.php file and change database connection information (host, login, password, database name). Host is normally "localhost", Login is your login from MySQL, Password is easy :), Database name is name of your table.

Step 4: Uploading the Program to the Chip

  1. Download source code of RoboArm from our GitHub. And unpack it.
  2. Download Arduino IDE latest version from their website.
  3. Then in Arduino IDE go to "Preferences", and you would see field "Additional Boards Manager URLs", add this line in the field "http://arduino.esp8266.com/stable/package_esp8266c...". After adding this line go to the Tools -> Board -> Boards Manager, and find by keyword "ESP8266", then install "esp8266 by ESP8266 Community".
  4. Go to the Tools and choose following parameters: Board -> NodeMCU 1.0, CPU Frequency -> 80MHz, Flash Size -> 4M, Upload Speed -> 9600, and if you already connect WittyCloud to your PC select port (it should be only one in this list).
  5. Finally we can upload the code. Open .ino file in Arduino IDE.
  6. Then check 45 line of code (It should be like "srv1.attach"). And check those lines:

    srv1.attach(15); srv2.attach(2); srv3.attach(13); srv4.attach(12); You need to check out, on which GPIO on circuit is servo connected, for example: if servo 1 is connected on GPIO1 you need to put in brackets 1. (Numeration of servos going from bottom to top).

  7. Line with "WiFiMulti.addAP("ssid", "password");" chang to your WiFi login and password (just put them instead "login" and "password" in line).

  8. Change "http.begin("http://disscore.com/robot_arm/motor-control.php?verify=Aw9CLLe6IT"); //HTTP " to "http.begin("http://your-ip-or-name/robot_arm/motor-control.php?verify=Aw9CLLe6IT"); //HTTP"
  9. Click "Ctrl + U" (it will upload source code). Then wait until it won't be uploaded.

Step 5: Testing and Smiling

After all of those steps, RoboArm should work. Just connect it to power 5V and test it! Enjoy!

If you have any issues, please let me know!