How do I debug not being able to get one stepper to run?

Moderators: TomKerekes, dynomotion

Post Reply
men8ifr
Posts: 19
Joined: Tue Mar 26, 2019 2:30 pm

How do I debug not being able to get one stepper to run?

Post by men8ifr » Mon Nov 06, 2023 10:15 am

I've just started the set-up for a 3 axis milling machine.

I am trying to test the first axis/motor

The servo driver (a leadshine copy) has a self test function - that runs the stepper no problem.

I have put in what should be a good set-up into the set-up screen - bear in mind this is kmotion 4.34

input is set to no input output is step/dir

Then I goto axis, enable axis 0

I have jp7 pins connected:
PU+ 24 (+5v)
PU- 15
DIR+ 23 (+5v)
DIR - 16
ENA + I have tried leaving disconnected and also jumping pin 24 (+5v)
ENA -I have tried leaving disconnected and also pin 25 (gnd)

Then from the console screen I send jog0=100000
or move 0 = -1000

I see the dest increment on the axis window but no stepper movement - position does not change (I guess that only shows a value if input is used and shows an encder value?)

I tried checking voltage across step =1.27v and dir 1.27v - I would have thought dir should read close to 0 or close to 5 v depending on direction.

I disconnected pins 16 and 23 from the servo and connected to a multimeter
when I power on kflop the voltage reads
1.47 then 5 v then 1.37v
So seems to work and I guess low voltage ~1.5v high is ~5v
But when I send the jog0=100000 command the voltage does not change
if I send jog0=-100000 (I guess this should be the reverse direction) the voltage does not change.

What do I do next to debug this?
My Set-up
PM30 Milling Machine - 3 axis
Kflop
Leadshine copy closed loop 'hybrid' stepper drivers similar to HBS86
Nema 34 6A 8.5Nm motors with encoder (encoder connects to stepper driver)
Fusion 360 Software

men8ifr
Posts: 19
Joined: Tue Mar 26, 2019 2:30 pm

Re: How do I debug not being able to get one stepper to run?

Post by men8ifr » Mon Nov 06, 2023 2:17 pm

One thing I see is the stepper driver manual indicates 2us may not be enough for the driver to detect a pulse, In the step/direction help I see a reference to changing this

FPGA(STEP_PULSE_LENGTH_ADD)=32; // set the pulse time to ~ 2μs

What would I need to set to get 5ms or more and do I just enter FPGA(STEP_PULSE_LENGTH_ADD)=32 into the console and send?

This would not explain why I cannot see the voltage change at the DIR pin though but may also be stopping the stepper motor moving.
My Set-up
PM30 Milling Machine - 3 axis
Kflop
Leadshine copy closed loop 'hybrid' stepper drivers similar to HBS86
Nema 34 6A 8.5Nm motors with encoder (encoder connects to stepper driver)
Fusion 360 Software

men8ifr
Posts: 19
Joined: Tue Mar 26, 2019 2:30 pm

Re: How do I debug not being able to get one stepper to run?

Post by men8ifr » Mon Nov 06, 2023 5:49 pm

OK I've flashed v5.3 to the board and the DIR pin ca read 0 or 3.3v when I send + or - Jog commands via the console.

I think I still need to lengthen the pulse width for my stepper drivers though.
My Set-up
PM30 Milling Machine - 3 axis
Kflop
Leadshine copy closed loop 'hybrid' stepper drivers similar to HBS86
Nema 34 6A 8.5Nm motors with encoder (encoder connects to stepper driver)
Fusion 360 Software

User avatar
TomKerekes
Posts: 2546
Joined: Mon Dec 04, 2017 1:49 am

Re: How do I debug not being able to get one stepper to run?

Post by TomKerekes » Mon Nov 06, 2023 6:03 pm

I have put in what should be a good set-up into the set-up screen
I think you are not downloading the screen configuration to KFLOP. KFLOP defaults to no output mode. You might read this.

You can also troubleshoot wiring issues using the Digital IO Screen. With Open Collector wiring and a voltmeter referenced to GND the Step or Direction Pin should be about 3.8V when open (Configured as input). And about 0.4V when on (Configured as Output and low state).
I think I still need to lengthen the pulse width for my stepper drivers though.
You can do this with a C Program. See the SetStepPulseLength.c example.
Regards,

Tom Kerekes
Dynomotion, Inc.

men8ifr
Posts: 19
Joined: Tue Mar 26, 2019 2:30 pm

Re: How do I debug not being able to get one stepper to run?

Post by men8ifr » Thu Nov 09, 2023 6:45 pm

Thanks - I have all axis working now - yes I was not downloading the axis to kflop before attempting to use them.
My Set-up
PM30 Milling Machine - 3 axis
Kflop
Leadshine copy closed loop 'hybrid' stepper drivers similar to HBS86
Nema 34 6A 8.5Nm motors with encoder (encoder connects to stepper driver)
Fusion 360 Software

Post Reply