Robot Arm Controlling with Javascript

Nowadays, we face a very interesting period of modern technologies development with already existing websites and services for different kinds of activities. Each year, there are fewer technologies that can crucially change the work of developers compared to 10-20 years ago. I can see that software development industry is growing in terms of human resources, but the number of state-of-the-art technologies decreases. Of course, an average developer doesn’t care much about this but most of the people who have chosen this profession are dreamers, inventors, creative creatures, – people who hate monotonous and boring work. I also belong to them, that is why one of my life priorities is the continuous discovery of something new. Observing the tendencies of big and famous companies development becomes obvious that priority goes to IoT technologies, artificial intelligence, robotechnics etc. These are technologies that allow us not only to visualize information but also to feel and look at the real world. Turn around! Can you see a robot somewhere? Does your T-shirt talk to you? No? Then, this is the right time to dive into this technology and become one of the dreamers, who changes the world.

The idea that was pushing me forward was quite simple: “To create an Assistant that would make a cup of coffee for me.” Of course, I will not highlight all the aspects of a fully functional coffee making assistant development, but you will find out how to create a robot arm out of a toy and make it autonomous, programmable and with access to the internet.

In this article, you will find out how to create a Robot Arm from a toy and how to program it with Javascript. Most of the microcontrollers are oriented on servos, and I will describe how to connect them to DC-motors with the help of a board built on H-bridges. It is not necessary to have some in-depth knowledge of JavaScript to develop an arm, nonetheless if you would like to establish a set-up adaptor by yourself due to the scheme I have described, you should have some expertise in electronics and know how to use a solder. For sure, I will describe where to order all the parts if you will find it hard to design them by yourself. I will also show how to control a Robot Arm remotely via Wi-Fi and how to define an Arm condition for calibration over webcam.

Material resources selection

At the baseline of everything is a toy, that can be purchased on Amazon – OWI Robotic Arm Edge1 (See Figure 1). It goes in a set with a control joystick and modification of a possible launching it to the computer via USB. However, I have chosen the first alternative as far as I have planned to launch it myself to one of the existing microcontroller kits.

The lifting weight of this toy is 100gr. Of course, it will not lift a cup of coffee, but it will manage to turn on the coffee machine and drop a couple of sugar cubes.

Figure 1. OWI Robotic Arm Edge

There is a big amount of microcomputers: Raspberry Pi, Arduino, ODROID, etc. But my attention was turned to a new microcomputer – Tessel 22 (see Figure. 2), which allows programming on JavaScript and Rust. I have considered JavaScript as far as I use this technology both for front-end and backend at my full-time work. Due to its simplicity and cross platforming, it is gaining popularity among developers which means that this will only increase an amount of people interested in this project.


Upgrade to Premium Account to read all articles and publish your own content …


https://github.com/elifTech/robotkit-tessel

Interesting to read:

  1. http://www.societyofrobots.com/robot_arm_tutorial.shtml
  2. https://www.hackster.io/taifur/complete-motor-guide-for-robotics-05d998
  3. http://start.tessel.io/modules/servo
  4. http://jjmie.hu.edu.jo/files/JJMIE-V2-N3-press/2(16-21).pdf
  5. http://blog.robotiq.com/how-to-calculate-a-robots-forward-kinematics-in-5-easy-steps
  6. https://www.researchgate.net/file.PostFileLoader.html?id=57cd4b20615e274c742de265&assetKey=AS%3A402906923716613%401473071904615

References

  1. https://www.amazon.com/Build-Your-Own-Robot-Arm/dp/B002HXTONC
  2. https://tessel.io/
  3. https://www.fabtolab.com/tessel-servo-module
  4. https://cdn-shop.adafruit.com/datasheets/PCA9685.pdf
  5. http://www.robotshop.com/en/wasp-10a-6-5v-28v-single-r-c-dc-motor-driver.html
  6. http://socket.io/
  7. https://angularjs.org/
  8. https://www.uco.es/investiga/grupos/ava/node/26
  9. http://opencv.org/
  10. https://github.com/jcmellado/js-aruco

About the author
Vitalii Savchuk is a Senior Software Engineer at ElifTech company. He likes to solve tough tasks and implement out-of-the-box solutions. Besides his great experience and expertise in web application development, he also possesses strong knowledge of System analysis and design as well as contributes to many open source projects. One of the most famous ones is ngTable directive for AngularJS. As a student Vitalii also did an academic research in artificial intelligence and ecology at the Vinnitsa National Technical University.

Vitalii Savchuk
Human history holds many names of people who have left their mark on it, I want to be one of them!
Vitalii Savchuk

Latest posts by Vitalii Savchuk (see all)