Download Grbl Controller + for Android to grbl Controller (Bluetooth USB) Use your smart phone to stream G-Code to your CNC machine with GRBL 1.1 firmware. The 0.9J USB GRBL controller is compatible to run with this software. The controller has two 12 to 36V input voltage, one 12V laser output and a 24V 775 motor output for ease of access. In addition to the above features, the grbl controller comes installed with a 3 stepper driver of A4988.
My machine (basically this build: https://www.thingiverse.com/thing:1514145) has GRBL 0.9 : https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.9The documents for newer version are up there too, obviously. It would definitely be good to get v1.1 working in order to learn the process of getting it on a fresh Arduino board. I'll outline the process of how to do that in the section below this one and fill in the details as I get around to figuring them out. Here's what I do know for sure though...
Sending GCode to the Machine
You can use any number of GUIs but the premise is always the same.Once the firmware is on your board, connect it via USB, power it on, and search in your /dev/
directory for your Arduino (type that into Terminal and start typing 'tty' and then hit Tab until something shows up). If you have the Arduino software, use the drop down menus to identify an address like /dev/ttyusb####
or /dev/wchusbserial####
The numbers will be unique to your computer. Take note of these.If you're using the Arduino software, connect to the chip through there and open up the Serial Monitor. You can start sending GCode right there.You can also follow examples on GRBL's github source to see .ino files to upload via the Arduino software that run your GCode.
TO USE PYTHON
LaserGRBL support a wide range of laser engraver based on the open “GRBL” firmware. This list include some brand that is compatible with LaserGRBL (by user feedback). FoxAlien brand is a little more expensive than Ortur and Atomstack, but the product is of a higher class. The double motor on the Y axis guarantees faster and always. Motion 5 is a specialised variant of GRBL which is focused on motion of up to five CNC axes and laser processing instead of milling. It supports ATMega MCUs running with up to 20 MHz and provides jitter-free pulses with a frequency of up to 38 kHz. Wherever usage and handling of motion5 is different to original GRBL, this is described in Wiki.
Get the dependency that allows python to send and receive information over your USB ports.git clone https://github.com/pyserial/pyserial.git
cd pyserial && python setup.py install
(Alternatively, pip install pyserial
)
You might need a driver to make sure your computer can communicate with your Arduino.
Chinese knock-offs sometimes don't play nice with these. Use http://www.wch.cn/download/CH341SER_MAC_ZIP.html for the Nano, for example. Google around until your device is listed in /dev/
.
Authentic drivers are found at http://www.ftdichip.com/Drivers/VCP.htm
Copy this to a .py file (source: https://github.com/grbl/grbl/blob/master/doc/script/simple_stream.py )
Name this file streamGcode.py
(or whatever)Create a new file named grbl.gcode
and put your code in there.Now you can just run python streamGcode.py
You can also get a sense of what is going on in the python file above and stream GCode commands one-by-one through Python using IPython but at that point, I suggest looking up how to send/receive over the Serial port directly through command-line tools.
TODO Use sys package and create an alias so that you can run a gcode file located anywhere on your computer (to run the above, you would have to be in the same directory as the two files). Throw those edits and instructions up in this tutorial, share it with others.
I think this is how they expect the wiring to be by default: https://github.com/grbl/grbl/wiki/Connecting-Grbl
Step 1 - Clone the GRBL directory
git clone https://github.com/grbl/grbl.git
Step 2 - Configure for your hardware.
TODO This is the bulk of the work. Go ahead and open config.h in the /grbl subdirectory and start editing it according to the custom thing you just built. The ports you wired need to be detailed here. I'm not sure what the default configuration is, but it's Cartesian, not CoreXY.
Step 3 - Configure Paths
DO NOTE THAT THE PATHS MAY BE QUITE DIFFERENT ON YOUR MACHINE.
Add all those AVR compilers to your computer's
$PATH
.TODO How to find the compilers on your computer. Mine were in/Arduino.app/Contents/Java/hardware/tools/avr/bin
So adding them to my path would look likeecho 'export PATH='Arduino.app/Contents/Java/hardware/tools/avr/bin:$PATH' >> ~/.bash_add'
(note the colon separating the path)Add $DEVPATH to
.bash_aliases
or.bashrc
(LINUX) or.bash_profile
(OSX) ... or a new file~/.bash_add
where we'll temporarily store these since we only need them for this.
Gbrl Control Software
There are a few ways to do this, including editing the aforementioned files in the text-editor of your choice.From the command line, this looks likeecho 'export DEVPATH='/dev/tty.usbmodem1411' >> ~/.bash_add
Add
$AVRPATH
as well.echo 'export AVRPATH='~/Downloads/Arduino.app/Contents/Java/hardware/tools/avr/bin' >> ~/.bash_add
Wrap UpRun
source ~/.bash_add
to make Terminal aware of where all the software we'll need to use is located.You can add the above code snippet to your~/.bashrc
file (or equivalent) if you plan to recompile in the future, or just run it each time you want to.
Step 4 - Compile GRBL
This creates a hex file that we then need to flash to the Arduino
Free Grbl Cnc Software
For ease, we now add $GRBLHEX to our .bashrc file as well.echo 'export GRBLHEX='/Users/Imogen/Packages/grbl-1.1f.20170801/grbl.hex' >> ~/.bash_custom
Once all the paths and configurations are set, runmake cleanmakein the top-level directory of the GRBL version you cloned (a folder named grbl-1.1f.20170801 or something like that ). Running ls now should reveal the grbl.hex file that you're going to flash.Go to https://github.com/grbl/grbl/wiki/Compiling-Grbl if you want details for Windows or more information in general. It has instructions for flashing right from Arduino, as well as telling you where to find some examples.
Grbl Controller Software Download For Mac
Step 5 - Flash your ArduinoMy fake Arduino nano wasn't being recognized by my computer.I downloaded http://sparks.gogo.co.nz/assets/_site_/downloads/CH34x_Install_MAC_10_9_AND_ABOVE.zip and installed it.
Then run
- For v1.+ on the Uno:
$AVRPATH/bin/avrdude -C$AVRPATH/etc/avrdude.conf -pm328p -carduino -P$DEVPATH -D -Uflash:w:$GRBLHEX
- For v1.+ on the Duemilanove/Nano:
$AVRPATH/bin/avrdude -C$AVRPATH/etc/avrdude.conf -pm328p -carduino -P$DEVPATH -b57600 -D -Uflash:w:$GRBLHEX
_More info, including older versions:https://github.com/grbl/grbl/wiki/Flashing-Grbl-to-an-Arduino
General GRBL Usefulnesshttps://github.com/grbl/grbl/wiki/Interfacing-with-Grbl
I think this is how they expect the wiring to be by default: https://github.com/grbl/grbl/wiki/Connecting-Grbl