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
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:
Platform compatibility
Compatible platforms have been tested with the default configuration provided by the HelloWorld_IHM03A1 example.
Diff: Components/powerstep01/powerstep01_class.h
- Revision:
- 2:06f3a5360a45
- Parent:
- 1:8ce2a5d6fbf8
- Child:
- 3:2fbfe0cd8d4d
--- a/Components/powerstep01/powerstep01_class.h Thu Apr 07 16:11:47 2016 +0000
+++ b/Components/powerstep01/powerstep01_class.h Wed Apr 13 12:55:45 2016 +0000
@@ -1075,7 +1075,7 @@
* @note The voltage corresponds to a peak output current
* accross the external sense power resistor
**********************************************************/
- static uint8_t Tval_Current_to_RegVal(float voltage_mV)
+ static uint8_t Tval_RefVoltage_to_RegVal(float voltage_mV)
{
return ((uint8_t)((((float)(voltage_mV)-7.8125f)*0.128f)+0.5f));
}
@@ -1089,7 +1089,7 @@
* @note The voltage corresponds to a peak output current
* accross the external sense power resistor
**********************************************************/
- static float Tval_RegVal_to_Current(uint32_t regVal)
+ static float Tval_RegVal_to_RefVoltage(uint32_t regVal)
{
return (((float)(regVal+1))*7.8125f);
}

X-NUCLEO-IHM03A1 High Power Stepper Motor Driver