The Machine Moves

This time I got the machine moving under GRBL Arduino control. This is perhaps a little frustrating after I’d ordered a parallel port capable mini-itx machine as a backup plan.

The main problem I’d had (and this is a head slap doh moment) is that I’d read the pin assignments for a female parallel port connector, and forgot to invert the layout for the male connector. I then inverted them, and the machine worked.

I then demonstrated all 3 axes moving! Awesome.

This lead to the next problem, calibrating and zeroing. This was frustrating as I was learning gcode as I went, and I did bump the end with the steppers a couple of times. Watch out for that!

Zeroing and coordinates

The important thing to note is it is a right handed coordinate system according to G-Code tutorial - Coordinate System. After playing with my machine, I determined that it was going backwards on some coordinates. I inverted directions on the X and Z axis - using a bitmask of 160. In GRBL this is a flag set with $6 - https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.8#6--step-port-invert-mask-intbinary.

I have been using The Rep Rap Wiki G Code Reference.

While playing with the GCode, I also started using Universal GCode Sender. Universal GCode Sender is a free tool on github that interfaces nicely with grbl, and gave me machine control. This was after learning enough gcode to switch between absolute and relative control systems. It is likely that before each job, I will need to use the manual controls to reset to 0, and then reset the coords in grbl too.

Note that the Universal GCode Sender “reset” button resets the “work position” and not the machine position to 0.

I’ve no limit switches yet so this machine can not auto-home. This may also mean homing for each job. Jobs tend to start around zero. The grbl demo circle uses it as the centre of the work piece I think.

Calibrating speed and distance

So I now have a machine with the right axes, but does it move the correct lengths? I have a metallic shop ruler, which I can use to check if 50 in the Y direction really tallies, or if I have something wrong.

I am suspecting that the pulses may need to hold low instead of high, or that pulses/steps per mm may still be wrong, but I’ll need measurements to prove that. I also need to read more of the machine spec from the ebay page and save that for future reference. I will also check specifications on the stepper motors themselves too.

The documentation shows mach3 screenshots with the settings. For every axis it is 400 steps/mm, and the lowest axis acceleration is z at 100. I used $1, $2 and $3 to set the steps/mm, and then $8 to set the acceleration. I set the acceleration to 40, a bit cowardly for now, but I shall get used to it before setting it higher. This is far faster than the default 10.

Trying this against the metal ruler it looks pretty close, so I’ll go with this for now since these settiings are what I got from the vendor.

Trying a test gcode program

The first is the grbl circle demo I think: Grbl Circle Demo

I first moved the head so zero was middle of the bed, and dropped the z down a little too, then soft reset. I did this with no bit in the spindle, and no job to mill. I just wanted to see it all moving.

I pasted the circle demo code into a simple text file, and loaded it into the GCode sender in file mode. Then I tried the visualise button to see what it would look like.

I used the send button to stream over the gcode and watched while the machine went through some fine moves. It made some odd noises while doing it - but it looks good.

Plan for next steps

Time to finish for today. Tomorrow I’ll get some test subjects on the bed and try milling out some examples. I may want sacrificial material under them. Hobbycraft or Maplin may be able to provide something to mill from…