Basic Description

TheArtBot controls a pen in 3 dimensions. It moves the pen in a path that produces a drawing. This path is calculated beforehand by computer analysis of an image.


The pen is always oriented perpendicular to the paper by a flat surface that clamps onto the pen and slides on the paper, called the car. The car's position is controlled by 3 control strings (fishing line) that pull on the car and are opposed by a single elastic wire that provides counter force and therefore tension on the control strings.  Each of these control strings is pulled by a spool on an electric stepper motor. All 3 stepper motors are driven in real time by a PC running TheArtBot custom driver software.  The PC communicates to the motors via a USB Input/Output card (I/O card) whose signals are amplified up to 15 volts via 12 transistors.

There are 2 main programs that are used by TheArtBot:
  1. TheArtBot path generator
  2. TheArtBot driver
Both are custom pieces of software written from scratch specifically for this project. Both use C++ and are designed to run on a PC.
Program Description Input Output
TheArtBot Path Generator Run prior to drawing An image in the .BMP format A .PATH file that defines a path for the pen to travel.  This path is encoded as a list of points to sequentially visit. This is a custom file type defined for TheArtBot; is not the same as any other .PATH file.
TheArtBot Driver Runs in real time by the PC attached to TheArtBot The .PATH file Sequential voltages on 12 binary (on/off) wires controlling the 3 stepper motors (4 wires per motor).  Every ~3 ms all 12 wires will receive a new voltage. The wires are connected directly to the 5-wire stepper motors (after amplification).

In Depth Description

Control Flow:
Path Generator Software
Driver Software
USB I/O Card
12 Amplifying transistors
3 stepper motors
3 Spools
3 control strings
Car with pen
Click for full size
Figure 1: Overview Diagram. Click for high-res.
Electrical Parts
Basic Parts:
Major design decisions:
There are many parts to the machine that need to be optimized to provide the greatest precision with fastest draw time.
Variable Optimum Value Downsides of non-optimum value
Static coefficient of friction (μ) of sliding surface on car Low Strings will build up tension before moving causing a loss of precision
'Height' of A&B motors above paper (in XY plane) High Excessive force will be put on control strings when car is at top of paper causing stretching
Width of A&B motors around paper (in XY plane) High Tension on control strings will be too low when car is at the bottom opposite corner
Spring Coefficient (k) of control strings High My software assumes an infinite spring coefficient which simplifies calculations. It would be possible to calculate the force and therefore stretch of the control strings which would increase accuracy (but not precision).
Elastic Tension Medium/Balanced Control strings will have too little tension causing inaccurate positioning or too much tension causing excessive stretch

First a .PATH file is generated by the Path Generator program. Then it is read by the Driver during the drawing. The .PATH consists of many XY coordinates that the pen must travel to sequentially. It also contains information telling the pen when to lift (to move without leaving a mark) and lower. This .PATH file is unique to TheArtBot and is not the same file format used in any external program.
TheArtBot Driver:
As stated previously this program takes a path and generates the stepper motor wire values during drawing.

high level

low level

Function Name Description
path_generator Goes through .PATH file and sets the goal (goto) coordinate. Once the machine reaches the coordinate, it sets the next goal coordinate. Also when it hits a lift or lower instruction, it executes it.
goto_calc When a goto function is set, the driver records the starting and ending points and follows the path closest to the line between them. Each step, goto_calc is called and finds the next point to go to. Each motor's direction variable is then set. The 3 directions are increase, decrease, or stay the same.
pos_calc For each motor: given the current position and the direction, it sets the new position.
out_calc For each motor: given the position, it will calculate the 4 bit value to assign the wires leading to the motor. Note that this function has variable out_method which allows easy changing between wave drive, full step, and half step.
out It actually assigns each pin its value (high or low) through the I/O card.
TheArtBot Path Generator:
The only part of this project that is currently a trade secret. Check back in the future to see if I release the code.

In order to calculate the correct signals to send to the motors, the driver needs to know the following values of the specific ArtBot it is driving:
  • Length per step of each motor: This is the distance the string will move when the motor turns one step. This is also the theoretical limit of software precision of the specific ArtBot. My value = 1/300 inch
  • Speed of motors when drawing and not drawing: non-drawing speed is faster for greater time efficiency while not sacrificing accuracy when needed
  • Lift height: how high to lift pen above paper
  • Distance between A and B motors
  • Location of C motor in X, Y, and Z
  • Edges of paper in X and Y
These are the only variables needed by the driver software. So, if you were to build an ArtBot of completely new dimensions you would only have to measure these values for correct calibration.

Future Improvements: