15
Shoulder/Arm Mechanism Lab Report Preface From June 11 th to July 20 th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as TP in short. TP is an educational institution of higher learning in Singapore where students ages 17 to 21 can study for a diploma in various fields such as Electronics Engineering or Biotechnology in three years. The specific lab that I was working in was a student-access lab where students work on their capstone projects. The purpose of this lab report is to present a project that I have been working on for the past six weeks. This lab report will go into details on the project and will its impact on Temasek Polytechnic and beyond. I would like to thank my mentor, Mr. Lee Yew Fai for giving me this opportunity to work in his lab and teaching me various useful skills required for my project. During this internship I met several friends in TP, like my fellow colleague Henry Han. I would like to thank these friends for making my internship experience a lot more enjoyable. 1. Intro 1.1. Background My project revolved around a small, programmable microcontroller board known as the Arduino. This board is special because when it is hooked up to an LED or motor, it can be programmed to do actions, such as light the LED or turn the motor. It uses its own programming language called Arduino, which is a derivative of the programming language C++.

alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as

Shoulder/Arm Mechanism Lab Report

Preface

From June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as TP in short. TP is an educational institution of higher learning in Singapore where students ages 17 to 21 can study for a diploma in various fields such as Electronics Engineering or Biotechnology in three years. The specific lab that I was working in was a student-access lab where students work on their capstone projects.

The purpose of this lab report is to present a project that I have been working on for the past six weeks. This lab report will go into details on the project and will its impact on Temasek Polytechnic and beyond.

I would like to thank my mentor, Mr. Lee Yew Fai for giving me this opportunity to work in his lab and teaching me various useful skills required for my project. During this internship I met several friends in TP, like my fellow colleague Henry Han. I would like to thank these friends for making my internship experience a lot more enjoyable.

1. Intro

1.1. Background

My project revolved around a small, programmable microcontroller board known as the Arduino. This board is special because when it is hooked up to an LED or motor, it can be programmed to do actions, such as light the LED or turn the motor. It uses its own programming language called Arduino, which is a derivative of the programming language C++.

Apart from the Arduino, my project also focuses on a special kind of motor called the servomotor. The servomotor is a motor that can only turn from 0 to 180 degrees. These motors are controlled by pulses ranging typically from 1 milliseconds to 2 milliseconds. The angle the servo turns is proportional to the duration of a pulse, so as the duration of the pulse increases, the angle the motor turns also increases.

1.2. Objective

The objective of this internship was to build a mechanical shoulder using servomotors that would replicate the human shoulder. This mechanical shoulder should be able to be controlled by a human in such a way that when the person moves his or her arm, the mechanical shoulder will mimic the movement. The control should be done through the Arduino board.

Page 2: alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as

2. Making the Project

2.1 Learning

For the first two weeks of the internship I learned the basics of Arduino board and the specific programming language that it uses through a book called The Arduino Cookbook. I programmed several of the examples given by the book and tried to make some programs on my own to understand the material. Mr. Lee also gave me some small projects to work on so that I could better grasp the material. These projects consisted of using a temperature sensor to do specific actions, like turning on an LED or turning a servomotor, based on the temperature reading of the sensor.

(Picture of an LED turning on based on the temperature reading from a sensor)

As my time was short, I was unable to complete all the chapters of the book, covering only 8 of the 18 chapters. These chapters taught me how to do many actions to control the Arduino board, such as sending information to the board’s serial port, learning how to give visual output (turning on LEDs), and, most importantly, turning a servomotor. Although I never finished reading the book, the information I learned was adequate to get me starting on the project.

Page 3: alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as

2.2 Solution

The solution to the mechanical shoulder consisted of two parts: hardware and software. In order for the shoulder to work, the circuit had to be correctly assembled and the sensors had to be placed on the body (hardware), and the code had to be written for the Arduino to execute the actions correctly (software).

For the hardware portion of the shoulder, Mr. Lee and I decided that potentiometers would be the best and easiest solution for the human to control the mechanical shoulder. Potentiometers are resistors with knobs that can be turned. These resistors will change in value depending on which way the knob is turned. They could be turned without difficulty, which made them favorable for the project. The potentiometers would then be glued together using a hot glue gun, and placed on the body such that when a person’s shoulder moves, the potentiometers would turn. In order to place them on the body, Mr. Lee suggested that I make a wearable vest and arm out of a durable material. We decided that this durable material would be corrugated plastic because it could be easily cut and was sturdy. As for the circuitry, the circuit would first be assembled on a breadboard to make sure it worked. The circuit would then be soldered onto a circuit board.

The software part of the project turned out to be easier than expected. I wrote a program to control the servomotor with a potentiometer, and I changed it to make it control three servomotors with three potentiometers. At the beginning of the code, three servo objects are made to represent the three servomotors that I was using for the shoulder. Also, three variables by the names potpin1, potpin2, and potpin3 were initiated to represent the specific analog pins that were being used by the potentiometers. The three variables, val1, val2, and val3, were initiated to store the position of potentiometer and later on, give the servomotor the angle it should turn. In the setup() function the servomotors were attached to digital pins 8 through 10 on the Arduino and were all set to 90 degrees at the beginning. Then the loop() function calls the turn() function for each of the three servomotors and gives it some values to use. In the turn() function, a number from the specific potentiometer given is stored in the variable value, and then it is scaled to a number within the range from 10 to 170. The function will then send a message to the servomotor to a certain number of degrees based on the scaled number. Finally, the function will delay for 15 milliseconds before being repeated. A flowchart of the code is shown on the next page:

Page 4: alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as
Page 5: alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as

2.3 Approach

The approach to the project was taken in four steps. The first step was to control three servomotors, each using one potentiometer. In step 2, three servomotors were glued together, each placed orthogonal to each other, to allow them to mimic the action of the shoulder/arm, and a popsicle stick was glued to the top motor to act as an arm. These three servomotors will be controlled by three separate potentiometers. In step 3, the potentiometers were glued together, each placed orthogonal to each other, just like the like the servomotors.

(Servomotor shoulder with popsicle stick)

(Potentiometers glued together to look like the servomotor shoulder)

Page 6: alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as

Finally, the vest and arm were made and the potentiometers were attached to the vest and arm so that when the shoulder/arm moved, it would in turn rotate the potentiometer arm. This change in resistance in the potentiometer would be processed by Arduino and it would move the popsicle stick (through servomotors) to mimic the actual shoulder/arm motion.

Also, the circuit would be soldered to a circuit board and connect the potentiometers to the shoulder, thus completing the project. Note that in steps 1 – 3 the circuit was made on a breadboard, and only in step 4 was the circuit actually soldered on a circuit board.

(The whole circuit assembled on a breadboard)

2.4 Making the Project

The solution to the project was fairly straightforward; however, executing it proved to be a little more difficult. The software portion was easy to type up, compile, and upload onto the Arduino board; it was the hardware portion that took a lot of work. Before I started on the vest, arm, and circuit board I had to glue three servomotors together and glue together the potentiometers that were going to be controlled by the shoulder/arm. Then I tested the circuit on a breadboard to make sure it was working fine before I moved on to the rest of the hardware: the vest, arm, and circuit board.

As mentioned before, the vest and arm were made of corrugated plastic. The plastic was sold in big pieces, so I used a penknife to cut through it. Since the material was thick, I had to make several cuts in it before I could actually cut through. As the pieces of plastic were cut, they were glued together to make the vest using a hot glue gun. After finishing the first half of the vest, I realized that I had not made it wide enough for someone to put it on. So I cut more pieces of plastic and glued them to

Page 7: alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as

the vest to make it wider. After the vest was made, I continued on and made the arm. For the arm I inserted bent pieces of plastic inside to act as supports for it. Since the arm was very narrow, it was hard to glue the supports inside it. The arm proved to be harder to make than the vest. I also applied glue to the edges of the plastic, as the material was sharp and could scratch people who wear it.

After completing the vest and arm, I glued the base of the potentiometers on the right hand side of the vest. Then the other end of the potentiometer was glued to a popsicle stick attached to a beam made of Legos. This beam was then glued to arm, with popsicle sticks glued on both sides of the beam to provide support. The vest, arm, and the potentiometers connecting the two were finally done, so I started on the circuit board.

(Picture of the potentiometers connecting the vest to the arm)

Page 8: alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as

Making the circuit board and soldering the circuit on it was the most tedious part of the project. First the board had to be measured for the correct size and cut off from a big circuit board. I had a hard time cutting off this piece; after three failed attempts I finally succeeded. Then I made marks in the metal with a penknife to separate the lines of metal, so that a short circuit would not occur. This took a long time, and I had to cut the area many times before the metal was separated. Finally, I soldered the circuit together. I made many mistakes while I was soldering, and had to use the solder remover multiple times before I finally was able to finish the circuit.

(Picture of the circuit board)

The whole process of making the hardware portion took about three days to complete. It required some strength and hard work, but I was satisfied with the final result.

3. Results

3.1 Testing

The way I tested the project was simple: I wore the vest and arm and moved my arm around, observing if the mechanical shoulder/arm (popsicle stick) followed my movements.

3.2 Observations

When the whole project, both software and hardware, was done, I finally tested it. The testing was fairly successful; I was able to control the shoulder mechanism by moving my right arm in the vest and arm. However, the motors would sometimes make jerky, sudden movements to one side and then return back to its original position. Also, half the time while I was testing, one of the motors would not work and refused to turn according to my arm. I suspect this was because there was a short circuit on the circuit board. I might have accidentally soldered together two separate rows on the circuit board. While Mr. Lee was inspecting my project, he saw

Page 9: alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as

that the wires attached to the potentiometers were not soldered and were frayed, so he helped me to solder those connections. Although one of the motors on the shoulder was still dysfunctional even after the potentiometers were soldered together, during the last test all the motors worked and the project was successful. Testing the project made me nervous, as I was not sure if my project was going to work, but in the end everything was functioning well (except a couple minor jerks). I was pleased with the result of the testing because it proved that my project was successful.

(I made a video that showed me testing the shoulder/arm mechanism. These photos are screen shots of the video)

Page 10: alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as

4. Post Analysis

4.1 Real Life Applications

The mechanical shoulder project has a lot of potential and there are a multitude of real-life applications for a more developed version of the project. For example, someone could use this technology for precise surgery. Human fingers may be too thick to work in a person’s body, so surgeons could use sensors on their arms and fingers to control a precise machine to do all the work. This would make surgery a lot safer and hygienic. Another example of a possible application is in bomb disposal. Instead of using a person to dispose of the bomb, a humanoid controlled by a person wearing sensors can dispose of it. This would make disposal completely safe, because even if the bomb does explode, only the humanoid would get damaged, not the person.

4.2 Possible Improvements to the Project

This project is far from perfect and could be improved on. One improvement that would make the shoulder easier to move in is to make the Arduino wirelessly communicate with the mechanical shoulder. Then there would be fewer wires near the circuit board and the arm would be able to move more easily. Also, the person wearing the vest would be able to control the shoulder from a farther distance, rather than having to be in close proximity to the mechanism. Another change that could be made to the project is to use an accelerometer, gyroscope and compass instead of potentiometers to control the servomotors. This would make the implementation more elegant, as it would look for the actual position of the arm instead of the angle of the potentiometer.

4.3 Impact on Temasek Polytechnic and Myself

The impact that this project will have on Temasek Polytechnic is undetermined. My project will remain in TP, but whether it will be used is unknown. I believe that it would be best used as an example for teaching others students how to use the Arduino. Whatever the case, I hope that the mechanical shoulder will be beneficial to TP and will help the students there.

On the other hand, the impact this project had on me was profound. I learned an immense amount of the Arduino programming language and about how to assemble circuits. Also, I realized that in Engineering, solving problems are not always easy and in fact may take a long time. My work at TP has taught me many things about Engineering, Arduino programming, building/testing circuits, and troubleshooting skills.

Page 11: alowminumfoil.files.wordpress.com  · Web viewFrom June 11th to July 20th (6 weeks) I worked in the Robotics lab of lecturer Mr. Lee Yew Fai at Temasek Polytechnic, also known as

4.4 Future Recommendations

Although I thoroughly enjoyed my internship at TP, there is an improvement I would want to suggest. I would suggest that a rough schedule or calendar of the goals and objectives that need to be met be drawn up. This would help the intern know what the next goal is after he or she has completed an objective.

5. Conclusion

My internship at Temasek Polytechnic has been an incredible experience. I was given the opportunity to work in a laboratory and use a lot of equipment that I would otherwise not be able to use. Also, the work I did taught me many skills that I will remember for a long time. I am fortunate to have this opportunity to work in TP and will never forget the experience I had there. Again, I would like to thank my mentor Mr. Lee Yew Fai and the new friends I made in TP for this phenomenal internship I had. I hope that the skills I learned during my internship will be put into good use in the future.