Git Product home page Git Product logo

grbl-lpc's Introduction

GitHub Logo


Old releases are in the Release tab. See cprezzi's branch for more recent releases. Note: cprezzi's branch defaults stepper current to zero and has defaults more suitable for other boards.


This is GRBL 1.1 ported to the LPC1769. It can run on Smoothieboard.

Usage notes:

  • This uses a different usb-serial driver than Smoothieware. Windows 10 should recognize it automatically. If it doesn't, try installing VCOM_lib/usbser.inf.
  • This doesn't pass the sdcard to the host. Once installed you need to use a micro sdcard adaptor to replace or change it.
  • Only tested with lasers with PWM. Non-PWM spindle control not ported.
  • These are defaults for easy-to-change config values.
    • WPos enabled for LaserWeb compatability ($10=0)
    • Laser mode: ON ($32)
    • Minimum S value: 0.0 ($31)
    • Maximum S value: 1.0 ($30)
  • Hard limits not yet ported
  • Control inputs not yet ported (e.g. Cycle Start and Safety Door switches)

New configuration settings

  • $33 is PWM frequency in Hz
  • $34 is PWM off value in %
  • $35 is PWM min value in %
  • $36 is PWM max value in %
  • $140, $141, $142 are X, Y, Z current (amps)
    • Default to 0.0 A to avoid burning out your motors
    • Your motors will likely stall if you don't set these!

Build notes:

  • Include make and the arm-none-eabi-* tools in your path.
  • Run git submodule init and git submodule update before building.
  • Make produces 2 files:
    • build/firmware.bin: this is compatible with the sdcard bootloader.
    • build/grbl.hex: this is not compatible with the sdcard bootloader. It loads using Flash Magic and is primarilly for developers who don't want to keep swapping sdcards. If you flash this, then you'll have to reflash the bootloader if you want to go back.

Grbl is a no-compromise, high performance, low cost alternative to parallel-port-based motion control for CNC milling. This version of Grbl runs on an Arduino with a 328p processor (Uno, Duemilanove, Nano, Micro, etc).

The controller is written in highly optimized C utilizing every clever feature of the AVR-chips to achieve precise timing and asynchronous operation. It is able to maintain up to 30kHz of stable, jitter free control pulses.

It accepts standards-compliant g-code and has been tested with the output of several CAM tools with no problems. Arcs, circles and helical motion are fully supported, as well as, all other primary g-code commands. Macro functions, variables, and most canned cycles are not supported, but we think GUIs can do a much better job at translating them into straight g-code anyhow.

Grbl includes full acceleration management with look ahead. That means the controller will look up to 16 motions into the future and plan its velocities ahead to deliver smooth acceleration and jerk-free cornering.

  • Licensing: Grbl is free software, released under the GPLv3 license.

  • For more information and help, check out our Wiki pages! If you find that the information is out-dated, please to help us keep it updated by editing it or notifying our community! Thanks!

  • Lead Developer: Sungeun "Sonny" Jeon, Ph.D. (USA) aka @chamnit

  • Built on the wonderful Grbl v0.6 (2011) firmware written by Simen Svale Skogsrud (Norway).


Official Supporters of the Grbl CNC Project

Official Supporters


Update Summary for v1.1

  • IMPORTANT: Your EEPROM will be wiped and restored with new settings. This is due to the addition of two new spindle speed '$' settings.

  • Real-time Overrides : Alters the machine running state immediately with feed, rapid, spindle speed, spindle stop, and coolant toggle controls. This awesome new feature is common only on industrial machines, often used to optimize speeds and feeds while a job is running. Most hobby CNC's try to mimic this behavior, but usually have large amounts of lag. Grbl executes overrides in realtime and within tens of milliseconds.

  • Jogging Mode : The new jogging commands are independent of the g-code parser, so that the parser state doesn't get altered and cause a potential crash if not restored properly. Documentation is included on how this works and how it can be used to control your machine via a joystick or rotary dial with a low-latency, satisfying response.

  • Laser Mode : The new "laser" mode will cause Grbl to move continuously through consecutive G1, G2, and G3 commands with spindle speed changes. When "laser" mode is disabled, Grbl will instead come to a stop to ensure a spindle comes up to speed properly. Spindle speed overrides also work with laser mode so you can tweak the laser power, if you need to during the job. Switch between "laser" mode and "normal" mode via a $ setting.

    • Dynamic Laser Power Scaling with Speed : If your machine has low accelerations, Grbl will automagically scale the laser power based on how fast Grbl is traveling, so you won't have burnt corners when your CNC has to make a turn! Enabled by the M4 spindle CCW command when laser mode is enabled!
  • Sleep Mode : Grbl may now be put to "sleep" via a $SLP command. This will disable everything, including the stepper drivers. Nice to have when you are leaving your machine unattended and want to power down everything automatically. Only a reset exits the sleep state.

  • Significant Interface Improvements: Tweaked to increase overall performance, include lots more real-time data, and to simplify maintaining and writing GUIs. Based on direct feedback from multiple GUI developers and bench performance testing. NOTE: GUIs need to specifically update their code to be compatible with v1.1 and later.

    • New Status Reports: To account for the additional override data, status reports have been tweaked to cram more data into it, while still being smaller than before. Documentation is included, outlining how it has been changed.
    • Improved Error/Alarm Feedback : All Grbl error and alarm messages have been changed to providing a code. Each code is associated with a specific problem, so users will know exactly what is wrong without having to guess. Documentation and an easy to parse CSV is included in the repo.
    • Extended-ASCII realtime commands : All overrides and future real-time commands are defined in the extended-ASCII character space. Unfortunately not easily type-able on a keyboard, but helps prevent accidental commands from a g-code file having these characters and gives lots of space for future expansion.
    • Message Prefixes : Every message type from Grbl has a unique prefix to help GUIs immediately determine what the message is and parse it accordingly without having to know context. The prior interface had several instances of GUIs having to figure out the meaning of a message, which made everything more complicated than it needed to be.
  • New OEM specific features, such as safety door parking, single configuration file build option, EEPROM restrictions and restoring controls, and storing product data information.

  • New safety door parking motion as a compile-option. Grbl will retract, disable the spindle/coolant, and park near Z max. When resumed, it will perform these task in reverse order and continue the program. Highly configurable, even to add more than one parking motion. See config.h for details.

  • New '$' Grbl settings for max and min spindle rpm. Allows for tweaking the PWM output to more closely match true spindle rpm. When max rpm is set to zero or less than min rpm, the PWM pin D11 will act like a simple enable on/off output.

  • Updated G28 and G30 behavior from NIST to LinuxCNC g-code description. In short, if a intermediate motion is specified, only the axes specified will move to the stored coordinates, not all axes as before.

  • Lots of minor bug fixes and refactoring to make the code more efficient and flexible.

  • NOTE: Arduino Mega2560 support has been moved to an active, official Grbl-Mega project. All new developments here and there will be synced when it makes sense to.

List of Supported G-Codes in Grbl v1.1:
  - Non-Modal Commands: G4, G10L2, G10L20, G28, G30, G28.1, G30.1, G53, G92, G92.1
  - Motion Modes: G0, G1, G2, G3, G38.2, G38.3, G38.4, G38.5, G80
  - Feed Rate Modes: G93, G94
  - Unit Modes: G20, G21
  - Distance Modes: G90, G91
  - Arc IJK Distance Modes: G91.1
  - Plane Select Modes: G17, G18, G19
  - Tool Length Offset Modes: G43.1, G49
  - Cutter Compensation Modes: G40
  - Coordinate System Modes: G54, G55, G56, G57, G58, G59
  - Control Modes: G61
  - Program Flow: M0, M1, M2, M30*
  - Coolant Control: M7*, M8, M9
  - Spindle Control: M3, M4, M5
  - Valid Non-Command Words: F, I, J, K, L, N, P, R, S, T, X, Y, Z

Grbl is an open-source project and fueled by the free-time of our intrepid administrators and altruistic users. If you'd like to donate, all proceeds will be used to help fund supporting hardware and testing equipment. Thank you!

Donate

grbl-lpc's People

Contributors

0xpit avatar alpharesearch avatar beardicus avatar binaryconstruct avatar buserror avatar chamnit avatar cprezzi avatar daapp avatar diara628 avatar eliteeng avatar henols avatar hin avatar jeepshop avatar jgeisler0303 avatar kfoltman avatar martinstingl avatar michmerr avatar paulkaplan avatar poelstra avatar protoneer avatar robgrz avatar rustyoz avatar scottrcarlson avatar shapeoko avatar silasb avatar simen avatar tbfleming avatar tmpvar avatar winder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grbl-lpc's Issues

Compiling in Platform IO

Hi !

Could you help me please, I m wondering if it is possible to compile your new firmware grbl lpc with Platform IO ?

I have a mks robin nano V3 and I saw it can handle a laser so I d like to try... Other question : if I can t compile in PIO, how to do with arduino 1.8.13 ? As I could see, proc is a STM32F407VGT6 known as STM32 ARM Cortex-M4F in marlin nighly.

I hope been clear...

Thank you a lot

M9 not working on mks

Hi.
I'm running my DIY laser with mks sboard 1.3, firmware for TTL 1.23 and solenoid connected to pin 2.6 and lightburn. I've got problem with air assist - it turns on as gcode is executed, but doesn't turn off.
If I turn off USB and power supply for rest, solenoid closes, as i turn USB first for board and later power supply for all other stuff, solenoid stays closed, but if power supply is turned on first and USB later, solenoid is opened.
Is it configuration problem?

Compile errors

Hello,

i love this idea and want test the Homing Feature on a smoothieboard. But first of all i try to compile the grbl-lpc on my cloud9 workspace, but:

xpix:~/workspace

 (master) $ make
/bin/sh -c "mkdir -p \"build\""
/bin/sh -c "mkdir -p \"build/src\""
arm-none-eabi-g++ -DCORE_M3 -DLPC175x_6x -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-builtin -fno-delete-null-pointer-checks -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m3 -MMD -MP -mthumb -Os -Wall -Wextra  -fno-rtti  -DCORE_M3 -DLPC175x_6x -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-builtin -fno-delete-null-pointer-checks -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m3 -MMD -MP -mthumb -Os -Wall -Wextra  -Wno-unused-parameter  -I CMSIS_5/CMSIS/Core/Include -I CMSIS_5/CMSIS/Driver/Include -I CMSIS_5/Device/ARM/ARMCM3/Include -I grbl -I grbl-lpc -I lpc17xx -I VCOM_lib  -o build/src/coolant_control.o grbl/coolant_control.c
In file included from grbl/grbl.h:42:0,
                 from grbl/coolant_control.c:21:
grbl-lpc/debug.h:24:18: fatal error: atomic: No such file or directory
 #include <atomic>
                  ^
compilation terminated.
make: *** [build/src/coolant_control.o] Error 1
xpix:~/workspace (master) $ amke clean
bash: amke: command not found
xpix:~/workspace (master) $ make clean
/bin/sh -c "rm -rf \"build\""
xpix:~/workspace (master) $ make
/bin/sh -c "mkdir -p \"build\""
/bin/sh -c "mkdir -p \"build/src\""
arm-none-eabi-g++ -DCORE_M3 -DLPC175x_6x -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-builtin -fno-delete-null-pointer-checks -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m3 -MMD -MP -mthumb -Os -Wall -Wextra  -fno-rtti  -DCORE_M3 -DLPC175x_6x -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-builtin -fno-delete-null-pointer-checks -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m3 -MMD -MP -mthumb -Os -Wall -Wextra  -Wno-unused-parameter  -I CMSIS_5/CMSIS/Core/Include -I CMSIS_5/CMSIS/Driver/Include -I CMSIS_5/Device/ARM/ARMCM3/Include -I grbl -I grbl-lpc -I lpc17xx -I VCOM_lib  -o build/src/coolant_control.o grbl/coolant_control.c
In file included from grbl/grbl.h:42:0,
                 from grbl/coolant_control.c:21:
grbl-lpc/debug.h:24:18: fatal error: atomic: No such file or directory
 #include <atomic>
                  ^
compilation terminated.
make: *** [build/src/coolant_control.o] Error 1
xpix:~/workspace (master) $ make
/bin/sh -c "mkdir -p \"build\""
/bin/sh -c "mkdir -p \"build/src\""
arm-none-eabi-g++ -DCORE_M3 -DLPC175x_6x -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-builtin -fno-delete-null-pointer-checks -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m3 -MMD -MP -mthumb -Os -Wall -Wextra  -fno-rtti  -DCORE_M3 -DLPC175x_6x -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-builtin -fno-delete-null-pointer-checks -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m3 -MMD -MP -mthumb -Os -Wall -Wextra  -Wno-unused-parameter  -I CMSIS_5/CMSIS/Core/Include -I CMSIS_5/CMSIS/Driver/Include -I CMSIS_5/Device/ARM/ARMCM3/Include -I grbl -I grbl-lpc -I lpc17xx -I VCOM_lib  -o build/src/coolant_control.o grbl/coolant_control.c
In file included from grbl/grbl.h:44:0,
                 from grbl/coolant_control.c:21:
grbl-lpc/delay.h:42:71: warning: multi-character character constant [-Wmultichar]
     delay_loop(get_time(), uint32_t(uint64_t(SystemCoreClock) * us / 1'000'000));

I removed
-std=gnu++14 and "atomic" include in debug.h, but run in the next error.
I think i'm wrong :)

Can somebody help me to install the correct packages

MKS Sgen L

Hello,
i test GRBL with Arduino Uno for CO² Laser.
But the Controller is to slow.

So i buy an MKS SGen L
but with Marlin 2.0 and Smoothieware didnt work.

Here is GRBL LPC availe for MKS SBase thats work with LPC1758 prozessor.
Is it posible to pinmapping for Sgen L and dissable the stepper current over software.
Or have some one a firmeware for this board.

current run plan and pin out are here:
https://github.com/makerbase-mks/SGEN_L

Sorry for my bad english :)

grbl-lpc on LPC1768 at 100MHz

Hi Claudio,

I'm looking around for some hardware to retrofit into a laser cutter and use laserweb/grbl-lpc. I hope you have a moment to answer my question.

From looking at the grbl-lpc code it looks like it runs at 120MHz.

#define XTAL (12000000UL) /* Oscillator
frequency */

This would imply an LPC1769 is needed and the LPC1768 is not fast enough (or code changes are needed for 100MHz).

I see mention on reddit that it works on some 1768 boards, should I adjust the above for 100MHz perhaps?

https://www.reddit.com/r/hobbycnc/comments/6b9p48/grbllpc/

Many thanks,
Tom

Windows Comiple Issue

Good morning I hope someone might be able to point me in the right direction.

I am using a windows 10 system.
I have installed the GNU make for windows and the GNU ARM toolchain
I have git cloned this repository, then git submodule init and the update (received checksums)
I have been to the environment variables and added the toolchain and make bins to the local user Path
I have tested the version of the toolchain and make and got positive response.

But when I "make" this is my response:

C:/Program Files/Git/usr/bin/sh.exe -c "mkdir -p "build""
/usr/bin/sh: C:/Program: No such file or directory
make: *** [build/src/coolant_control.o] Error 127

Any help would be much appreciated

LPC boards

@cprezzi @tbfleming : I'm unfamiliar with LPC boards. Can you provide a list of compatible LPC boards supported? If I understand correctly, there are others like Panucatt's Azteeg X5, which I can easily request for. I think it'll probably be a good idea for me to have one on hand.

Open drain outputs

Is there a easy way to set the LPC pin config to open drain output for using external stepper drivers with optoisolators?

Thanks

Jim

Safety door detected as opened

Latest release (11th Feb 2020). Just started to setup the mks-sbase v1.3 on the test bench.

Currently nothing connected (no steppers / endstops), when I connect with laserweb I get the error Error 13 - Safety door detected as opened.....

I've tried both grounding and applying 5v to p1.22 but the error does not clear.

Any help most appreciated.

How to compile Firmware.bin without Arduino IDE (LPC17xx)

Im really badly stuck with compiling instructions, how to make firmware.bin without Arduino IDE / VSCode Platformio, since LPC17 based MKS SBASE 1.4 cant used on those and this branch is right ment for that kind of boards

Ive trying to follow several different instructions, but those are not so newbie friendly like step by step, which softwares to use, which commands should send and where.

Error in checksum calculation in flash.cpp

There's a compile warning in grbl-LPC about the checksum calculation routine in flash.cpp. There's a logical OR in the code which should be a bitwise OR. Existing code shouldn't generate spurious errors, but I don't think it will really catch any errors either. It basically returns the last character in the memory block potentially with 1 added.

I've included a patch below.

Thanks, Gil

diff --git a/grbl-lpc/flash.cpp b/grbl-lpc/flash.cpp
index a42b843..aabc422 100644
--- a/grbl-lpc/flash.cpp
+++ b/grbl-lpc/flash.cpp
@@ -77,7 +77,7 @@ static unsigned char memcpy_with_checksum(char *dest, char *src, unsigned size)
     unsigned char checksum = 0;
     while (size--)
     {
-        checksum = ((checksum << 1) || (checksum >> 7)) + *src;
+        checksum = ((checksum << 1) | (checksum >> 7)) + *src;
         *dest++ = *src++;
     }
     return checksum;

pn:PA triggered on MKS

Hello,
I have wired my 3 limit switches NC ($5=1) and in the serial I'm reading Pn:PA and I get an alarm triggered by it obviously.
All 3 switches are recognized and when I press them and I'm reading Pn:PXA when pressing X so they are working.
I guess I have to use a jumper on two pins somewhere on the MKS board to close the limit of 4th axis(?)
I'm just guessing it is the 4th axis as I can see all the feeds in the settings like $113

Can I remove this with any setting in the software or can someone point me to the right pins to jumper on the MKS 1.3 board?

Setting up an MKS board - PWM/TTL

Hi, I posted this (MKS) a few minutes back then found this forum.

Can someone please assist me with this.

Is the TTL with pin 1.23 option locked at 0 to 5vdc PWM or what? Yeah, I am a neophyte with this. :)

I do not want to fry the Laser internal electronics.

Thanks

Homing does not move motors

Firmware and Board Version
grbl 1.1f
MKS-SBASE v1.3

Input and Output

$$

 $0=1
 $1=25
 $2=0
 $3=3
 $4=0
 $5=0
 $6=0
 $10=0
 $11=0.010
 $12=0.002
 $13=0
 $20=0
 $21=0
 $22=1
 $23=1
 $24=25.000
 $25=500.000
 $26=250
 $27=5.000
 $30=1000
 $31=0
 $32=1
 $33=1000.000
 $34=0.000
 $35=0.000
 $36=100.000
 $100=160.000
 $101=160.000
 $102=160.000
 $110=24000.000
 $111=24000.000
 $112=24000.000
 $120=1500.000
 $121=1500.000
 $122=1000.000
 $130=300.000
 $131=200.000
 $132=50.000
 $140=0.400
 $141=0.600
 $142=0.000

$H

 ALARM: 9 - Homing fail. Could not find limit switch within search distance. Defined as 1.5 * max_travel on search and 5 * pulloff on locate phases.

Expected Behavior
Motors moving in the -X and +Y direction until end stops.

Observed Behavior
Motors not moving at all.
Motors "locking" and making high pitch noise.

Homing not tested

Hi,

This means the input pins for switches are disabled or just not tested?

Br Frank

grbl-LPC on AZSMZ Mini Board

Hello together,
It's my first time setting up Laserweb4. I am having trouble flashing LPC to the AZSMZ Mini board (Smoothieware works fine) and am wondering if this board has been tested before by you?

When I copy the firmware.bin to the SD Card and boot the board LED1 and LED2 are blinking and after that no LED is visible at all. The filename on the SD changes to FIRMWARE.CUR, but it is not possible to connect via SERIAL. Any ideas would be very helpful!

Thank you in advance,
Nico

please help, compileeeeee

have everyone tutorial how can i make this:

Build notes:

  • You should use virtual machines, if you use multiple toolchains on the same PC.
  • Install make if not already there (for Windows see http://gnuwin32.sourceforge.net/packages/make.htm)
  • Install the ARM embeded toolchain (see https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads)
  • Include make and the arm-none-eabi-* tools in your path.
  • Run git submodule init and git submodule update before building.
  • make produces 2 files:
    • build/firmware.bin: this is compatible with the sdcard bootloader.
    • build/grbl.hex: this is not compatible with the sdcard bootloader. It loads using Flash Magic
      and is primarilly for developers who don't want to keep swapping sdcards. If you flash this,
      then you'll have to reflash the bootloader if you want to go back.

i am not a programator :(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.