Showing posts with label potter. Show all posts
Showing posts with label potter. Show all posts

Friday, 10 May 2019

Pen Plotter Part 2 - Electronics and Software


This is the second part of my pen plotter build - part 1, covering the physical structure of the build, is here.

Printing Hello World!


Electronics and Software 

The stepper motors are driven by EasyDriver controllers which were recycled from an old, abandoned project.

Everything else is pulled together and controlled using an Arduino Duemilamove which provide the G-Code interpretation using the GRBL library.

Because GRBL is designed with 3-axis CNC machines in mind, it requires some alterations to work with the servo pen-plotter mechanism.

Thankfully I'm not the first person in the world to have attempted this, and this instructable provided a good head start on how to do this.

The main takeaways are to download the regular GRBL library, but swap out the spindle_control.c file with the one from the instructable. In that file there are two lines:

#define PEN_SERVO_DOWN 
#define PEN_SERVO_UP

Change the servo values if necessary - after experimenting with changing them, I found that I got the best results setting the down value to 255 and the up value to zero.

Inkscape GCode Conversion
The GCode plugins for Inkscape seem to be included with a standard installation - I didn't have to do anything special for them to appear.

Whatever your source image is (in the video below it was a text object), it needs to be converted to paths.

If you're using objects within Inkscape, such as text, use Path, Object to Path.


If you're starting with a bitmap image then use Path, Trace Bitmap, and use the Edge Detection method.


Post-processing
 
The next step is to run the generated GCode through a post-processor to add the instructions to raise/lower the servo. The post-processor linked in the Instructable didn't work for me, so I ended up making my own - the code is on GitHub.



To run the machine, I use the Universal G-Code Sender.

Troubleshooting

There were a few issues homing the plotter as near the extremities of the carriages travel it would struggle to move smoothly, and would not reach close enough for the limit switches to be triggered, resulting in it stalling. To overcome this I added screws to the structure in such a way that the limit switches would be triggered when stalling began to occur.


The pen holder that I designed in the previous post did work, but there were a few issues with the overly simplistic design:
  • The fact it rotated the marker off the page created 'flick' marks where the pen was raised/lowered.
  • As it was secured entirely on the servo, it had too much flexibility which resulted in it being dragged incorrectly on the page.


To fix this I redesigned the pen mount, factoring in what had already been created so as to make use of what was already created as much as possible.


The new design relies on supporting rails mounted to the existing carriage, which would allow the servo to push the pen mount directly down onto the paper. When lifting the servo returns to its initial position, letting springs added to the rails lift the pen back up.

This new nozzle is on github here.












Wednesday, 3 April 2019

Pen Plotter Part 1 - The Structure

I had two new years resolutions this year - start posting here on a more regular schedule, and to start whittling down the pile of electronic junk that I'd accumulated over the years.

I've obviously failed the first one already, but to aid the second one I've set myself the challenge of using as much of the junk pile into projects as possible.

A pen plotter works kind of like a printer, but allows for any flat material to be printed on, and uses vectors to draw images - like a person drawing by hand, instead of rasters like a traditional printer.

The principle is simple, a basic 2-axis structure with a tool-end that allows for a marker/pen/pencil to be simply placed on or lifted off the paper.

The stepper motors, gears and drive belts, along with the steel structural rods and bushing were taken from a variety of old ink-jet printers and scanners. The limit switches and servo were either just in my components library or salvaged from old projects.

The supporting structure was 3D printed, having been designed in OpenSCAD - the SCAD source code can be found on GitHub. I'm not putting the files on Thingiverse as they're created to fit the random motors that I scavenged, so anyone else using the design would most likely need to alter the dimensions for their own motors.

The chipboard base has been up-cycled from an old flat-pack desk.


The structure
The 4 main components of the first axis
(Rods not 3D printed)


The first axis consists of two end mounts - one being a simple shape to support the ends of the steel bars (a wheel for the pulley was added manually after printing.)
The other end is a larger mount which contains a mounting point to secure the first stepper motor - obviously this was created bespoke to the stepper that I salvaged, but could easily be adapted in the SCAD file.

In the middle are two pieces which will form the carriage for the second axis. - they're similar to the first end piece, but also contain mounting points to secure the pulley.

The second axis builds off of the first, fitting between the two runners created as part of the first axis:

The second axis
and how it fits with the first axis carriage.
The two holes are the front are for the steel guide rods. The gap in the middle is a space for the limit switches to be attached to the carriage and the cutaway at the top is for the second axis' motor.
The two runners and this carriage are fixed together by plastic friction welding.


The motor/gear assembly that I'll be using for the second axis lifts the belt over the top of the first axis' rods, so the height of the end piece is made to match. The notch at the top accommodates the spring-loaded tensioner for the belt.

The carriage for the second axis is a simple block which contains the two limit switches for the axis, a servo and a bracket to mount the pulley to.

The carriage on the second axis

The pen holder

The final structural piece is a simple pen holder which connects to the arm of the servo.

A post shared by Anthony (@darkmidnight_diy) on

The next part will cover the electronics and software.