cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling STSPIN250

Jhern.1
Associate II

Hello,

I am implementing a dc motoro control and I am a bit confused about the control of STSPIN250.

I have acquired the kit "x-nucleo-ihm13a1" and I am not sure about the signal handling. I thought I could inject a PWM signal into the STSPIN250 for controling the power to the motor.

But it seems the PWM input is just for Enabling PWM handling when current is reaching the limit. Is this right?

I you could clarify about this I would really appreciate it.

Regards, Ramon.

1 ACCEPTED SOLUTION

Accepted Solutions
Cristiana SCARAMEL
ST Employee

Hi @Jhern.1​ ,

concerning the control you can find the truth table at page 13 of the STSPIN250 datasheet.

As you can see the outputs of full bridge are controlled by the PWM and PH input.

With phase input (PH signal) you set the current direction and with PWM you can turn on the diagonal.

When the diagonal is on (PWM = 1), the load current is set with the internal current controller, adjusting the REF voltage according to the target current: VREF = Rsense x Itarget.

In the X-NUCLEO-IHM13A1 you have 2x 0.68 ohm so Rsense is 0.34 ohm.

For more details on PWM current control refer to dedicated section on the datasheet (6.3 at page 15).

In particular in Table 9 you can find the status of the outputs both in ON and decay status.

If you feel a post has answered your question, please click "Accept as Solution"

View solution in original post

3 REPLIES 3
Cristiana SCARAMEL
ST Employee

Hi @Jhern.1​ ,

concerning the control you can find the truth table at page 13 of the STSPIN250 datasheet.

As you can see the outputs of full bridge are controlled by the PWM and PH input.

With phase input (PH signal) you set the current direction and with PWM you can turn on the diagonal.

When the diagonal is on (PWM = 1), the load current is set with the internal current controller, adjusting the REF voltage according to the target current: VREF = Rsense x Itarget.

In the X-NUCLEO-IHM13A1 you have 2x 0.68 ohm so Rsense is 0.34 ohm.

For more details on PWM current control refer to dedicated section on the datasheet (6.3 at page 15).

In particular in Table 9 you can find the status of the outputs both in ON and decay status.

If you feel a post has answered your question, please click "Accept as Solution"
Jhern.1
Associate II

Hi Cristiana,

Thanks for your kind answer.

My main doubt is about the PWM pin. Am I supposed to generate a PWM signal and inject it into PWM pin? or should I just set PWM pin to HIGH so the PWM signal is generated internally in the STSPIN250?

I have another question about current sensing:

I am working in a low voltage solution (3V) for opening/closing lockers by driving a BDC motor (forward/reverse).

For detecting the end of the lock/unlock process I could do it by timeout, but this may show problems across different systems/motors/tolerances. So, I would like to use current sensing in order to know when to stop the motor. Note the motor will draw more current when reaching mechanical limit of the locker.

¿Does this approach make sense for you?

How can this be implemented with the STSPIN250?

Regards, Ramon.

Hi @Jhern.1​ ,

the device was designed with the idea to run the motor setting high the PWM signal and use the internal current controller to control the current inside the motor.

If I have understood correctly, you want to apply the PWM directly (and then control the current in the motor) to the PWM input and use the current sensing to trigger an higher current level corresponding to the motor stop.

In principle is feasible, but when the internal current control is triggered a decay sequence starts turning on all the low sides of the full-bridge (just like when apply a PWM = 0) and after the programmed OFF time the system returns to the ON state.

An extra monitoring is necessary to detect the motor stop and disable the bridge (EN = LOW) or set LOW the PWM. For example two options:

  1. monitor the sense resistor voltage (low pass filter, peak detector) to identify the higher current;
  2. monitor an OUT voltage pin and verify if it is compatible with the applied signal (e.g. if you apply a 30 kHz signal duty cycle 50%, you are expecting a low voltage of about 30 us, if you set the OFF time to the maximum value - recommended 125 us - and after 2/3 PWM cycle is always low you can assume that the motor is stopped).

Finally, which is the current value when the motor stops? I guess it is not compatible whit the over current threshold of 4 A (typical value @ 5V).

Let me know if it can work for your case.

If you feel a post has answered your question, please click "Accept as Solution"