Page 1 of 1

Stepcraft HF Spindle

Posted: Thu Jun 28, 2018 1:44 pm
by robgmsn
Hey guys,

I've got KFLOP/KSTEP running a 3 axis router.

Spindle is a Stepcraft HF Spindle. I set the speed and turn the spindle on manually. As per the table on P18 of the manual, the spindle can be controlled via a 15 pin DSUB, Pin 13 Spindle On/Off, Pin 7 PWM (0-5v)

https://www.stepcraft-systems.com/image ... 500-v7.pdf

Mist coolant is also controlled manually by a airvalve.

The end game is to have the spindle and coolant controlled via GCode M3 / M5, and if possible the speed via Sxxx.

My questions are:

1) Is this possible with my setup?
2) What would be the recommended setup?
3) How do IO Bits translate to IO Ports? e.g. KSTEP JP33 Pin 1 = KSTEP Signal Relay0+ = KFLOP Signal IO0. If I configure in KMotionCNC. M3 to set IOBit0 to High, will this appear at KSTEP JP33?

Many thanks

Rob

Re: Stepcraft HF Spindle

Posted: Thu Jun 28, 2018 4:47 pm
by TomKerekes
Hi Rob,

I wasn't able to find any specification for the PWM or Spindle On/Off. You would need to research this or do some experimentation.

For the "PWM signal" they might be expecting a 0-5V analog input. If so, the KStep Analog output might be used. You might experiment by connecting a 1.5V battery connected through a 1K Ohm resistor and see if you get 30% of full speed. See also the \C Programs\KStep\KMotionCNC\Spindle_S_Kstep.c example.

Similarly with Spindle On/off you would need to determine what voltage/current is expected. Most likely a KStep Relay Driver Output #0 could be used to apply a voltage to turn on the spindle. Experiment with the KMotion Digital IO Screen for IO bit 0 as an output. If that works then you could configure M3/M5 to control IO0.

Re: Stepcraft HF Spindle

Posted: Thu Jun 28, 2018 8:23 pm
by robgmsn
Okay, that worked, but it needed both the Spindle On and PWM Signals. I had the 1.5V battery negative to pin 10 (gnd), positive to pin 13 (spindle on), and via the 1k resistor to pin 7 (pwm).

So next steps are to wire it up to the KSTEP Analogue output. I think I'll use the same 5v supply through the Relay Driver Output #0.

Thanks for the pointers :D

Re: Stepcraft HF Spindle

Posted: Thu Jun 28, 2018 8:26 pm
by robgmsn
What's the most stable 5V supply on the KSTEP or KFLOP?

Re: Stepcraft HF Spindle

Posted: Thu Jun 28, 2018 8:44 pm
by TomKerekes
Hi Rob,

It seems that proves 1.5V is enough to turn the Spindle On. It still isn't clear what the voltage should really be or if using a relay driver output to switch it fully to 5V would cause damage to the Drive or the KStep relay driver. You might add something like a 220 ohm series resistor to be safe. You could also then measure the current by measuring the voltage across the resistor.

Which supply is most stable would depend on what supplies you are providing each, or if you are in non-isolated mode they would be the same supply.

The KStep Analog output (as well as the relay drivers) are opto isolated from KStep/KFLOP. In order to maintain the opto-isolation you would need to use a separate supply. If you were to connect the KFLOP/KStep +5V or GND to the Drive you would be defeating the opto isolation. It isn't clear to me what the Spindle Drive GND is common with.

HTH

Re: Stepcraft HF Spindle

Posted: Fri Jun 29, 2018 2:35 pm
by robgmsn
Hi Tom,

Thanks for the info. I've had a look inside the spindle electronics and it looks like the Spindle On/Off is buffered through a standard NPN transistor, before heading to an ATMEGA16 GPIO pin, so that should be pretty straight forward.

The bit I'm struggling with is understanding how you control the Relay Driver Outputs from the Digital IO panel. I would have thought you would set both pins 1 and 2 as output, then toggling the State would do the trick. If you have 5v into Pin 1, then it would appear at Pin 2, or am I missing something?

As per this diagram:

Image

Re: Stepcraft HF Spindle

Posted: Fri Jun 29, 2018 3:13 pm
by TomKerekes
Hi Rob,

That is exactly correct and should work.

Re: Stepcraft HF Spindle

Posted: Fri Jun 29, 2018 4:23 pm
by robgmsn
Thanks Tom, good to know.

I think I've got enough info to get this hooked up properly. I'll let you know how it goes.

Thanks again and have a good weekend :)