cancel
Showing results for 
Search instead for 
Did you mean: 

st72141: Emergency Stop

jneely
Associate II
Posted on June 03, 2003 at 15:40

st72141: Emergency Stop

7 REPLIES 7
jneely
Associate II
Posted on May 17, 2011 at 10:16

Hi

I am working on a project that involves using the ST72141 to drive a BLDC motor. The motor spins up and runs at the desired speed. I am trying to add a over temperature sensor to shutdown the motor, but I cannot get the motor to completely shutdown. According to the user manual, there are two ways to shutdown. Use the NMECS pin or use the MCRA register and set the MOE bit to 0. Both set the driver outputs into a Hi Impedence mode, which stops sending inputs to the motor. I am trying a software approach as I am reading from a thermistor and using the A/D converter. I can read the value, do a comparison to determine if cutoff is reached, and then jump to the shutdown code. The motor shutsdown immediately, but then starts to spin up again, stalls, and repeats. It is almost as if it is trying to align itself, but can't and tries again. I have tried disabling interrupts in the stop routine, but still no luck. I have looked at the ST documentation and even used their code as a basis for my program.

Does anyone have any suggestions? I appreciate the help.

Thanks.

John
nmorgan2002uk
Associate II
Posted on May 17, 2011 at 10:16

Hi,

is the mcu going into reset after the stop command is issued ?

jneely
Associate II
Posted on May 17, 2011 at 10:16

Wait, I got it. I had a flash LED loop that waited 500ms to flash the LED. Well, 500ms is much longer than the 98ms timeout of the watchdog timer. Removing the 500ms delay stops the motor completely.

Thanks again to all that helped.
jneely
Associate II
Posted on May 17, 2011 at 10:16

I am not reseting the MCU by use of the MCRA RST bit, if that is what you mean.

Should I?

Thanks.
maxime2399
Associate II
Posted on May 17, 2011 at 10:16

what is your program doing after stopping the motor?

if you stay in an infinite loop, your watchdog is probably kicking.

After the watchdog reset the device, the motor will try to restart like if nothing happened!

jneely
Associate II
Posted on May 17, 2011 at 10:16

Ah, yes. You are right about the watchdog. So do negate its effects, in my loop I am reseting it to 7Fh. However, I am still having the same problems with the motor try to spin up. How come the NMCES works like charm and setting the MOE bit to 0 does not? According to the data sheet the NMCES pin when pulled low, changes the MOE bit to 0. Any more thoughts?

Thanks for the help up to now.

John
jneely
Associate II
Posted on May 17, 2011 at 10:16

The code is stopping the motor, but I would like to add the flashing LED. As mentioned before, the 500ms wait is too long for the watchdog timeout (~98ms). I added the the watchdog reset in the wait loop (load with 7Fh). However, in testing, the motor shuts down, but the lights never flash. I thought maybe it had to do with calling a subroutine, so I rewrote the code and added it inline with the stop motor code, but still no luck. Am I missing something? Any ideas?

Thanks.

John