Motors hardware block

The Interstacks Motors hardware block enables you to connect four DC motors or two stepper motors (4V - 12V DC, 1 amp maximum). You can use motors in all kinds of mechatronic projects like robotics, small manufacturing motion platforms, and anything else that requires an actuator in the physical world. All motor power must be provided externally via a separate power supply. Typically 5 - 7V DC. (see Adafruit, Sparkfun, Digikey). DC (4v - 7v) motors and four wire DC (4v - 12v) stepper motors can be purchased from many sources e.g. Pololu.

You use the ‘M’ property in Stackbuilder to define which types of motors will be connected. By sending the character ‘1’ to the appropriate Go/Stop input terminal, the motor will turn on. By sending the character ‘0’ to the Go/Stop input terminal, the motor will stop. Refer to the detailed property spec sheet for advanced options.

motor_sblder

Set Properties of Motor Block
Select the Motor block by clicking on it once in Stackbuilder. Click in the “Property Editor” in the bottom right, in the first row, in the “Property” column. Type a “M” (without quotes). Click in its corresponding “Default Value” column and type a number 0 - 3, to specify the types of motors you want to connect (see below). 0 for four DC motors or 1 for two DC stepper motors. Refer to the detailed property spec sheet for advanced options.

ioexpander_back

Motors Connector - Looking into back

If ‘M’ property is set to 0, specifying four DC motor functionality.

motors_pinout1

If ‘M’ property is set to 1, specifying two stepper motor functionality. (4v - 12v DC stepper motors. Four wire).

motors_pinout2

( Four wire stepper motors often have the following color coded wiring that would correspond to the Motors block connector.
Please check the spec sheet for your motor.)

motors_pinout3

All motor power must be provided externally via a separate power supply. Typically 4.8 - 7V DC. (see Adafruit, Sparkfun, Digikey)


For advanced users, the full blocks detail spec sheet with all properties and terminals.

Motors Block
To drive four external DC motors, or two, under 12 volt, DC stepper motors.
Properties
T (uuid): Module Type
F (int): Firmware Version

M (int) (0-3): Motor module configuration. Supports Four low current DC motors or 2 stepper motors. 0: Four DC motors (motors 1-4) 1: Two Stepper motors (motors 1-2) 2: One Stepper (motor 1) Two DC ( motor 2 motor 3) 3: Two DC motors (motor 1-2) / One Stepper (motor 3)

1 (int): Motor 1 speed. 0-1000. for dc motors, its PWM duty cycle %. (for steppers, its PPS (pulses/steps per second). with 1.8 degree stepper, 300 RPM at 1000)
2 (int): Motor 2 speed. 0-1000
3 (int): Motor 3 speed. 0-1000
4 (int): Motor 4 speed. 0-1000

A (int): Stepper 1 start acceleration. in pulses per second per second. linear slope
B (int): Stepper 2 start acceleration. in pulses per second per second. linear slope
C (int): Holding current for steppers. Defines holding torque. 0-100 max. default 50. Motor can get hot if hold too much.
U (int): 1/4 stepping on/off stepper 1. default off 0. on 1. if on, 1/4 stepping enabled, 800 step per revolution vs 200 typically.
V (int): 1/4 stepping on/off stepper 2. default off 0. on 1. if on, 1/4 stepping enabled, 800 step per revolution vs 200 typically.
Y (int): For stepper 1, number of steps for full rotation. default 200. (1.8 degree steppers) This is specified by the stepper motor manufacturer.
Z (int): For stepper 2, number of steps for full rotation. default 200. (1.8 degree steppers) This is specified by the stepper motor manufacturer.

Terminals
“Properties” - in (List or Property Name string): To set property. Send property name, Value. For example [’N’,’netname’]. To get property, just send property name. For example. ’N'
“PResponse” - out (List or True) : On set, responds with True when done. On get, responds with list. For example [’N’, ‘netname’].

"Go/Stop 1” - in (string): Motor 1 go/stop. '1' go, '0’ stop. If go, will run continuously.
"Stopped 1” - out (int): Motor 1. Sends int of 0 when stepper motor stopped.
"Direction 1” - in (String): Motor 1 Direction '0' forward. '1' reverse.
"Speed 1” - in (int): Motor 1 Speed. 0-1000. (this also sets the speed property).

"Go/Stop 2” - in (string): Motor 2 go/stop. '1' go, '0’ stop. If go, will run continuously.
"Stopped 2” - out (int): Motor 2. Sends int of 0 when stepper motor stopped.
"Direction 2” - in (String): Motor 2 Direction '0' forward. '1' reverse.
"Speed 2” - in (int): Motor 2 Speed. 0-1000. (this also sets the speed property).

"Go/Stop 3” - in (string): Motor 3 go/stop. '1' go, '0’ stop. If go, will run continuously.
"Stopped 3” - out (int): Motor 3. Sends int of 0 when stepper motor stopped.
"Direction 3” - in (String): Motor 3 Direction '0' forward. '1' reverse.
"Speed 3” - in (int): Motor 3 Speed. 0-1000. (this also sets the speed property).

"Go/Stop 4” - in (string): Motor 4 go/stop. '1' go, '0’ stop. If go, will run continuously.
"Direction 4” - in (String): Motor 4 Direction '0' forward. '1' reverse.
"Speed 4” - in (int): Motor 4 Speed. 0-1000. (this also sets the speed property).

"Num Steps 1” - in (int): Stepper 1 Number of steps to move. does go - move n steps - stop.
"Num Steps 2” - in (int): Stepper 2 Number of steps to move. does go - move n steps - stop.
"Degrees 1” - in (int): Stepper 1 move N degrees.
"Degrees 2” - in (int): Stepper 2 move N degrees.

"Motor Fault” - out (int): Sends a 1 if motor controller overheats.

Refer to documentation on many other topics at interstacks.com/support.
Please email info@interstacks.com with any questions.