Tool/software:
你好 ,我正在考虑使用DRV8702-Q1 做一个电机控制器的驱动,请问如何控制电机的方向和速度,
在规格书第Page 24 中介绍PWM控制接口,IN1=1 是否意味着可以输入PWM占空比为100% ?而IN1=0 , 则意味 PWM为0% ? 比如 IN2 端口输入PWM duty 为0%(相当于低电平 0 ),此时 IN1 端口输入PWM (duty 为0%--100% 变化 ),是否意味着电机速度从0 到最高速度 ?
谢谢,
亚历克斯
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.
Tool/software:
你好 ,我正在考虑使用DRV8702-Q1 做一个电机控制器的驱动,请问如何控制电机的方向和速度,
在规格书第Page 24 中介绍PWM控制接口,IN1=1 是否意味着可以输入PWM占空比为100% ?而IN1=0 , 则意味 PWM为0% ? 比如 IN2 端口输入PWM duty 为0%(相当于低电平 0 ),此时 IN1 端口输入PWM (duty 为0%--100% 变化 ),是否意味着电机速度从0 到最高速度 ?
谢谢,
亚历克斯
Hi Alex,
Thanks for your post. While the FAQ states an example the control table in the datasheet will be specific to the device.
How can I control the direction and speed of the motor?
This depends on the MODE setting in this device. If MODE is set HiZ the device will operate in PWM control interface. See below table from the datasheet. I've highlighted the input controls. When both IN1 and IN2 are logic high the motor will not be running and will be in brake / low-side slow decay mode. This is the suggested mode while the motor is not running. In cases where output fully disabled and HiZ is desired both IN1 and IN2 can be logic 0, also known as coast where the motor will be free to spin.
For driving the motor with PWM in a specific direction one of the INx must be logic high and the other must be PWM input, 0 to 100 %, for speed control. The motor tON during the PWM will be when the PWM input is low, in other words the PWM input will be active low.
If the MODE = 0, the device will operate in PH/EN control interface. See below table from the datasheet. The EN input will accept PWM input, 0 to 100 %, for speed control and it will be active high logic in this mode. The PH input will be the direction DIR control. When it is high the motor will run in one direction and when it is low it will run in the opposite direction. In this mode when PWM input is low, the motor will be in brake / low-side slow decay. To render the output HiZ and allow coasting of the motor nSLEEP must be 0, logic low.
Regards, Murugavel