This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I made DRV8825EVM growl

Other Parts Discussed in Thread: DRV8825, DRV8825EVM

Hello motor drivers forum, I had to write my own trajectory generator (the S-curve) that uses DRV8825 IC.  I programmed the DRV8825EVM from CCS 5.3 using MSP-FET430UF, but ran into the motor "growling" problem.  I wrote a simple program to reproduce the problem with a constant pulse rate (attached in the bottom of the email).

* To play around with the A/BVREF, I set JP2 to use the POT for AVREF, ahd set JP1 to AVREF (BVREF = AVREF).

* If I set the DECAY to slow, the motor starts shaking even when I don't move at all.  It doesn't even seem to matter what I set AVREF to.  Even near 0 V, the motor shakes.

* That said, the motor does move.

* If I change DECAY to fast, the growl is gone, but depending on the AVREF, I still hear a high pitch.  The motor moves OK at about AVREF = 200 mV, but there seems to be only a narrow window where the motor moves.  Too high AVREF will just make the motor vibrate again (although not as badly as when DECAY is slow).

* The problem when DECAY is fast is that the motor has hardly any torque.  I can grab it so lightly with my finger, and the motor starts slipping!  I don't know how to drive the DECAY to mixed, because on DRV8825EVM, DECAY pin is tied to GPIO; it's going to be either high or low, right?

The problem is reproducible with 2 different kinds of steppers, and at VM = 6 V, 9 V, 12 V, 15 V, 18 V.  I read the DRV8825 datasheet over and over, and can't think of any pin I am not driving.  Can someone at TI please tell me what I am doing wrong?

4885.DRV8825EVM_coasting.zip

  • Hi,

    Below are some advise for your further test.

    1. Stepper motor gives the best running and output torque at its rated current. So the first step is to set your current to the motor's rated value (+/-30% fine tuning is enough). It means you should not change A/BVREF too much away from the rated value.

    2. Do you use micro stepping (MS)? in full or half stepping, usually there will be no big difference when change the decay mode. But in higher MS, you should use fast or mixed decay especially in fast running application. SLOW decay may cause big vibration while FAST decay may have some high frequency noise (related to motors) but more smooth running. Mixed decay will play a good work around in between. you can unplug JP3 to let decay pin floating and set to mixed mode.

    3. Stepper can not start at STEP input which has a frequency higher than certain value related to motors. But this is not meant the motor cannot run to that speed, you need to have a gradually increased input frequency as linearly or sinusoidally.

    4. VM should not be 6V. Please follow the ratings of DRV8825 datasheet.

    5. Just in order to identify the root cause clearly, Please makesure all your code and MCU output is correct as you wanted firstly before you doubt about the driver.

    Thanks.

    Wilson

    Motor Application Team

  • Thanks for the suggestions Zuo, I tried the JP3 suggestion.  My original questions was probably not clear, so let me clarify that I am NOT saying there is something wrong with DRV8825 IC--it must be my usage of it, but I cannot figure out what I am doing wrong.  That is why I attached the example.  As of yesterday, I tried all those voltages, full stepping, ustep 8, ustep 32, and saw the same result (either growl with lots of torque, or no/little noise with no torque).  Here is an updated result.

    I just moved JP3 to POT (vs GPIO) position, and got the motor moving with ustep = 32 better than before (see the movie).  It still makes a noise, but maybe that's just how it steppers are (sorry I'm just a SW engineer, not a motor expert).  I attached the updated CCS project here.  Still, I find it strange that there is such a narrow window of ABVREF that will avoid the 2 problems: growl, or not enough torque.

    5618.DRV8825EVM_coasting.zip

    Click here to play this video

  • Hi Henry

    I just flash your code to the EVM and find that you do not have the DAC output control from the MCU to VREFA and VREFB. In this case, you definitely will have problem on driving the motor correctly, because no designed current will flow over the motor coils.

    It is easy to verify this problem on our EVM. You just do not change any of your code. Just by setting the JP1:5-6 and JP2:2-3 to make both VrefA and VrefB controlled by external AVREF POT. Normally, you can tune the POT AVREF to about 0.5~1V and set the current about 0.5~1A for any of your small type stepper. More current will get you more torque but more heat of the motor.

    Also you need to control the decay pin to HIGH or leave it floating for fast decay or mixed decay as you have controlled the mode to 1/32 microstepping.

    I have done this and your code can spin a stepper and shifting the direction all the time normally.

    So all your problems are because of the MCU settings.

    Please have me noted when you fixed your problem. Good luck!

    Thanks.

    Wilson

     

     

  • Thanks for your reply Wilson, I am sorry that I was not clear enough in my original posting.  Can you please read it again, because I am already doing everything you suggest from the time when I posted the original question.  If you think about it, if I didn't have any current through the motor, it would not move at all, right?   But my motor is moving.  In fact, it probably has too much current in it, because it makes growling or whining noise.  If you say your motor ran normally with the SAME jumper setting as what I am already using (again, please read my original post again), then maybe our expectation of normal is different.  Can you please play the movie I attached in my last post in full volume and tell me whether that kind of noise is normal?  If you have a webcam, I'd like to see what you mean by normal.

    For today, I am going to try to drive ABVREF from DAC, just in case I can make the problem go away--although as you say, the pots should do the same thing.

  • Hi Wilson, I converted AVREF to be driven by 12 bit DAC, and changed JP2 to DAC (was on POT).  As expected, absolutely same result as when I was using the POT (would have been strange otherwise).  The modified code is attached in case you want to try it out.  Let me summarize the current behavioral problem:

    * Full step.  DECAY set to TRUE: nothing happens until VREF about 100 mV, then the motor just shakes until it stops shaking and just squeals high pitched sound.  The motor never moves.

    * 1/8 step with DECAY floating: Same thing, except there is a narrow range of VREF around 250 mV that will make the motor move (but with a lot of shaking)

    * 1/32 step with DECAY floating: same thing, but with less shaking

    I think about this problem over and over, and I just don't think this is right.  Can you please show me the right behavior?

    3414.DRV8825EVM_coasting.zip

  • Hi Henry

    Please use square wave instead of the narrow pulse in you code as STEP input. You can try the following mod first.

       if(step_r > step) { //emit a pulse
        //STP_on();
        P4OUT ^= BIT3;  // generate square step signal
        LED_on();
        //_delay_cycles(10);
        LED_off();
        //STP_off();
        ++step;
       }

    Also your DAC is only about 0.4V, please increase to DAC12_0DAT = 0x400; or higher.

    Also you need add acceleration and deceleration to the start and direction change. But I still can run all motors in my hand without problem after the above fix.The STEP signal you feed previously is too narrow as the driver have digital filter on STEP input. 

    Thanks.

  • Thanks for the suggestion Wilson, I think we need to reproduce your setup (or your reproduce mine) because clearly, we are seeing different results.  Plus, your explanation does not agree with the DRV8825 datasheet (slvsa73d.pdf).  Page 7 of the datasheet says the minimum pulse duration, STEP high is 1.9 us, and the STEP low is 1.9 us.  And Table 1 on the same datasheet says (on the STEP row, "Rising edge causes the indexer to move one step.  Internal pulldown."  The change you made above causes every other intended step to be SKIPPED.  Therefore, according to the documentation, you MUST output a square wave of sufficient high and low hold time.  In the attached pictures (please open the zip file), you can see that I meet this condition by inserting different CPU delay duration between STP_on() and STP_off().  It is possible that at some incredibly long pulse width, but that limits the maximum pulses/sec (therefore the maximum motor speed).  When I increase the pulse width to 15 or longer (see the last 2 pictures in the zip file), the growling problem is much improved, there are 3 remaining problems:

    * Motor skips step occasionally.

    * When encountering high load (hold the motor axis with finger), the motor seizes and emits high pitched squeal.  I have to lower the VREF (with the POT) to get it to move again.

    * As before, there is only a narrow window of VREF value where the motor will move but not seize with high pitched squeal.  The window does improve with longer pulse width.  But this is not a behavior that is explained by the datasheet or any documentation I've seen.

    Maybe it's the motor?  I tested with LIN engineering 4218L-01-23RO 2.0A 030807 and Haydon 28F47-2.1-906 C1309.

    Since you say you don't have a problem, can you please send me the picture of your setup, including the motor model number?

    2630.DRV8825 STEP pulse.zip

  • Update: changed my code to use timer interrupts to sample the trajectory, instead of using an infinite loop.  The result is a smoother motion (see attached video).  I still can't get the motor to not vibrate or make any audible noise

    Click here to play this video

  • Hi all, I showed the current full stepping behavior to the in-house stepper expert, and he said there is nothing more that can be done by the IC; it's just the nature of the stepper.  So in summary, the combination of setting the VREF higher and DECAY got the response to a satisfactory level for 32 uStep, which the in-house expert suggested we use.

    Thanks for your support Wilson, and everyone.

  • Glad you were able to get the issue resolved Henry!