December 29, 2012

Robotic Plotter Arm

I was required in my school work to design and implement an embedded system. I thought it would be great to make something robotic. I recalled the movie Hugo. I was impressed and later fascinated by the automaton appeared in the movie. I decided to make one with similar functionality by modern robotics.
I quickly designed the mechanical structure of the robotic arm. It is really standard practices from what I saw on the internet. I got some help in hammering the aluminium plates. Then I embedded 3 servo motors in the joints.


We do embedded C on STM32. The only hardware interfacing was the 3 PWM outputs controlling each motor. I did struggle for some time in producing a signal with the correct frequency and pulse width, and to varies the pulse width smoothly at a desired speed.

Luckily the control algorithm is not hard.

In order to design the desired Hugo's drawing, I scratched up a simple vector graphics editor. The editor can export a vector design into a format accepted by the embedded program.
The designer is where magic happens. I traced the Hugo's automaton's drawing, though dropped a lot of lines for fear that the robotic arm cannot be that accurate.


Finally it gave me this drawing.

Compare with the drawing by Hugo's automaton.

It took smaller amount of time and effort than I had expected to finish this arm. That's 10 days of spare time and 3 days of full time.
There is indeed much room for improvement of accuracy. But then I am satisfied by how pieces of hardware and software work together to create the artistic outcome.



Appendix I - photo album
on google plus

Appendix II - presentation slides


Appendix III - demonstration video

21 comments:

  1. Really amazing! I think it is worth spending some money for more precise motors to control the arm. It looks like the math behind it is perfect. I think if the arm would be a bit more solid and the motors allow smoother motion, this can do better than Hugo! Again, very nice for such a home-made project!

    ReplyDelete
  2. thank you for your appreciation! yes you are right. the arm itself has a large inertia and induced friction that the motors I am using have a hard time pushing. my next plan is to replace the motors by better ones, and maybe with encoder installed. modern robotics should have done better than this!

    ReplyDelete
  3. Great work. I was wondering, did you bend and cut the material yourself or did you buy the metal angles ready-made?

    ReplyDelete
    Replies
    1. I cut and bend the aluminium plates with the help of the industrial facility in my school. it is good because aluminium is light and slightly elastic, making the entire structure a perfect-fit. it is bad because it is not tough enough to withstand the dynamics.

      Delete
  4. Hey. I've got another question.

    I've made a robotic arm myself. Right now, the arm just moves to the points defined in an svg file, but does not consider whether the segment is a line or curve and include both control points of curves. It just makes sure the servos arrive at their destination at the same time.

    Did you include any code for curves and lines or did you do something similar to what I have done?

    ReplyDelete
    Replies
    1. Never mind. I'm looking through your slides and I see that you have implemented different commands for lines and curves.

      Delete
    2. I am not sure I understand your problem, but SVG paths themselves distinguish line segment (L) and curve segment (C).
      glad that you are also doing a similar thing! good luck to your project, and, share your achievement with us!

      Delete
    3. Well, my program so far takes an x-y coordinate, calculates the two angles, calculates the difference between the current angles and the angles to goto, calculates the ratio of the differences and then sets the speed of the servos accordingly to complete their desired rotations at the same time.

      In terms of a quadratic bezier curve, the first control point does not lie on the actual curve so the servos should not move the pen to this point. Although the control point will affects how the tangent of the curve changes with position along the curve (or time).

      The only way I could think of doing this would be to break the segment P0_P2 into smaller pieces and calculate the P value for each time based on P0,P1 and P2. Although, how many segments I will divide the segment into seems arbitrary.

      Does this make sense?

      Delete
    4. exactly, and this is what rendering engines do. FYI, I based my code on the following snippet.

      Delete
  5. I see. Thanks for the snippet. This will help me out a lot.

    ReplyDelete
  6. bro,,how many degree of freedom of this robot that you built it?

    ReplyDelete
    Replies
    1. In theory, two. So it is the simplest system you can make.

      Delete
  7. BÜKMATİK Portable Acrylic Letter Bending Device.

    Olympos plotter foil cutter machine.

    bükmatik video : http://www.youtube.com/watch?feature=play­er_detailpage&v=dlSDRDvTODw#t=­116

    plotter video : http://www.youtube.com/watch?feature=player_detailpage&v=yvSVPqhcIuo#t=3

    Turkey wholesale office? :

    http://www.buk-matik.com
    http://www.plot-ter.com

    ReplyDelete
  8. I think the software used is metafile Companion. Am I Correct??

    ReplyDelete
    Replies
    1. Nope, it must be a coincidence. I developed all parts of the software.

      Delete
    2. can you please tell me how the robotic arm reading the image

      Delete
    3. Oh well, it could be a long story. Basically the "images" are vector graphics, i.e. SVG, but not bitmap images. Vector graphics are defined by paths, which are segments of straight lines and Bezier curves. All I did was extracting lines and curves from the vector graphics files.

      Delete
    4. can you tell me how to read the vectors from an image file or which software can be useful to read vectors from the image file and how to find the coordinates of that perticular vector

      Delete
    5. I based my code on http://www.kevlindev.com/dom/path_parser/

      Delete
    6. Thanks for your example code and fast reply

      Delete