Stepcraft HF Spindle

Moderators: TomKerekes, dynomotion

Post Reply
robgmsn
Posts: 6
Joined: Fri Jan 12, 2018 4:59 pm

Stepcraft HF Spindle

Post by robgmsn » Thu Jun 28, 2018 1:44 pm

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

User avatar
TomKerekes
Posts: 155
Joined: Mon Dec 04, 2017 1:49 am

Re: Stepcraft HF Spindle

Post by TomKerekes » Thu Jun 28, 2018 4:47 pm

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.
Regards,

Tom Kerekes
Dynomotion, Inc.

robgmsn
Posts: 6
Joined: Fri Jan 12, 2018 4:59 pm

Re: Stepcraft HF Spindle

Post by robgmsn » Thu Jun 28, 2018 8:23 pm

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

robgmsn
Posts: 6
Joined: Fri Jan 12, 2018 4:59 pm

Re: Stepcraft HF Spindle

Post by robgmsn » Thu Jun 28, 2018 8:26 pm

What's the most stable 5V supply on the KSTEP or KFLOP?

User avatar
TomKerekes
Posts: 155
Joined: Mon Dec 04, 2017 1:49 am

Re: Stepcraft HF Spindle

Post by TomKerekes » Thu Jun 28, 2018 8:44 pm

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
Regards,

Tom Kerekes
Dynomotion, Inc.

robgmsn
Posts: 6
Joined: Fri Jan 12, 2018 4:59 pm

Re: Stepcraft HF Spindle

Post by robgmsn » Fri Jun 29, 2018 2:35 pm

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

User avatar
TomKerekes
Posts: 155
Joined: Mon Dec 04, 2017 1:49 am

Re: Stepcraft HF Spindle

Post by TomKerekes » Fri Jun 29, 2018 3:13 pm

Hi Rob,

That is exactly correct and should work.
Regards,

Tom Kerekes
Dynomotion, Inc.

robgmsn
Posts: 6
Joined: Fri Jan 12, 2018 4:59 pm

Re: Stepcraft HF Spindle

Post by robgmsn » Fri Jun 29, 2018 4:23 pm

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 :)

Post Reply