Close

Firmware tuning - and success!

A project log for Minimal Pico Vertical Plotter

Building and improving a Raspberry Pi Pico-based, wall-hanging vertical plotter.

andy-piperAndy Piper 11/01/2023 at 13:370 Comments

In the previous test, I was getting output, but the alignment and direction was all wrong.

After several iterations (switching m1<->m2 wiring, and also, diving back into the firmware code), I figured out that the firmware needed to be set up to invert one of the motors.

#define INVERT_M1_DIR     1 // -1        
#define INVERT_M2_DIR     -1 // -1

I also needed to tune the angle for the servo to ensure that the pen was properly lifted. Merged into my fork of the original code.

There have also been a few annoyances with the wiring (the Dupont cables kept popping apart where I'd extended things so I lost power to one of the motors midway through a plot, for example). Also, motor 2 seemed to be slipping / not moving as smoothly as motor 1... I think I've now resolved that by reseating all of the connections. Lots of tidying up to do.

CNCjs has worked out well to drive the plotter. For the studio logo, I took an existing SVG, broke it down into paths, used the AxiDraw plugin for Inkscape to add hatching to fill, repositioned the whole thing over the corner of the page (because the plotter expects a centre-aligned image), and used Ben's fork of gcodeplot to output a gcode file that I could use with the plotter. It looks like gcodeplot could actually send the commands directly to the printer, as well.

I'm happy that I've got to here from the original article and materials i had to hand! There are a number of things I want to work on next:

Hardware:

Firmware:

... and then if we start thinking about mode switches, I might need to redo the electronics, and then I might want a board that takes a Pico as a controller, with the motor drivers and buttons attached... and hey, I've built a CNC machine. And we are back to "why am I not using GRBL/grblHAL here?". Well, because this is interesting.

For something that was intended as a learning exercise, I've learned a lot, and have different directions I can go! I'm not marking this as completed just yet, but I count it as "mostly done".

Discussions