hi forum, i want to connect a mks sbase board with grbl-lpc firmwar to a 3 axis cnc, what should i change on the config.txt to use a 220v spindle?
Hi marcello do you mind me asking which pin you have used to control your spindle?
at the moment I don’t have the mks sbase board yet, I can turn the 220v spindle on manually, or if I can connect a relay to turn on the spindle with m3 and m5 tell me how to do it, since grbl-lpc is configured for laser I want to understand if I can control a cnc
grblLPC doesn’t use config.txt, that’s a smoothieware thing.
is it true i got confused, just set $ 32 = 0?
if I want to connect a relay to turn on the spindle, on which pin to enable it?
I’m looking at using it for a laser but cannot discern the pin, if any, that would be suitable for a 2 pin connection.
The configured pins are documented on the grblLPC binary download page here:
To switch a spindle on/off use the flood or mist pin wth a relay or SSR.
For Laser there is no 2-Pin configuration. Just use the PWM pin for laser power and the original panel switch for laser enable.
please explain to me which relay to buy and how to connect it?
On the MKS SBase board, the flood output is on Pin2.7 which is a mosfet output for Heater1.
The relay needs to be matched to your spindle needs (ac/dc, voltage and current) and the relay magnet needs to be for your power supply (the voltage you connect to the 12-24V input on the MKS).
For an AC spindle use something like this:
For a DC spindle of up to 60V use something like this:
Hi Claudio thanks for the reply.
I mistakenly put 2 pin when I meant 3, it had been a long day!
So for a 3 pin lasewr diode connecter 12v requiring +, ground and pwm which wires would go into p2.5 and where would the other go?
Sorry, very new to this.
my spindle is at 220v, is the first relay ok, I connect the + and - of the relay to the + e- pin 2.7?
The + pin of the heater1 port is directly connected to the + pin of the 12-24V board input. The - pin of the heater1 port is connectd to the mosfet (switch), which connects to the - pin (GND) of the 12-24V input.
This results in a inverted PWM signal, which means it’s usable for typical CO2 lasers, but not directly for laser diodes.
For a laser diode you need a non inverted PWM signal, which means you cannot use the mosfet output. I made once a special bin file for a MKS SBase board for this case (Release New general release · cprezzi/grbl-LPC · GitHub), where digital pin 1.23 on connector J6 is used for PWM output insted of the mosfet.
Hint: The digital pin only delivers 3.3V. Some laser modules accept PWM and analog signals on the PWM input, which means 100% PWM at 3.3V (instead of 5V TTL) will only deliver ~66% power.
Yes, the first SSR is ok.
Just connect the SSR + input to P2.6 (flood) + and - to P2.6 -.
ok, I did not understand if the relay turns on and off with M3 and M5?
M3/M5 is for PWM controlled spindles where the rpm is controlled by the gcode S value.
For on/off spindles I would use the flood output M8/M9 (therefore P2.6).
If you prefer to use M3/M5, you can use output P2.5. But make sure you only use 0% or 100% PWM.
By the way: I don’t think grblLPC is a good match for CNC mills. Smoothieware has much more features for CNC and is easier to configure.
Claudio, thank you so much for your reply. Just to be safe, which version of the MKS Sbase boards will your GRBL work on?
Would your grbl work on an MKS GEN L V1.0 in addition?
Many thanks, Laurence
I only tested the MKS SBase V1.3. I don’t expect the GENL V1.0 to work. Most other MKS and SKR boards have different stepper pinouts and are therefore not compatible with grblLPC.
Many thanks Claudio for your help with this.
Best regards, Laurence