DrawBot – Another Successful(ish) Drawing!, and an Update

A summer rose from our garden, drawn by a freakin’ narcoleptic robot

A summer rose from our garden, drawn by a freakin’ narcoleptic robot

The drawings are getting better with a little tinkering.  I’ve designed, printed, and installed new motor spools.  These have a thicker central core, so they should be able to collect more monofilament line with slightly less distortion.  I’ve made a few changes to the setup.  Dialing in the starting area and calibrating the starting home point were pretty important.

I’m still having a little trouble with the robot occasionally stalling out.  Although, now I think it is a symptom of the controller software rather than a problem with the Arduino.  There’s no set time after printing, no set time after running the program, or other noticeable precipitating event which seems to cause this problem.  At some point during a drawing, the controller software just reports the Arduino as being busy. 1  Here’s what I do to correct the problem:

  1. Disconnect the USB cable from the laptop
  2. Click “Queue->Export Queue” and save as a text document
  3. Open the text document and perform the following operation
    1. Select, copy, paste the first line above the first line – so now you see a duplicate.  So, for instance in the image above I had to copy “C05,2700,2370,10,247,END” and paste this above the same line – so that it would look like the robot would be receiving the same command twice.
    2. Edit the line “C05,2700,2370,10,247,END” so that I change the command to start with “C09” and delete the last two numbers and the “END” statement, so that it now looks like, “C09,2700,2370,END”
    3. Save the text document with these changes
  4. Shut down/close the controller software
  5. Restart the controller software
  6. Reconnect the USB cable to the laptop
  7. Click “Setup->Serial Port…” and click on the serial port of choice
  8. Click “Queue->Import Queue” and choose the text document I just edited
  9. Start the queue again!

The reason I suspect this is a controller software and not an Arduino firmware issue is that I don’t have to reset the Arduino at any point – just disconnect the USB, restart the controller software, reconnect the USB, and start the queue again.  I would think that if there were a problem with the Arduino firmware, I would need to reset the board itself.

The lowest you can specify as the “grid size”2 in the Polargraph controller software is “20,” but you can use a smaller value by editing the “polargraph.properties.txt” file.  In the image above I used a grid size of “10” which appears to cover 1/4 the area of the size 20 pixel.  That image probably took about five hours to draw.  I think it looks really nice.  The image above seems to have been distorted by my scanner.  It came out almost perfectly square with a slight warp to the top right corner. 3  You can see some bare spots in the image above – that’s where the pen, for whatever reason, just wasn’t making a mark on the paper.  I suspect it has something to do with that region of the paper being either slightly smoother and/or slightly more depressed than the surrounding regions.  Otherwise, there would be no reason why the next row would have a similar defect nearby.

I’ve noticed the controller software also tends to forget the machine width, page size, and page position.  I’ve updated this, saved it, and uploaded it to the Arduino several times, but it doesn’t seem to stick past a reboot of the software.  Ultimately, these are very minor concerns and really just something to be aware of when I’m printing.  I just about couldn’t be happier with the controlling software.  That piece of software plus the Arduino sketch together have basically made this a nearly effortless project.  Besides a hiccup soldering a circuit board wrong, this entire project went together very quickly and yielded almost immediately gratifying results.

I’ve done several drawings in the last few days.  I’m still having trouble getting a perfectly rectangular and centered result.  I may have to adjust the Y offsets and double-check my machine measurements.  I still also notice a slight upwards warp to a drawing in the top right corner.  But, I’m looking forward to additional experimentation – it’s all part of the adventure!

Last, but certainly not least, I want to make it clear that Sandy Noble’s software for the Polargraph/drawbot is really really great.  That I am having some minor calibration troubles speaks more to my incompetence than Sandy’s excellent program.  So, a great big thank-you to Sandy for his continued hard work on this software!

Default Series Title
  1. Aren’t we all, Arduino?  Aren’t we all? []
  2. What is essentially the pixel size []
  3. This one was commissioned at the request of my daughter and now hangs in her room. []

DrawBot – Onwards and Upwards!

A few thoughts about operating a DrawBot, in semi-organized fashion:

  • Vertical Surface Drawing.  There is an interesting tension in the design of a vertical line-driven drawing robot.  As the drawing surface orientation approaches horizontal, the easier time the robot will have using a standard pen to draw, the more difficult it will be to control the drawing component via a line system, the  greater the weight that would be required,1 a greater weight puts a greater stress on the line and the motor and has some effect on the responsiveness of the drawing component, and the more the weights on the drawing component would be in contact with the drawing surface – possibly causing smudges.  The closer the surface is to vertical, the easier it will be to actually operate as a line-driven robot, the less weight required,2 but the more difficult it would be to have a pressure from the drawing component on the drawing surface.
  • Robot Portability.  Right now my robot is quite portable – and, of course, there are costs and benefits associated with this.  Right now I’m limited to the “size” of my robot at 2’x4′ since that’s the size of the piece of plywood I bought and on which the motors are mounted.  However, it is very easy to just move the robot by putting the plywood in a different location in the house.
  • Robot Location.  This is, in some senses, the flip side to robot portability.  I’d love to put the ‘bot up on the wall and draw something really really huge.  I don’t see that happening until I’m more comfortable running the robot, have found a better pen/paper combination, and – perhaps most importantly – figured out how to run the robot wirelessly or off an SD card.
  • Drawing To-Do’s:  Ideally, I’d like to put the robot to work drawing something on an epic scale.  A high resolution photograph of earth, moon, or pretty much anything from NASA.  Perhaps a map of middle earth, the 100 acre woods, or the Princess Bride story?  A photograph of the world at night, with highlights of the world’s electricity consumption.  Or, some of the INSANELY awesome super sweet posters from various XKCD comics.
Default Series Title
  1. This my theory, anyhow.  My reasoning is that as the surface approaches horizontal, the more weight you’d need to pull at the drawing component because more of the force of the weight would be absorbed directly by the drawing surface itself – along with some friction as it passes over the surface as well. []
  2. See reasoning regarding weight above. []

DrawBot – Pen Selection, Part II

I believe my next challenge, aside from better DrawBot calibration, is to find a good pen and paper combination.

This afternoon after I got back from a meeting, but before I went back to the office, I stopped off at an office supply store.  The local craft/hobby store near work didn’t have any really big rolls of butcher/craft paper – which was very disappointing.  Luckily, the office supply store had a slightly larger roll of white paper. 1

I really went there to check out the pens.  And, there were a LOT of these pens.  An entire side of one large aisle was devoted to pens.  However, since this was an office supply store, you could only buy these pens in office supply quantities for office supply amounts.  I was not about to drop $20.00 for a five pack of multi-colored pens only to find out that that style of pen just doesn’t work in a near-horizontal drawing robot kung fu grip.  I even checked out the pen refills, which were more reasonable – but the selection wasn’t there.

One thing I did while I was there was write down the name of every brand name pen manufacturer I saw.  Here’s the list I came up with:

  • BIC
  • Cross
  • Montblanc
  • Paper Mate
  • Parker Quink
  • Penatia
  • Pentel
  • Pigma
  • Pilot
  • Sharpie
  • Uni ball
  • Waterman

While I understand Montblanc and Waterman pens to be on the expensive side, I would gladly pay for a pen that “just worked.”  I would point out that the Pigma was no where to be seen at the office supply store.  This is a really nice quality art pen and I’m actually surprised I didn’t see any of them when I was at the craft/hobby story yesterday.

One other side note… while at that craft/hobby store I noticed fountain pens.  I’ve never tried to write with one, but I did wonder how effective they would be in a nearly horizontal orientation.  It could result in some very cool drawing effects.

But, for now I think I’ll focus on robot calibration for the moment while I ponder this move.  In the meantime, if you’ve got a pen suggestion, please let me know!

Default Series Title
  1. For slightly cheaper than the craft store too! []

DrawBot – Drawing Success(ish)!!!

Starry Night by Van Gogh, drawn by a freakin’ narcoleptic robot

Starry Night by Van Gogh, drawn by a freakin’ narcoleptic robot

I think that turned out rather well!!!  If you look closely at the area circled in red in the next picture, you’ll see where there is a discontinuity in the line.  You may have to look at the large version to really see where this happens.

Starry Night by Van Gogh, drawn by a freakin’ narcoleptic robot, with the error circled

Starry Night by Van Gogh, drawn by a freakin’ narcoleptic robot, with the error circled

I suspect that my attempt to fix the stalled drawing probably did not have a role to play in the robot drawing off the top edge of the paper.  I think that is my fault for badly centering the paper on the robot.  Let’s see it again, without the red circle, with the original image overlaid.

Starry Night by Van Gogh, drawn by a freakin’ robot with narcolepsy, overlaid the subject image

Starry Night by Van Gogh, drawn by a freakin’ robot with narcolepsy, overlaid the subject image

There is clearly some calibration and whatnot to be done, but I’m still amazingly pleased with the results.  As much as I’ve blogged about drawing robots, the entire process from assembling parts ordered online to having a machine that actually draws stuff has been amazingly painless.  Based on the image above, it looks like I need to:

  • Adjust the aspect ratio, so that the image isn’t made too wide by the drawing process.  I suspect this has something to do with the “Setup->Machine Width” setting.  That was the setting that caused the drawing to be unnaturally narrow.
  • Adjust the amount of line that is unspooled in the center of the drawing.  I suspect this has something to do with the “Setup->MM per Rev” setting.  I have nothing upon which to base this suspicion except that my feeling is the robot is spooling out too little line.  I suspect that if I tell it that the spool is slightly smaller (closer to 47 than the 50 I’m using now) I would end up with a better result.
Default Series Title

DrawBot – How to Recover from a Stalled Print!

I should really have entitled this post “How to mostly recover from a stalled print.”  Several times now I’ve had a problem with the DrawBot stalling out and stopping a print.  When this has happened, hours can pass and the little ‘bot will do nothing at all.

Such as last night.  It was probably 80% done drawing Starry Night when it … just… stopped.

Here’s what I saw and here’s how I (mostly) fixed it:

  • The Symptoms
    • No DrawBot movement1
    • No scrolling of the command queue
    • The ‘bot status read “BUSY [insert normal seeming string command I didn’t write down]”2
    • The motors were quite warm
    • And the poor little Motor Shield was warm as well3
  • The Fix45
    •  I figured that, for whatever reason, the little ‘bot just seized up – but that perhaps if I could get it to respond to commands I might set it back on track.
    • The control software was responsive enough that I could “Queue->Export Queue“, which I did.
    • The problem with trying to reset the board or the control software and just feeding it the remaining part of the queue is that it wouldn’t remember where it was.  So, I figured if I could convince it that it was already where it was supposed to be, it might just continue on as if everything were okay.
    • I had seen from prior command queues that the code, “C09,NUMBER1,NUMBER2,END” appeared to be the way the machine would apply “Input->Set Pen Position.”
    • I then looked at the code that I had exported from the queue.  The first item was:
      • C05,3103,4350,29,133,END
    • So, I edited the text file so that it read as follows:
      • c09,3103,4350,END
      • C05,3103,4350,29,133,END
      • …the rest of the command queue
    • Which I believed essentially tell the ‘bot that it was where it was supposed to be and to continue on as if everything was normal.
    • I then disconnected the USB cable
    • Closed the control software
    • Restarted the control software
    • Reconnected the USB cable
    • Reestablished contact with the ‘bot, “Setup->Serial Port” and selected the port of choice for my laptop
    • Clicked the queue to start it up again…
    • It seems to have worked – but may possibly have shifted up one pixel.  This is why I say this was mostly a recovery.  I suspect that if I should have moved the pen down a little and see if I could get it to draw the next pixel in line.

I’ll scan and post this drawing as well and will point out the spot where I tried this little fix.

Default Series Title
  1. Doctor, she’s been acting listless… []
  2. … and unresponsive… []
  3. …and has a fever!  What should I do?! []
  4. VERY nearly almost called this the Cure and linked to a YouTube video.  It’s really just too damn early in the morning for me to write such a thing or you to read such a thing.  As much as I like the Cure, they’re not morning music, you know? []
  5. Like the Smiths []

DrawBot – Pen Selection

I just tried several pens.  Here’s what I’ve found:

  • “Fine point” Sharpie, black.  This is the kind you typically use.  It makes a huge, stinky, black line that leaks all over.  Not recommended.
  • “Ultra fine point” Sharpie, black.  This also leaked right through the paper, made a super thick line, and made such a mess I stopped the drawing.  Not recommended.
  • Pilot Precise Roling Ball V7, Fine, red.  I really like this style of pen for writing.  These gel pens feed ink easily, the ball point rarely gets messed up, and it’s just all-around easy to use.  Unfortunately, as you can see from some of the drawings, it didn’t like drawing at a nearly horizontal angle.  Even though I can see through the side that the pen has sufficient ink and that it is reaching the pen tip, it just wasn’t working very well.
  • Piolot G-2 10, black.  While excellent for writing, this pen was miserable for use in a DrawBot.
  • Uni-ball Deluxe Micro, blue.  So far, this pen is AWESOME.  It seems to write amazingly well on a nearly horizontal surface, no bleeding, and it draws a very fine line of blue.  I fully intend to buy several different colors of this pen.  I believe it comes in all kinds of colors – black, blue, green, and red.  If the drawing I’m having the robot work on now turns out, you’ll get to see just how awesome this pen really is.

As an FYI, Sandy recommends:

Very smooth paper (like Bristol board) with hard-tipped fineliner pens.  In the UK he uses ZIG Millennium pens.  He suggests that Pigma MICRON pens may be a good choice for those in the states.  I’ve used Pigma Micron pens for years and really like them for pen-and-ink drawing.  They’re great on regular photocopy paper as well as serious art paper.  I would have tried a Pigma pen, but I couldn’t find any around the house.  I know I’ve got a stack of them – I just can’t find ’em.  If and when I do, I’ll update this post.

Default Series Title

DrawBot – Calibration

Polargraph Calibration by Sandy Noble

Polargraph Calibration by Sandy Noble

Calibrating my DrawBot was apparently important to its operation.  Who knew?!  If you’re following along at home, you’ll definitely want to check out Sandy Noble’s instructible on Polargraph calibration.  I’ll put my settings here, but they probably won’t be that helpful to you unless you’re using the same exact equipment and hardware as I am.

  • Setup->MM per Rev = 50
    • Based on the actual spool center diameter, this should be 47.  But, with some line wound onto the spool, it should be more like 54.  So, of course, I chose something that was neither.
  • Setup->Steps Per Rev = 400
  • Setup->Machine Width = 844
    • Although the “Machine Width” is defined by Sandy as “The distance between the two closest points on the sprockets,” I used a different figure.1  Since my machine uses spools, rather than sprockets, and the spools are unwound on the far side of the spool, I measured from the far edge of the spool’s core the the other far edge of the other spool’s core.  I figure this is probably the best measurement of the width of the line available to the machine.
  • Setup->Machine Height = 848
    • This is a relatively arbitrary specification given that my spools have about four times as much filament than I could use in my current configuration.  I intended this to be 844, but must have typed it in wrong.  :)
  • Setup->Page Width = 216
    • Rounded up from 215.9, which is 8.5 inches converted to millimeters.
  • Setup->Page Height = 279
    • Rounded from 279.4, which is 11 inches converted to millimeters.
  • Setup->Pen Tip Size = 0.12
    • With my 2’x4’x0.5″ board covered in butcher paper, I’ve marked out on the paper the locations of the various important lines for my machine.
Default Series Title
  1. Heaven forbid I do something normal, right? []

DrawBot – Why are you crying?

Starry Night by Van Gogh, drawn by a freakin’ robot with ADD

Starry Night by Van Gogh, drawn by a freakin’ robot with ADD

After about half an hour I noticed my drawing robot was not making the low scritchy scratchy humming drawing noise.  I’ve started the drawing again…  It looked like it should have been working, the controller software indicated it was still connected, the command queue was still loaded, the Arduino + Motor Shield were still lit up, but it just wasn’t moving.

In retrospect, I should just have hit the reset button on the Arduino.  I think that would have made it pick up with the last command.  But, then I wouldn’t have the lovely picture above to show you!

Actually, I’m really really happy with the drawing quality.  Check out what it looks like when overlaid the subject image:

Starry Night by Van Gogh, drawn by a freakin’ robot with ADD, overlaid the subject image

Starry Night by Van Gogh, drawn by a freakin’ robot with ADD, overlaid the subject image

Default Series Title

DrawBot – Printing, Part II

After actually calibrating my machine, the results are MUCH better.  I still need to adjust the settings a little, but otherwise I’m very very happy with this result.  As you can see, the drawing is flipped.  Once flipped back, I think it is reasonably apparent this is Van Gogh’s Starry Night.  Here are a few things I’m going to try:

  • The pen I was using seemed to stop working in certain regions of the drawing.  I bought a few new pens on my lunch break today.  Both are art marker pens – one blue and one red.  Unfortunately, both are too wide to fit in my current gondola.  For now I’ll use a thin sharpie.
  • There is a slight curvature on the top and bottom of the drawing.  This is probably due to a miscalculation in the mm per rotation.  The downside to using a spool, rather than a sprocket/ball chain or gear/toothed belt, is that as the spool contains more cord, the diameter of the spool actually grows larger.  This means that when there’s a lot of line on the spool each rotation releases more line and when there’s very little line left on the spool, each rotate releases less line.  However, given the diminished space requirements, I don’t think this is going to be such a big deal.
  • I mostly measured the machine width.  Basically what that means is that I did measure it, but then got distracted, then used what I recalled the width to be inches to calculate the width in mm.  Clearly, there is room for increased precision.
  • For weights I’m using a bunch of spent batteries in a ziplock baggie tied with a wire to the gondola.  Too many batteries were causing the line to be too jagged.
Default Series Title

DrawBot – Printing!

I’ve actually printed something using my DrawBot!!!  Would you like to see it?!

DrawBot test print #4

DrawBot test print #4

As you can see, this is a print of Van Gogh’s Starry Night.  It has a few problems.  First, the pen was non-ideal.  This will take some experimentation.  Second, the image, as anyone can tell you, is mirrored.  Third, the image was supposed to be much larger – almost as wide as the entire A4 page I’ve scanned in above.  I fiddled with some settings last night, but didn’t accomplish much.  I’ll try again tonight.

However!  I’m really very encouraged!  It actually drew something that roughly corresponds to the thing I’ve asked it to draw!  I’m looking forward to playing with the settings.  The robot is fairly quiet – it’s propped against a wall about seven feet from where I’m sitting and the sound of operation is barely noticeable above the television.

Default Series Title