Gondola PlottyBot

Introduction

This is Gondola PlottyBot, a vertical pen plotter you can build.

It’s based on a Raspberry Pi Zero W which means it’s loaded with software to make it easy to use. It also comes  with novel features. It shares a software stack with the Tabletop PlottyBot.

Features

  • Simple control from a web interface, with plot preview, play, pause & stop
  • Works on complex days long plots without missing a step
  • Arbitrary size, it can be deployed on vertical surfaces of various sizes
  • GCode support, or simpler human readable (and kid friendly) Plotter code. Automatic conversion from GCode to Plotter code.
  • Various pen stroke aggregation algorithms & normalization to drawing area.
  • Internet enabled live drawing

Finished Build

Downloads

STL Parts for 3D Printing

Raspberry Pi SD card image

Circuit Diagram (optional: for reference)

SKP Model (optional: for editing)

Build Instructions

Parts to gather

3D Printed

Grab all the STL parts from here. Each part file has a name finishing with the quantity you need print of it.

When all are printed, you’ll have this:

Acquired

Tools to have

  • soldering iron
  • glue gun (or sugru moldable glue)
  • allen wrench set
  • needle nose pliers
  • dupont wire connection kit (possibly optional)
  • voltmeter (preferable)
  • cordless drill (preferable)

Consumables

  • 22AWG wiring of various colors
  • heat shrink tubing

Circuit

Here is a full representation of the final circuit where we’re going to build. We’ll take it step by step, this is only for reference

(click image for full size)

Step by Step

1. Logic Box

Parts

3D printed
– logic_box_x1

Acquired
– PG9 cable gland x2
– PG7 cable gland x1

Install the cable glands on the logic box, 2 PG9s on each side and the PG7 in the back. Tighten with help from the pliers.

2. Voltage Regulator & Powering the Pi

Parts

Acquired
– Raspberry Pi Zero W
– 5V voltage regulator
– black, red & orange electrical wiring
– 12V power connector
– a piece of heat shrink tubing slightly longer than the 5V voltage regulator

The 5V voltage regulator needs to be permanently set to take the 12V from our power supply and convert it into 5V for the Pi. This is done by sectioning one part of the circuit and soldering another.

You can use an exacto knife to section the circuit. Make sure you do several passes at different angles, you want to permanently remove any contact. When you are done, your regulator will look something like this:

Grab 3 wires of each color, cut them to about 10cm and strip their ends. Then solder them onto the voltage regulator as such:

Make sure that the solder crosses from the IN+ port to the EN port. This will make the voltage regulator always ENabled when the plotter is plugged in and receiving 12V.

Attach the power connector to the red and black wire you just soldered. Of course red goes to the + side of the connector, and black to the side.

Let verify that the regulator is turning 12V into 5V. Plug in the 12V power supply into the connector.

Grab a voltmeter and measure between or GND, and the end of the orange wire, you should read 5V.

Disconnect power and elongate the wires on either sides of the connector.

Slide the shrink tubing over it, making sure it covers beyond the regulator on either side, and heat it up until shrunk.

Get another black wire of the length of the regulator plus its wires.

Add it so the side of the power connector.

Grab the Pi and solder the orange wire to pin 2 (5V power), and the black wire to pin 6 (Ground). You can refer to https://pinout.xyz to make sure you are hitting the right pins.

You Pi is ready to be powered from our 12V circuit. But don’t do it just yet, first grab an SD card.

Download the PlottyBot SD Card image. Using the Raspberry Pi Imager, you can write it to your SD card. The steps are as follows.

You can stick your newly imaged SD card in the Pi, and now you can power it on.

And now we wait :). The first boot can take 10 to 15 minutes, that’s right! The image comes pre-loaded with a lot of packages, and they are being installed on a fairly slow computer. You’ll know it finished when you see a new Wifi network show up called PlottyBot. You can connect to this new Wifi network.

Then point your browser to http://plottybot.local (or http://10.0.0.5 if the former doesn’t work). You should see something like this:

Looking good! You can now disconnect your Pi from power.

3. Managing Wires to the Terminals

This plotter can technically be deployed at any size. In reality, going too long a distance will impact electronics and the weights keeping belts straights. At this moment though, you should decide how big a plotter you want, or at least what its maximum size should be. Here’s how the plotter is deployed to try and help you determining wire length.

The “wire length” in the above picture is what we’ll be cutting to. In this case, I went about 2 meters on both sides and looped the extra. This way I can always redeploy the plotter on a larger canvas. Note that the margin is necessary and baked into the software. It is impossible to get accurate motion near the extremities, and so it easier to avoid them and deploy the plotter on a larger area if needs be.

So let’s grab 5 wires of different colors, including a red and a black, and Cut them to your desired “wire length”. It will be messy for the next little bit.

With the drill, we’re going to twist the wires together over their whole length. You can do this by hand, but it is slow and painful. Doing so with a drill is a lot faster but it’s still tricky to do this over 2 meters, having someone else help is nice.

Then make another one just like it with another 5 wires :).

4. Left Motor

parts

Acquired
– stepper motor x1
– stepper motor driver x1
– heat sink x2

Grab a wire bundle you just made, and tidy up the ends. Snip them to equal length.

Spread them out a bit so we know what we’re working with and strip them.

Then solder them on the stepper driver as follows.

Cut and strip the wires coming out of the stepper motor, leaving 15 to 20 cm of length.

Solder them to the driver as follows.

Pass the other end of your wire bundle into the left gland of the logic box.

Isolate the red & black wires from the other 3.

Solder the 3 wires to the Pi, following the colors such that:
– Pi pin 37 (GPIO 26) is connected to the stepper driver’s ENABLE pin
– Pi pin 35 (GPIO 19) is connected to the stepper driver’s STEP pin
– Pi pin 33 (GPIO 13) is connected to the stepper driver’s DIR pin

Grab the red & black from that same bundle and connect them to the power connector’s + & .

Stick the 2 heatsinks on the stepper driver’s chip.

Power on the Pi, hopefully no smoke comes out :). You can stick a little piece of tape on the motor’s shaft if you want, we’re going to test it and it helps visualize motion.

Once you see the PlottyBot wifi, connect to it and point your browser to http://plottybot.local (or http://10.0.0.5). Scroll all the way down to the “Mechanics” section.

You know exactly what you’re doing right?

Then click the “Test Bottom Stepper Motor” button. (Note: at some point I’ll rename this to the Left Stepper Motor that it is, this is a liability of sharing a software stack with a tabletop plotter).

You should see the motor do 1/8 of a turn and back, then 1/4, 1/2 and finally a full turn. If you do not, stop here before going further. Check your that your connections go to the right pins, and are clean. Drop a comment if you’re stuck.

You can disconnect power.

5. Right Motor

parts

Acquired
– stepper motor x1
– stepper motor driver x1
– heat sink x2

This is a repeat of the Left Motor, with
– Pi pin 40 (GPIO 21) connected to the stepper driver’s ENABLE pin
– Pi pin 38 (GPIO 20) connected to the stepper driver’s STEP pin
– Pi pin 36 (GPIO 16) connected to the stepper driver’s DIR pin

Don’t forget to go through the right gland before soldering. And add on red & black so the power connector. When you are done you’ll have both motors connected.

You can test it with the web interface’s “Test Top Stepper Motor” button.

6. Servo Motor

parts

Acquired
– 30AWG flexible wiring
– servo motor
– Dupont connector kit (optional)

You do not need this particular sort of wiring, but you do want light and flexible wiring. We are building the wire connecting the logic box to the gondola. It needs to float and not impact weight distribution so the belts are always straight.

Note: for my plotter, I’m crimping a Dupont connector to the end of the wire so I can easily connect/disconnect servo motors. You do not need to do this you can simply cut, strip and connect wires making sure they are insulated from each other with shrink tubing or electrical tape. Servo motors will die and so I like an easy swap, but the MG90S is very robust and rarely needs it.

Grab 3 wires of different colors and braid them lightly so they stick together some. You want to make sure to have enough length that they can reach the bottom most positions of you maximum drawing size (plus a little slack).

Then connect your wire bundle to the servo motor, with Dupont wires or strip/connecting them.

Run the other end through the remaining logic box gland.

And solder them to the Pi such that:
– Pi pin 9 (Ground) is connected to the servo’s brown wire
– Pi pin 4 (5V Power) is connected to the servo’s orange wire
– Pi pin 16 (GPIO 23) is connected to the servo’s yellow wire

Power on the circuit, go to the mechanics section and try the “Pen Up” and “Pen Down” buttons.

Now is a good time to attach the little arm to the servo motor, and to align it with the Pen Up and Pen Down positions.

7. Fitting In the Logic Box

Ok! We are done with the electronics, let’s fit, attach, and tidy everything.

Carefully fit the power connector and the Pi in the logic box. Make sure to not put too much stress on the wire connections. When things are in place, you can tack them with the glue gun. Don’t put too much glue everywhere, just a few tacks to keep things from moving.

8. Motor Mounts

Parts

3D Printed
– motor_holder_x2

Acquired
– M3x8 bolt x8
– washer x8
– zip ties

Fasten the stepper motors to their mounts with the bolts & washers.

Tack glue the stepper motor drivers in their holders, and zip tie wires tightly so that pulling on wires will not result in stress on the connectors.

Snip the zip tie extras.

9. Gondola

Parts

3D printed
– gondola_x1

Acquired
– M4x20 thumb screw bolt x1
– M4 hex nut x1

Pressure fit the M4 nut into the hex shaped hole inside the pen holder.

Then screw in the M4 thumb screw bolt.

Grab the servo motor and fit in right bellow the pen holder. You shouldn’t have to use any force to get it there, but it is a tight fit that will require some moving around until it goes in. The servo motor comes with 2 little pointy screws that you can use to keep it in place on the gondola.

To be thorough, you can power the circuit and test the pen up and down functions again. The whole gondola should be flush against the table in the pen down position, and pushed away from the table in the pen up position. There’s a good chance you’ll need to re-adjust the servo’s arm to optimize the up & down positions.

10. Stepper Motor Pulleys

Parts

Acquired
– gt2 pulley x2

Grab each pulley, and take note of the 2 hex nuts they each have. You want one of the hex nuts to not obstruct the shaft hole at all, and the other to slightly come out. Adjust them until it looks something like this:

This is because the motor shafts have a flat side, and we and this nut sticking out a bit to line up with it.

Install the pulleys so that they are flush with the end of the shaft, the belt needs to be as close to the drawing surface as possible, watch their orientation.

11. Logic Box Cover

Parts

3D printed
– logic_box_cover_x1

Simply tack glue it to the logic box with 4 drops of glue in each corner where a small protrusion is ready to receive the glue.

And voila! Your gondola Plotter is ready to go!

Deployment & Calibration

Your plotter is meant to be screw onto a standard 2×4, this way it can be moved and deployed as a unit. If there are no 2x4s in your country, get in touch and we can tweak the model so the mounts fit something else.

At home I have a 2×4 on a wall with some paper and dimensions pre-marked. But all you need is a vertical surface and the 2×4 attached to it.

Screw your plotter mounts into the 2×4, make it so they don’t move, but don’t put too much pressure on the 3D printed plastic or it’ll break.

Grab the GT2 belt and 3D printed belt_looper_x6. Cut 2 lengths of belt, you want each length to be as long as the diagonal of your drawing area plus some slack.

Loop then around each stepper motor pulley.

Grab a couple of belt loopers, slide them on each belt, loop the belt on the gondola and slide the looper back so it keep the belt in place.

Then using heavy disposable objects and some imagination, create 3 weights to keep the belts straight. Here I’m using some old batteries and some heavy metal nuts. Hang 2 on the other ends of both belts, and one the gondola.

You will most likely have to adjust this, there is no single way to weight these down. Depending on the size of your plotter, the surface friction and weight distribution. Ultimately you want the best to be straight, and the gondola flush against the wall on Pen Down. The rest is adjustable to achieve that in your particular setup.

Before you power on the plotter, you need to adjust the belt lengths such that the gondola center (where the pen comes out) is positioned exactly at the center of your drawing surface. Every time you power on your plotter, it assumes it is placed in the center. If it isn’t, nothing will work right. If X is the distance between the shafts of both stepper motors, the center is at X/2 of the edges of the square that is the drawing surface.

I find it useful to make a small indelible mark there so I don’t need to re-measure the center every time. I very carefully measure it once, make a mark, and then I can simply place the pen head at the mark.

Ok let’s power on the plotter. And for it to be able to draw, it needs to be calibrated. The only thing it needs to know for this is the exact distance between the centers of the stepper motors. If you move your plotter still attached to its 2×4, the distance is the same, it will remember it. If you re-deploy it and change that distance though, make sure you re-measure it and punch in the new one when calibrating.

To reiterate, there are 2 things that matter for the plotter to draw accurately:

  1. that the gondola’s pen tip be placed exactly at the center of the drawing surface
  2. that the distance between the centers of each motors be accurately measured and entered in for calibration

It is a bit tricky to set everything up and measure accurately at first, but overtime it become quick.