Loading

Pen Head

by derrickoswald, published

Pen Head by derrickoswald Aug 26, 2012

Description

Stylus mounting head for the Ultimaker, that turns a 3D printer into a single pen plotter.
May also be useful for mounting other lightweight tools.

Recent Comments

view all
It does make sense to use your already assembled XYZ system instead of building a new one when it comes to other things than printing plastics.
I use export to HPGL from Inkscape.and then a custom go program to convert to g code.

package main

import "bufio"

import "flag"

import "fmt"

import "os"

import "strconv"

import "strings"

var scale int

var lift float64

var filename string

func parse(s string) (x float64, y float64) {

r := strings.Split(s, ",")

if 2 == len(r) {

_x, e1 := strconv.ParseInt(r[0], 10, 64)

_y, e2 := strconv.ParseInt(r[1], 10, 64)

if (nil == e1) && (nil == e2) {

x, y = float64(_x), float64(_y)

} else {

x, y = 0.0, 0.0

}

} else {

x, y = 0.0, 0.0

}

return

}

func main() {

// process command line flags

// 40 plotter units = 1mm

flag.IntVar(&scale, "scale", 40, "scale of the plot file in integers per millimeter")

flag.Float64Var(&lift, "lift", 1.0, "amount to increase Z with a pen up command")

flag.StringVar(&filename, "filename", "Guy_Fawkes_mask.hpgl", "file name to convert")

flag.Parse()

fmt.Printf("converting file %s at scale %d units/mm with lift %f mmrn", filename, scale, lift)

pen_up := false

var x, y float64

// open a file

file, err := os.Open(filename)

if nil == err {

defer file.Close()

reader := bufio.NewReader(file)

// issue reset all axes to zero command G92

fmt.Print("G92")

for {

line, eof := reader.ReadString(';')

// if PU increase Z and then rapid move

if line[0:2] == "PU" {

if !pen_up {

fmt.Printf("rnG1 Z%f", lift)

pen_up = true

}

_x, _y := parse(line[2:(len(line) - 1)])

x = _x / float64(scale)

y = _y / float64(scale)

fmt.Printf("rnG0 X%f Y%f", x, y)

} else if line[0:2] == "PD" {

if pen_up {

fmt.Printf("rnG1 Z0")

pen_up = false

}

_x, _y := parse(line[2:(len(line) - 1)])

x = _x / float64(scale)

y = _y / float64(scale)

fmt.Printf("rnG1 X%f Y%f", x, y)

}

if nil != eof {

break

}

}

} else {

panic(err)

}

}
It trumps an inkjet in that it (in principle) can hold other scribing tools besides pens, for example exacto knives, wood burning tools, engraving tools, milling cutters, etc. This weak little attachment would have a tough time holding heavy tools, but I wanted to prove out the workflow before committing more hardware effort.

More from 3D Printer Accessories

view more

Liked By

view all

License

Pen Head by derrickoswald is licensed under the Creative Commons - Attribution license.

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

Print two of the PrintHeadClip parts.
Print one each of the StylusBracket and StylusClamp parts.
Clean out all holes with 3mm drill bit.
Glue pieces of inner tube rubber into clamp angles for better grip.
Assemble with three 3mmx10mm bolts and nuts.
Tighten upper and lower bolts completely, with parts at 90°.
Mount pencil or pen in bracket and tighten center bolt to fix the clamp.
Clip upper and lower print head clips onto the Ultimaker print head threaded rods.
Fun to make, or see it in action. But in what way does it defeat a inktjet desktop printer that can easily hande A4 paper size?
It trumps an inkjet in that it (in principle) can hold other scribing tools besides pens, for example exacto knives, wood burning tools, engraving tools, milling cutters, etc. This weak little attachment would have a tough time holding heavy tools, but I wanted to prove out the workflow before committing more hardware effort.
It does make sense to use your already assembled XYZ system instead of building a new one when it comes to other things than printing plastics.
What software do you use for pen-plotters like this?
I use export to HPGL from Inkscape.and then a custom go program to convert to g code.

package main

import "bufio"

import "flag"

import "fmt"

import "os"

import "strconv"

import "strings"

var scale int

var lift float64

var filename string

func parse(s string) (x float64, y float64) {

r := strings.Split(s, ",")

if 2 == len(r) {

_x, e1 := strconv.ParseInt(r[0], 10, 64)

_y, e2 := strconv.ParseInt(r[1], 10, 64)

if (nil == e1) && (nil == e2) {

x, y = float64(_x), float64(_y)

} else {

x, y = 0.0, 0.0

}

} else {

x, y = 0.0, 0.0

}

return

}

func main() {

// process command line flags

// 40 plotter units = 1mm

flag.IntVar(&scale, "scale", 40, "scale of the plot file in integers per millimeter")

flag.Float64Var(&lift, "lift", 1.0, "amount to increase Z with a pen up command")

flag.StringVar(&filename, "filename", "Guy_Fawkes_mask.hpgl", "file name to convert")

flag.Parse()

fmt.Printf("converting file %s at scale %d units/mm with lift %f mmrn", filename, scale, lift)

pen_up := false

var x, y float64

// open a file

file, err := os.Open(filename)

if nil == err {

defer file.Close()

reader := bufio.NewReader(file)

// issue reset all axes to zero command G92

fmt.Print("G92")

for {

line, eof := reader.ReadString(';')

// if PU increase Z and then rapid move

if line[0:2] == "PU" {

if !pen_up {

fmt.Printf("rnG1 Z%f", lift)

pen_up = true

}

_x, _y := parse(line[2:(len(line) - 1)])

x = _x / float64(scale)

y = _y / float64(scale)

fmt.Printf("rnG0 X%f Y%f", x, y)

} else if line[0:2] == "PD" {

if pen_up {

fmt.Printf("rnG1 Z0")

pen_up = false

}

_x, _y := parse(line[2:(len(line) - 1)])

x = _x / float64(scale)

y = _y / float64(scale)

fmt.Printf("rnG1 X%f Y%f", x, y)

}

if nil != eof {

break

}

}

} else {

panic(err)

}

}
Top