Engee documentation

Stepper Motor Driver

Driver for stepper motor.

stepper motor driver

Description

The Stepper Motor Driver block is a driver for a stepper motor. It generates the pulse sequences, and , required to control the stepper motor. This block initiates a step each time the ENA port voltage rises above the Enable threshold voltage.

If the voltage at the REV port is less than or equal to the Reverse threshold voltage, the pulse is 90° ahead of the pulse. If the REV port voltage is greater than the Reverse threshold voltage, the pulse will precede the pulse by 90° and the motor rotation direction will be reversed.

At zero time, the pulse is positive and the pulse is negative.

When Stepping mode is set to Half stepping, the stepper motor driver unit can generate the output signals required for half stepping mode. In this mode, there is an intermediate state between full stepping in which only one of the half windings or . is energised. As a result, the step size is half of the full step of the stepper motor. At half step size, the windings that are not energised are short-circuited. This roughly corresponds to the action of a reverse circuit diode connected to the windings.

Microstep

To advance the rotor a fraction of a step instead of a full or half step, set the Stepping mode parameter to Microstepping. This mode enables ring current driven microstepping and increases the resolution in the rotor position. To select fractional step resolution, set Number of microsteps per step.

The unit initiates a microstep each time the ENA port voltage rises above the Enable threshold voltage.

In microstep mode, the current in each motor winding follows a discretised sine waveform. The current amplitude is equal to the value of the Maximum continuous current per phase parameter.

To increase or decrease the current in each microstep, the driver applies a positive or negative overvoltage until the current equals the set point.

If Power supply is set to Internal, the applied over-voltage will be equal to the value of Supply voltage. If Power supply is set to External, the applied overvoltage will be equal to the voltage between the VM and GND ports.

Averaging mode

If Simulation mode is set to Averaged for both the stepper motor driver unit and the connected unit Stepper Motor, individual steps will not be simulated. This allows for faster simulation. In Averaged mode, it is assumed that the external controller sets the step frequency. This step rate requirement is determined from the voltage applied between the ENA and REF ports on the stepper motor driver block by multiplying this voltage by the value of the Step rate sensitivity parameter. The direction of rotation is set by the REF port in the same way as in the `Stepping' mode.

The Averaged mode must send the stepper motor block a step frequency request as well as information about the amplitude of the output voltage. For this purpose, an equivalent voltage is applied to ports A+ and A-. Similarly, information about the output voltage amplitude is transmitted by supplying a steady-state voltage to the B+ and B- ports with a value equal to the Output voltage amplitude parameter.

Assumptions and limitations

  • To use `Averaged' mode, the stepper motor driver block must be directly connected to a stepper motor block that is also operating in `Averaged' mode.

  • When changing from Stepping mode to Averaged mode and back again, the blocks that provide the input voltage to the stepper motor driver block must be changed. One way to accomplish this is to use subsystems.

Ports

Conserving

# ENA — trigger input voltage
electricity

Details

A non-directional port to which a triggering voltage is applied.

Program usage name

enable_port

# REF — reference output for control signals
electricity

Details

A non-directional port to which control signal reference lines are connected.

Program usage name

reference_port

# REV — input voltage controlling the direction of motor rotation
electricity

Details

A non-directional port associated with an input control voltage.

Program usage name

reverse_port

# A+ — positive terminal of phase A
electricity

Details

Non-directional port connected to the positive phase terminal .

Program usage name

p_a

# A- — negative terminal of phase A
electricity

Details

Non-directional port associated with the negative phase terminal .

Program usage name

n_a

# B+ — positive terminal of phase B
electricity

Details

Non-directional port connected to the positive phase terminal .

Program usage name

p_b

# B- — negative terminal of phase B
electricity

Details

Non-directional port associated with the negative phase terminal .

Program usage name

n_b

# VM — supply voltage
electricity

Details

A non-directional port associated with the supply voltage.

Dependencies

To use this port, set Power supply to External.

Program usage name

p_supply

# GND — power supply ground
electricity

Details

A non-directional port associated with a power supply relative to ground.

In external power mode, ports A- and B- are internally connected to GND. A positive supply voltage must be provided, and the power supply must always be connected (e.g. you cannot put a daisy-chain switch between the power supply and the driver).

Dependencies

To use this port, set Power supply to External.

Program usage name

n_supply

Parameters

Parameters

# Simulation mode — simulation mode
Stepping | Averaged

Details

Use Averaged only if the unit is connected directly to a stepper motor unit that also operates in averaged mode.

Values

Stepping | Averaged

Default value

Stepping

Program usage name

simulation_mode

Evaluatable

No

# Enable threshold voltage — step threshold voltage
V | MV | kV | mV

Details

When the voltage at the ENA port rises above this value, the stepper motor driver unit initiates a step.

Dependencies

To use this parameter, set Simulation mode to Stepping.

Values

V | MV | kV | mV

Default value

2.5 V

Program usage name

V_enable

Evaluatable

Yes

# Step rate sensitivity — sensitivity to step frequency requirement
1/Wb | Hz/V | A/(N*m) | A/(m*mN)

Details

This parameter converts the voltage applied through the ENA and REF ports to the required step frequency.

Dependencies

To use this parameter, set the Simulation mode parameter to Averaged.

Values

1/Wb | Hz/V | A/(N*m) | A/(m*mN)

Default value

10.0 Hz/V

Program usage name

step_rate_sensitivity

Evaluatable

Yes

# Reverse threshold voltage — threshold reverse voltage
V | MV | kV | mV

Details

When the voltage at the REV port rises above this threshold, the pulse will precede the pulse by 90°, and the motor rotation direction will be reversed.

Values

V | MV | kV | mV

Default value

2.5 V

Program usage name

V_reverse

Evaluatable

Yes

# Power supply — power supply
Internal | External

Details

If Power supply is set to Internal, the applied overvoltage will be equal to the value of Supply voltage. If Power supply is set to External, the applied overvoltage will be equal to the voltage between the VM and GND ports.

Values

Internal | External

Default value

Internal

Program usage name

power_supply_type

Evaluatable

No

# Supply voltage — external power supply voltage
V | MV | kV | mV

Details

Voltage from the external power supply.

Dependencies

To use this parameter, set Stepping mode to Microstepping and Power supply to Internal.

Values

V | MV | kV | mV

Default value

10.0 V

Program usage name

V_supply

Evaluatable

Yes

# Output voltage amplitude — output pulse amplitude
V | MV | kV | mV

Details

The amplitude of the output pulse.

Dependencies

To use this parameter, set:

  • Averaged for the Simulation mode parameter.

  • for Simulation mode to Stepping and for Power supply to Internal.

Values

V | MV | kV | mV

Default value

10.0 V

Program usage name

V_output

Evaluatable

Yes

# Stepping mode — step size for step-by-step simulation
Full stepping | Half stepping | Microstepping

Details

Step size for step simulation: full step, half step or micro step.

Dependencies

To use this parameter, set the Simulation mode parameter to Stepping.

Values

Full stepping | Half stepping | Microstepping

Default value

Full stepping

Program usage name

stepping_mode

Evaluatable

No

# Stepping mode (averaged) — step size for averaged modelling
Full stepping | Half stepping

Details

Step size for averaged modelling: full or half step.

Dependencies

To use this parameter, set the Simulation mode parameter to Averaged.

Values

Full stepping | Half stepping

Default value

Full stepping

Program usage name

stepping_mode_averaged

Evaluatable

No

# Number of microsteps per step — number of microsteps per step

Details

The number of microsteps per step. This value must be a positive power of two.

Dependencies

To use this parameter, set the Stepping mode parameter to Microstepping.

Default value

4

Program usage name

step_division_ratio

Evaluatable

Yes

# Maximum continuous current per phase — maximum continuous current per phase
A | MA | kA | mA | nA | pA | uA

Details

Maximum continuous current per phase.

Dependencies

To use this parameter, set Stepping mode to Microstepping.

Values

A | MA | kA | mA | nA | pA | uA

Default value

1.2 A

Program usage name

I_max

Evaluatable

Yes