INSTRUCTIONS:

Check out the new MoBeam posts! To find K40 conversion information use the "INDEX", "SEARCH" or "LABELS" sections in the sidebar.

Tuesday, December 29, 2020

SKR to K40 integration

I recently worked with a K40 builder that needed to integrate the following:

This post shares the integration details.

WARNING: as of this date this integration has not been tested since I do not have an SKR board.

If you try this out and need help or got it to work please comment below.

Other similar work 

Connecting the SKR and the LPS;

I do not recommend the method used to attach the SKR to the LPS outlined in the  https://www.civade.com. The reasons are posted elsewhere in this blog.

The method that I recommend is outlined in this post. It uses one PWM signal from the smoothie to drive the LPS-L pin (or equivalent on other LPS). The LPS-L expects ground signal to turn on the laser, therefore an open-drain MOSFET is chosen as the output. 

laser-power-supply-control-take-2.html

If the SKR is truly a smoothie clone then this configuration should work.

About the SKR board

About the HY-T60 

Connection to SKR

This connection is for the typical K40 analog panel. Another configuration is needed if you have a digital panel. Comment if you need help with that.
The diagram below shows how to connect this type of supply including safety, test fire, interlocks, water protection, and power control pot.
On an SKR integration, the connection will be from SKR-E2 to the LPS-TL. This connects an open drain MOSFET on the SRK to the LPS-TL. When the PWM signal is true it will ground LPS-TL and turn the laser on.



SKR Equivalent circuit

This diagram shows the connection between the SRK's P2.4 pin 69, which is PWM capable, and one of the SRK's MOSFET drivers (Q1).
  • The output of this MOSFET is located at E1-2. 
  • Do not use E1-1 as it is VBB
  • Pick up the ground from DCIN-Gnd


Smoothie configuration

Below is my K40 configuration which uses a genuine smoothie boards P2.4 connection.
If the SRK is a true clone this configuration file should work.

Note: I have no way to test this as I do not have an SRK board.

Dons smoothie configuration

Note this is just the laser configuration section of the configuration file;

_______________________

## Laser module configuration
laser_module_enable                          true            # Whether to activate the laser module at all. All configuration is
                                                              # ignored if false.
laser_module_pin                             2.4             # this pin will be PWMed to control the laser. Only P2.0 - P2.5, P1.18, P1.20, P1.21, P1.23, P1.24, P1.26, P3.25, P3.26
                                                              # can be used since laser requires hardware PWM
laser_module_maximum_power                   .8             # this is the maximum duty cycle that will be applied to the laser
laser_module_minimum_power                   0.0             # This is a value just below the minimum duty cycle that keeps the laser
                                                              # active without actually burning.
laser_module_default_power                   0.3             # This is the default laser power that will be used for cuts if a power has not been specified.  The value is a scale between
                                                              # the maximum and minimum power levels specified above
laser_module_pwm_period                      20              # this sets the pwm frequency as the period in microseconds

switch.laserfire.enable true #

switch.laserfire.output_pin 2.5^ # connect to laser PSU fire (!^ if to active low, !v if to active high)

switch.laserfire.output_type digital #

switch.laserfire.input_on_command M3 # fire laser

switch.laserfire.input_off_command M5 # laser off

_________________________


Enjoy and please comment
Don

6 comments:

  1. Don,
    Thanks again for your help.
    [UPDATE] I now have the BT SKR 1.4 Turbo activating the X & Y stepper motors using a version of your config file and the smoothieware firmware. I'm using Prontoface to send the commands to the board.
    [QUESTION] The SKR Equivalent Circuit shows a 5K POT, am I safe to use a 10K pot? Link:https://www.amazon.com/Taiss-Precision-Potentiometer-Adjustable-3590S-2-502L/dp/B07D7YH9N2?ref_=ast_sto_dp&th=1
    AtB,
    Scott
    PS: I will post my config file (once tested) and any deviation to my build once complete.

    ReplyDelete
  2. [QUESTION] The original K40 had a ceramic 28K ohm resistor between the laser tube cathode and the AMP meter. None of the diagrams I've seen with the HY series power supply show this resistor...should I leave it in the circuit or remove it? I have a picture but I am unable to upload it to the blog.

    ReplyDelete
    Replies
    1. Ceramic resistor removed - no issues on the HY-T60.

      Delete
  3. Minor setback. The hose barbs on the 60W laser tube are significantly larger (.375 OD) than the OEM tube (.25 OD) so I am going to need new tubing and I'm going to upgrade the cooling pump.

    ReplyDelete
  4. Quick update: Everything is functional. Laser is firing properly. Initially had an issue where the stepper would ONLY go in the X- direction when engraving/cutting. When using the 'move' window in lightburn or protoface it would move appropriately in the negative X direction. The fix was to disable the PWM Fan pin in the config file. The X stepper was on the 2.6 pin and the PWM Fan pin was assigned 2.6. When lightburn turns on the laser it uses M2 and M106 (PWM Fan enable) and to turn the laser off it uses M5 and M107 - Lightburn likely does this to cover all bases, but in my case confused the X- direction.

    The remaining issue to solve is the stepper moves in both directions at a 2:1 ratio...1mm commanded, it moves 2mm...etc. More to follow.

    ReplyDelete
  5. Every is working *PERFECTLY* I solved the 2:1 distance issue...it was two-fold. The larger of the two problems was the steppers were wired incorrectly; however, worked as directed with ~160 steps/mm. When I changed to 320 or 80 both motors acted erratically (noisy) but in different mannerisms. The SKR BTT 1.4T stepper pin-out is 2B,2A,1A,1B which if you convert to stepper language is B-,B,A,A-. If you use factory wiring for the version of K40 (no middle man board and no ribbon cable) the wiring is Red, Blue, White, Yellow for a 17HM3448N-15AD(-Z) (See Don's guide: http://donsthings.blogspot.com/2016/06/k40-s-motors.html). The X stepper was wired Red, Blue, White, Yellow to 2B,2A,1A,1B and the Y stepper was White, Yellow, Blue, Red to 2B,2A,1A,1B. Once I switched them both to Yellow, White, Red, Blue to 2B,2A,1A,1B and changed the steps/mm to 80 (instead of 160), the steppers moved in a 1:1 ratio...I think this means I am using 1/8 microstepping instead of 1/16. I might investigate my TMC 2130 driver, but unlikely since everything is working so well. If it ain't broke, don't fix it.

    ReplyDelete