With the Stepper Brick one bipolar stepper motor with a maximum current of 2.5A and a maximum voltage of 38V per phase can be controlled over USB. With the provided API for many programming languages you can control the direction, velocity and acceleration of the connected motor.
The maximum driving current and the decay mode can also be controlled. The current consumption and power supply voltage can be measured by the API.
Two Bricklet ports can be used to extend the features of this Brick. It can also be used together with other Bricks in a stack. For example an additional Master Brick with Master Extension allows to replace the USB connection by other cable based (RS485, Ethernet) or wireless (WIFI) connections.
The stepper motor can be powered by an external power supply connected directly to the Brick (black connector) or by the stack internal power supply. If an external power supply is connected the Brick automatically switches to this power supply.
|Maximum Motor Current per Phase||2.5A|
|Minimum/Maximum Input Voltage||8V/38V|
|Step Modes||full, half, quarter, eighth steps|
|Decay Modes||slow decay, fast decay or configurable mixed decay|
|Maximum Velocity||0 to 65535, configurable as limit, in steps/s|
|Maximum Acceleration||0 to 65535, configurable as limit, in steps/s²|
|Dimensions (W x D x H)||40 x 40 x 17mm (1.57 x 1.57 x 0.67")|
The following picture depicts the different connection possibilities of the Stepper Brick.
To test a Stepper Brick you need to have Brick Daemon and Brick Viewer installed. Brick Daemon acts as a proxy between the USB interface of the Bricks and the API bindings. Brick Viewer connects to Brick Daemon. It helps to figure out basic information about the connected Bricks and Bricklets and allows to test them.
Connect a stepper motor to the Brick and a suitable power supply (see here). Your setup should look like below.
Now connect the Brick to the PC over USB, you should see a new tab named "Stepper Brick" in the Brick Viewer after a moment. Select this tab.
In the left part of the GUI you can enable the driver and control the velocity, acceleration and deceleration of the stepper. Below there are three buttons that control the direction of the stepper and stop it. For example if you press "Forward", the stepper will increase its speed to "Max Velocity" with the given acceleration. If you press "Stop" it will decrease its speed to "0" with the given deceleration.
Below you can set the stepping mode (full, half, quarter, eighth) stepping mode and trigger a "Full Brake", which stops the motor immediately.
You can drive to a specific position (measured in steps) by entering it at "Drive To" an press "Go". Also you can drive a specific number of steps. By using these controls the motor will accelerate until reaching the maximum velocity and decelerate before reaching the specified position.
On the right side the current position and remaining steps are shown as well as the stack and external voltages. Below is a graphical representation of the velocity of the stepper. Beneath you can configure the minimum input voltage, which allows for undervoltage signals if the voltage is too low. In the bottom right the motor current can be configured according to the connected motor.
After this test you can go on with writing your own application. See the Programming Interface section for the API of the Stepper Brick and examples in different programming languages.
The connected stepper can be powered through the black on-board power-connector or through a Power Supply in a stack. The Brick switches automatically to the on-board power-connector when a voltage is measured there.
For a good explanation of the different decay modes see this blog post by Avayan.
A good decay mode is unfortunately different for every motor. The best way to work out a good decay mode for your stepper motor, if you can't measure the current with an oscilloscope, is to listen at the sound of the motor. If the value is too low, you often hear a high pitched sound and if it is too high you can often hear a humming sound.
Generally, fast decay mode (small value) will be noisier but also allow higher motor speeds.
The red LED is enabled if the input voltage is below the user configurable minimum voltage.
See Programming Interface for a detailed description.
|Visual Basic .NET||API||Examples||Installation|