0
\$\begingroup\$

I'm driving a NEMA34 bipolar stepper motor with the following specifications:

  1. Holding torque 5.9 Nm
  2. Step angle 1.8°
  3. Resistance / phase 0.33±10% Ω
  4. Inductance / phase 3.00±20% mH
  5. Max load axial 65 N
  6. Max load radial 200 N

https://www.igus.com/info/drive-technology-nema-34-ca

It is being driven by a DM860 leadshine with an output current of 1.0 - 7.2A , and an input voltage of 24 - 80 VDC (http://www.sah.co.rs/media/sah/techdocs/dm860h_manual.pdf). I have the driver configured with 24V power supply,PNP signals control signal conector and using a microstep of 4 (800 pulses / rev). I tried to create a code with ramp up and ramp down by following this example (joan answer) https://raspberrypi.stackexchange.com/questions/26216/how-to-generate-smooth-frequency-ramp

This is an example of my code:

import time

import pigpio

def working(longLoop):
    START_DELAY=500
    FINAL_DELAY=155

    GPIO=20
    dirrection = 21

    pi = pigpio.pi()

    pi.set_mode(GPIO, pigpio.OUTPUT)

    pi.wave_clear()

    pi.write(dirrection,1)
    # build initial ramp

    wf=[]

    for delay in range(START_DELAY, FINAL_DELAY, -1):
       wf.append(pigpio.pulse(1<<GPIO, 0,       delay))
       wf.append(pigpio.pulse(0,       1<<GPIO, delay))

    pi.wave_add_generic(wf)

    # add lots of pulses at final rate to give timing lee-way

    wf=[]

    # add after existing pulses

    offset = pi.wave_get_micros()

    print("ramp is {} micros".format(offset))

    wf.append(pigpio.pulse(0, 0, offset))

    for i in range(100):
       wf.append(pigpio.pulse(1<<GPIO, 0,       FINAL_DELAY))
       wf.append(pigpio.pulse(0,       1<<GPIO, FINAL_DELAY))

    pi.wave_add_generic(wf)

    wid1 = pi.wave_create()

    # short waveform to repeat final speed

    wf=[]

    wf.append(pigpio.pulse(1<<GPIO, 0,       FINAL_DELAY))
    wf.append(pigpio.pulse(0,       1<<GPIO, FINAL_DELAY))

    pi.wave_add_generic(wf)

    wid0 = pi.wave_create()

    #ramp down

    wf=[]

    for delay in range(FINAL_DELAY,START_DELAY):
       wf.append(pigpio.pulse(1<<GPIO, 0,       delay))
       wf.append(pigpio.pulse(0,       1<<GPIO, delay))

    pi.wave_add_generic(wf)

    wid2 = pi.wave_create()

    # send ramp, stop when final rate reached

    pi.wave_send_once(wid1)

    time.sleep(float(offset)/1000000.0) # make sure it's a float

    pi.wave_send_repeat(wid0)

    time.sleep(longLoop)

    pi.wave_send_once(wid2)

    pi.wave_tx_stop()

    pi.stop()

working(1)

The problem is, with my code, the stepper motor cannot move around 2000 rpm (my stepper motor moves lower than 2000 rpm). If I set the FINAL_DELAY lower than 155 the stepper motor would be lose the step motion and starts to vibrate. So what's the problem in my code? Thank you!

so this is my switch setup

enter image description here

SW1 = on SW2 = on SW3 = on

\$\endgroup\$
  • \$\begingroup\$ It might not be something wrong with your code! At high speeds, step motors develop an instability and lose synchronism. At some RPM every driver will be unable to maintain the currents that they do at low speeds. That is when the trouble begins..... \$\endgroup\$ – whitegreg56 Oct 16 '18 at 2:59
  • \$\begingroup\$ @whitegreg56 then what should I do to make my stepper motor can move in 3000 RPM \$\endgroup\$ – Jan sebastian Oct 16 '18 at 7:18
  • \$\begingroup\$ What are your switch settings? \$\endgroup\$ – whitegreg56 Oct 17 '18 at 1:41
  • \$\begingroup\$ @whitegreg56 switch current table SW1 = off SW2 = off SW3 = off \$\endgroup\$ – Jan sebastian Oct 19 '18 at 7:31
  • \$\begingroup\$ From your photo, it looks to me like SW1, SW2, SW3 are ON! \$\endgroup\$ – whitegreg56 Oct 19 '18 at 17:29
0
\$\begingroup\$

The factor that controls step motor stability at high speed is the effective resistance seen by the back-EMF looking out of the motor and back into the driver. When the driver is "active" the resistance looking back into it will be large.....and, the motor stable. By selecting the minimum current the driver will stay "active" at higher speeds than if a larger current was selected (you have already selected the minimum current!).

The other thing that MIGHT help is to increase the pulses per revolution to 1600. Then, the driver has a brief time to go "active" as the current crosses near zero. This would not take place if the driver was full stepping....and, then the motor would be unstable.

If this doesn't work, you may have to increase the supply voltage, as noted in the first answer.

\$\endgroup\$
1
\$\begingroup\$

A spinning stepper motor acts as an alternator; a voltage whose magnitude is proportional to RPM (called back-electromotive force or back-EMF) gets induced in the windings. The driver has to output more voltage the faster the motor spins to overcome this back-EMF, or the current will decrease.

Torque is directly proportional to the current, so eventually the motor hits a maximum speed where the generated torque is less than the load torque and sync is lost:

characteristic curve

You may need to further increase the supply voltage to the driver to go faster. The motor is rated for up to 60 V.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.