I have a new Blackbox controller that I want to enable for auto-squaring. While I have flashed GRBL 1.1h to other controllers in the past, I would prefer to start with the current GRBL 1.1h configuration as shipped as there are a lot of options that I fear may disable my controller if not correct. Where can I download the GRBL source code that corresponds to the version installed in newly-shipped Blackbox controllers? Thanks.
The blackbox has the stock grbl config. You can compile a custom one and use Control to flash the BB by going into the wizards menu, then select firmware flashing tool.
I downloaded grbl_v1.1h.20190825.hex from Releases · gnea/grbl. If I compile and upload the resulting hex file, I'll have the same functionality as the new Blackbox controller? Also, I've installed OpenBuilds Control. I see within the Wizards & Tools -> Machine Flashing Tool that the available builds have their own descriptions. Where is the description picked up from as I've seen screenshots in other threads that include new and custom builds with descriptive names it appears the user defined. Thanks for responding so quickly!
We do indeed use stock standard Grbl GitHub - gnea/grbl: An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino (for most images, only exception is the Servo version hwhich is from GitHub - cprezzi/grbl-servo: Special Grbl version for use with servo instead of spindle or laser.) Our included (precompiled) customisations comes from GitHub - OpenBuilds/control-grbl-buildall: Script to Build all the Grbl Variants for OpenBuilds CONTROL (Customised for OB machines) However for your use case start with stock standard Grbl from github.com/gnea/grbl The build-all hasn't been updated to Grbl 1.1h yet, which has autosquaring Keep in mind we still say its better to build a rigid and square machine, rather than using the motors to pull a skew frame into square using a homing sequence - bending and tensioning an otherwise badly built machine back into shape. Not good for the longevity of components. Just a general tip of course. The only difference between stock Grbl and ours is that we set $4=1 by default. Our profiles does too, but we set the default to avoid users forgetting that BlackBox needs $4=1
Many thanks, Peter, for the valuable details. Having an on-line source for the original HEX files gives me the confidence that I can get it back to factory worse comes to worse. As for why I'm wanting to implement self-squaring, my custom 4'x4' CNC build is on a 5'x7' table that I can flip up vertically for storage. Even though it uses ball screws, I've already seen that the Y-axis will shift when vertical due to the weight alone. Hence, I expect it will go out of square when stored. I'll post the final configuration once I get it working in case anyone else wishes to explore the same.
I confirmed that config.h of the OpenBuilds factory build indeed matches that of the GRBL 1.1h version I've downloaded. Hence, this will be the version I branch from. Another question regarding the self-squaring settings. The file config.h documents the following. // Dual axis pin configuration currently supports two shields. Uncomment the shield you want, // and comment out the other one(s). // NOTE: Protoneer CNC Shield v3.51 has A.STP and A.DIR wired to pins A4 and A3 respectively. // The variable spindle (i.e. laser mode) build option works and may be enabled or disabled. // Coolant pin A3 is moved to D13, replacing spindle direction. #define DUAL_AXIS_CONFIG_PROTONEER_V3_51 // Uncomment to select. Comment other configs. // NOTE: Arduino CNC Shield Clone (Originally Protoneer v3.0) has A.STP and A.DIR wired to // D12 and D13, respectively. With the limit pins and stepper enable pin on this same port, // the spindle enable pin had to be moved and spindle direction pin deleted. The spindle // enable pin now resides on A3, replacing coolant enable. Coolant enable is bumped over to // pin A4. Spindle enable is used far more and this pin setup helps facilitate users to // integrate this feature without arguably too much work. // Variable spindle (i.e. laser mode) does NOT work with this shield as configured. While // variable spindle technically can work with this shield, it requires too many changes for // most user setups to accomodate. It would best be implemented by sharing all limit switches // on pins D9/D10 (as [X1,Z]/[X2,Y] or [X,Y2]/[Y1,Z]), home each axis independently, and // updating lots of code to ensure everything is running correctly. // #define DUAL_AXIS_CONFIG_CNC_SHIELD_CLONE // Uncomment to select. Comment other configs. Should I enable the Protoneer v3.51 option or the CNC shield clone one?
See docs:blackbox:jumper-slaveaxis [OpenBuilds Documentation] Thus V3_51 as it mentions A3/A4 in the comments
My first step will be to get my dual Y-axis stepper CNC machine (almost finished with construction/wiring) working without dual-axis homing to ensure the axes move in the correct directions and traditional homing is working. Once that is working as required, I believe the proper changes to enable dual-axis homing are as follows. 1. Edit config.h by uncommenting the ENABLE_DUAL_AXIS definition and changing DUAL_AXIS_SELECT to Y_AXIS as illustrated below and load this new firmware into the Blackbox controller. // NOTE: This feature requires approximately 400 bytes of flash. Certain configurations can // run out of flash to fit on an Arduino 328p/Uno. Only X and Y axes are supported. Variable // spindle/laser mode IS supported, but only for one config option. Core XY, spindle direction // pin, and M7 mist coolant are disabled/not supported. #define ENABLE_DUAL_AXIS // Default disabled. Uncomment to enable. // Select the one axis to mirror another motor. Only X and Y axis is supported at this time. #define DUAL_AXIS_SELECT Y_AXIS // Must be either X_AXIS or Y_AXIS 2. Open the Blackbox controller and set the Y2 STEP and Y2-DIR jumpers to the A3 and A4 pins as illustrated in docs:blackbox:jumper-slaveaxis [OpenBuilds Documentation]. 3. Wire the Y-2 axis limit switch in parallel with the Z-axis limit switch. I will follow up with the results of these changes shortly.
Ugh... I've been searching for a way to do this. My inexperience with all things GRBL kept me from realizing what was being said in the build instructions. My 4 stepper kit should be here today and this helps immensely! Thanks to both of you!
It worked! After verifying that normal homing worked, I then made the changes described previously. The only hiccup was that GRBL 1.1h would not compile when ENABLE_DUAL_AXIS was uncommented. A search of the 'Net confirmed this was a bug, which was corrected in report.c by appending a "}" to line 581 as follows. #ifdef ENABLE_DUAL_AXIS #if (DUAL_AXIS_SELECT == X_AXIS) if (bit_istrue(lim_pin_state,(bit(X_AXIS)|bit(N_AXIS)))) { serial_write('X'); } if (bit_istrue(lim_pin_state,bit(Y_AXIS))) { serial_write('Y'); } #endif #if (DUAL_AXIS_SELECT == Y_AXIS) if (bit_istrue(lim_pin_state,bit(X_AXIS))) { serial_write('X'); } // line 581 if (bit_istrue(lim_pin_state,(bit(Y_AXIS)|bit(N_AXIS)))) { serial_write('Y'); } #endif if (bit_istrue(lim_pin_state,bit(Z_AXIS))) { serial_write('Z'); } #else if (bit_istrue(lim_pin_state,bit(X_AXIS))) { serial_write('X'); } if (bit_istrue(lim_pin_state,bit(Y_AXIS))) { serial_write('Y'); } if (bit_istrue(lim_pin_state,bit(Z_AXIS))) { serial_write('Z'); } #endif Looking at the code, it makes sense that only if ENABLE_DUAL_AXIS is defined (true) and the DUAL_AXIS_SELECT is set to Y_AXIS would this typo cause compiling to fail. Once that change was made, GRBL compiled and loaded into the Blackbox controller without issue and dual-axis homing worked flawlessly.
Having gotten the auto-squaring working per my previous posts, I'm now wiring an IOT to turn on/off my dust collector. However, I'm not able to get the Blackbox controller relay or coolant outputs working. Following the directions of docs:blackbox:jumper-relay [OpenBuilds Documentation], I've tried the On-Board Relay jumper in every position as well as having removed it. Measuring the DC voltage of the coolant connection output and the relay connection output while entering commands M3, M4, M5, M8, and M9, I detect no change in either output. The DC voltage seems to fluctuate around 300 mV, which seems to be noise, perhaps indicating an open circuit. When the jumper is in the M8/M9 position, there is an audible click when entering M8 and M9 commands. However, neither of the connectors outputs a DC voltage. I also tried the direction pin of the tool head connector. Prior to enabling dual-axis mode, I had verified that the direction pin was low with M3 and M5 and was high with M4. Now, however, the direction pin doesn't change with any of the M3, M4, M5, M8, and M9 commands. I also tried uncommenting the config.h USE_SPINDLE_DIR_AS_ENABLE_PIN, but GRBL 1.1h would not compile stating that this option could not be supported when using DUAL_AXIS. I had hoped to use the tool head connector's direction pin to control the IOT. Is it possible that setting the Y2-STEP and Y2-DIR jumpers to the A3 and A4 pins has somehow disabled the coolant and relay outputs as well as the tool head's direction pin?
The relay is a switch - the outputs are not connected to the controller power supply - the contacts need to be part of an external circuit. Alex.
Don't forget the S-Word too. M3S1000 where 1000 = value of $30 in Grbl Settings Coolant output needs the 24v PSU connected and turned on as well - its a 24v output. See docs.openbuilds.com/blackbox