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.

DRV8841: IO pwm inputs

Part Number: DRV8841

Firstly I thank the community especially Mr Rick Duncan for helping me sort the issue out.

The INAx pins can take either 5 or 3.3v inputs right?and PWm should also be appiled on the same pins?right

let me put this in context.....I am giving it a logic 5v Input for full speed(100% duty cycle).....then I adjust PWM to 3.3v for an appropriate output voltage....can be done right?

Now I have migrated to a 3.3v MCU...which gives 3.3v output for logic HIGH....so how do i make sure that the driver doesnt see this as an PWM input and give me a lesser voltage than motor supply.

How can the driver know that the MCU whether the input supplied from the MCU is a LOGIC level or a PWM signal...

I hope i could give you a clear perspective of what my issue is...

Thanking you,

Jash

  • Hi Jash,

    The INAx pins can take either 5 or 3.3v inputs right?and PWm should also be appiled on the same pins?right

    The xINA pins are digital inputs. There is no difference between providing 3.3 or 5V to the inputs.

    The DRV8841 interprets the input as a logic 0 when the input is below 0.7V, and as a logic 1 when the input is above 2.2V. 

    Please refer to Table 1 of the the datasheet.

    let me put this in context.....I am giving it a logic 5v Input for full speed(100% duty cycle).....then I adjust PWM to 3.3v for an appropriate output voltage....can be done right?

    Please see statement above. Changing the input voltage from 5V to 3.3 has no effect on the outputs. The output voltage is changed by adjusting the duty cycle of the input PWM. A rough estimate is to multiply the duty cycle by the VM voltage.

    Now I have migrated to a 3.3v MCU...which gives 3.3v output for logic HIGH....so how do i make sure that the driver doesnt see this as an PWM input and give me a lesser voltage than motor supply.

    How can the driver know that the MCU whether the input supplied from the MCU is a LOGIC level or a PWM signal...


    If you were able to control the motor using a 5V mcu, a 3.3V mcu can also do so. The outputs of the mcu should be almost the same. The only difference is the output voltage on the 5V mcu transitions from 0 to 5V, and the output voltage of the 3.3V mcu transitions from 0 to 3.3V.

  • Hey Rick ...as always grateful for your prompt and precise responses.

    Pls check bridge control section on pg 8 of the data sheet.

    Its last line says that "either inputs(AINx) can be used as PWM to drive the load"

    So this driver IC doesn't have any dedicated PWM pin , correct....if not then let me know on which pin do I need to apply the PWM to control voltage on the output.

    For eg...I am using a 5v AVR to drive this driver....the PWM output pins of the AVR should go to which pin of the driver..

    Many thanks boss!

    Regards,

    Jash

  • Hi Jash,

    The AINx pins are used to control the outputs.

    The PWM output pins of the AVR should be connected to AIN1 and AIN2.

    To drive the motor in one direction, PWM AIN1 and set AIN2 low. The outputs will transition from AOUT1/AOUT2 = L/L to AOUT1/AOUT2=H/L.

    To drive the motor in the opposite direction, set AIN1 low and PWM AIN2. The outputs will transition from AOUT1/AOUT2 = L/L to AOUT1/AOUT2=L/H.

    The duty cycle will set the speed.