2015/11/27

Turning 3D printer into pen plotter

The purpose of this post is to show how to turn the Prusa i3 3D printer into a pen plotter with minimum effort. This modification uses the Z-axis movement to lift the pen up / down instead of using Solenoid or RC Servo Motor because it requires least modification to the existing hardware / software.

Hardware

The wooden extruder comes with 2 long screws for mounting the cooling fan.


















After the cooling fan is mounted, the remaining portion of the screw can be used to mount the pen holder.



















The pen holder is 3D printed then mounted to the extruder.



















Pen holder on extruder.














Since the cooling fan doesn’t need to be running when the printer is used as a plotter, it's a good idea to add a switch to the cooling fan so the fan can be switched off.

That’s all for hardware modifications.

The modified 3D printer/plotter is capable of taking the gcode generated from a black and white image and plot it out on paper, wood, or other material that has a flat surface.

For example,

From this




















To this




















Note, the number of contours forming the A can be adjusted in Cad.py

Software

Below is the software tool chain for converting the black and white image to gcode, checking gcode / simulating plotting, and for feeding the gcode to the modified 3D printer for plotting.

CAM software (converting black and white image to gcode): Cad.py;
- Simulation: CAMotics (OpenSCAM);
- Plotter control: Standard Marlin firmware (no modification required);
- Gcode feeder: Pronterface (no modification required).

Note, Cad.py was written by Neil Gershenfeld of the MIT Center for Bits and Atoms. A big THANK YOU to Neil for the great work.

In order to run Cad.py, the following software need to be installed on your computer first.

- Python 2.6 (note, must be Python 2.6.x);
- Numerical Python (numpy);
- Scientific Library for Pythom (scipy);
- Python Imaging library (PIL).

Once the above softwares are installed, you are ready to use Cad.py which can be downloaded from Sourceforge.


With Cad.py, there is no need to modify marlin firmware or the marlin configuration file. However, the gcode genaretd by Cad.py needs to be modified so that it could be used by Marlin and Pronterface.

Assuming “(Cad.py) Plotting with solenoid or Laser.py” is used, the following modifications need to be made to the gcode.

-  Replace all “M106 S255” and “M106” with “G1 Z2” (pen up);
-  Replace all “M107” to “G1 Z0” (pen down);
-  Repace the below gcodes at the end of the gcode file

G4 P120 (wait 120ms)
G0 X0 Y0 Z15 F3500.00 (go to position for retrieving platform -- increase Z to Z25 or similar if you have trouble avoiding tool)
G4 P300 (wait 300ms)
G0 Z0 F3500.00 (return to start position of current sheet)

G4 P300 (wait 300ms)
M18 (disengage drives)
(End of sheet footer)

M01 (Printing on the next sheet?)
(yes, if dropping the default .1 mm to next sheet; no, if you will print again on same sheet)
G0 Z-0.10 F3500.00 (drop 0.1mm to next sheet)
G1 Z0 (Pen Down so as not to overheat solenoid)

(Paste in further sheets below)
(---------------------------------------------------------------)
(---------------------------------------------------------------)

With the following gcodes.

G91          ; enter relative movement mode
G1 Z10     ; lift Z axis up by 10mm
G90          ; enter absolute movement mode
G28 X0    ; home X axis
G28 Y0    ; home Y axis
M84         ; disable motors

After the modification, the gcode is ready to be fed to Pronterface for plotting.

Here is a time-lapse video of my modified machine plotting the capital A.


Happy plotting.. J

References:

Make Your Bot!

Using cad.py on a Windows PC

How to make circuits on the Modela milling machine (cad.py)

No comments:

Post a Comment