I`ve tried to find a way to stay with my Workflow using Freecad for Developing and Path creation. But there are not postprocessors for Marlin in Freecad. So I decided to run grbl on my GT2560 Rev A board. The first try was with the setup from John Boiles and it looked good but the steppers didn’t moved. So I took a deeper look and can now present a commit with correct pin mappings to run grbl-Mega-5x.
The code is here it is currently only one commit and I havn’t tested the end stops as they are not wired on my machine at the moment. The grbl config you can find here.
Great topic, I was looking for days to wire my GT2560 as cnc, thanks a lot!
Unfortunately, I burn the pwm for the spindle (hotbed). How can I change it in cpu_map.h to use coolant flood or mist pins (heat0 or heat1)?
Thanks,
this gave me the possibility to reuse my GT2560 board. I installed the software and everything runs fine but the steps/mm don’t match my setup. When I try to adapt the controller settings from 200 steps/mm to 100 steps/mm things start to go wrong. I have the impression that only one of the steppers runs at the new rate while the other still runs at 200 steps/mm.
Is there more to change that $100 and $101 ???
you just need to take a look into the cpu_maps.h there are comments about which pin is wired to which functionality. As stated above, coolant and mist are wired to to heat-0 and heat-1 so you just need to swap them out with the hotbed pin. I don’t have the Spindle connected to the board so I don’t use these wires and don’t know if they work. I even don’t know if heat-0/1 are pwm outs.
I’m sorry, it took me hours to find out th pin mapping from marlin to GT2560 and back to grbl. And I must admit that I only have gone as far as needed to run my setup on the board.
After some tries with no result I took the risk to solve the problem hardwarically! The R29 was burnt, I replaced it with R28 and now everything works fine. (M4 command not tried yet).
I guess that there is an error in pin or port assignment in laser mode. Sxxx command does not change the power of my ttl laser at all. I am using the original grbl from this topic… Does anyone is using GT2560 in laser mode to confirm this?
@johnboiles, Do you have any advice for ksdfpr? I know grbl uses the microcontroller notation for pins, and I’m not sure if PWM uses the same port configurations…
I haven’t poked around with PWM support in GRBL so I can’t be a ton of help I’m afraid. But I can share what I remember about using PWM on AVR chips from 10 years ago before Arduino made it easy. There are only certain pins that support hardware PWM. I don’t remember which. And there’s some extra registers you need to configure to set up the pulse timing (maybe called something like OCCR registers or something). You prob will need to do some datasheet reading.
Arduino made PWM and pin assignments super easy and we’re all spoiled now