Hacker News new | past | comments | ask | show | jobs | submit login
Building a DIY Pen Plotter (szymonkaliski.com)
139 points by tobr on Oct 4, 2023 | hide | past | favorite | 53 comments



For a history of some of the earliest CAD/CAM and plotters, ref. "A Possible First Use of CAM/CAD" by Norman Sanders, Chapter 4. https://inria.hal.science/hal-01526813/document

The gist of the paper is that computer aided manufacturing was developed FIRST, and computer aided design was an offshoot of that. When they had developed their prototype CAD system, the available pen plotters could not output drawings in a high enough resolution to be used for downstream manufacturing processes.

"In short, at that time computers could master-mind the cutting of metal with great accuracy using three-dimensional milling machines. Ironically, however, they could not draw lines on paper accurately enough for design purposes; they could do the tough job but not the easy one.

However, one day there came a blinding light from heaven. If you can cut in three dimensions, you can certainly scratch in two. Don’t do it on paper; do it on aluminium. It had the simplicity of the paper clip! Why hadn’t we thought of that before? We simply replaced the cutter head of the milling machine with a tiny diamond scribe (a sort of diamond pen) and drew lines on sheets of aluminium. Hey presto! The computer had drawn the world’s first accurate lines. This was done in 1961."


If you want the simplest plotter you can make: https://www.brachiograph.art/en/latest/


The Makelangelo is also charmingly simple: http://www.makelangelo.com/


It has a not-so-charming price tag (490 CAD).


That's really cool. I have a few of those servos laying around waiting for a project :)


this is fab


The only thing that moves more impressively fast than the dancing pens in a high-quality pen plotter, is the human supervisor of said plotter, when some rare physical fault occurs, and the mechanism starts turning your big sheet of expensive paper into a random 3D pretzel at the speed of light.

It very rarely happened! and certainly, most modern equipment would have inbuilt fail-safes, but trust me, when it happened, it wasn't subtle!

One of those trash-style TV shows, based around 'When Plotters Go Bad', would be - as they say - "quite the lol".

Other humorous old-fashioned plotter errors included those times when human error led to half the plot being drawn directly onto the plotter's vacuum bed (e.g. sent Landscape data, while the paper was loaded Portrait). Of little consequence except shame, that one.


Related: Franz Kafka's In the Penal Colony. Probably the ur-example of the plotter-error trope.


More useful is one of his references on how to build a CNC router.[1] This one covers all the usual mistakes one can make building a CNC router. (He skips the real n00b mistake - trying to use a Dremel tool in a CNC router. That never works. Dremel tools slow down or stall under load, and the CNC controller doesn't detect that, so it keeps pushing a stalled tool around.)

[1] https://mattferraro.dev/posts/cnc-router


A few comments for those who want to go down this route: 1) you probably should buy a machine, rather than designing and building one, if your goal is to use the CNC. It will be cheaper and more of your time will be spent CNCing instead of rediscovering the painful lessons learned over the past decades.

2) he says woodworking equipment is only good for wood, but it also works for aluminum

3) ignore all the talk about grbl on arduino due or mega, use FluidNC on ESP32.

4) a dewalt 611 will work better than any spindle that costs less than it, and also many spindles that cost more, if you're working in just wood. This is a controversial opinion, if a spindle makes you happy, go for it.


Yes, don't build your own CNC or plotter (from scratch). OpenBuilds has a good range of options and also a fairly active community of people adapting their platform for custom uses.


To be fair, most hobby CNC tools were opened looped until more tools came out that were BLDC + zero cross detection for speed control. That being said, stalling your tool more or less means you’re just blindly cutting a part. Calculating the correct feed rate is absolutely essential for any router/milling operation.


Instead of open loop calculations, why not just actually measure the current (or motor RPM) and do a feedback loop?


Mixture of motor technology, cost, and application. Take a dremel for instance, adding all these features cost money and most dremel users won’t care for it. Also certain motor technology makes it impossible to control in a meaningful fashion. If you stuck an encoder on a dremel, you’ll still have a lot difficulty maintaining the set RPM.


Simple voltage control for spindle motors and open loop stepping motors for everything else is just precise enough and most cost effective for hobby machines. Closed loop is technologically superior but ultimately not necessary.

(note: "sensorless homing" and sensorless BLDC are different things)


that doesn't give you step-level accuracy.

Some systems do this- for example Prusa MK3 and newer don't have physical endstops, instead they monitor current. And FluidNC supports this but clearly points out you shouldn't use it for step-level accuracy.


The original Dremels had actual speed controls; if the spindle loaded down, the motor power would be increased to restore the speed. Modern ones (at least as of a few years ago) were just constant power, so they indeed slow down as a load is applied.

(Probably still a bad idea...)


A nickel DSP/microcontroller, and a microphone, should easily close that loop.


Nice project! I was gifted a pen plotter [1] a while ago and have enjoyed it so far. I would love to build one that supports larger pieces.

[1] https://shahinrostami.com/articles/my-pen-plotter-setup/


It makes me so happy to read summaries of project like this. Thanks for sharing! I did almost the exact exercise a couple of years ago, except hand soldering the controller board together with an ESP32. It was an Core XY design with timing belts, also completely over-engineered. It suffered from hysteresis from too many plastic 3d printed parts (I only had belts, steppers, linear rails, and ball bearings). Would love to do it again some day, but properly. Definitely going for a pre-built CNC controller board, as that was a pain. P̶e̶r̶h̶a̶p̶s̶ ̶a̶ ̶M̶a̶c̶h̶3̶ ̶o̶r̶ ̶M̶a̶c̶h̶4̶ ̶b̶o̶a̶r̶d̶ Probably just make a PCB version, unless anyone know of a general ESP32 based 3-axis GRBL board with SD card?


FluidNC on a Bart Dring board: https://www.tindie.com/products/33366583/6-pack-universal-cn... I used this with external stepper drivers to power NEMA23 axes.


Thanks. I believe that's more or less the board I soldered together by hand. Or, perhaps a somewhat simpler version. Back then I don't think FluidCNC existed, it was just a grbl build for esp32.

Edit: It was this board https://www.tindie.com/products/33366583/grbl_esp32-cnc-deve... I soldered manually. Same developer though.


Grbl on esp seems to be not really a thing. You can however go the Arduino nano and el-cheapo CNC board + drivers for less than $20 or so. You can usually also plug in an Hc-05/hc-06 Bluetooth module if you want it wireless.

Beware that some of the cheapest CNC boards may have some dodgy wiring on the MS lines https://youtu.be/U839EbPw-A8?si=0SvVgZL0tX3j4P4K

I've just completed a project using these parts https://doug.lon.dev/2023/09/19/astro-camera-mount.html


"Grbl on esp seems to be not really a thing."

Grbl on ESP32 absolutely is a thing. I've been using it to drive my robots for years. https://github.com/bdring/FluidNC


Oh that's interesting, I didn't seem to find that when I was researching my project. Definitely worth a look.


That is one EXTREMELY overbuilt plotter, you love to see it.


For a properly extremely overbuilt plotter, you could do what I've done: tape a pen to a 3D printer. It's a bit like building a back massager by putting a cell phone on vibrate and texting it continuously, but it's also a dang good plotter once you figure out a set of G-Code instructions that don't destroy the pen by accident.

I've been thinking of taking advantage of the ability to raise the pen really high to do something crazy like use a quill and an inkwell, but I use a bed slinger printer, so figuring out an inkwell that doesn't splosh ink around everywhere or floats just over the bed is probably more work than the idea is worth.


I bolted a linear rail to my 3D printer next to the nozzle and clamped a pen to it, so it applies constant pressure (due to gravity) and there's less risk of destroying the pen/paper. The downside is that lifting the pen is very slow, since it's a lead screw Z axis and there are a couple mm of travel in the rail before the pen carriage hits its stop and actually lifts from the paper.

I agree that the instructions were the tricky part - lots of messing around in Inkscape and Python and manually editing GCode.


> figuring out an inkwell that doesn't splosh ink around everywhere or floats just over the bed is probably more work than the idea is worth

What if...

- cut a custom bed out of a piece of plywood or something, letter-shaped so there's a few cm of open space along one side

- position an ink well directly under the Z gantry

- set your Z offset such that the tip of the quill is 0 and set your min-z to -5cm or something

Refilling the quill would then be homing the X axis and dipping the quill down to negative Z.


I have a custom built plotter that paints in watercolor, I don't have a lot of good media depicting it yet, but if you're local to the Bay Area I'll have a booth at Maker Faire showing it off!


That is really, really cool! I'm not but I look forwards to hearing more about it in the future. Really curious about how you move the brush. Pointillism? Filling polygonal regions with lines? Some sort of interesting "imitate real brushwork" algorithm?

Do you do color change by swishing the brush in water? Ooo, does it mix colors? Because that'd be super fun if probably impractical.


I take a bunch of different approaches so the short answer is "Yes" but I'll try get a little more in depth.

I mostly use something akin to a "imitate real brushwork" algorithm, but it's more a "mess with the code until it looks right to me" algorithm.

> Do you do color change by swishing the brush in water?

Sort of, this aspect of definitely has some physical bugs (flooding my work area occasionally) but I am using an automated water pot that works using a pythagorean siphon and is controlled using the coolant flood commands in GRBL (used to cool bits when cutting with a CNC ordinarily)

> Ooo, does it mix colors?

This is what I'm currently working on, but it's very much a non-trivial thing to solve. Luckily you don't have to be precise to make good art, there's a lot of opportunity for happy accidents.

self promo: While I haven't been very good at producing compelling media about my plotter, I do have a patreon where for $7/mo I mail you a postcard-sized plot every month demonstrating whatever thing I'm working on at the moment. https://www.patreon.com/thot_experiment

here are a few examples of last month's plots, these are colored by hand https://thiic.cc/heavy/bb_plot.jpg https://thiic.cc/heavy/crank_plot.jpg https://thiic.cc/heavy/pedal_plot.jpg

and here's a few that are pure robot https://thiic.cc/heavy/abstract_plot.jpg https://thiic.cc/heavy/other_plots.jpg


Really cool! Thanks for sharing.


Here is a simple commercial product (designed by EMS who also makes the axidraw plotter) https://watercolorbot.com/


I'll look for you!


A sponge is the inkwell you want :) micro-baffles


Very over built. A lot of the times you just see two beams that advance their respective axis because there's so little force applied by a pen.


Dad was a polymath. He used pen plotters to map out his VLSI designs in the 1980s and taught VLSI at CIT in Melbourne. I remember as a kid watching the magic as the diagram unfolded on A3 paper. I also remember my grandmother bought a four colour plotter for her home pc (Oric Atmos I think). She put herself through business systems in the 70s at night school, too. Probably enough genes there to get me into software dev :)

(Edit for Atom to Atmos - twas a long time ago)


Hardened CNC frame template.[0]

[0] https://github.com/JMG1/PlasticSliderCNC


What is the final resulting accuracy?


What are the best approaches for turning an image into a plottable vector graphic?


There are a lot of options for this but the two I really like are https://github.com/SonarSonic/DrawingBotV3 and https://mitxela.com/plotterfun/

Also, vpype (https://github.com/abey79/vpype) isn't specifically a tool for vectorizing images, but its incredibly useful for preparing vector files for plotting.



Post about pen plotter without video. Hmm, I feel cheated.

Random video of old school pen plotter in action: https://www.youtube.com/watch?v=3Cd3GsZlOBg

My father still fondly talks about how the crispness of a true pen plot was never really matched by modern printers.

Edit: he has them on a second page: https://szymonkaliski.com/projects/diy-pen-plotter Not as fast as the 1983 version though :)


They make a weird kids STEM toy that's a surprisingly well thought out pen plotter: https://www.youtube.com/watch?v=kSFW5ok3ROc&start=128

The big arms are attached to the egg thing with two magnets, so a kid shoving their hand into the moving parts is very safe; it just falls apart. And you can see the clever arrangement of the three moving parts (axis 1, axis 2, and lift/drop pen).


I have a Watercolorbot[1] which is like the world's most inexact plotter. But it's a lot of fun to watch it pick up paint on the brush and try to paint a gcode version of your design (also funny to see the patterns the slicer algo uses to try and fill blocks of color). Software was always a little fiddly, but still a fun idea.

1: https://watercolorbot.com/


> crispness of a true pen plot was never really matched by modern printers

I don't know about that. Pen plots can, at a push, achieve the equivalent of about 250dpi.

Back in the early 90s, I wrote software for the first inkjet “plotter” (a wide format printer that used HP inkjet cartridges, and rasterized HP-GL commands on the fly). Even back then, we could get 600dpi resolution, and today's printers can do up to 2400 dpi.


The point is generally no matter how high your DPI, if you're drawing a line using a series of points, compared to drawing a line via a vector process, the vector process will almost always look nicer (for some definition of nicer).


My mid-1990s Graphtec plotter has a precision of .01mm, or 2540dpi. I don't have any pens for it fine enough for that to matter though, and have yet to build a generic pen-holder (it grabs the pen with magnets...).


> I don't have any pens for it fine enough for that to matter though

Yes, that is the issue. The finest pen you could likely get would be 0.1mm (and even that would be hard to find and expensive). That is what I based the 250 dpi on.


Wait, even if the line width is broader than the resolution of the printer, wouldn't the placement of the .1mm line be accurate to the printer's resolution?


Yes, but you would not be able to distinguish two parallel lines spaced apart by minimum printer step size.


Yeah… but I think what he misses is that it’s a line drawn by a pen. It has a certain analog appeal to it?

Vinyl is worse in every way to lossless digital. As is an analog film camera. Or a mechanical watch for keeping time. Still though.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: