Errors while Communicating with SPI Daisy Chain Devices

You’re using one of the older drivers.

Have you tried this newer one?

https://www.ghielectronics.com/community/codeshare/entry/909

Justin gave me the one I am using, he said it works fine. I will try out yours too.

Can I see some code implementing that updated driver?

Struggling to figure out how to work that class since it is so much more compact than the other driver.

L6470Chain stepperChain = new L6470Chain(GHI.Pins.G120.P2_0, SPI.SPI_module.SPI1, GHI.Pins.G120.P0_11, GHI.Pins.G120.P0_10, GHI.Pins.G120.P0_16);

stepperChain[0].Run(DirectionEnum.Forward, 10000);

You don’t have to set each register?

@hwalker_MIWV, No, you don’t have to set each register to get the system to work. It has defaults that will work with a small motor.

Define Small. I am using a nema m-1713-1.5s 24V motor.

for stepper motors, the phase resistance is more important. What’s the phase resistance?

1.3 Ohm. Can’t get your driver to even make my motor vibrate.

1.3 ohms. Ok, what voltage are you using, because the L6470 maxes out at 6 amps, and even then it needs cooling.

Testing between 8 and 12 V. That should be enough to give it some motion right?

Check the flag pin. If the motor is overloaded, the flag pin will be low. Also, it is low when the L6470 is first powered on. Therefore, when testing you should confirm that flag goes high, and then stays high during operation. Thermal Warning and Thermal Shutdown both trigger the flag. The only way to clear the flag pin is to call GetStatus.

Note: The Flag pin is ACTIVE Low. So is the Busy pin.

At 12V, 1.3 ohms would produce 9 amps. This could be a problem.

The motor does not begin to vibrate until 8+ V. What is the easiest way to check the pins? Measure with voltmeter or check with a breakpoint?

Also, my power supply does not show any current being drawn.

What voltage are you supplying to VCC? 3v3 or 5V? Also, did you pull the Standby pin to VCC? The easiest way to check the pin is with an LED (connect the LED via a 330 ohm resistor to the pin, don’t just connect it directly).

I am supplying 3.3 V to VCC. I have standby going to Vcc as well as the uC like Justin does it. Everything is pulled high except Flag is doing something weird - it is reading 1.7 V instead of 3.3 V

When you first turn the driver on, it should be active low (i.e. 1.7 volts, in your case)

It is definitely something with the flag pin. When I turn the motor voltage to 0 flag pin gets pulled high so it is clearly being pulled low by the motor’s power supply

I can’t figure out why flag is going low when the voltage for the motor is turned up more than a couple volts. How are you calculating 6 A?

12V / 1.3 Ω = 9.23 Amps. The driver’s max is 6 Amps I use 5 ohm power resistors to increase the phase resistance to 6Ωs for motors that need it.

pg 47.

I have two 1.8k Ohm resistors between each phase.