Skip to content

09. Machine Design

This week I’m still at home, waiting for a sign from the heavens to move to the lab! :) André will send me all the components I need to build and hopefully operate the machine I chose.

I will do this project mostly by myself, with some help of my local supervisor. Taking that into consideration, I chose a simple machine to build and bring to life: a polargraph.

The polargraph or polar plotter

is a plotter which uses bipolar coordinates to produce vector drawings using a pen suspended from strings connected to two pulleys at the top of the plotting surface. This gives it two degrees of freedom and allows it to scale to fairly large drawings simply by moving the motors further apart and using longer strings.

I will be doing a small machine to draw pictures in an A4 paper (for now). The original project that inspired this build was the polargraph made by Sandy Noble, a programmer, designer and maker. The following picture1 shows one version of those machines

His page is not exactly easy to follow and doesn’t have any tutorial or clear building instructions. So I researched a bit on the internet and found several people that did a build out of his polargraph, such as this XY plotter Drawing Robot Instructable created by MertArduino. The following picture shows the XY plotter at work.

Mine will be similar to this one but without the frame ;)

I also found Ferdi’s (my remote instructor) build of a polargraph but this one uses a different software from the one I’m building. In the end I may mix everything up if something doesn’t work! ;)

Intermission

I took some weeks off the machine building week to work on my final project. When I resumed and tested the machine I realized the software of Sandy Noble wouldn’t work well with the RAMPS 1.4 Shield of the Arduino MEGA. So I went back I adopted what Ferdi had suggested in the first place.

The new polargraph - Makelangelo!

Makelangelo is another polargraph which fortunately is still being updated for all controllers, contrary to the other polargraph. It is mostly used as

an art robot to draw posters and murals.

Parts

Our version of the polargraph is comprised of a few parts:

  • Off the shelf parts

    • Arduino Mega 2560 compatible board. We chose the Mega only because it was available to use.
    • RAMPS 1.4 Shield. The RAMPS shield was available here to use so we took it.
    • 2x Pololu A4988 Stepper Motor Drivers.
    • 2x standard NEMA23 stepper motors (1.8ª, 2.4V, 1.5A, 420mn.m). The two motors will move the gondola through the belt.
    • Servo motor MG90S + generic 3 wire jumper Male-Female extension cables
    • GT2 Pulley with 20 teeth.
    • 5m GT2 Rubber belt. The belt connects the Pulleys attached to the motors with the gondola and also to two weights that add tension to the belt.
    • Generic 12 V Power supply.
    • Marker Pen.
    • Two suction cups with attachment slots.
    • 2 weights. I will need a few hundred grams weight to tension the belt.
    • Small and medium sized plastic cable ties.
  • 3D Printed Parts

    • Gondola. The Gondola will be the central piece of the machine. It holds the pen and is moved by the two motors via the pulley and belt. The pen can be pulled from or to the paper through the servo motor. I used the gongola from https://www.thingiverse.com/thing:575487 which I had to slightly modify to accommodate the servo.
    • 2x Stepper motor mounting brackets. The brackets will be designed to fit into the slot of the two suction cups and attach to the motor with two screws.

Parts design

Suction cup-Motor connector

I designed the part that connects the suction cups to the motors. After several interactions…

…I came up with the final design shown in the following picture.

The parameters I used are shown below. The design is available through a fusion 360 file in the files section.

I exported the file as a .stl and sliced it with Ultimaker Cura. I had to lie the piece down and add supports because otherwise the printed layers would be parallel to the motor weight, exerting a downward strength and ultimately breaking the piece!

The following picture shows the piece attached to the suction cup…

…and the full assembly, with two M3 screws.

Gondola

As mentioned before, the original gondola was taken from https://www.thingiverse.com/thing:575487. However, this version could not be used to attach our servo.

In Fusion 360, I clicked on insert/insert mesh menu…

…and obtained the following object.

From here, I needed to smoothe the top and bottom parts of the disc section of the gondola. To do that, I clicked on one of the triangles of the surface…

…and clicked on delete.

I did the same at the disk bottom.

On this surface, I added a rectangular sketch of 12x6 mm…

…so that I could then extrude a hole through it, where the servo would be placed. I also extruded 3 mm extra thickness at the bottom of the gondola…

…so that I could pierce a screw to fix the servo, as shown in the following two pictures.

The used parameters are shown below.

From here I exported the gondola as a mesh (right click on the gongola component)…

…sliced it in Cura…

…and printed it with Octoprint. The gondola here is already with the servo attached.

Machine assembly

The machine assembly is quite straightforward.

  1. Attach the RAMPS 1.4 board on top of the Arduino Mega board. The following pictures show (top2) both boards, Arduino on top, RAMPS at the bottom. And both board attached (bottom3). To attach just press the RAMPS board down along the arduino female pins. It should be a tight fit.

  2. Attach two A4988 drivers to the RAMPS board into the corresponding X and Y slots. First add three jumpers into the pins enclosed in the blue rectangles of the following picture4. This will instruct the RAMPS driver to configure a microstepping of 1/16 per step. It is the highest value we can achieve for the A4988 drivers. Attach the X and Y A4988 drivers in the slots marked in red in the pictures.

  3. Attach the wires of the two motors to the pins depicted inside the red boxes in the picture. Note that the Y motor must have an inverted connection. Attach the three wire extension jumper cable to the servo three pin connection depicted by the blue box. This must be long enough to reach the suspended gondola. In this case, the black wire is connected to the -, the white cable to the +, and the grey wire to the signal.

  4. Take the gondola and the servo and attach the servo to the gondola as shown in the following two pictures. The servo is put in place with an M2 piercing screw.

  5. Make two small 70 cm rubber belts from the 5 m cable. Use the small cable tie to attach one of the rubber belts to the gondola as shown in the picture. Add two M3 screws on the holes of the pen holder section. These screws will fix the pen in the right position relative to the servo’s “foot”.

  6. Take two similar sized heavy objects (in this case I used 4 AA batteries) and tie them together with a medium sized cable tie. Then take the other end of the rubber cable and tie everything together with a small size cable tie as shown in the picture.

  7. Repeat steps 5. and 6. for the other side. This will be needed to have enough tension on the rubber cable.

  8. Attach the two suction cups at a desired distance. This will be the width of your machine. In this case I attached the cups so that the center of the two motor’s axis would be approximately 400 mm. Connect the motor cables. The left motor connects to the X pins and the right motor connects to the Y pins.

  9. Now gently attach the rubber band to the motor’s pulleys leaving the gondola hanging in the air!

  10. Finally, we need to make the electrical connections. With a convenient electrical cable connect the 12 V transformer to the mains power (red box) and to the RAMPS board (blue boxes). The USB connection to the computer is shown in the white box.

Software

The polargraph operates on a firmware that runs on multiple platforms. This firmware can be downloaded at https://github.com/MarginallyClever/Makelangelo-firmware.

The machine itself is operated with a java based software that can be downloaded at https://github.com/MarginallyClever/Makelangelo-software/releases/tag/7.24.5.

Firmware

The firmware is composed of multiple files. One of the important files here to modify is configure.h. Inside this file we need to change the following lines:

#define MACHINE_STYLE POLARGRAPH  // This line configures our machine as a polargraph
#define MOTHERBOARD BOARD_RAMPS  // This line states that we are going to use RAMPS as our motherboard

We will also leave the MOTOR DETAILS part as default, because its configuration corresponds to our machine, meaning:

#define DEGREES_PER_STEP     (1.8)
#define MICROSTEPS           (16.0)
#define PULLEY_PITCH         (40.0) //this is the GT2 timing belt multiplied by the length of each teeth (2mm)

However I found a bug in the code. From the old days, the polargraph had motors with 400 steps per turn, which corresponds to 0.9 degrees/step. This setting is still active in the file robot_polargraph.h. I just entered this file and changed the following to

// choose one of the following
#define NORMAL_MOTOR_STEPS   200  // 1.8 degrees per step //changed here to 1.8 degrees per step
//#define NORMAL_MOTOR_STEPS   400  // 0.9 degrees per step //commented this line
/// -------------- change here ----------------

That’s it! Hopefully the machine will work normally once the firmware is uploaded. To do it, we just connected to the MEGA board via a USB Cable, verified the code and then uploaded it.

Meanwhile I upgraded my setup and installed it in a bigger window with 1m rubber belts, and with length and width of 500mm. The machine is now much better balanced!

Java controller software

After the firmware is loaded, I opened the java controller software as shown in the picture below.

From here I clicked on connect and then settings, and chose the following options for the machine.

Our model is Makelangelo (custom) and our width and length is 500 mm.

Calibrating the machine

To check if the dimensions are the correct ones I used the manual driving menu, as shown in the picture, and drove the machine 3 times 10 mm right, 2 times 100 mm up, one time 100mm left, and then back to the home position as shown in the following video.

I repeated this process, this time using a pen to mark the positions of the machine, as shown in the following two pictures. As observed, the machine is reasonably calibrated. Let’s try it out!

To make a drawing, I placed the gondola at the home coordinates, and within creative control I chose generate art and then fibonacci spiral pattern of degree 12.

Then I clicked on start in animation control and…nothing! The machine wouldn’t start! After a lot of time tweaking without success, I decided to talk with Ferdi, and I obtained an older software of the polargraph used at Fab Experience 2020. After comparing the firmwares I noticed I was only missing the motor libraries!

After adding the motor libraries TMCStepper and TMC2130Stepper to the firmware directory as separate directories, the machine suddenly awoke :) I checked and there’s nothing stated in the dependencies section of the firmware page…maybe I need to look better.

After adjusting the pen I could make a few drawings as shown in the next two pictures. On both cases, the pen drew when it shouldn’t and didn’t drew when it should at some places. This was due to the pen misplacement relative to the servo “finger” controlling the pen’s distance.

After some tweaking on the position of the rubber bands relative to the window, I could draw a reasonable picture!

The movie of this operation is shown below. Yay!

References

Files


Last update: September 7, 2021