Page 1 of 1

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

Posted: Mon Nov 06, 2023 10:15 am
by men8ifr
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?

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

Posted: Mon Nov 06, 2023 2:17 pm
by men8ifr
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.

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

Posted: Mon Nov 06, 2023 5:49 pm
by men8ifr
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.

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

Posted: Mon Nov 06, 2023 6:03 pm
by TomKerekes
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.

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

Posted: Thu Nov 09, 2023 6:45 pm
by men8ifr
Thanks - I have all axis working now - yes I was not downloading the axis to kflop before attempting to use them.