Welcome to Our Community

Some features disabled for guests. Register Today.

Ask Grbl CNC questions here.

Discussion in 'Control Software' started by Sonny Jeon, Aug 12, 2015.

  1. jean-philippe leduc

    Builder

    Joined:
    Mar 1, 2020
    Messages:
    5
    Likes Received:
    2
    for when a grbl for mega with ramp?
     
  2. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    315
    Likes Received:
    138
    it exists now. You need to download the grbl/gnea code and configure for the mega and RAMPS. To be honest, RAMPs is a poor choice for a breakout board.
     
    David the swarfer likes this.
  3. jean-philippe leduc

    Builder

    Joined:
    Mar 1, 2020
    Messages:
    5
    Likes Received:
    2
    bettre than an uno for shure lol faster cpu cycle ton of ready made board all mks 3d printer will run it (except 32 bord) more memory that can be use to get grbl to next level..
    tank for the input by the way
     
  4. jean-philippe leduc

    Builder

    Joined:
    Mar 1, 2020
    Messages:
    5
    Likes Received:
    2
    its not the
    Arduino Mega 2560 :(
     
  5. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    315
    Likes Received:
    138
    huh? Not sure what you are disagreeing with but GRBL/GNEA most certainly runs on the mega. You have to configure it before building. Plus, the Uno and Mega have the same speed.
     
  6. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,919
    Likes Received:
    4,291
    Yes, same 16Mhz speed, refer to gnea/grbl-Mega for the Mega version
     
  7. IrishMoss

    IrishMoss New
    Builder

    Joined:
    Mar 17, 2019
    Messages:
    1
    Likes Received:
    0
    You want the mega-5x version for the ramps board: fra589/grbl-Mega-5X
     
  8. HTieleman

    HTieleman New
    Builder

    Joined:
    Mar 3, 2020
    Messages:
    1
    Likes Received:
    0
    Hey guys,

    Im new to the forum and have a question regarding GRBL.

    I recently bought a Protoneer Raspberry PI Hat for my project.

    I want to achieve the following:
    I have a X / Y gantry (both 400mm stroke) positioned above a table. The gantry is equipped with an USB camera.
    On the table a piece of pipe is placed which can be moved around by hand.

    By means op Opencv (running in Python) I manage to detect the circumference and center point of the pipe and calculate the pixel distance (x / y) from circle center to camera center.

    Now I want to actively position the camera in the center of the pipe.

    I am looking for some guidance how to control the GRBL installed on the Protoneer Hat to move the gantry around. I was thinking of using jogging commands send by python to the GRBL.

    Do you guys have an example how you sent jogging commands in python to GRBL? I am aware of the simple_stream.py and stream.py scripts on the wiki, but i understand these read G-code written in a separate file.

    would like to hear your thoughts.

    Will soon make a project thread with some hardware pictures

    Thnx!
    Hubert
     
  9. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    748
    You can send direct individual G-code commands or specific realtime grbl commands (which include some G-code) for jog. $J is the realtime option: gnea/grbl

    Either option works as far as grbl's concerned.
     
  10. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    315
    Likes Received:
    138
    Probably overkill for your use but in the GRBL/GNEA wiki, there is discussion about sending commands to GRBL from application. There might be some good pointers in there.
     
  11. Erkki Holopainen

    Builder

    Joined:
    Mar 10, 2020
    Messages:
    1
    Likes Received:
    0
    Is there a way to use two probed values to calculate average position.
    Something like this:
    1) Probe -X
    2) save X-value
    3) probe +X
    4) calculate average of probed -X and +X
    5) move X to average value
     
  12. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    748
    Certainly, but it would have to be performed by the host software, not grbl itself. G38.2 to probe, G38.3 to query probe result, repeat, calculate, and then move to calculated results.

    Which senders would let you perform this X/2 function? bCNC maybe, haven't seen it specifically but it's good with extended features. Not sure about the rest.
     
  13. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,435
    Likes Received:
    1,908
    bCNC can do it I think, you do at least have access to the probed values
     
  14. Student

    Student New
    Builder

    Joined:
    Mar 22, 2020
    Messages:
    4
    Likes Received:
    0
    Is it possible to edit grbl code for ATmega32?
    'cpu_map.h' from the grbl package has configuration for ATmega328P. Trying to modify it for ATmega32A, I believe that interrupt vectors USART_RX_vect & USART_UDRE_vect on 328p can be substituted with USART_RXC (ATmega32A) & USART_UDRE respectively on 32A, also pins would not pose any problem. But,
    1. Can iterrupts PCIE0 & PCIE1 on 328p be substituted with external interrrupts Int0 & Int on 32A?
    2. I can not completely understand WGM20, WGM21, WGM22, WGM23, and how to substitute them with their counterparts for 32A
    Enclosed: cpu_map.h with comments in red/orange.
     

    Attached Files:

  15. Student

    Student New
    Builder

    Joined:
    Mar 22, 2020
    Messages:
    4
    Likes Received:
    0
    Is it possible to edit grbl code for ATmega32?
    'cpu_map.h' from the grbl package has configuration for ATmega328P. Trying to modify it for ATmega32A, I believe that interrupt vectors USART_RX_vect & USART_UDRE_vect on 328p can be substituted with USART_RXC (ATmega32A) & USART_UDRE respectively on 32A, also pins would not pose any problem. But,
    1. Can iterrupts PCIE0 & PCIE1 on 328p be substituted with external interrrupts Int0 & Int on 32A?
    2. I can not completely understand WGM20, WGM21, WGM22, WGM23, and how to substitute them with their counterparts for 32A
    Enclosed: cpu_map.h with comments in red/orange.
     

    Attached Files:

  16. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    315
    Likes Received:
    138
    You can do that but really what you need is functioning Arduino board support. Then it's a simple matter of telling GRBL which pins are which and rebuilding.

    However, before you go to that trouble, take a look at grblHAL, get a Due' or MKRZero or a Teensy 4 and build for that. grblHAL is a very high quality ARM port of GRBL and runs on 11 different microcontrollers. It uses a hardware adaptation layer to make it easy to port to other processors and supports up to 5 Axis machines with more higher end GCode features coming. The 8 bit micros are running out of gas.

    I have breakout boards that I've built for the Teensy 4 and SAMD21 MKRZERO. And, will make the gerbers available for anyone who wants to build one. If there is interest, I may get a batch made and offer the bare boards at a small cost. Here's the Teensy 4 BoB. I have an Arduino Due' Bob design in progress (though hate hate hate the arduino mega form factor)
     
  17. Student

    Student New
    Builder

    Joined:
    Mar 22, 2020
    Messages:
    4
    Likes Received:
    0
    Thanks Phil, but I have only ATmega32s available with me and my plan is to build a laser engraver. Can you point me in the direction to modify existing grbl code to suit ATmega32.
     
  18. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    315
    Likes Received:
    138
    First, you need to get Arduino working for your atmega32. Is there a port for that? There appears to be for an ATMEGA 32U4. Then you will need to look at GRBL and understand how it uses processor peripherals like timers and adapt them to the processor you are using. The code is a kind of spaghetti which is why Terje's refactoring of it was important. With the HAL, moving it to another 32 bit processor becomes relatively easy.

    If you are going to build a laser engraver, you will be spending lots of money. What's $20 more to avoid a huge amount of effort? Seems like a false economy but that's your decision.
     
  19. RegPye

    RegPye New
    Builder

    Joined:
    Jul 1, 2014
    Messages:
    15
    Likes Received:
    7
    I built my laser engraver using just GRBL 1.1h and a Arduino nano. Very simple setup and very cheap. Works very good.
    GRBL 1.1 has laser settings that are very useful and easy to use.
     
    Peter Van Der Walt likes this.
  20. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    315
    Likes Received:
    138
    Good point. A Nano cost like $3.
     
    Peter Van Der Walt likes this.
  21. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,919
    Likes Received:
    4,291
    If I remember far back when Arduino Leonardos were still a thing (about half a decade ago) - as they were ATmega32U4s, that question at the time was "not possible"
    The ATmega32U uses native USB (Uno/Nano uses a USB Serial chip) and Grbl could not fit with the USB stack (not enough interrupts, timers, memory etc)

    Google it grbl atmega32u4 - Google Search - maybe the situation changed over the years...

    Agreed, get a Nano, or even better, get a BlackBox (OpenBuilds BlackBox 4X Documentation) just easier and more mainstream
     
  22. Student

    Student New
    Builder

    Joined:
    Mar 22, 2020
    Messages:
    4
    Likes Received:
    0
    Thank you all for your valuable suggestions. I'll try to get a nano.
     
  23. stuart wallace

    Builder

    Joined:
    Jul 28, 2019
    Messages:
    57
    Likes Received:
    6
    Hi there,
    Hope you're well. Something went a little awry today and I can't figure out what. I hadn't changed out the bit (tapered ballnose). In aspire, I duplicated the oval domes into a row above the bottom one that I already did. Here is a photo of the problem... I believe it happened when going from one dome to the next. Here is a photo of the material. Many thanks for any help solving this mystery.
    Also, for whatever it's worth, openbuilds control software wouldn't do the 3d display for this when I loaded it. It ran the job fine except for this error.
    take care and all the best
    Stuart
     

    Attached Files:

  24. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    748
    Can't be 100% sure, but doesn't look like a grbl issue to me, looks like a simple physical proximity issue. The tips of the ovals are too close, and it's cutting into the second row as it cuts the top side of the first row. Offset the second row horizontally by a half width, like a scale or brick pattern, instead of going straight vertically up.
     
  25. stuart wallace

    Builder

    Joined:
    Jul 28, 2019
    Messages:
    57
    Likes Received:
    6
    Gotcha, many thanks. I'll give that a try for the next row as I work out different variables. Cheers
     
  26. RegPye

    RegPye New
    Builder

    Joined:
    Jul 1, 2014
    Messages:
    15
    Likes Received:
    7
    Some good software that I have been using for my laser engraver, both are free.
    I have tried quiet a few, but of them all I found that LaserWeb was very good, but has a bit of a learning curve.
    The best one for me has been LaserGRBL, almost no learning curve and excellent results.
    Both can be downloaded over the net.
     
    Peter Van Der Walt likes this.
  27. Thomas C Kelly

    Builder

    Joined:
    Oct 30, 2019
    Messages:
    2
    Likes Received:
    0
    i have lead 1010 with blackbox when i open control side works fine i can jog machine but when ii go to cam side the screen for drawings is black and when i load hello world you can not see anything thanks in advance with any help
     
  28. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,919
    Likes Received:
    4,291
    Your PC/Browser needs to support WebGL properly. Try Chrome browser (if you were using something else) or try a different computer
     
  29. Omar Elrazaz

    Builder

    Joined:
    Apr 8, 2020
    Messages:
    1
    Likes Received:
    0
    this is my 1st post here and i really need help
    so from 1 year ago i bought this 3018 CNC ..
    i start to work with it a littile bit then i changed to Laser Engraver..
    so more than 7 monthes i didnt touch it and i lost all drivers and programs for it ..
    is there any way that i can formated and fresh install new GBRL 1.1?? i'm planning to use Light burn program for laser.
    i got Xloader and GRBL1.1 but seems that there is something wrong with my selection of boards as i dont know wich one of those i need to select
    here is a pic of my board and a pic of the screen i got in Xloader.
    in windows com its CH340 com 9 i did change the number to 115200
    thanx in advance guys..
     

    Attached Files:

  30. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    315
    Likes Received:
    138
    I can't tell from the picture but it doesn't look like that chip is a mega2560 and knowing how cheap these Chinese controllers are, it's probably a 328p. Can you get a better picture of the chip I circled? Need to be able to actually read the lettering on the chip.

    But, fair warning, even if you get the right chip number, there's no guarantee that they use the default GRBL pinout. Where did you get GRBL for loading? How do you know it's the right version for your board?

    fair warning part 2. Do you know which version of GRBL your board runs? If you hook up a sender app to it (or a terminal), can you send it a "$I", that should give you version info. GRBL changed the 1.1 pinouts from earlier versions and you need to know what version this board was built for.

    Finally, why do you think you have to upgrade in the first place. If it ain't broke, don't "fix" it.
     

    Attached Files:

    #1080 phil from seattle, Apr 8, 2020
    Last edited: Apr 8, 2020

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice