SKR 1.4 Turbo Spindle Pins

Trying to figure out where to connect my spindle to SKR 1.4 Turbo. I managed to compile by using the generic solution on marlinfw.org:

#define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM laser TTL input
#define SPINDLE_LASER_ENA_PIN 4 // CO2 PSU enable input

but I can’t figure out where to actually connect the physical wires now? And does this mean I don’t need a separate PWM controller now, just the two wires from the spindle can go directly to the board, right? I also have a laser I’d like to use occasionally but I’m not sure how to enable both in the firmware since it makes you choose one or the other.

I checked all the hotend, heater, and fan ports on the board with a meter and couldn’t see any change when I turn on the spindle from TFT so I’m totally lost and could use some help. I haven’t really messed with my MPCNC or my printer firmware in almost a year so I’ve forgotten a lot of what I’d learned.

No. you DO need a seperate PWM driver module. The signal pin you have designated (pin 6) is only a very low power output, you need to feed that signal into a PWM driver board that you connect your spindle to.

According to the schematic for the SKR v1.4 Turbo pin 6 is P0.26 which appears at pin 5 of the SPI pinheader.


spi

1 Like

Thank you that’s exactly the info I was looking for. So does the pwm controller have to be any certain kind or will the basic one work with psu +/- and motor +- with just a knob and the signal from the board takes the place of the potentiometer or does it need to be one with more connections on it?

On my setup (different CNC control board and different PWM controller), I was able to add a DPDT switch an can use it to select between computer/CNC control or potentiometer control for spindle speed.

1 Like

Can you send me a link to the pwm controller you’re using?

It’s a “build your own” closed-loop solution based on an AC control board that was sold in the V1 shop and an Arduino Nano for the PID compute work. I’m not sure if the parts are still available.

The A/C control board accepts a 0-5Vdc PWM signal which can be calculated by the program on the Nano and sent on a signal/ground pair, and the potentiometer just varies the 5V from the control board logic bus, so the DPDT switch just picks between those sources for the PWM signal.

1 Like

I just used a simple MoSFET driver module like this one.

It was for a small 550 DC type spindle so 400 Watts was plenty. You would need to consider the power requirements for your spindle and choose a module accordingly…

Also bear in mind there is no feedback in this setup, the motor speed will vary with load and may not like very low settings.

The MosFET module would not be needed for your laser, you can feed the PWM signal from your SKR directly into the lasers PWM input along with a 12V and ground power feed, although I would be tempted to add a 470 ohm series resister between SPI pin 5 and the laser PWM in pin to provide at least a modicum of protection to the SKR’s MCU…If it affects the PWM performance it could be reduced in value or even removed.

1 Like

I finally got it working. If any of this looks like a disaster waiting to happen let me know, I still don’t have the best working knowledge of how all this stuff works but trial and error resulted in the following solution:

Since both my laser and my spindle can run on PWM alone with just two wires, all I had to do was add

#define SPINDLE_LASER_ENA_PIN = P2_05
#define SPINDLE_LASER_DIR_PIN = P2_05
#define SPINDLE_LASER_PWM_PIN = P2_05

in configuration_adv.h (all 3 of them can be on the same pin since only the PWM pin will be used AFAIK), and then I use the actual spindle/laser function (M3/M5) in Marlin rather than the asynchronous laser function (M106).

That particular pin on my SKR 1.4 Turbo is the heatbed since I figured it would have a bigger MOSFET than the two extruder connections or the fans.

Now it accepts the normal M3/M5 commands and runs with only two wires connected to the board but I’ve only tried it with the spindle so far. It draws too many amps all at once this way, a plain M3 command turning the spindle on to full power will reset the board so I’m trying to figure out if adding a capacitor or something will fix that. For now I just have it come on at half speed first, then ramp up to full speed.

The laser was much easier with the async function (M106) but I’d like to try the inline features.

The next thing I want to try is to have both spindle and laser connected to the board at the same time and use the software to activate one or the other with one mount to accommodate both of them at the same time.