Jump to content
cubeberg

Build thread - 3 Axis pen plotter

Recommended Posts

I ran across this Instructable the other day on how to make a tiny laser engraver from a couple of CD-Roms.  I figured my wife wouldn't be too keen on lasers, and the glasses I would need are expensive - so I decided to start with a Pen Plotter.  Maybe I'll work my way up to a laser :smile:

 

I'm using TI's DRV8834 low-voltage stepper driver - the same one used by a TI employee in their internal boosterpack challenge.  For now, I'm using a small breakout board, based on the boosterpack design.  Using the chip honestly couldn't be easier thankfully.

post-1690-0-73353900-1371661470_thumb.jpg

 

Right now - I've got two stages built and I'm working on the third.  

post-1690-0-81384700-1371661476_thumb.jpg

 

Running some test patterns - using some "Poster Putty" in place of the unfinished Z-axis.

post-1690-0-80865900-1371661481_thumb.jpg

 

I'm using an old PC power supply for the 5v needed for the steppers - works great, although it's almost as large as the project itself :smile:

 

For now - the code is pretty rudimentary - but it's a good start.  Current X/Y/Z coordinates are recorded, and it supports moving to any X/Y coordinate - although it doesn't calculate a perfect line between the points.  

The Z axis is handled first since it's simply used for starting/stopping a line - no purpose in moving the Z axis at the same time as X/Y.  From there - X/Y are incremented/decremented by 1 until it hits the desired value.  So moving from 0,0 to 15,30 would result in a 45 degree line from 0,0 to 15,15, and a straight line from 15,15 to 15,30.  

 

I'm fighting with some issues with the platform being level - the pen isn't exactly forgiving - a variation of a single MM is enough to stop a line.  I might work in some Z-axis compensation, but hopefully I won't have to.  I've also run into some situations where the steppers skip - I think that might be a lubrication issue.  Hopefully it isn't an issue with the pen dragging on the paper.

 

Since I've got a decent base with the X/Y coordinates - I'm hoping to apply some of the calculations found in LCD libraries for drawing lines and curves - should be pretty simple to apply the same logic.

Share this post


Link to post
Share on other sites

 

 

Since I've got a decent base with the X/Y coordinates - I'm hoping to apply some of the calculations found in LCD libraries for drawing lines and curves - should be pretty simple to apply the same logic.

 

The basic algorithm is called Bresenham's algorithm. 

 

To draw a circle, it uses only one octant and the rest is draw thanks to symmetries.

 

So you may need to make some changes to the algorithm.

Share this post


Link to post
Share on other sites

Nice start, I'm working on something similar using repurposed scanners.

 

Since your Z axis is more like an on/off thing, maybe you could add a small spring to allow the pen to go up/down on bumps whithout having to compensate on Z.

 

Are you using floppy drives? If so the steppers should take 12V and have more torque (double check first :-)

Share this post


Link to post
Share on other sites

The basic algorithm is called Bresenham's algorithm. 

 

To draw a circle, it uses only one octant and the rest is draw thanks to symmetries.

 

So you may need to make some changes to the algorithm.

Thanks - I know I'd run across that on my earlier research - I booked the midpoint circle algorithm.  I'll definitely have to modify the approach since I will want to create a smooth circle, not hop around.

 

 

Nice start, I'm working on something similar using repurposed scanners.

 

Since your Z axis is more like an on/off thing, maybe you could add a small spring to allow the pen to go up/down on bumps whithout having to compensate on Z.

Yeah - that's something I was considering - it has to be something that won't allow the pen to give at all in the x or y directions.  I'll have to do some searching to see if someone has come up with a solution.  Found a good forum thread here: http://www.shapeoko.com/forum/viewtopic.php?f=24&t=330

Share this post


Link to post
Share on other sites

That guy has a nice design, but your cdrom steppers may be too weak that pen holder seems heavy.

Yeah - I was wondering about that - I'm actually planning on using a floppy stepper for the Z-axis which is even smaller.  I'll have to come up with something very light weight.

Share this post


Link to post
Share on other sites

Ran some circle algorithms last night.  Ran into some problems with the midpoint circle algorithm - it isn't really designed for consecutive points and there's not enough memory on the device to store 4,000 points.  Once I have a working Z-axis - it won't really be an issue though.

 

I was able to get the gcodetools plugin for inkscape working.  I started with a few complex shapes, added points and had it convert everything to straight lines.  That means that the device won't have to do anything except draw lines (although I need to add linear interpolation).  Next task is to write something that will transmit it to the device.

post-1690-0-74995900-1371825605_thumb.jpg

Share this post


Link to post
Share on other sites

Ok - got the Z-axis working :smile:  I'll try to take a video if it working tonight.  Here are some test prints:

post-1690-0-48275800-1372165656_thumb.jpg

 

Right now, I've got a G-code interpreter capable of reading X,Y and Z coordinates for lines (G01) and fast move (G00).  Objects are placed on an 8000mm canvas in inkscape (I've got 250 full steps of range = 8000 1/32 steps).  On the TODO list is interpolation.  I'm using the Add Nodes and Flatten Bezier functions in Inkscape to avoid needing to calculate curves.  Works beautifully so far.  I'm using GCodeTools to generate the GCode from inkscape.

 

Here is the G-code that I used to generate the 43oh logo

43oh_0002.txt

And the corresponding inkscape file:43oh_circuit.svg.txt

 

 

I've also got a C# program that's sending a line of code and waiting for a response.  It currently supports sending one section at a time, or the entire file.  I'm working on cleaning that up, but I'll be posting that shortly.

 

@@bluehash - can you add the ability to attach SVG?

Share this post


Link to post
Share on other sites

Here's a screenshot of the interface for transmitting the gcode.  I've got some threading stuff to work on - everything currently outputs to the debug window during transmission and not the UI.

 

File is loaded into memory and can be analyzed for the # of commands as well as the # of sections (each time the pen is lifted off of the paper is considered the end of a section).

 

 

post-1690-0-39758800-1372168496_thumb.png

Share this post


Link to post
Share on other sites

I have to warn you that this CNC stuff gets very addictive. I started with a small mill (Proxxon MF70) that I converted to CNC - initially for milling PCBs. You quickly find other uses for it and want to do more...

Share this post


Link to post
Share on other sites

I have to warn you that this CNC stuff gets very addictive. I started with a small mill (Proxxon MF70) that I converted to CNC - initially for milling PCBs. You quickly find other uses for it and want to do more...

lol - I know - this was a "gateway" project.  It was pretty cool to finally get the Z-axis working and just watch it churn something out.  My wife wanted to know what exactly I was going to do with the project - I don't think she quite understood what I meant when I said it was learning for future projects :)

 

I've already considered adding on the laser like the original project and using it to create plastic stencils for SMD reflow.  Needing $50 eye protection is putting me off a bit for now, although I considered just putting it in a box when it's running :)

Share this post


Link to post
Share on other sites

Don't skimp on the eye protection. I'm fairly sure that some cheap acrylic or polycarbonate safety goggles would be fine for my CO2 laser. I still bought some proper ones. They didn't stop me burning a hole in the back of my hand though.

Share this post


Link to post
Share on other sites

Don't skimp on the eye protection. I'm fairly sure that some cheap acrylic or polycarbonate safety goggles would be fine for my CO2 laser. I still bought some proper ones. They didn't stop me burning a hole in the back of my hand though.

Better your hand than your eye!  Yeah - I'll have some convincing to do with my wife before trying out the laser.  That'll give me plenty of time to save up for glasses.

 

The other possible avenue is a DYI 3D printer - a RepRap would be fun to build, although a small Printrbot would be cheaper and still tweakable.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...