Arm-Controlled Robotic Arm

by treminiobravorafael in Circuits > Robots

617 Views, 4 Favorites, 0 Comments

Arm-Controlled Robotic Arm

Picture27.jpg

The goal of the project is to create a mechanical arm out of 3D printed parts that can mimic the movement of a user’s arm using sensors attached to them. The build will use different sensors to detect muscle movement from the person and control the arm as close to their movement. This can be a steppingstone in creating arms for people who have lost an arm and do have not enough remaining muscle for normal prosthetics. The design can also be used to interact with objects at a further distance where the environment is not suitable for human presence

Supplies

Screenshot 2021-11-15 211253.png
  • x2 Stepper Motors
  • x2 Vex Servo Motors
  • x2 Vex Motors
  • x4 TT Motors
  • Arduino Uno
  • Arduino Mega 2560
  • Myoware Muscle Sensor
  • x2 Transceiver Modules
  • x2 Stepper Motor Driver
  • x1 H-bridge
  • Hookup Wire
  • Solder
  • Shrink Tubing
  • 1/4" wood
  • 3D printing filament (PLA and PETG)
  • 12V power supply
  • Nuts and Bolts
  • x5 Potentiometers
  • Buck Converter

**Note that the bill of materials was centered on what we had in the engineering room, so some of the things on the list are not included because we already had them.**

Technical Approach

For the mechanical part of the build, I would need to model all my parts in Fusion 360, with careful attention to measurements of motors and sensors that would incorporate into the model. Before making the models that will be printed, I would model the motors and sensors I would use into the models to use as a reference while creating the pieces. Factors to consider while making the model would be the orientation of the arm to match the user's arm, the weight of the arm, motor placement, sensor placement, wiring, and Arduino hub. To save some time, I will also use an existing prosthetic model (K1 arm) and modify it to accommodate the design. I will make sure that the motors will be able to handle the weight of the arm, so it doesn’t collapse on itself.

The electrical system will involve a lot of different sensors to detect movement on the user’s arm. Since the sensor system would need to be wireless from the mechanical arm, I would need to use a transceiver module to make the Arduinos communicate with each other. To use the transceiver module, I would need to learn about how to program the module to work with the Arduinos. To take up as little space as possible, I'm going to use 2 Arduino Nanos to use. For the movement of the arms and hand, I will use a combination of step motors, dc motors, servo motors, and possibly Vex motors. Depending on the location on the arm, the motors used will need to be able to lift the weight of the mechanism. To make the design as light as possible, I will place holes inside the arm design to reduce material usage and thread wires through the arm. To plan out all the electronic parts, I would use Tinker cad.

As mentioned before, the user will use a variety of sensors to control the arm. The finger will be controlled using strings on a coil attached to dc motors. When the flex glove detects the finger bending, the glove will close to the sensor. To control the wrist, a gyro sensor would be attached to the palm of the glove. I will only use 2 of the flex glove sensors, which will provide 4 sensors to control with the finger, so the thumb is going to have to move with another finger. The feedback from the gyro would be used in combination with the 3 stepper motors on the wrist. Using the muscle sensors, the elbow and the shoulder will move to the values given. All the sensors will be attached to an arm sleeve, which will house the Arduino board, and all the sensors that will control the arm. The arm will also have a separate control system stationary with the arm to help calibrate it when ready to use.

For the software, I will need to look up how to program stepper motors and sensors, as well as PID. Since I'm going to want to have the best precision when controlling the arm, a self-correcting system that works with the sensors will be optimal. I will need to figure out how the muscle sensor reads its value and implement it into the code. I would also use a gyro sensor on the palm of the user’s hand to communicate the hand's position to the stepper motors on the wrist of the hand. The movement will be programmed to be very precise because the stepper motor measures direction and spin very accurately, so with a combination of a gyro and stepper motors, programming PID will be essential. Since there will be a lot of programming involved in this project, I will create my libraries to better organize my program. I might need to access the Arduino projects book and website to aid in programming. Tinker CAD would also be used to test my program.

Gathering Materials

Picture3.png
Picture2.png
Picture1.png
Picture6.jpg
Picture5.jpg
Picture4.jpg

Before designing and building the mechanical arm, I had to assess all the materials I have planned on using. Since a lot of the motors were unfamiliar to me, I had to test all the motors by writing up sample code and analyzing the strength and accuracy of each motor. Coming into the project, I was going to the small stepper, servo, and DC motors

After testing the motors, however, I realized that these sets of motors were too weak to hold a robotic arm. I had to look around and see what else was available and came across a broken 3D printer that I could scrap. From the 3D printer, I made use of its stepper motor and power supply to incorporate into the arm. I also made use of Vex servo/DC motors and geared up DC motors as well.

Aside from figuring out motors, I also needed to assess the electronics I would use in my arm. I wanted to control the arm wirelessly, so I made use of transceivers that would do that. Since the goal is to make it muscle-controlled, I needed to make use of the MyoWare Muscle Sensor in my project. I investigated purchasing stepper motor controllers to connect to my power supply and incorporated a motor shield to drive 4 DC motors. To run the remaining 2 motors, I used an H-Bridge. I also needed to make use of both an Arduino Mega 2560 and an Arduino Uno. Since the arm will use a lot of electrical components, the Mega was allocated to the arm and the Uno to the controls system.


Design

Picture10.png
Picture9.jpg
Picture8.png
Picture7.jpg
Picture12.png
Picture11.png

To design the arm, I began by outlining the axis of rotations that the robot was going to move in by using a diagram to visualize the movement. I then made a list of the part of the arm and motors that are associated with the motion.

After getting a general idea down, I began using Fusion 360 to model the arm and placed them in an assembly. I was able to use a prosthetic hand from E-nable as a basic design for my hand. I modified the hand to fit motors through Fusion and modeled the rest of the arm separately.  After assuring that all the parts fit together, I began 3D printing each piece of the arm and assembling it from the hand to the shoulder.

Despite being planned out, there was a major flaw that was overlooked that caused me to redesign the arm. I did not consider the great amount of force needed to move the elbow and the shoulder, which meant that it needed to be geared so that it would move. I had previously thought that rubber bands would have been enough to help the stepper motors move. With a lot of weight at the end of the hand, however, the arm needed more torque to move. I had to re-CAD certain parts of the arm to include a torque gear ratio and used the Gear Add-on in Fusion 360 to help me redesign and rebuild the arm. 

Electronics

Picture16.png
Picture15.jpg
Picture14.jpg
Picture13.jpg
Picture18.jpg
Picture17.png

Although a lot of the electrical design began after building the arm, I began to experiment with the electrical aspect of the project before design. I first hooked up the muscle sensor to a basic Arduino Uno to get a better understanding of how it worked. Once I was done, I moved on to experimenting with power supplies, DC motors, servo motors, transceivers, and stepper motors. 

This process was part of the material gathering process by testing each component. After determining my electrical components, I focused my attention on designing the arm before I began to mess with electrical components. After most of the arm was constructed, I started implementing all the information I gathered from the experiment into the main circuit. I first soldered the transceiver onto the prototype board and connected all the wires that connected to the two-stepper motor controller and. I then stacked a motor shield on top of the prototype shield to connect the two-servo motor and 4 DC motor. After testing the components, I moved towards connecting the h-bridge to manipulate the two vex motors and adding a buck converted to step down the voltage coming out of the power supply.

After connecting all the electrical components, I knew that I would have to make the housing for them accessible in case I had to adjust. In Fusion 360, I made a CAD of a shelf-looking design that would slide in and out of the box. This allowed me to modify certain circuits a lot faster and made the redesign process of the electrical aspect of the project more efficient. 

Apart from the robotic arm, I had to also design an efficient controls system to test and control the arm. I first made use of potentiometers to control each DC motor on the fingers while testing. After finalizing the circuitry on the arm, I then added buttons and a switch to control all the DC motors (Vex included) and used the potentiometers for the wrist, elbow, and shoulder. 

Programming

Picture20.png
Picture19.png
Picture22.png
Picture21.png
Screenshot 2021-11-15 210019.png

The programming aspect of the project was also weaved into the testing and material gathering. I had to write up some code in the beginning to test all the aspects of the electrical components I was using. Since a lot of the sensors and motor controllers I was planning on using were relatively new to me, I had to do some research on how to program a lot of the components. I used the following websites to get a grasp on the electrical components I was using:

I first began by experimenting with the motor shield and stepper motors to determine how the code works for each motor I was using. I had already had experience with coding servos, but since I was using a motor shield, I had to determine how to utilize the libraries included with these components and get an understanding of how they work together. I began using the example code from makersguide.com, aranacorp.com, and instructables.com to make a simple sequence for the motors. 

After figuring out how the motors worked, I moved on towards programming the transceiver. Unlike programming the motors, I had no background experience in programming anything like it, so it took a lot longer to figure out how it worked and how to program it. In the end, however, I was able to understand how to program it with the help of howtomechatronics.com and the Arduino Forums. Essentially, the transmitter packages all the values into an array and sends them to the receiver, where it computes and uses all the values to control the components on the other circuit. 

I also made use of the h-bridge to control the vex motors. I had some experience with the IC, but overall coding it was a hassle. Using the tutorial provided by lastminuteengineers.com, I coded the h-bridge into a function to make the code more manageable. Unlike the servos, motor shield, and stepper motors, there was no library to code the h-bridge, so I made my own function to simplify the process.

Libraries Used:

  • SPI.h
  • nRF24L01.h
  • RF24.h
  • AFMotor.h
  • Servo.h
  •  AccelStepper.h

Testing and Evaluating

Picture25.jpg
Picture24.jpg
Picture23.png
Picture26.jpg
Rock-Paper-Scissors Testing
Muscle Sensor Testing

At the start of the year, I first began testing the components of my project to determine the best use of materials. I previously mentioned that I had switched from small motors to more powerful ones. Part of the decision came from testing each motor with a sample code. The servo motors and the stepper motors were easy to test because it was just assessing their strength by applying a counterforce to their spin. For the DC motors, I assumed that the motors had enough power to pull the fingers down. When it came to testing the fingers, I had the motors open and close at separate time intervals and observed their movement. After testing, I realized that the motors were too weak to pull the index and thumb down, so I had to use different motors to give more power to the fingers. I ran a similar test with the elbow and shoulder, where the stepper motors were also too weak. As a result, I had to redesign the elbow and shoulder to include a torque gear ratio.

After finishing the design and confirming that the arm could move with the test code, I moved on to testing the electronics. I hooked up all the motors on the arm and used the controls system with the potentiometers to control the elbow and shoulder first. After that, I moved on to testing the servo motors with the other two potentiometers. In doing so, my Arduino blew out, meaning that there was a flaw in my circuit. I did some research and found that there was too much voltage going into the Vin pin of the Arduino, so it was drawing current too fast. I purchased a buck converter to fix the issue and a new Arduino. After that was all finished, I moved on towards messing with the 2 vex motors. For a while, the h-bridge controlling both motors was not responding. As a result, I had to rewire the h-bridge and redownload code to figure out the issue. After a few attempts, the h-bridge seemed to work smoothly with the Vex motors. I moved on towards testing the arm by making a rock-paper-scissors mode and a control mode. I made the arm play rock-paper-scissors to test how the motors behaved with each other and later tested the controls system to determine the accuracy of the controls system.

Conclusions and Recommendations

For the most part, I was able to accomplish many of the goals I set to accomplish. Although it was not as I envisioned at the beginning of the year, I feel like I am very close to completing the final product. Much of the reason I was able to complete the arm was preparation. Because I tested all my parts and made sure to research all the electrical components I was using, building, and programming the arm was very efficient. However, not carefully looking into the design of my arm did also hinder progress. Major setbacks such as redesigning the whole arm and fixing my circuit multiple times meant that I could not continue onwards without first fixing my errors. Despite not finishing the project, I learned a lot throughout the year through experience and mistakes.

Working on the project opened many opportunities to learn and grow throughout the year. Since much of the components I was working on were new, I learned a lot about coding and utilizing transceivers, motor shields, power supplies, etc. I also managed to gain experience in using the resources around me when I did not have the resources available. Designing my arm while not spending a substantial amount of money was challenging, yet a necessary part of the project. I was able to learn about resource management and used problem-solving to push my project further when it otherwise seemed impossible. Of course, the biggest learning experience came from the mistakes I have made throughout the year. Blowing two Arduinos and redesigning most of my arm taught me to better plan for future projects and allocate time to research more.

Having made multiple mistakes throughout the year, it is clear that I have reflected on what could have been done differently. For one, I should have done more research on the potential physical aspect of my arm. While testing, multiple issues like redesigning the arm or reprinting the palm could have all been avoided if I had taken the extra steps of researching the effects of torque or simply being safe and choosing a stronger DC motor by default. The same could be said with electronics, where a buck converter could have saved me time in replacing the Arduino and rewiring my board. All these precautions could have saved me time and I could have gotten a lot more done. Though, if I had more time to work on the project, I would have soldered on the controls system and further test the connections between the transceivers. I would also add acceleration in my motors and add more sensors to control the arm more accurately. Adding another muscle sensor and redesigning the control system would also be done.