I'm pretty new to to software aspect of things, and just finished with my build. I'm having a difficult time setting up my universal gcode with grbl (v0.9). I'm using the Cnc pro v3. I made a test cut set to .25 inches but it only cut .0249 inches. I need some assistance setting up my parameters. Thanks Zach
Exactly an order of magnitude off (0.25 vs 0.025) suggests it could be a simple distance-per-step mis-key? Say, "02" instead of "0.2" or something.
Grbl v1.1 Configuration · gnea/grbl Wiki · GitHub This is the link to the values in the wiki Regards Dave
Thanks Dave. Those are the current setting's I have Except with Grbl V0.9. I have the open builds nema23 stepper motors, 3GT belt, 20 tooth pulley, and the 250mm 8mimm lead screw for the Z, Also I'm using the Cnc Xpro V3 stepper driver. I've bought all my electronics from the openbuild parts store. I appreciate the help
Ah. That would be the problem, then. You really need to go through every one of those values and make sure it's correct for your machine. Grbl wants you to input steps/mm (ie. how many steps does it take to travel 1mm?) This needs calculating, as the Github documentation suggests. The NEMA 23 motors are 1.8 degree step angle, so 200 steps per revolution. GT3 belt is of course 3mm pitch. With 20mm pulleys, you have 60mm of linear movement per rev, which, divided by 200 steps is 0.3mm/step. 1/0.3 = 3.333333333333 steps/mm (put in as many 3s as it'll accept). That's your $100 and $101 value (and the reason I'll never use GT3 belt, computers don't like odd numbers and recurring decimals- should be GT2.5 or GT4). For the z axis, 2mm pitch 4 start gives a lead of 8mm/rev. That would be 0.04mm/step, which is 25 steps/mm for your $102 value. Ensure you fully understand every value in that config page, what it does, how that relates to your actual hardware, and what it should be set to for your machine before trying any cuts. At best, you'll just scrap some wood. At worst, you could trash your belt, motors, controller electronics, spindle, toolbits, etc.
use this GRBL settings calculator to get the step/mm numbers you need. use this HOWTO Calibrate your CNC Machine for MACH3 or GRBL to fine tune the values
David, I imput the numbers from the caculator and now I'm having a homing fail and my machine is no longer smooth.
first, turn off all homing and limits and get the calibration correct, THEN set up homing. I cannot find where you have told us what microstepping setting you are using. that has an effect on 'smoothness', but so does that actual speed it is travelling at (they are STEPPER motors, they STEP ) Note that all settings in GRBL are in millimeters. assuming your video shows a homing cycle, you can adjust those speeds Set up the Homing Cycle · gnea/grbl Wiki · GitHub your homing fail is most likely your $27 setting, it is not pulling off the switch far enough. (what is that actual error message?) OR it is noise in the limit wires. That is why you get the machine working properly without them. Wiring Limit Switches · gnea/grbl Wiki · GitHub (This is one of those things where if you don't follow the 'best practices' it will not work)
David, Thanks for all the help, I managed to get up and running yesterday ended up changing the post processor and everything was good after that. Thanks again!
Hi everyone, I'm pretty new to g code, and I'm running into an issue with controlling a Nema 23 stepper motor. What I'm trying to do is pretty simple, just turn 90 degrees and then back again in a loop. Setting up the accelerations and velocities seemed to work fine, but when I tried to create a loop I ran into a problem. I can't seem to define variables. When I use #100 = 1 or something of the sort I get the error: Command Letter missing. When I try $#100=1 It's an invalid statement. I tried reuploading the grbl source code, look at different manuals, but they all seem to have #100 = something working just fine. What am I missing here?
GRBL does not understand variables. It supports only what it says it does in the Wiki (-: Home · gnea/grbl Wiki · GitHub While the specifics of how it interprets Gcodes follow the LinuxCNC documentation, it does not do everything LinuxCNC can do. I assume you want that motor to turn 90 degrees back and forth 'forever'? You can do that with a little Python..... Code: #!/usr/bin/env python """\ Simple g-code oscilating script for grbl, Python2.7 modified from the stream script by the swarfer --------------------- The MIT License (MIT) Copyright (c) 2012 Sungeun K. Jeon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------- """ import serial import time # Open grbl serial port s = serial.Serial('COM11',115200) # Wake up grbl s.write('\r\n'.encode()) time.sleep(2) # Wait for grbl to initialize s.flushInput() # Flush startup text in serial input s.write('G21G91F1000\n'.encode()) # set relative mode print(s.readline()) dist = 90.0 #set this to the distance to move # Stream g-code to grbl for i in range(0,12): #change 12 to how many times you want it to run cmd = 'G1 X{:f}'.format(dist) print(cmd) s.write(cmd.encode() + '\n'.encode()) # Send g-code block to grbl grbl_out = s.readline() # Wait for grbl response with carriage return print( ' : ' + grbl_out.strip()) dist = -dist # Wait here until grbl is finished to close serial port and file. raw_input(" Press <Enter> to exit and disable grbl.") # Close serial port s.close() Run it under Python2.7 in a DOS prompt c:\python27\python.exe rotate.py it will run back and forth in relative mode until the loop expires, 0 to 12 in the above, but if you change 12 to 100000 it will run a long time. the loop could be changed to run forever. you would have to close the DOS prompt to stop it.
Thanks David! That saves me a bunch of time messing around in grbl. If I can do it in python, or matlab for that matter, that'll save me a bunch of time. I really appreciate the effort! Best, Dennis
so long as you can send the correct commands to the correct serialport that the Arduino is attached to, you can send it any Gcode commands you like, for as long as you like, the language used does not matter.
I'm new to grbl and having a problem getting my OX (large) running. I'm running grbl(grbl_v1.1f.20170131 without any changes by me) on a uno clone as recommended and finding that the stepper direction pins for Y and Z axes are not going high to 5V but rather about 2V which is not high enough to trigger reverse direction on the drivers. This is the case even if I disconnect the cables from those pins. They are going low and high (if you can call 2V high) with commands to go forwards and backwards so I'm sure everything is wired up correctly. It is not a hardware fault because I can drive those two pins to 5V if I replace grbl with a simple sketch digital writes those pins. X axis moves completely fine and that direction pin does go to 5V on reverse as expected. I actually seems as though the pin mode for those pins is not getting set correctly and they are being written high but configured as inputs. Just a guess based on the behaviour. Any thoughts?
thinks "get a real Uno" clones use the wrong USB->serial chip and do not communicate properly. (just google 'grbl ch340' for details)
Thanks for the reply David, but I don't see how serial comms issues could cause this problem. When I upload a basic sketch which writes pin D6 or D7 high I get ~5V. When grbl does it my multimeter says 2.5V. I don't even understand how that is possible? I could not replicate the behaviour by messing with the data direction register so that rules out my initial hunch.
Is grbl writing it permanently high? I would assume, since stepper drivers typically only increment the motor on a rising edge, a step from grbl would have to be an entire "wavelength"- ie. rise and fall. If grbl is continuously stepping the motor, it's essentially just sending a steady square wave of +5v and 0v at whatever duty cycle based on the pulse timing, which is ultimately a PWM voltage to your meter. Really, you need an oscilloscope to see what's going on for this kind of data transmission.
I have a question about an unused pin on an Arduino Uno with GRBL 1.1 - A4. From the code, it looks like Mist uses A4 as an output. The wiki diagrams does not show this so was hoping for confirmation from the authority on GRBL. I'm making an arduino shield to support this and want to get it right.
Having a "laser on" issue that I hope someone can help with. Arduino Uno with a CNC shield V3 running GRBL 1.1f. Upon startup all is fine but when GRBL panel connect is "clicked" the laser turns on until it actually connects and goes into locked mode. It only stays on for about a second while the connection takes place but still not a good thing. Any ideas??? Thanks Paul
Hi everyone, so I have an issue with grbl giving me alarm 8 whenever I try to home it. It also tells me to check my limit switches. I have tested them before and they work properly as far as I can tell. Anyone have any idea why I can't home my machine?
put a pulldown resistor on the PWM pin (between the pin and GND) during boot the Arduino pins go into a 'tristate' mode where the state is undefined. your laser driver must be defaulting to ON in this state, which means it has a a pullup resistor. you need to use a pulldown resistor that has a lower value so that it overrides to off, yet not so low as to overload the pin when in operation. I would try 10 x 1k resistors in series and remove one until it works, then replace that mess with one resistor of that value. for example, if it comes on with 6 resistors but stays off with 5, then you need a 5k resistor.
Hello guys I am new to all this, and unfortunately the z axis of my GRBL 3D printer isnt working. When I test the z-axis it only moves down (If it is at the top) and never up. I have never printed anything, so I am wondering if this is normal behavior. I am using sparkfun's easydriver stepper motor controllers from Amazon, and am running version 3.5.1 with version 0.8c on my arduino uno. I have tried everything from checking my wiring several times, and swapping wires. All other axis seem to work fine, and the driver boards seem to be fine, and illuminated with an LED. I am following tinkernut's CD drive 3D printer tutorial from YouTube, and attached is a video
In a week, I'll be making my electronics box and setting up the new machine! 1)Does anyone know where to wire the PWM and Spin Ena pins on a HuanYang VFD? What is the voltage on the PWM anyways? 5V? I'd like 2 types of coolant on my relay, one is a vacuum (simply switches a power bar from NO to closed) and the other will be a compressor line for milling metals. This may be easier to just do manually, honestly. just asking. Can I have the other relay control the stepper motors PSU? It'd be cool to have the whole box basically shut itself off via the arduino. Any pin option for that? If not, I'll just use a on/off toggle. 4)How does the feed hold pin work? I'd like to add my E-stop button, but without just losing power to the drives and my work position. The switch has one NO and one NC circuit, so if there was some way I can have it Feed hold when I engage the switch, then reset when I pop the switch out? Is that possible or will it just constantly reset itself as long as the circuit is complete. Thanks! Here is my current wiring set up: Imgur: The most awesome images on the Internet Please comment here so its all in one spot Pins options + Spindle Wiring · Issue #244 · gnea/grbl · GitHub
hi i'm trying to help a friend with some custom electronics for an OX.... we got GRBL loaded on it but it enters alarm lock mode we know the electronics are ok as it has just come off a big 3d printer are there a way to get a kind of status that says what causes the alarm? ie GRBL thinks that a button is pressed while its not connected etc
our config is: $0=255 (step pulse, usec) $1=255 (step idle delay, msec) $2=255 (step port inv - Pastebin.com EDIT: what i suspect is that the inputs for the cycle start, feed hold and reset used to be thermistor inputs and we have to remove the cap and resistor there... but i would like to confirm that the alarm is due to one of these buttons to be "pressed" before we start to desolder things