KStep Hardware Info

From Dynomotion

Jump to: navigation, search
KSTEP perspective1 400.jpg

Need to get up and running with KSTEP fast? View this high-level explanation of a basic KSTEP setup:


KStep Hardware/Connectors

Block Diagram of KSTEP Board Layout
KStep Use and Settings KSTEP Basics Tutorial

KStep Motor Power Supply (VB) Type Regulated Switching vs Linear

Switching supplies work well with KStep. A common reason that switching supplies are not recommended with some other stepper drives is because of regenerative braking.  In some cases with fast stops, E-Stop, or even a stall, the mechanical energy must go somewhere.  If pushed back into the power supply the voltage can rise and trip the supply's over-voltage circuit, possibly requiring a power cycle to reset.  Or worse, a damaged power supply or stepper driver.  Linear supplies usually don't have over voltage protection to trip and usually have very large capacitors to absorb energy.  KStep has an over voltage clamp circuit that absorbs the energy and avoids this problem.  So Switching supplies work well with KStep.

Unregulated linear supplies built with a Transformer, Diodes, and Filter Capacitors can also be used. But care should be taken that the no load voltage does not exceed KStep's Clamping Voltage.

KStep Motor Power Supply (VB) Current Requirements

The power supply should be sized to handle the worst case power situation. Even though the system might not often demand a high power, we wouldn't want to risk a stall if it does.  A supply's power output can be calculated by multiplying its voltage and current.  For example a 36V @ 10 Amp supply can supply 360 Watts of power.

A common misconception is to assume the sum of the motor currents is equal to the supply current.  The average supply current will usually be much less.  It is a power issue rather than current.  This is due to conservation of energy, power in equals power out.  Power in is the Supply Power.  Power out is motor heat and mechanical power.

When steppers are stopped or moving slowly (even while generating great torque) very little power is consumed.  Most any stepper drive's efficiency is very high.  Power from supply basically equals power to motor.  KStep's efficiency is exceptionally high because of the very efficient MOSFETs used. (17 mOhms this is also why no heat sink is required).  So virtually all the supply power goes into the motor as either a few watts of heat or work performed.  To do work the motor has to be moving.

The mechanical power output of a motor is it's torque x velocity.  A stepper motor's output power is limited because as the speed increases it is usually not possible to keep the current flowing (torque drops).

Example: assume motors are 3V @ 5Amps. When stopped (no mechanical power) the motors will consume 15 Watts of power that heat the motor. The power from a 48V supply would only be:

15W / 48V = 0.3125 Amps

When moving at high velocity under load the motor will be creating mechanical power and will draw correspondingly more power from the supply. But it is usually not possible to get more than 100W of mechanical power from a stepper motor because torque typically drops rapidly with speed. Here is an on-line calculator

Example: 200 oz-in (12.5 lb-in, 1.41Nm) x 400 RPM = 60Watts

KStep Motor Power Supply (VB) Voltage Requirements

KStep allows an Motor Input Voltage (VB) in the range of 12-48V.  Because of the design of KStep the Motor Supply Voltage shouldn't be more than ~15X the Motor Voltage or poor micro-stepping may result. 

If not specified, the Motor Voltage will be the Coil Resistance x the Coil Current.  For example a motor coil resistance of 0.7 Ohms at 4 Amps of current will require: 0.7 x 4 = 2.8V

Because 2.8V x 15 = 42V a 42V or lower supply may be used.

Note that motor wiring resistance can increase the total resistance and increase the Motor Voltage required.  So longer/thinner motor wiring can ironically allow the use of a higher Supply Voltage.  Reference to Wire Resistance

For example 10ft (20ft round trip) of 20AWG wire (10.4 Ohms/1000ft) would add:

20 x 10.4 / 1000 = 0.208 Ohms

That would increase the allowed Supply Voltage in the above example to (0.7 + 0.208) x 4 x 15 = 54.5V (so 48V could be used)

The factor of 15 comes from the fixed off time and minimum on time (blanking time) of the KStep Switching Driver Circuit used.  Higher Supply Voltage makes controlling small currents difficult.  At 16X micro-stepping a stepper motor coil must be regulated to 10% of full current.  If 1/15th of the Supply Voltage is required for full current then only 1/150th Supply Voltage is required for 10% current.  The minimum on time vs fixed off time makes it not possible to be on less than 1/150th of the time.

An analogy might be maintaining the water level in a tank, with a leak, by switching on and off an input valve with a process of:

1 - Open the valve

2 - wait 1 second for the waves caused by switching on the value to diminish

3 - wait for the water to be at or above the desired level

4 - switch off the valve

5 - wait 149 seconds (water should leak out to below desired level)

6 - repeat

Note the valve will always be open at least 1/150th of the time.  If this raises the level by more than the amount that leaks out over 150 seconds then the level increases above the desired level.  Imagine the input from a fire hose making it difficult to add a small enough amount of water.  Note the leak is analogous to the motor resistance.

KStep Analog Output for Spindle Control

KStep has an isolated Analog output that operates much like a 3 pin potentiometer POT) where some supply voltage is applied (+5V, +10V, or +12V and GND) and the output voltage can be commanded to a voltage between GND and the Supply.  See the section "Optically isolated PWM to Analog Circuit" here

Note a separate supply (or voltage from the Spindle Drive) should be used as the analog source in order to avoid defeating the isolation between the Spindle and other control logic.

Once connected the Example Program \C Programs\KStep\Spindle_S_Kstep.c can be configured to KMotionCNC's S Action on the Tool Setup | M0-30 page.  Configure as Exec Prog with Var #1 and some unused Thread (ie #2).

At this point commanding an S word in GCode or in the MDI input such as:


should set a Voltage on the Analog Output to control the speed.  The Spindle Override Slider should then also control the speed. You might confirm this with a voltmeter connected with the Black wire to the GND and the Red wire to the Analog Output.

To Scale the speed properly for your system adjust the factor in the Spindle_S_Kstep.c Program to an RPM value that your system runs when commanded ith the full Analog Voltage:

define RPM_FACTOR 500.0 // RPM for full duty cycle (max analog out)