Alright, so the robot arm that me and Mark Laatikainen were building is finally finished. After a lot of… adjusting, we managed to finish the prototype successfully. There were some changes to the initial plan, so here’s a summary of our progress.
To control the arm we had planned to use potentiometers because of their simplicity and accuracy. However, we were presented with the possibility to use a Nunchuk (the Wii remote that is), so we just had to take the chance.
Nunchuks are fitted with an accelerometer that can measure motion and tilting. We decided to connect the Nunchuk to the two main servos that do the heavy lifting. So now when you tilt the controller horizontally or vertically the arm responds. One of the biggest problems we encountered with the accelerometer were the uneven values it provided. We had to implement a sliding average into the code and some if/else- conditions to filter out the erroneous values. The arm is still a bit “jittery” because of the faulty values but it’s manageable.
We use four servos in the arm and we couldn’t connect them all to the accelerometer. So we allocated the analog stick to the third servo and the fourth servo, that controls the “claw”, to the trigger button “Z”. The controls work fairly well with this configuration.
Here are some pictures of the final setup:
I had a lot of fun with this project and I’m glad I got to work on it with Mark, who’s a very capable programmer and very competent with electronics. Mark uploaded the code for the arm on his GitHub-page. Here is a list of the parts we used:
2 x Tower Pro 9g micro servos
2 x Tower pro MG995 servos
Prototype shield for the Arduino
4 x Metallic shelf holders
Dental floss for the claw (yes…)
∞ jumper wires
Remember to also check out this course taught by Tero Karvinen: http://terokarvinen.com/2017/prototyypin-rakentaminen-bus4tn007-8-w22