cancel
Showing results for 
Search instead for 
Did you mean: 

L6470: Getting problem with the number of steps in move command

Muneeb Ahmed
Associate
Posted on October 26, 2017 at 17:26

Hello! I am using l6470 on X-Nucleo IHM02A1 with the STM32F4 discovery board with the SPI interface (daisy chaining). I am working on the precision of an autonomous robot with the four mecanum wheels of 10 cm. I am using 128 usteps step mode. When I am giving move command less than 38535 micro steps, it is working fine but for more than ~39000 usteps, the motor is not reacting.

If I change the step mode from 128 usteps to 64 usteps then the value is half of the max number of steps e.g. 19267 usteps.

I have also an issue with the torque of the motor as I can't increase much torque.

I am using BYG42 2 phase stepper motor with 1.7A current and 12V.

I have attached dspin_config file where all the parameters are configured. 

Please tell me, how can I solve this problem.

Thanks in advance,

Muneeb Ahmed

#l6470
7 REPLIES 7
Enrico Poli
ST Employee
Posted on October 27, 2017 at 14:02

Hi,

did you tried to check the L6470 configuration using the

http://www.st.com/en/development-tools/stsw-spin002.html

?

In this software you have a tool named 'BEMF configuration' generating the configuration parameters according to the motor characteristics.

Enrico

Posted on October 31, 2017 at 12:01

Hi,

Thanks for the reply. Yes, the attached header file is generated from the spin family evaluation tool. But I have changed some parameters because with the move command there was so much acceleration in the motor. So, I could not control the motor speed with the move command.

Can you tell me on which parameters move command depends on?

Thanks

Muneeb Ahmed

Posted on October 31, 2017 at 15:43

All the motion commands are executed according to the acceleration, deceleration, maximum and minimum speed.

The motor torque is regulated according to the voltage mode driving parameters (KVAL_xxx, ST_SLP, FN_SLP_xxx, INT_SPD). There are the values that must be tuned according to target current (i.e. torque), supply voltage and motor characteristics using the 'BEMF compensation tool' of the SPINFamily software.

You can also use the 'wizard' in order to configure all the other parameters according to your needs.

Posted on May 24, 2018 at 20:47

Hello Enrico

I am having trouble getting the SpinFamily tool to work with my IHM02A1 connected to a Nucleo-F401RE. I originally did not think I could use this software since UM2022 doesn't list the IHM02A1 board, but you asked the poster to use this software and he apparently got it to work. 

I am having problems. I have updated the STLINK firmware on the board. I have copied the firmware from the firmware folder of SPINFamily to the board.

But when I open the SPINFamily software and attempt to connect to the board, I get an error message that says  'No device found. The communication board is correctly connected to the PC, but no working devices has been found.'

Can you tell me what I am doing wrong?

Thanks in advance for your help!

Posted on May 29, 2018 at 15:46

Hi Clark,

As you said, the IHM02A1 is not officially supported by the SPINFamily software.

You can use the software to generate a configuration file (e.g. setting the BEMF compensation parameters) but you cannot use the board to communicate without performing some changes on the hardware.

The SPINFamily firmware maps the SPI on the PA5/PA6/PA7/PB6 gpios, so you need to change the following solder bridges on IHM02A1 board:

- SB23 --> open, SB8 --> closed

- SB34 --> open, SB12 --> closed

This should solve the communication issue.

Regards

Enrico

Posted on May 29, 2018 at 17:15

Enrico

Thank you for that information. I think I want to move the SPI. But I'm a little worried about moving jumpers. I've had a lot of experience soldering through hole but not on surface mount and I don't want to destroy the board.

Should I attempt to move the 0 ohm resistors? I don't have any experience with this but that seems like it might be difficult to do.

Or should I just use a solder sucker or solder wick to remove the resistor and then try to make a solder bridge on the bridges that need one?

Clark

PS: I recently took a Udemy class on FreeRTOS. One of the requirements of the class was to use an STM Nucleo board. So I ordered one and began to learn about STM32CubeMX, SW4STM32, and Atollic True Studio. Then I began learning about STM's motor drivers. These tools made my life much easier. No more writing tedious low level code to configure the peripherals! No more debugging with print statements because I could not get JTAG to work! No more writing low level code to produce step and direction pulses for my stepper driver! These tools showed me that STM was making a serious effort to assist developers and shorten development times. 

So I have decided to move my projects to STM. I made that decision a couple of weeks ago and I'm already ahead of where I was with my original MCU.

Thank you STM!

Posted on May 30, 2018 at 11:33

Hi Clark,

moving the solder bridges is not so difficult

You can use solder sucker to remove the resistor and close the new solder bridge with a tin drop. The only care is to keep the solder temperature not too high (350 °C max).

Glad to hear you found our toolchain and firmware development material helpful.

Enjoy!