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.

DRV11873EVM - Control RPM at start up

Other Parts Discussed in Thread: DRV11873EVM, DRV11873

Hi there,

I'm try to control a motor using an Android device in conjunction with an IOIO board and the DRV11873EVM. I removed the R5 resistor so I can provide an external PWM signal. However, the motor always starts at high RPM when I supply power to the IOIO as shown in this video:

http://youtu.be/u5Wh8hlrUEU

Will it be possible to use the FG pin to control the speed of the motor at startup? In other words, I need the motor to wait until the Android app has stablished communication with the IOIO board and commands it to spin.

Thanks!

  • Hi Al,

    When you first power the system, what is the voltage on PWM? I am assuming the control signal is either high or not driving. In either condition, the internal pullup resistor on PWM will cause the DRV11873 to run at 100%.

    To control the speed at startup, there are two options.

    1) When powering up, set the GPIO controlling PWM to a logic zero.
    2) Add an external pulldown resistor (10k should do). This will cause the PWM input to be below the Vil threshold.

    The pullup is described in the SPEED CONTROL section of the datasheet, and the value can be calculated in the electrical characteristics section (PWM source current).

     

  • Hi Rick,

    Thanks for commenting on this.

    The SPEED CONTROL sections says, "The DRV11873 can control motor speed through either the PWMIN or VCC pin".

    Does it mean that I don't need to power the EVM via the H1 header and I should only use the PWM and GND test points to control the motor RPM?

  • Hi Al,

    Please allow me to clarify the statement in the SPEED CONTROL section. The DRV11873 is intended to operate in two ways.

    1) Set Vcc to a fixed value and vary PWMIN to control the speed or
    2) Set PWMIN to a logic one and vary Vcc to control the speed

    The first case is the most common, but the second case allows the use of an adjustable regulator to set the speed.

    In both cases you need Vcc and GND to power the device. I hope this clears up the statement.

  • Hey Nick,

    I took the Arduino out of the equation and I'm now just providing power directly to the EVM as shown in the video (see link below).  So, does the EVM always starts the motor at high speed when the R5 resistor has been removed and the only work around is to change the motor parameters to lower the speed via the PWM IN? Or is there another way to control the start speed when the EVM is powered up (e.g. via the FS pin)?

    http://youtu.be/X3ciNRkGNes

    Thanks again!
    -Al

  • Hi Al,

    By default the motor will start at high speed when powered is applied if the PWMIN input is left floating. This is the result of removing R5. Speed is only controlled by the PWMIN input. When held low, the device is placed in a low power state.

    As I mentioned earlier, you can place a 10k resistor to ground on the PWMIN signal. This will prevent the DRV11873 from starting the motor on power up.

    When ready to start the motor, you can send a PWM signal to the PWMIN input  to control the speed, or you can send a logic high to run at full speed.

  • Placing the 10k resistor to ground on the PWMIN signal now prevents from stating the motor on power up. Sorry, I totally overlooked at your original answer.

    Thanks Rick!!!

  • Hi Rick,

    Although placing the 10k resistor prevents the EVM from starting the motor on power up, now I cannot control the speed via the external PWM signal.

    Can you please take a look at this picture and let me know if I didn't place the resistor properly?

    https://lh3.googleusercontent.com/-InYhV1HofYM/UlEYxAjvFSI/AAAAAAAAA5I/Cn6-8q5S22Q/w1093-h820-no/photo.JPG

    This video shows how the motor can be control when the pulldown resistor is not in place, but of course the motor starts on power up. Catch 22.

    http://youtu.be/2TlLxIwMNyA

    Thanks!

    -Al

  • Hi Al,

    By cannot control, I am assuming that the motor will not start.

    The most plausible is that the PWM signal cannot drive the PWMIN signal to a logic high. This could be due to the firmware using an internal pullup instead of the CMOS output driver.

    If you have a scope, please examine the PWMIN signal to confirm that it is transitioning above the Vih level. If this is the case you may be able to increase the pulldown resistor, as long as the Vil is met.

    A second fix is to modify the code to actively drive the PWMIN input when PWM'ing. I believe that standard output should be able to drive the PWMIN signal to a logic high. 

    If the motor is starting, the reason could be a reflection at the PWMIN signal that is causing the PWMIN signal to incorrectly interpret the duty cycle.

    I hope this helps. If it doesn't can you provide more information regarding the device controlling the PWMIN signal. What voltage should it drive the signal? What are the drive currents, Iol and Ioh? What frequency is being driven? Do you have any idea how much capacitance the protoboard is adding?  

  • Hi Rick,

    Let me gather more information on those questions you asked.

    In the meantime, do you seen any problem with the way I setup the pulldown 10K resistor (see below)?

    https://lh3.googleusercontent.com/-InYhV1HofYM/UlEYxAjvFSI/AAAAAAAAA5I/Cn6-8q5S22Q/w1093-h820-no/photo.JPG

    Thanks!

  • Hi Al,

    Sorry I forgot to answer that part of the question. Your connection appears to be correct.

     

  • Hi Rick,

    Correct, the motor was not starting when the 10k resistor is in place.

    However, I think I found the cause.

    The IOIO board should generate a 5V PWM signal when the pin in open-drain mode and I thought it (like the ATmega328 microcontroller on the Arduino) had internal pull-ups that could be enabled and disabled programmatically. Instead, it seems to require a pull up resistor to cause the voltage to toggle between 0V / 5V when used as open-drain. For now, I'm opening the pin in normal mode; which generates a 3.7V PWM signal instead since it works, as shown here:

    http://youtu.be/r3eObW_J3aU

    BTW, will it be possible for the EVM to control that initial jump of the motor when it starts up or do I need to control it programmatically when I set the initial duty cycle in code?

    Thanks again for your assistance and all the suggestions!

  • Hi Al,

    Glad to hear you have identified the cause.

    That initial jump of the motor is due to starting. If the motor were locked in place with the three mounting screws, you would not see it. The jump is also seen if you suddenly stop the motor.

    The post http://e2e.ti.com/support/applications/motor_drivers/f/38/t/274006.aspx describes the startup procedure of the device in more detail.

  • Hey Rick,

    Even if I lock the motor in place with the 3 mounting screws, the speed change is still noticeable. Although it is not locked in this video, you still can see that the speed jumps drastically when it transitions from one direction to the other. Is there way to control the that with the EVM?

    http://youtu.be/Qdiv8eOgXHA

    Thanks, and best regards!

    -Al

  • Hi Al,

    Are you referring to the fact that the motor starts at high speed, and then slows down to the desired speed? The DRV11873 was designed to start at max torque (also speed) then reduce to specified PWM input.

    You should see this speed jump at startup regardless direction changes.

    One possible method of minimizing the speed jump is to lower VCC during startup, then raise VCC after the motor is running. This may not be practical in an application.

  • Hey Rick,

    Yes, that is exactly what I am referring to (the motor starts at high speed and max torque).

    Is there a counterpart TI EVM that doesn't do that?

    What about the FS pin? Will it make any different if I pull it low or high?

    Thanks!

    -Al

  • Hi Al,

    Changing FS may have some effect. You can try it, but don't expect much. One other item to keep in mind is that you are examining the motor with no load. In the final application, the change may not be as great.

    Please see page 7 of the datasheet for more details on the effect of setting FS high or low. There are a few differences, starting with the switching frequency described in the "SPEED CONTROL" section.

    Changing FS, the switching frequency, affects the lock detection time (page 6, Lock Protection), and time required to change FR (page 8, REVERSE SPIN CONTROL FR)

  • Good point regarding "examining the motor with no load".  I agree, adding the load should make a difference so I'm going to test that. Thanks Rick!