STSPIN250 Click-Platine
STSPIN250 Click-Platine
Das STSPIN250 Click Board™ ist ein bürstenbehafteter Gleichstrommotortreiber mit Strombegrenzung und Strommessung. Es basiert auf dem STSPIN250, einem Niederspannungs-Gleichstrommotortreiber mit Bürsten. Es ist für tragbare und Niederspannungsanwendungen optimiert und verfügt über den niedrigsten Standby-Strom auf dem Markt (max. 80 nA).
Dank des niedrigen Einschaltwiderstands der für die Ausgangsstufe verwendeten MOSFETs ist der STSPIN250 ein hocheffizienter DC-Motortreiber mit einem sehr kleinen Formfaktor (3 x 3 mm QFN). Das Gerät implementiert eine PWM-Stromsteuerung mit fester Ausschaltzeit sowie einen vollständigen Satz von Schutzfunktionen. Das STSPIN250 Click Board™ kann mit einer Schrittmotorspannung von 1,8 V bis 10 V und einem Strom von bis zu 2,6 A verwendet werden.
The STSPIN250 Click Board™ is optimized for driving brushed DC motors using batteries. Therefore, the STSPIN250 integrates very efficient H-Bridges in a parallel configuration, with a total ON resistance (HS+LS) of approximately 200mΩ. The PWM current controller allows for a programmable OFF time. Also, the motor current limit can be set by an onboard potentiometer. These features make STSPIN250 Click Board™ perfectly suited for rapid development of various battery-powered and portable brushed DC motor applications, including home appliances (such as toothbrushes and shavers), toys, portable printers, mechatronics, and robotics-related applications, etc.
How Does The STSPIN250 Click Board™ Work?
The STSPIN250 Click Board™ is based on the STSPIN250, a low voltage DC brushed motor driver by STMicroelectronics. This device integrates two full-bridge MOSFET channels in a parallel configuration, which can sustain up to 2.6A. This IC is targeted towards battery-powered applications, featuring optimizations toward lowered power consumption. It has a PWM current controller that has a fixed OFF time, during which the current decay sequence is performed. This effectively limits the current through the connected load (motor). The OFF (decay) time is fixed to approximately 40 µs on this Click board™.
The PWM current controller compares the voltage across the sense resistor (VSENS) and the VREF voltage, which is adjustable on the STSPIN250 Click Board™. When VSENS becomes greater than the VREF voltage, the current limiting is triggered, and the OFF timer starts counting. The decay sequence is performed. By using a simple formula, the VREF voltage can be determined, for a specific load current:
VREF = RSENS · ILOAD
Where:
- VREF is the voltage on the REF pin of the STSPIN250, adjustable with the potentiometer;
- RSENS is the resistance of the current sensing resistor, which is 150 mΩ;
- ILOAD is the peak current through the motor coils;
By knowing the RSENS, it can be easily calculated how much voltage should be applied to the REF pin of the STSPIN250, to limit the current according to ILOAD. For example, if there is 0.388V applied at the VREF pin, the current limit will be maxed out to 2.58A. The onboard potentiometer allows to simply adjust the VREF voltage, according to needs.
The connected motor can be controlled by using these pins: PWM, PH, RST, and EN/INT:
The PH pin determines the direction of the current. If set to a HIGH logic level, the current will flow in one direction, and vice-versa: when a LOW logic level is applied, the current will reverse its direction. This pin is routed to the AN pin of the mikroBUS™ and labelled as PH.
PWM pin can be used to regulate the speed of the rotation. When there is a LOW logic level on this pin, the current will start circulating through the low-side (LS) MOSFETs and the motor coil. When there is a HIGH logic level on this pin, the current will flow through the load, depending on the logic state of the PH pin. Higher duty cycle percentage will result in higher angular speed. While the current decay sequence is performed, the logic states on the input pins will be disregarded until the decay timer expires. The decay time is fixed to approximately 40 µs on this Click board™.
The STBY/RESET (RST) pin of the STSPIN250 is used to set both bridge outputs in HIGH-Z mode, disconnecting the power supply from the output stage. This pin allows lower average power consumption as no current can flow from the power supply to the motor. This pin is routed to the RST pin of the mikroBUS™.
The EN/FAULT (EN) pin has a double purpose: when set to a high logic level, it acts as a chip enable, allowing the device to operate. In the case of a fault condition on the IC, it will be asserted to a LOW logic level, acting as an interrupt pin. After a timeout period defined by the external capacitor and resistor values, a restart attempt will be made. This pin is routed to both CS and INT pin of the mikroBUS™, allowing the host MCU to use both functions. These pins are labelled as EN and FLT on the Click board™, respectively.
The motor power supply can be connected to the input terminal labelled as VIN and should be within the range of 1.8V to 10V. The motor can be connected at the second terminal, between two poles labelled as A+ and A-. The STSPIN250 Click Board™ requires an external power supply for the motor in order to work. However, it also requires 3.3V from the mikroBUS™ rail.
SPECIFICATIONS
Type | Brushed |
Applications | The STSPIN250 Click Board™ is perfectly suited for rapid development of various battery-powered and portable brushed DC motor applications, including home appliances (such as toothbrushes and shavers), toys, portable printers, mechatronics, and robotics-related applications, etc. |
On-board modules | STSPIN250, a low voltage DC brushed motor driver by STMicroelectronics. |
Key Features | The main IC features a set of protection features, allowing reliable performance. The current limit can be adjusted by an onboard potentiometer. It is optimized for a low-power and battery-operated applications, featuring very low ON resistance, and lowest standby current on the market. |
Interface | GPIO,PWM |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V,5V |
PINOUT DIAGRAM
This table shows how the pinout of the STSPIN250 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
Direction Control | PH | 1 | AN | PWM | 16 | PWM | PWM Speed Control |
Chip Standby/Reset | RST | 2 | RST | INT | 15 | FLT | Flaut Reporting |
Chip Enable | EN | 3 | CS | RX | 14 | NC | |
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | NC | ||
NC | 6 | MOSI | SDA | 11 | NC | ||
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | 5V | Power Supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
STSPIN250 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Input voltage | 1.8 | 10 | V | |
Output current | 0 | 2.6 | A |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
PWR | PWR | - | Power LED Indicator |
VR1 | - | - | Potentiometer for current limiting |
Software Support
We provide a library for the STSPIN250 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
Initializes and defines gpio driver and constant values witch can be used in example code, and also performs the chip enable.
Key Functions
void stspin250_enable(uint8_t state)
- Function for enable or disable device.void stspin250_setPH(uint8_t state)
- Function for select the direction of rotation of the motor.
Example Description
The application is composed of the three sections :
- System Initialization - Sets AN,RST,CS and PWM pin as OUTPUT and INT pin as INPUT.
- Application Initialization - Initialization driver init, PWM init and enable device.
- Application Task - (code snippet) - Changes the PWM dutyCycle and controls the motor speed. You can change the direction of the motor rotation by setting PH to 0 or 1..
void applicationTask() { // PWM DEMO EXAMPLE _dutyCycle += 250; stspin250_pwmSetDuty(_dutyCycle); if (_dutyCycle > 40000 ) { _dutyCycle = 0; stspin250_pwmStop(); Delay_ms(2000); stspin250_pwmStart(); } stspin250_setPH(1); Delay_ms( 200 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
GPIO
PWM
Additional Notes and Information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click 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 STSPIN250 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 STSPIN250 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
Initializes and defines gpio driver and constant values witch can be used in example code, and also performs the chip enable.
Key Functions
void stspin250_enable(uint8_t state)
- Function for enable or disable device.void stspin250_setPH(uint8_t state)
- Function for select the direction of rotation of the motor.
Example Description
The application is composed of the three sections :
- System Initialization - Sets AN,RST,CS and PWM pin as OUTPUT and INT pin as INPUT.
- Application Initialization - Initialization driver init, PWM init and enable device.
- Application Task - (code snippet) - Changes the PWM dutyCycle and controls the motor speed. You can change the direction of the motor rotation by setting PH to 0 or 1..
void applicationTask() { // PWM DEMO EXAMPLE _dutyCycle += 250; stspin250_pwmSetDuty(_dutyCycle); if (_dutyCycle > 40000 ) { _dutyCycle = 0; stspin250_pwmStop(); Delay_ms(2000); stspin250_pwmStart(); } stspin250_setPH(1); Delay_ms( 200 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
GPIO
PWM
Additional Notes and Information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click 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 STSPIN250 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.
STSPIN250 Click-Platine
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.