Bringing the Visible Robot to Life

Getting Started with an Assembled System

The assembled system includes the base mechanical system and the controller (this example used the Arduino Mega 2560 and RAMPS 1.4) completely wired except for power and attachment to the controlling device (a PC in this case).

dsc00780Assembled Visible Robot

Start with an assembled system (reference Visible Robot Assembly Guide).

Power and Communication
Using an ATX, or other suitable power supply, with it turned off, hook-up two 12V wires and two ground wires with a four-wire cable. Each wire should be at least 18AWG. (A color-coding standard in general use is to use yellow wire for the 12VDC and black wire for ground (GND). Not shown here, but red wire is commonly used for +5V). The pinning to the RAMPS 1.4 board is illustrated on the RepRap wiki at

Strip the wires about 1/4” (~6mm) with a wire-stripper and manually twist the stripped ends so that no stray wires appear when you insert the bare wire-ends into the green connector.

Insert the wires and tighten the screws securely. (See photo below). Give the wires a pull-test to ensure they’re securely fastened.

dsc0073612VDC and GND wiring to RAMPS junction

From the PC you’re using as a controller, hook-up a USB Type-A to USB Type-B cable between the PC and the Arduino Mega2560. (The Type-A to Type-B cable is the one that’s typically used to connect to printers).

Both 12VDC/Ground and USB hook-ups to the RAMPS board are from the bottom (as mounted on the gantry of the Visible Robot). The USB Type-B connector is the dark connector in the bottom center of the picture below. The four +12VDC and GND wires are the yellow and black wires, respectively, connecting into the light green junction box at the bottom-right.

dsc05758 USB Type-B connector (bottom left) and power wiring (bottom right)

Get the software used to configure the machine
The software used on the Visible Robot runs on Linux, Mac and Windows operating systems.

Arduino software
If you don’t have the Arduino software, go to and download it for your operating system. According to Repetier, to get SD card support (can be used with Printrboard or Megatronics, but not Arduino Mega2560 with RAMPS used here) you must be running at least Arduino 1.0.

Arduino is documented at Tutorials for it are available at

Repetier Firmware
Now, go to and download the latest Repetier-Firmware for the operating system you use.

Repetier spends a lot of effort developing and maintaining the Repetier-Firmware and RepetierHost. Donations are always appreciated.

Repetier-Firmware comes with a configuration tool, which is handy in that it presents the commonly configured settings in a series that’s easy to follow, hiding much that can be confusing. The configuration tool is done online, writing the Configuration.h file before R-F is downloaded.

Repetier-Firmware is documented at

The following screenshots were taken of the Repetier Firmware V.92.8.

Start Tab: there is an introduction to the software and an option to Upload Old Configuration. If you have a configuration you’d like to use, click the Browse button to locate it and it will be available to the Repetier Configuration Tool.


General Tab: Before the ‘Dimensions’ section, leave the defaults unless there is something particular there you wish to change. Under ‘Dimensions,’ you’ll normally set the X, Y and Z minimum ([x,y,z]_min_pos) limits to ‘0’.


The X Length (x_max_len) of the Visible Robot is 350mm.
The Y Length (y_max_len) of the Visible Robot is 590mm.
The Z Length (z_max_len) of the Visible Robot depends on what end_effector/s you have attached to the machine and whether you are using a top-mounted motor, or a bottom mounted motor to power the ‘Z’ axis. What you want here is the travel along the ‘Z’ axis. So, at the minimum ‘Z’ position (Zmin microswitch closed), measure the distance from the top of the end-effector platform or sleeves, whichever is taller, to the lower sleeves of the ‘X/Z’ carriage.

The Z length I’m using is 100mm (~4”).

Under ‘Z Correction’ accept the defaults. Once you’ve calibrated the bed you can come back and add in the correction.

Mechanics Tab: The Visible Robot uses a 4-start (quadruple helix), ¼”-.250 (lead) leadscrews and an anti-backlash nut on ‘X’ and ‘Y’ axes. The first number (¼”) represents the diameter of the leadscrew. The second number represents its travel for one revolution in inches. This is called its “lead.” One revolution of the motor moves the respective carriage .250” (6.35mm).


The ‘X’ and ‘Y’ stepper motors—whether NEMA17 or NEMA23—are very typically 200 steps per revolution. The RAMPS board can take either A4988 or DRV8825 Pololu stepper drivers. The maximum number of microsteps for the A4988 (jumpers MS1-MS3 on the RAMPS board all inserted) is 16. The max for the DRV8825 is 32. So, assuming the RAMPS board is setup for either 16 or 32 microsteps per step (the MS1, MS2, and MS3 jumpers are all inserted). one revolution of the ‘X’ or ‘Y’ motors results in a travel of 200 * 16 = 3200 steps per revolution, or 200 * 32 = 6400 steps per revolution.

As mentioned above, one revolution of the suggested ‘X’ and ‘Y’ leadscrews is 1/4” (6.35mm).

The formula for finding the resolution (steps per mm) of an axis is: microsteps per revolution divided by the linear distance traveled in one revolution. Or,

3200 / 6.35 = 503.94 steps per mm resolution for both ‘X’ and ‘Y’ motors if all jumpers are inserted and the A4988 Pololu, set to 16 microsteps is used. Or,

6400 / 6.35 = 1007.88 steps per mm resolution for both ‘X’ and ‘Y’ motors if all jumpers are inserted and the DRV2588 Pololu, set to 32 microsteps  is used.

The ‘Z’ stepper motor is also 200 steps/rev and again, is set to either 16 or 32 microsteps. However the ‘Z’ axis leadscrew is ¼”-20 (TPI). As with the ‘X’ and ‘Y’ leadscrew designation, the first number represents the leadscrew’s diameter. However, the second number (the 20) represents the leadscrew’s TPI, or Threads Per Inch. This is a unique source of confusion in the Inch system.

One revolution of a 20 TPI screw is 1/20 TPI = 0.050” (1.27mm). So, the ‘Z’ axis has:

3200 / 1.27 = 2519.69 steps per mm, with 16 microsteps per step (uS/S)
6400 / 1.27 = 5039.37 steps per mm, with 32 (uS/S) resolution for the ‘Z’ motor.

A good, easy-to-read, description of microstepping by Bob Parente is available at

Why use microstepping at all? According to another very good article by Isaac Sever at, there are four reasons:

o Precision is controlled with more accuracy.
o Rotation can be stopped at a specific fraction of a step.
o Transitions are smoother.
o Damp resonance creates fewer oscillations as motor steps (especially at startup and slowdown).

Because of the gantry’s height and expected relatively large masses to be present at the end-effector platform (EEP), I’ve chosen to change the X/Y Jerk movement to 10, vs. the default 20 setting. This slows the transition speed at abrupt changes in X/Y direction, resulting in less stress to the mechanism, less motor noise and less chance of missed steps.

Presuming max and min endstop microswitches are installed on all three axes, add in Xmax, Ymax and Zmax microswitches using the same settings as for Xmin, etc. If the microswitch wiring was done as suggested in the Assembly Guide, the “Endstop configuration” section will have all ENDSTOP_PULLUPS… set to “true”, all ENDSTOP…INVERTING set to “true”, and all …HARDWARE_ENDSTOP… set to “true”.

…software_endstop… setting are not used, and are set to “false”.

For Pause Handling, accept the defaults for Jam Detection and Out of Filament Detection.

Tools Tab: The intent is to provide a robotic base for a workcell. However, to get the base machine working without complicating things, I’ve not checked the “Support …” Laser Cutter and CNC mill checkboxes.

If you (now or later) decide to go ahead and check these boxes, you’ll see in the screenshot below, this—giving you a textbox to dedicate a Laser Enable Pin, and further down on the page (un-shown) Spindle Enable and Direction and also Enable/Disable Wait settings.


If you are planning to use some exotic (for now) filaments requiring high temperatures, such as polycarbonate, you might increase the Max Extruder Temp to 300degC and the Max Defect Temp to 310 or 320degC.

Due to having a large workspace to work with, I’ve increased the Max extrusion length from 160mm to 300mm, assuming that some long extrusion-lengths may be needed for the larger parts that the workspace accommodates.

Heated Bed Support is unchecked, as are all the check boxes at the bottom of the Fused Filament Fabrication section.  (Note: Checking ‘Heated Bed Support’ will cause a “temp sensor defect.” error if the bed isn’t attached before operating the machine).

I’ve used the ‘Remove Additional Extruders’ selection button to remove all extruders. (To reduce the complications of bringing up the base machine. I’ve mounted proxy extruders for testing, but no working extruders are mounted).

After the base machine is running I’ll add in the (working) extruders. The following offsets are used for the three mounted extruders. The values are those determined by the 3-extruder EEP, and the geometries of the extruders themselves. The extruders mounted are MK8s in a direct-drive configuration using NEMA17-40 motors.

Extruder0 offset:    [-29, -5.5, 0]
Extruder1 offset:    [29, -24.5, 0]
Extruder2 offset:    [29, 24.5, 0]

I’ve made a note to check whether the heated bed thermistor is the one used as the default, though I haven’t verified this at this point.

Other than these revised settings on the Tools Tab, the defaults are used.

Features Tab: No changes to the defaults are made.




You may get a warning before leaving the Configuration Tool that no Watchdog was enabled. As there is no heated bed and no extruders attached, this seems a safe omission. As you add these things that are temperature controlled, you may want to return and enable the watchdog.

UI Tab: As with the Features Tab, no changes from defaults are made.



Manual Tab: Nor are there changes to the Manual Tab.


Download Tab: Three options are given for the download and described. Since we’re configuring for the first time, choose the first button: “Download complete firmware incl. these settings.”


Save the downloaded zipped file to a reasonable place somewhere in your home directory. I created a directory called Repetier to put this, and later, the Repetier Host software (“The software controlling your 3D printer”).

Extract (unzip) the downloaded file. The extraction provides all the files and the directory tree needed to flash the EEPROM on the Arduino Mega and create the firmware used as the basis for the Visible Robot.

Flashing the EEPROM:
Start Arduino by clicking on its icon. Use File → Open to open the Repetier.ino file. If, as on my (Linux) machine, the IDE shows “/usr/share/arduino/” in the “Enter path or folder name,” erase that and type in the full pathname—including the Repetier.ino filename—in the “Enter file name” textbox at the bottom of the window.

NOTE: The software reading the “Enter file name:” textbox entry doesn’t seem to understand the Mac/Linux shortcut “~” for your “home” directory. I had to enter the complete directory name..

Clicking “OK” should bring up the Tabs representing the Repetier-Firmware headers (files ending with “.h”) and CPP files—you guessed it, files ending with “.cpp”.

Make a quick inspection of the RAMPS board to ensure that the jumpers that set the stepper motor microstepping boards are plugged in properly.

A good guide for both the Pololu A4988 and the Pololu DRV8825 stepper driver miniboards can be found at

Also check that the stepper drivers are correctly oriented. To know more about both boards, and see both properly oriented checkout
I found the explanation in the “IMPORTANT! “ note in the DRV8822 section a bit confusing, but the photo in “Mixing A4988 and DRV8825 stepper drivers” makes it clear.

For those not taking the link above, the trimpots (trimming potentiometers)—the round silvery adjustments with a phillips-head screw for tweaking—are located positioned towards the top of the RAMPS board (the long pin-header row is at the top) for the A4988, and positioned toward the bottom for the DRV8825 (the USB and 12V connectors are at the bottom). The proper orientation is shown in the photo below:

dsc05761Correct orientation of A4988 and DRV2588 Pololu stepper drivers on RAMPS

Make sure the USB cable is plugged in to both the PC and the Arduino. Having verified these things, turn on the power supply supplying power to the RAMPS board.

NOTE: The ATX power supply (PSU) is a sophisticated, nicely designed, inexpensive (for its capability) and well-standardized power system typically used for powering desktop PCs.

TIP: To get the PSU operating for non-PC use, a jumper that shorts two pins in the 20 or 24-pin connector is used. The jumper is placed between the green wire on pin 14 (PS On) and the black wire (Common or GND) on pin 13.

dsc05787Jumper enabling power from an ATX power supply

Moving back to the Arduino IDE (integrated development environment), verify your Arduino board, its connection, and baud rates are OK.

In the Arduino IDE:
Tools → Board brings up a list, where your controller board is marked with a bullet. If the board you’re using isn’t selected, or is mis-selected, select the proper board.

Tools → Serial Port will show the port connection. On Windows, its a COM port. On Linux, it’s something like /dev/ttyACM0. On a Mac it’s liable to be /dev/ttyUSB0.

With the USB cable plugged into both PC and the Visible Robot, Linux and Mac users can find the available serial port by issuing the following command at a Terminal prompt:

ls -l /dev | grep tty | grep dialout | less

Use the Spacebar to page down through the results.

If you get an error trying to connect, make sure that you’re a member of the ‘dialout’ group. To check this,  type

groups <your_username>

The system will respond with something like this:

<your_username> : <your_groupname> adm dialout cdrom plugdev lpadmin
admin sambashare

If you don’t see ‘dialout’ listed, type ‘

sudo usermod -a -G dialout <your_username>

If ‘sudo’ isn’t allowed on your machine, you’re not being recognized as an administrator. Get the administrator to add you to the dialout group, and/or give you ‘sudo’ ability by adding you to the ‘sudoers’ group.

NOTE: With the Arduino installation comes a nice set of documentation—over 300 articles—residing at /usr/share/arduino/reference/ which you can display in your browser.

The baud rate can be checked—and changed—with Tools → Serial Monitor. If the baud rate in your Configuration.h file doesn’t match that shown by the Serial Monitor, you won’t be able to talk to your Arduino board. A sure fire hint of that is to see whackified text streaming into the Serial Monitor window. To the bottom-right of the window, the baud rate is shown and can be reset to match that of your Configuration.h file.

A “Failure to connect: wrong port” error can sometimes be corrected by removing and re-inserting the USB plug.

An aside: I find it much easier to use my old tried-and-true editor than the Arduino editor. To accomplish this, go to Files → Preferences → and select “Use external editor.”

Setting the Stepper driver trimpots:
All the Pololu stepper drivers I’ve received need to have the voltage at the trimpot turned down (lowered) substantially. A good reference article is found at The article includes settings for both the A4988 and the DRV8825 boards.

IMPORTANT: Setting the stepper motor driver trimpots is key to getting good motor performance. If set too high, you may damage the motor or the driver. If set too low, the motor may skip microsteps.

For some details on the selection of microsteps vs. torque available for the motors referenced, see “Motor Torque Calculations for Microstepping.

For the A4988* board the formula for maximum trip current (I_TripMax) is:

I_TripMax = Vref/(8*Rs)


Vref = I_TripMax * 8 * Rs

NOTE: The sensing resistor, Rs, can come as 0.05 ohm, 0.1 ohm or even 0.2 ohm depending on your part source, so it really pays to know for sure what your board has as a value for Rs. The two sense resistors are located just to the left of the A4988 chip, when the chip is oriented as in the “Correct orientation …” photo above. They are marked “S1” and “S2”. The markings on the devices will be either R050, R100, or R200; translating to .05 ohms, 0.1 ohms, or 0.2 ohms, respectively.

* The A4988 datasheet is at

For the DRV8825** board the formula for maximum trip current is:

I_TripMax = Vref * 2


Vref = I_TripMax / 2

According to the Pololu DRV8825 Stepper Motor Driver Carrier spec, the max current for the DRV8825 chip is 2.5A—with proper heat-sinking—but further limited by the current sense resistor to 2.2A. Due to the fact that the heat-sinking pad is located on the bottom of the board, and as others have noted, the supplied heat-sinks to be mounted on the top of the IC are of limited value in removing heat from the chip, I’ve set the current limit at 1.5A, as recommended at Therefore:

Vref = 1.5A/2 = .75

**The DRV8825 datasheet is at

The motors I’ve used for the ‘X’ and ‘Y’ axes are NEMA23-76 (57BYGH627) steppers from Wantai, They are rated for 3A at 3V and have a holding torque of 270 oz-in (19Kg/cm).  Also used have been NEMA23-56 (23HD4004-25R) and NEMA17-60 (17HS6002-N27B) steppers from RobotDigg. Their ratings are 2.8A at 3.08V and 1.5A at 4.2V, with holding torques of 184 (13Kg/cm) and 92 oz-in (6.5Kg/cm), respectively.

Caution: Depending on the load put on the machine—including friction—when operating, motors with significantly less holding torque than the ones above are not recommended as they may run hot and burn out. This piece of advice comes from experience. With small motors, a simple “finger-tip test” made after the motors have been running at speed and at full load should give you a good indication. If the motor runs too hot to maintain your finger-tip on it for more than a few seconds, it’s too hot.

De-rating the maximum currents to the motors to 70% of max, while keeping the final current to be used equal to or lower than the stepper-driver board’s maximums would seem to give a nice conservative number.

So, for the DRV8825 controlling the ‘X’ and ‘Y’ motors (Wantai NEMA23-76), using the formula above and de-rating it to 70% of the maximum value:  (.7 * 3.0)/2 = 1.05. Hey! But this is over the 0.75 Vref that the board can handle, so set Vref to 0.75 due to the board’s lack of cooling, mentioned above. Of course, you can always add a fan 😉

The DRV8825 controlling an alternative motor (RobotDigg NEMA23-56) Vref (.7 * 2.8)/2 = 0.98) would also be set to 0.75 because of the board’s limits without cooling.

For the A4988 controlling the RobotDigg NEMA17 motor the formula for this part (.7 * 1.5A * 8 * 0.1) yields a Vref of 0.84V.

If we were to use an A4988 to control either of the NEMA23 motors (rated at 3.0A and 2.8A), We’d use the A4988 formula with the de-rating to 70% (Vref = .7 * I_TripMax * 8 * Rs) and get Vref = .7 * 3.0 * 8 * 0.1 = 1.68; or Vref = .7 * 2.8 * 8 * 0.1 = 1.57.

While, the A4988 device is rated at 2.0A with adequate cooling, its rating without either heatsink or active cooling is 1.0A. In this case,

I_TripMax = Vref/(8 * Rs) = 1.68/(8 * 0.1) = 2.1;


I_TripMax = 1.57/(8 * 0.1) = 1.96

These are both higher than an uncooled board can take.

This indicates that, with cooling of the board, the Pololu A4988 can drive a motor with a current rating of up to about 2.8A at its full rated current.

Stepper-driver trimpot setting procedure:
Using a multimeter set to VoltsDC, with the black probe connected to GND—the 2nd pin from the right on the Aux4 (top) RAMPS header is one place you can get a ground connection (connect the Female end of a M/F Dupont-type wire to the pin and alligator clip of the probe to the Male end)—and the red probe to the metal face of potentiometer (pot) itself, measure the voltage (Vref).

With a small Phillips screwdriver, turn the pot clockwise to decrease or counter-clockwise to increase, Vref to the level that provides the proper amount of current for the motor being driven.

Do this for each motor in the system.

Great! Now we need to see the robot move!

RepetierHost and Cura are two widely-used applications that allow you to load a model, slice it into layers for printing, generate the gcode providing the paths to be printed, move the printer along those paths, and control the extruder to appropriately deposit plastic to print your model.

Cura can be found here:

RepetierHost can be found here:

Both can be used with Windows, Mac and Linux platforms.

The RepetierHost Windows and Linux downloads come with an installer. According to the Repetier site, Windows requires Microsoft.NET Framework 4. Linux requires a recent version (3.2 or later) of the mono framework. Linux users should run the ‘’ script. Mac users running Lion, will have to agree to install unsigned code.

Both have excellent documentation available.
For Cura:

For RepetierHost:

This guide will focus on running RepetierHost. The current version of RepetierHost as of this writing is 1.6.1.

Download RepetierHost for your operating system into a place of your choice in your directory structure. I’ve created the directory “Repetier” just beneath my home directory.

If you are using Linux (Ubuntu), you’ll be given an “Extract” window. Click “Extract.” In the RepetierHost directory that’s just been created, there will be a script—an executable file—called “” Double-click on that file to run it—or run it at the command line as:


This will setup RepetierHost to run on your machine. For one-click starting, add the icon to your desktop. Alternatively, you can type the following at a Terminal command line. This starts repetierHost and puts it in the background, so you can use the Terminal session for other things.

repetierHost &

The RepetierHost window should appear.


RepetierHost V1.6.1

From this window you can load a part to be printed, position it on the build plate, slice it (have the gcode that runs the printer compiled for the part), and print the part! NOTE: If you’ve been building along with this set of instructions you won’t have added a 3D-printing extruder yet. That’s OK. You can still use Repetier Host in Dry Run to move the robot about, as if it were printing (or routing) a real part.

NOTE: If you don’t have anything to load, you can go to Pinshape,com or to download something. I’d recommend to start with a couple good calibration parts, so that you can see how well your machine is calibrated and see if there is any tweaking to be done.

To load the part you want to print, click the “Load” icon and navigate to where your STL part file is located.

You’ll then need to slice the part (I use Slic3r). Open the Slic3r tab and click “Configure” to configure the settings for slicing. The defaults are generally good to use, though, as you become more familiar with what works best with certain print geometries, etc., you will likely want to “tune” these. Above the selection textboxes in the configuration window are tooltips to help you decide.

If you have trouble, consult the Repetier (or Cura) documentation for initial setup of the machine.