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.

[参考译文] DRV8243-Q1:没有提供 DRV8243-Q1输出电压

Guru**** 2454880 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/motor-drivers-group/motor-drivers/f/motor-drivers-forum/1357296/drv8243-q1-drv8243-q1-output-voltage-is-not-coming

器件型号:DRV8243-Q1

我在使用该驱动器 IC DRV8243HQDGQRQ1时遇到问题、我正在使用 IO 扩展器 SX1509控制该驱动器。

这是 IC 的原理图、  
引脚连接是

nSLEEP -> GPIO

DRVOFF -> GND

MODE -> GND (0 Ω)

NFAULT -> GPIO

nFAULT -> GPIO

EN/IN1 -> GPIO (PWM)

EN/IN2 -> GPIO

 

这是我尝试向 nSLEEP 引脚提供脉冲的代码:-

#包含
#包含

//定义 SX1509的引脚编号
const int SX1509_ADDR = 0x3E// SX1509的 I2C 地址
CONST int N_SLEEP_PIN = 15
CONST int EN_PIN = 8// EN/IN1引脚用于 PWM 输入
CONST int PH_PIN = 7// PH/IN2引脚用于方向输入
CONST int N_FAULT_PIN = 9

SX1509 ioExpander;

void setup(){
 //初始化 I2C 通信
 Wire.begin();
 
 //初始化 SX1509
 如果(!ioExpander.begin(SX1509_ADDR){
  serial.println ("未找到 SX1509 !");
  while (1);
 }

 //设置引脚作为输出
 ioExpander pinMode (N_SLEEP_PIN、输出);
 ioExpander pinMode (EN_PIN、ANALOG_OUTPUT);// PWM 的 EN/IN1引脚
 ioExpander pinMode (PH_PIN、输出);// PH/IN2引脚用于方向
 ioExpander pinMode (N_FAULT_PIN、输入);
 
 ioExpander digitalWrite (N_SLEEP_PIN、高电平);//nsleep 到高电平
 延迟(1000);
 ioExpander digitalWrite (N_SLEEP_PIN、低电平);
 delayMicroseconds (30); //添加了一个延迟,以满足唤醒脉冲要求
 ioExpander digitalWrite (N_SLEEP_PIN、HIGH);//设置为高电平

 延迟(1000);



void loop(){
 // 将电机正向旋转2秒,然后停止2秒,再反向旋转2秒
 RotateForward()
 Delay(2000)
 stopMotor ();
 Delay(2000)
 rotateReverse()
 Delay(2000)
 stopMotor ();
 Delay(2000)

void rotateForward(){
 //向前设置方向
 ioExpander digitalWrite (PH_PIN、高电平);
 //为正向旋转设置 PWM
 ioExpander analogWrite (EN_PIN、255);

void rotateReverse(){
 //设置反向
 ioExpander digitalWrite (PH_PIN、LOW);
 //为反向旋转设置 PWM
 ioExpander analogWrite (EN_PIN、255);

void stopMotor(){
 //将 PWM 设置为0以停止电机
 ioExpander analogWrite (EN_PIN、0);

但我无法获得输出电压

我无法找到我失踪的内容,请帮我!!!