Menu
  • Use Cases
  • Stacks
  • Stackbuilder
  • MyStacks
  • Support
  • About Us
  • Contact
  • Use Cases
  • Stacks
  • Stackbuilder
  • MyStacks
  • Support
  • About Us
  • Contact
  • View Cart

Motors hardware block

The Interstacks Motors hardware block enables you to connect four DC motors or two stepper motors (4V – 10.8V DC max, 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 – 10.8V DC maximum. (see Adafruit, Sparkfun, Digikey). DC (4v – 7v) motors and four wire DC (4v – 11v) stepper motors can be purchased from many sources e.g. Pololu.

You use the ‘Mode’ 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.

Set Properties of Motor Block
To set properties in Stackbuilder: Select the Motors block by clicking on it once. Click in the “Property Editor” in the bottom right, in the “Initial Value” column for the property you want to edit (if a character or string, use quotes).
The “Mode” property specifies 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.

Motors Connector – Looking into back

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

If ‘Mode’ property is set to 1, specifying two stepper motor functionality. (4v – 11v DC stepper motors. Four wire).

( 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.)

All motor power must be provided externally via a separate power supply. Typically 4.0 – 10.8V DC maximum. (see Adafruit, Sparkfun, Digikey)

Block properties and terminals

Properties
Type (uuid): Module Type
Version (int): Firmware Version

Mode (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)

M1_Speed (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)
M2_Speed (int): Motor 2 speed. 0-1000
M3_Speed (int): Motor 3 speed. 0-1000
M4_Speed (int): Motor 4 speed. 0-1000

SM1_Accel (int): Stepper 1 start acceleration. in pulses per second per second. linear slope
SM2_Accel (int): Stepper 2 start acceleration. in pulses per second per second. linear slope
Holding_Current (int): Holding current for steppers. Defines holding torque. 0-100 max. default 50. Motor can get hot if hold too much.
SM1_step_size (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.
SM2_step_size (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.
SM1_Scale (int): For stepper 1, number of steps for full rotation. default 200. (1.8 degree steppers) This is specified by the stepper motor manufacturer.
SM2_scale (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/knowledge-base.
Please email info@interstacks.com with any questions.

Popular Articles

  • MyStacks Cloud Dashboard
  • Internet communication with HTTP block
  • Download and install Stackbuilder

Contact Us

Contact us with any questions or help with deploying your IoT projects.

CONTACT US

Connect

  • Facebook
  • Twitter
  • LinkedIn
  • Email

Sign up for the latest Interstacks news.

Join Our Newsletter
  Thank you for Signing Up
  Please correct the marked field(s) below.
1,false,1,First Name,2
Email:
1,true,6,Subscriber Email,2
Name:
1,false,1,Last Name,2

Copyright © 2023 Interstacks. All rights reserved. Privacy Policy | Terms and Conditions

Site by Imagebox