Expansion SW library to control high power stepper motor(s) using IHM03A1 expansion board(s) with Powerstep01 driver.

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   IHM03A1_ExampleFor1Motor HelloWorld_IHM03A1 IHM03A1_ExampleFor3Motors KYPHOS_Stepper_Motor_Control

Fork of X_NUCLEO_IHM03A1 by ST Expansion SW Team

Motor Control Library

Library to handle the X-NUCLEO-IHM03A1 Motor Control Expansion Board based on the Powerstep01 component.

It features the:

  • read and write of Powerstep01 registers
  • Nucleo and expansion board configuration (GPIOs, PWMs, IRQs, etc.)
  • Powerstep01 application commands handling
  • FLAG and BUSY interrupt handling (alarm reporting)
  • Daisy chain handling

The API allows to easily:

  • perform various positioning, moves and stops
  • get/set or monitor the motor positions
  • set home position and mark another position
  • get/set minimum and maximum speed
  • get current speed
  • get/set acceleration and deceleration
  • get/set the step mode (up to 1/128)
  • get/set the control method
  • get/set parameters for voltage mode driving
  • get/set parameters for current mode driving
  • get/set parameters for gate driving
  • configure various protections such as overcurrent detection
  • enable/disable alarms
  • handle step-clock
  • get system status

Daisy-Chain Configuration

The IHM03A1 board can be stacked up to three times so that the Powerstep01 components will be connected in daisy-chain configuration. For this purpose, some resistors must be correctly connected on the boards as depicted here below:

/media/uploads/nucleosam/driving1steppermotor.png /media/uploads/nucleosam/driving2steppermotors.png /media/uploads/nucleosam/driving3steppermotors.png

Platform compatibility

Compatible platforms have been tested with the default configuration provided by the HelloWorld_IHM03A1 example.

Revision:
3:2fbfe0cd8d4d
Parent:
2:06f3a5360a45
--- a/Components/powerstep01/powerstep01_class.h	Wed Apr 13 12:55:45 2016 +0000
+++ b/Components/powerstep01/powerstep01_class.h	Tue Sep 13 08:55:39 2016 +0000
@@ -2,8 +2,8 @@
  ******************************************************************************
  * @file    powerstep01_class.h
  * @author  IPC Rennes
- * @version V1.0.0
- * @date    March 18th, 2016
+ * @version V1.0.1
+ * @date    September 13th, 2016
  * @brief   This file contains the class of a Powerstep01 Motor Control component.
  * @note    (C) COPYRIGHT 2016 STMicroelectronics
  ******************************************************************************
@@ -193,9 +193,9 @@
     }
 
     /**
-     * @brief  Getting the current speed in pps.
+     * @brief  Getting the current speed in step/s.
      * @param  None.
-     * @retval The current speed in pps.
+     * @retval The current speed in step/s.
      */
     virtual unsigned int GetSpeed(void)
     {
@@ -203,9 +203,9 @@
     }
 
     /**
-     * @brief  Getting the maximum speed in pps.
+     * @brief  Getting the maximum speed in step/s.
      * @param  None.
-     * @retval The maximum speed in pps.
+     * @retval The maximum speed in step/s.
      */
     virtual unsigned int GetMaxSpeed(void)
     {
@@ -213,9 +213,9 @@
     }
 
     /**
-     * @brief  Getting the minimum speed in pps.
+     * @brief  Getting the minimum speed in step/s.
      * @param  None.
-     * @retval The minimum speed in pps.
+     * @retval The minimum speed in step/s.
      */
     virtual unsigned int GetMinSpeed(void)
     {
@@ -223,9 +223,9 @@
     }
 
     /**
-     * @brief  Getting the acceleration in pps^2.
+     * @brief  Getting the acceleration in step/s^2.
      * @param  None.
-     * @retval The acceleration in pps^2.
+     * @retval The acceleration in step/s^2.
      */
     virtual unsigned int GetAcceleration(void)
     {
@@ -233,9 +233,9 @@
     }
 
     /**
-     * @brief  Getting the deceleration in pps^2.
+     * @brief  Getting the deceleration in step/s^2.
      * @param  None.
-     * @retval The deceleration in pps^2.
+     * @retval The deceleration in step/s^2.
      */
     virtual unsigned int GetDeceleration(void)
     {