Upgrading K40 Controller
May 3, 2019
[Huy Le]
5 minute read
PROJECT LAYOUT

K40 Laser Engraver

Upgrades #

Add Switch to change between manual power, and PWM power #

  • add in a switch to switch between a potentiometer and the PWM power from the laser for the IN line on LPS"
  • K40 Laser Engraver

Controller Board Upgrades #

install an current meter to k40 laser #

Sainsmart board #

Good Wiki to read through #

Focusing Length and Beam #

Learn how to focus lens! #

https://www.youtube.com/watch?v=Eg6THrEdleo"

MKS SBASE V1.3 Board #

Chinese Board that has NXR LPC1768, running at 100MHz - documentation can be found here for this board - https://github.com/makerbase-mks/MKS-SBASE

  • Should work out of the box with GRBL?
    • Need to set the stepping for the stepper motor for the correct distance?

Setting power with pot! #

-““If you like to additionally adjust the maximum laser power with a potentiometer you can connect a pot of around 10kOhm instead of the direct connection between pin IN and 5V on the laser power supply.””

Potential Issue #

Final Configurations #

GRBL Settings #

  • Note that GRBL-LPC has more settings than just GRBL
    • particularly $140, $141, $142 for current settings for the stepper motors
    • additionally, the $30, and $31

lightburn settings #

  • USB devices

    • use ““rear left””
  • Settings window

    • use top-left radial button
  • Device Settings for USB device name here

    • use top-left radial button also
    • S-value should be 1000 here. to match the value of $30 in GRBL settings. this gives us full control through software.
  $$
  $0=10
  $1=25
  $2=0
  $3=1
  $4=0
  $5=1
  $6=0
  $10=0
  $11=0.010
  $12=0.002
  $13=0
  $20=1
  $21=1
  $22=1
  $23=3
  $24=50.000
  $25=1000.000
  $26=250
  $27=1.000
  $30=1000
  $31=0
  $32=1
  $33=5000.000
  $34=0.000
  $35=12.000
  $36=100.000
  $100=158.000
  $101=158.000
  $102=158.000
  $103=158.000
  $110=24000.000
  $111=24000.000
  $112=24000.000
  $113=24000.000
  $120=2500.000
  $121=2500.000
  $122=2500.000
  $123=2500.000
  $130=300.000
  $131=200.000
  $132=50.000
  $133=100.000
  $140=0.600
  $141=0.600
  $142=0.000
  $143=0.000
  ok

Sainsmart Board - ryc-grbl-v2 #

  • GRBL has been optimized for Ardunio’s ATmega328p

About the firmware GRBL 1.1 #

Good overall tutorial here #

http://www.oak600.com/2018/03/19/upgrading-a-k40-laser-cutter-part-1-control-board-upgrade/ Has all the settings..

(if empty in Our Value, then it uses the default)

  Option  Meaning Default Value   Our Value
  $0  Step Pulse (us) 10
  $1  Step Idle Delay (ms)  25
  $2  Step Port Invert mask   0
  $3  Direction Port Invert Mask  0
  $4  Step Enable Invert, bool  0
  $5  Limit Pins Invert, bool 0
  $6  Probe Pin Invert, bool  0
  $10 Status Report Mask  1
  $11 Junction Deviation (mm) 0.010
  $12 Arc Tolerance (mm)  0.002
  $13 Report Inches, bool 0
  $20 Soft Limits, bool   0
  $21 Hard Limits, bool   0
  $22 Homing Cycle, bool  1   0
  $23 Homing Dir Invert Mask  0
  $24 Homing Feed (mm/min)  25.000
  $25 Homing Seek (mm/min)  500.000
  $26 Homing Debounce (ms)  250
  $27 Homing Pull-Off (mm)  1.000
  $30 Max Spindle Speed/Laser Strenght (1/10 rpm/%)   1000
  $31 Min Spindle Speed/Laser Strength (1/10 rpm/%)   0   50
  $32 Laser Mode, bool  0   1
  $100  X Steps/mm  250.000 158.000
  $101  Y Steps/mm  250.000 158.000
  $102  Z Steps/mm  250.000 158.000
  $110  X Max Speed (mm/min)  500.000 50000.000
  $111  Y Max Speed (mm/min)  500.000 50000.000
  $112  Z Max Speed (mm/min)  500.000 50000.000
  $120  X Accel (mm/sec&2)  10  300
  $121  Y Accel (mm/sec^2)  10  300
  $122  Z Accel (mm/sec^2)  10  300
  $130  X Max Travel (mm)   200.000
  $131  Y Max Travel (mm)   200.000
  $132  Z Max Travel (mm)   200.000

need to enable laser pin #

Flashing #

  • use Arduino IDE, and UNO board (indeed has a ATmega328p)
    • success from user in Amazon review

Worked on #

  • Negative Homing

  • Homing Switches

    • Had to invert $5
  • Motor speed - in mm/min not mm/s

    • setting the motors speed limit on Lightburn, watch for mm/min vs mm/s
  • Change laser enable pin to Z+ (limit switch in code)

    • change in source to take on the Z+ as the pin
  • Min ““Spindle”” speed - 25 - allow to cut through corners

    • or else, the corners wont be cuts
    • ideally, we want to to set this value to be minimum as possible to reduce burn in the corners
  • Weak power control

    • S-power setting in Lightburn gets changed to 2000, twice that of the $30 value in GRBL of 1000
    • S-power setting is in Edit->Device Settings
    • This 2000 is doubled of the 1000 value, which is the limit set in the config.h file

FINAL CONFIGURATION #

  $0=10
  $1=25
  $2=0
  $3=2
  $4=0
  $5=1
  $6=0
  $10=1
  $11=0.010
  $12=0.002
  $13=0
  $20=0
  $21=1
  $22=1
  $23=3
  $24=25.000
  $25=1000.000
  $26=250
  $27=1.000
  $30=1000
  $31=50
  $32=1
  $100=158.000
  $101=158.000
  $102=158.000
  $110=3000.000
  $111=3000.000
  $112=3000.000
  $120=300.000
  $121=300.000
  $122=200.000
  $130=300.000
  $131=200.000
  $132=200.000

Settings for LightBurn Cuts #

Grayscale on Plywood #

  • Speed: 65mm/s
  • Max Power: 0.75
  • DPI: 750
  • Overscanning: 2.5%"


comments powered by Disqus