Getting dual axis self square gantry working

Post Reply
priority
Posts: 4
Joined: Sat Feb 22, 2020 8:01 pm

Getting dual axis self square gantry working

Post by priority » Tue Apr 28, 2020 4:08 pm

Took the plunge and managed to get self square (auto square) working on the gantry for my Workbee with dual Y stepper motors. It took a while to get it working as the information was scattered in different locations, so here's a consolidated list of what I found worked for my machine.

The limit switches should be set for NC operation. The default was NO when I initially built up my machine, but $5=1 will invert the grbl switch settings to NC.

My kit only came with 3 limit switches, so I had to purchase an additional limit switch.

Since there are only 3 axis limit switch circuits, in order to auto-square, connect the Z-axis limit switch in series with the A-axis (second Y-axis) limit switch. This will allow grbl to sense the Y and A limit switch engagements separately when homing since the Z-axis is homed separately from X & Y.

Update the firmware on the Protoneer's Arduino to grbl 1.1h. Make sure to get the firmware from the github repository. Do NOT use the archive on the grbl release notes page as there are a couple of typos can prevent the code from compiling for version 1.1h. Instructions for installing and compiling the grbl library are at https://github.com/gnea/grbl/wiki/Compiling-Grbl.

After installing the grbl repository as a library in Arduino, modify the following lines in config.h file in the grbl library folder.
#define ENABLE_DUAL_AXIS
#define DUAL_AXIS_SELECT Y_AXIS
#define DUAL_AXIS_CONFIG_PROTONEER_V3_51

The cpu_map.h pin mappings for a dual axis motors do not match the silkscreen on the back of Protoneer v2.60 board. If you are using external drivers, you can just swap the wires for STEP and DIR. I have not tested internal drivers, but I assume you will have to swap the pin assignments in cpu_map.h to get internal drivers to work ( #define DUAL_STEP_BIT and #define DUAL_DIRECTION_BIT are the lines to search for in cpu_map.h).

I used the Arduino program on the Raspberry Pi to upload code to the Protoneer board. Programming was finicky for me for a while, but seemed to work properly after a reboot.

Place solder bridges on the clone config A3/A4 clone config and make sure no other solder bridges are present.

It took a bit of fiddling with location of the Y-axis and A-axis limit switches, but I was able to an out-of-square gantry to auto-square repeatably with only a modicum of effort.

Bertus Kruger
Site Admin
Posts: 1649
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: Getting dual axis self square gantry working

Post by Bertus Kruger » Tue May 12, 2020 11:34 pm

Wow.... Well done.

maxcom
Posts: 1
Joined: Sat May 16, 2020 5:35 pm

Re: Getting dual axis self square gantry working

Post by maxcom » Sat May 16, 2020 5:43 pm

thank you priority! I decided this morning I would do the same thing and you saved me a ton of time!

You mentioned you're using external drivers - did you have to buy/use a 4th driver? X Y1 Y2 Z ?

I am using the external driver output boards - https://wiki.protoneer.co.nz/File:ExternalDriver.png

Do is the Step and Dir correct on these or do I need to swap them still?


Thanks in advance!

priority
Posts: 4
Joined: Sat Feb 22, 2020 8:01 pm

Re: Getting dual axis self square gantry working

Post by priority » Mon May 18, 2020 11:50 pm

@maxcom,
Glad to know someone out in the ether found this info to be useful!

One external driver is needed for each stepper motor--so, I have 4 external drivers.

I don't know about your driver boards wrt the labeling issue. Mine look different than yours. Unfortunately, I am several hours away from my machine at the moment and can't give you a definitive order. However, you can do what I did to determine the pin order: I used an ohmmeter to find the Ground pin; in theory, you can determine the other pins if you have the patience with an ohmmeter.

I was lazy, so to determine Step and Dir, I hooked Ground (known) and Step/Dir (randomly with remaining 3 pins) and started bCNC. Using the jog function, I checked the voltage at the inputs of the external drivers. The Step signal will pulse when bCNC is telling the stepper motor to move but will otherwise be low. The Dir pin will be much more "stable" and only changes between low and high when you jog the respective axis in bCNC. I did have my stepper motors mechanically disconnected from my Workbee during this "highly scientific investigation".

There is no need to connect Enable for TB6600s and DM542s (and probably others). If you do want them connected, I think you will need to dig through the GRBL source and switch the signal to be active high instead of active low.

Hope this helps!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests