Schrittmotor 14 Click-Platine
Schrittmotor 14 Click-Platine
Overview
Das Stepper 14 Click Board™ verfügt über den DRV8847PWPR, einen Schrittmotortreiber von Texas Instruments. Dieses Click Board™ bietet eine bipolare Schrittmotorsteuerung. Es verfügt über einen bipolaren H-Brücken-Schrittmotortreiber, der Voll-, Halb-, Viertel- oder Achtelschrittmodi unterstützt. Dieses Click Board™ verfügt außerdem über einen Port-Expander, sodass die Kommunikation mit einer minimalen Anzahl von Pins über den mikroBUS™ I2C-Bus erfolgen kann.
Das Stepper 14 Click Board™ bietet Wärmeschutz, integrierten Kickback-Spannungsschutz, einen großen Eingangsspannungsbereich, Schutz gegen Stromdurchschlag durch die H-Brücke und hohe Strombelastbarkeit. Diese Funktionen machen das Stepper 14 Click Board™ zu einer idealen Lösung für den Antrieb von Motoren in allen Anwendungen, die einen präzisen und sicheren Schrittmotortreiber erfordern.
How Does The Stepper 14 Click Board™ Work?
The Stepper 14 Click Board™ is equipped with two integrated circuits. The step motor driver IC is the DRV8847PWPR, a dual full-bridge motor driver from Texas Instruments. This IC internal structure is somewhat symmetrical. It features two MOSFET H-bridges used to drive two coils of a bipolar step motor in both directions. The DRV8847PWPR uses a wide input voltage range - from 2.7V to 18V. This is the voltage used to energize the motor coils. A jumper (JP4) is used to select whether to use external power supply or to obtain the power supply from the mikroBUS™ +3.3V or +5V rail. The DRV8847PWPR has two PHASE inputs which are used to control the direction of current flow through H-bridges and thus, the motor coils. It also allows controlling step motor in both full step and half step modes, by toggling states on MS1 and MS1 pins.
The bipolar step motor coils can be connected to the onboard screw terminals. There are two terminals, used to connect each of the step motor coils. The third connector is used to connect an external voltage, ranging from 2.7V to 18V, depending on the used motor voltage requirements. It should be noted that without a valid external voltage connected to this terminal, the motor will not work. Also, it should be noted that 20V is an absolute maximum voltage allowed as per datasheet, thus the overtemperature protection might be activated when driving heavier loads. The recommended maximum voltage should not exceed 18V, as stated on the silkscreen layer of the PCB.
All of the DRV8847PWPR control lines are routed to the second IC on Stepper 14 board, which is the PCA9538A, a well-known 8bit I/O expander with a serial interface, used on many of the MikroElektronika's designs for its simplicity and reliability. It allows the control lines of the DRV8847PWPR IC to be driven via the I2C and few pins it uses - reducing the required pin count of the Stepper 14 Click Board™. This also allows for sending compact I2C messages, instead of toggling several pins at once - which can introduce problems with timing sometimes, especially when those pins belong to different MCU ports. By changing states of the six control pins, it is possible to drive the step motor in full step mode as well as the half step mode. However, provided MikroElektronika libraries contain simple and intuitive functions to fully control the bipolar step motor, connected to the Stepper 14 Click Board™. Their usage is demonstrated in the included example application, which can be used as a reference for a custom design.
The motor power supply can be connected to the input terminal labelled as VIN and should be within the range of 2.7V to 18V. Stepper motor coils can be connected to the terminals labelled as A1, B2, B1, and A2. The Click board™ supports an optional external power supply for the motor in order to work.
However, the Stepper 14 Click Board™ can be supplied and interfaced with both 3.3V and 5V without the need for any external components. The onboard SMD jumper labelled as VCC SEL allows voltage selection for interfacing with both 3.3V and 5V microcontrollers.
SPECIFICATIONS
Type | Stepper |
Applications | Refrigerator damper and ice maker, Washers, dryers and dishwashers, Electronic point-of-sale (ePOS) printers , Stage lighting equipment, Miniature circuit breakers and smart meters etc. |
On-board modules | DRV8847PWPR Dual Full-Bridge 18V, 1A, Stepper Motor Driver, from Texas Instruments; PCA9538A 8bit I/O Expander with Serial Interface, from NXP |
Key Features | Dual H-bridge motor driver, Single or dual brushed DC motors, One bipolar stepper motor, Solenoid loads, Multiple control interface options. |
Interface | GPIO,I2C |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V or 5V |
PINOUT DIAGRAM
This table shows how the pinout of the Stepper 14 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
Reset In | RST | 2 | RST | INT | 15 | FLT | Fault |
Enable | EN | 3 | CS | RX | 14 | NC | |
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | 5V | Power Supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1 | VCC SEL | Left | Power Supply Voltage Selection: Left position 3V3, right position 5V |
JP2 | ADDR SEL | Left | Slave address selection: Left position 0, right position 1. |
JP3 | ADDR SEL | Left | Slave address selection: Left position 0, right position 1. |
JP4 | VM SEL | Left | Power select jumper for motor power supply: left position - On-board supply, right position - External supply. |
STEPPER 14 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Input Voltage | 2.7 | - | 18 | V |
Output current | - | - | 1 | A |
Software Support
We provide a library for the Stepper 14 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions that enables the usage of the Stepper 14 Click Board™d. It initializes and defines the I2C driver and drivers that allow full control of the device to the user. User can use the device to control forward and reverse motion, apply brake and coast functions for brushless dc motors, and forward and reverse motion in full step and half step for stepper motors.
Key Functions
void stepper14_step_motor ( uint8_t interface, uint8_t direction, uint32_t steps_no );
- Function is used to drive two or four wire stepper motor in user defined direction, one step at a time.void stepper14_set_half_step ( uint8_t hl_step );
- Function is used to set specific half step.void stepper14_control_mode_set ( uint8_t mode );
- Function is used to set mode of operation.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C module, LOG and GPIO structures, sets INT pin as input and RST and CS pins as output.
- Application Initialization - Initalizes I2C driver, applies setup for 4-pin interface and writes an initial log.
- Application Task - (code snippet) Demonstrates use of the Stepper 14 Click Board™ by driving NEMA 17 stepper motor one turn forward and then one turn backward.
void application_task ( ) { mikrobus_logWrite( " Stepper motor makes one turn forward ", _LOG_LINE ); stepper14_step_motor( STEPPER14_4_PIN_INTERFACE, STEPPER14_DIR_CW, 200 ); Delay_ms( 1000 ); mikrobus_logWrite( " Stepper motor makes one turn backward ", _LOG_LINE ); stepper14_step_motor( STEPPER14_4_PIN_INTERFACE, STEPPER14_DIR_CCW, 200 ); Delay_ms( 1000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The Stepper 14 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Software Support
We provide a library for the Stepper 14 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions that enables the usage of the Stepper 14 Click Board™d. It initializes and defines the I2C driver and drivers that allow full control of the device to the user. User can use the device to control forward and reverse motion, apply brake and coast functions for brushless dc motors, and forward and reverse motion in full step and half step for stepper motors.
Key Functions
void stepper14_step_motor ( uint8_t interface, uint8_t direction, uint32_t steps_no );
- Function is used to drive two or four wire stepper motor in user defined direction, one step at a time.void stepper14_set_half_step ( uint8_t hl_step );
- Function is used to set specific half step.void stepper14_control_mode_set ( uint8_t mode );
- Function is used to set mode of operation.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C module, LOG and GPIO structures, sets INT pin as input and RST and CS pins as output.
- Application Initialization - Initalizes I2C driver, applies setup for 4-pin interface and writes an initial log.
- Application Task - (code snippet) Demonstrates use of the Stepper 14 Click Board™ by driving NEMA 17 stepper motor one turn forward and then one turn backward.
void application_task ( ) { mikrobus_logWrite( " Stepper motor makes one turn forward ", _LOG_LINE ); stepper14_step_motor( STEPPER14_4_PIN_INTERFACE, STEPPER14_DIR_CW, 200 ); Delay_ms( 1000 ); mikrobus_logWrite( " Stepper motor makes one turn backward ", _LOG_LINE ); stepper14_step_motor( STEPPER14_4_PIN_INTERFACE, STEPPER14_DIR_CCW, 200 ); Delay_ms( 1000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The Stepper 14 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.