Stepper Brick

Note

The Stepper Brick Brick is discontinued and is no longer sold. The Silent Stepper Brick and the Silent Stepper Bricklet 2.0 are the recommended replacements.

Features

  • Drives one bipolar stepper motor over USB (max. 38V, 2.5A per phase)
  • API for many programming languages available
  • Position, velocity and acceleration controllable
  • Full, half, quarter and eighth step modes
  • Configurable decay mode
  • Extendable via two Bricklets ports

Description

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.

Technical Specifications

Property Value
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²
   
Bricklet Ports 2
Dimensions (W x D x H) 40 x 40 x 17mm (1.57 x 1.57 x 0.67")
Weight 20g
Current Consumption 60mA

Resources

Connectivity

The following picture depicts the different connection possibilities of the Stepper Brick.

Stepper Brick with caption

Test your 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.

Stepper Brick with motor

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.

Stepper Brick in Brick Viewer

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.

Power Supply

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.

Decay Modes

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.

Error LED

The red LED is enabled if the input voltage is below the user configurable minimum voltage.

Programming Interface

See Programming Interface for a detailed description.

Language API Examples Installation
C/C++ API Examples Installation
C# API Examples Installation
Delphi/Lazarus API Examples Installation
Go API Examples Installation
Java API Examples Installation
JavaScript API Examples Installation
LabVIEW API Examples Installation
Mathematica API Examples Installation
MATLAB/Octave API Examples Installation
MQTT API Examples Installation
openHAB API Examples Installation
Perl API Examples Installation
PHP API Examples Installation
Python API Examples Installation
Ruby API Examples Installation
Rust API Examples Installation
Shell API Examples Installation
Visual Basic .NET API Examples Installation
TCP/IP API    
Modbus API    

FAQ

Stepper makes funny noises

Stepper motors can produce high pitch or humming noises, even if they are standing still, if the decay mode is not configured correctly for the connected motor.

Try to play around with the decay mode as described here.