Introduction: SKR V1.3 in K40 Laser
So I bought a cheap Chinese laser from eBay having done some research.
This meant I was not just going to plug it in, blind myself, electrocute myself and set fire to the shed, I was going to do all of the upgrades and recommendations set out in the Facebook K40 Laser group. Those upgrades are going to be the subject of another post.
In this process I have been trying out Lightburn and I like it, so wanted to not just use it to create SVG files that I sent to K40 Whisperer but also to control the laser directly. I bought an Arduino CNC shield that came with 4 DRV8825 stepper drivers and the BigTreeTech SKR V1.3 to see if I could get this to work. I chose this board on price alone and the fact that it is the cheapest thing that will accept Smoothiware.
SKR V1.3 Control Board
2 off DRV stepper drivers (or basically any stepper driver that will work with the SKR board)
1m Stepper Motor Cable
2 off generic optical limit switches
4 Way 2.5 JST Socket
Step 1: Removing the Old
This picture shows the power supply configuration I have. The M2 Nano board uses the four connectors on the right. Disconnect these, the old digital power control unit used the 4 connectors on the right of the middle connector, these have been disconnected and a potentiometer and voltmeter connected to these.
Remove all of the other connections from the control board and remove the board.
This next stage is up to the individual. There is a connector board available that will connect to the existing ribbon and then allow "normal" connections to the SKR board called the Middleman Board, however I did not use this and discarded the endstops and ribbon cable and replaced them with different endstops and cables run directly to the new control board.
Step 2: Connecting the Controller to the Power Supply
The above drawing shows the details of the connections between the SKR V1.3 and the power supply. It also details the connections of an Ammeter, potentiometer, voltmeter and additional 24v power supply as this is how mine is connected.
Step 3: SKR V1.3 Pinout and Config
The attached Pinout is specifically for the BigTreeTech SKR V1.3 board. It is important to make a note of the connecting pins that you are going to use. On the left of the drawing is pin 2.5, this is the -ve pin labelled to control the bed heater. Note only the -ve pin needs to be connected and it goes to the L on the power supply.
This pin is a hardware PWM pin.
In the Config.txt file attached, The laser module configuration starts at line 98.
laser_module_pwm_pin is set to 2.5 denoting that this pin will be used to control the laser power.
The Motor pin details are shown on the right hand side of the photo.
Stepper Motor configuration starts at line 32 of the attached config file. Note alpha motor is the X axis motor
alpha_step_pin 2.2 # Pin for alpha stepper step signal
alpha_dir_pin 2.6! # Pin for alpha stepper direction, add '!' to reverse direction
alpha_en_pin 2.1 # Pin for alpha enable pin
Endstop pin numbers are shown in purple towards the middle right of the attached picture.
Endstop configuration starts at line 210 of the attached conifg.txt file. I don't know why there is the symbol at the end of the pin number eg 1.29^ it was in the config file I found, so I left it and it seemed to work.
Step 4: Firmware
I went to Github for the latest version of Smoothieware, I wont include a link as it may move or be updated, just do a search.
There is a specific CNC version of Smoothieware that you should use for Lasers and CNCs as a number of modules are not needed eg heaters and so on. You are looking for something like FirmwareCNC.bin.
Download this file and rename it to Firmware.bin.
Format the SD card that came with the SKR V1.3, I have found that they are corrupt in some way and the firmware doesn't load very well or doesn't allow a connection via the board to your computer.
Place the Firmware.bin file and the config.txt file in the root directory of the SD card, then transfer this to the board. Power up the board and after about a minute, you should be ready to go.
Obviously you need to add your stepper drivers to the board, set those up, connect your motors and endstops, however those are generic requirements well detailed elsewhere in the world.
If you are using Lightburn, there are plenty of tutorials on how to connect the computer to the laser and make sure it is all working properly. Hope this helps even just one person.