8 years, 6 months ago.

Modified Code

Hi David,

I have question regarding the modified code. In your description you've stated that l6474.cpp is modified from original with defines in l6474_target_config.h to select the original behaviour (motor de-energised when halted), or new mode to continue powering with a (reduced) current in the coils (braking/position hold capability).

1. Is there any reasons or advantages on powering the stepper motor with reduced current (in the target config, the current will be halved)? I presume that it is to reduce positioning error (due to sudden change of motor direction) and also to have stable holding torque.

2. Is there any possibilities that the motor getting warmer during halt, due to the current that keep flowing through the coil?

Thanks in advance!

Zubair

Question relating to:

X-CUBE-SPN1-20150128 example source code for one motor compiled under mbed. Tested OK on Nucleo F401. l6474.cpp is modified from original with defines in l6474_target_config.h to select the original behaviour (motor … EasySpin, IHM01A1, L6474, X-Nucleo

1 Answer

8 years, 6 months ago.

Hi - my application needed the holding current for the reasons you have stated (positional accuracy):

1. So that the (micro-stepped) position is not lost upon stopping (otherwise upon de-energising the rotor will be attracted & move to the nearest pole). 2. To resist movement caused by any external forces.

Yes, there is a chance of warming, hence the option to reduce the current to minimise that, whilst still providing sufficient holding torque.

Accepted Answer

Thanks for the answer, David. I have some question regarding the board (maybe you have a better understanding on electronic). I use the board with stepper motor to moves a cart on the linear drives. The move will be limited by proximity sensor that activates the interrupt on my board. (I use Arduino board). I use 45V with 3A for my stepper motor. Everything was okay with the coding. But as I try to improve the code for my application, I'd accidentally mess up the board, The situation was like this:

1.During setup, the L6474 library will be activated. And the motor will be rotates towards the proximity sensor.

2. Normally after reaching the sensor, interrupt will be activated and then the HardStop() function will be followed. (This code was ok.)

3. But as I play with the code, after the interrupt activates, I use the Reset() function instead of the HardStop() function. (Silly but dummy mistake). After that it didn't function anymore. I immediately check the L6474 datasheet. It states that it is not recommended to reset the device when outputs are active. On the power supply display, it didn't show 45V anymore but instead about 1,0 V.

4. The question is, did you think the chip is damaged? Normally if the chip are damaged, it would smell like a smoke or it burns, but from the appearance only, the chip looks ok for me.

Thanks in advance!

posted by Zubair Zulkifli 13 Oct 2015

I'm very sorry to hear that your board is damaged. Given that the datasheet warns strongly against resetting with the bridge powered, I would guess it's been destroyed. I'll modify the reset routine to ensure that the bridge is disabled when using the brake/hold mode.

posted by David Lowe 13 Oct 2015