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.

DRV8836: There is a problem driving 3.7V hollow cup motor with DRV8836DSSR (12 pin) and we need help urgently

Part Number: DRV8836
Other Parts Discussed in Thread: TMS320F28035

My intention is to use the DRV8836DSSR chip to drive the hollow cup motor, but now there are some problems that I can't solve.

The main control chip I use is TMS320F28035 (56 pin) chip,The hardware schematic diagram of the main control chip and the DRV8836 chip is as follows:

According to the schematic diagram, we can clearly see the connection relationship between the main control chip and DRV8836.

The complete code for CCS to regulate DRV8836 using EPWM1 and EPWM2 is as follows:

The first is the main.c file:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "Config.h"
extern Uint16 RamfuncsLoadSize;
void main(void)
{
InitSysCtrl();
DINT;
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (Uint32)&RamfuncsLoadSize);
LED_Init(); // LED-
InitMotor(); // -
Timer0_init(); // 01ms-
PieCtrlRegs.PIECTRL.bit.ENPIE = 1;
EINT;
ERTM;
while(1)
{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

moto.c file:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "stdio.h"
#include "Moto.h"
uint8_t Turningmodeselection=Noturn;
uint16_t MOTO1_PWM=0;
/*******************************************************************************
* : void InitMotor(void)
* : DRV8836
*******************************************************************************/
void InitMotor(void)
{
EALLOW;
nSLEEPMUX = 0; nSLEEPDIR = 1; //GPIO;
MODEMUX = 0; MODEDIR = 1;
AIN1MUX = 0; AIN1DIR = 1;
AIN2MUX = 0; AIN2DIR = 1;
BIN1MUX = 0; BIN1DIR = 1;
BIN2MUX = 0; BIN2DIR = 1;
EDIS;
nSLEEPLOW(); // DRV8836
MODELOW(); // DRV8836IN/IN
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

moto.h

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef INC_MOTO_H_
#define INC_MOTO_H_
#include "extern_variable.h"
#define PWM_FRE 600000
#define EPWM_TIMER_TBPRD 999
/* */
#define CMPX_MIN 0
#define CMPX_HALF 500
#define CMPX_MAX 999
#define Vertailmotor_PWM 300
extern uint8_t Turningmodeselection;
extern uint16_t MOTO1_PWM;
enum {Noturn = 0,Turnleft,Turnright};
#define nSLEEP GPIO5
#define nSLEEPMUX GpioCtrlRegs.GPAMUX1.bit.nSLEEP
#define nSLEEPDIR GpioCtrlRegs.GPADIR.bit.nSLEEP
#define nSLEEPTOGGLE() GpioDataRegs.GPATOGGLE.bit.nSLEEP = 1
#define nSLEEPON() GpioDataRegs.GPASET.bit.nSLEEP =1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

This code can run normally, I personally think there is no problem with this code, but the motor can not rotate normally, so I don't know where the problem is.

When the code is running normally, I expect the picture to appear is that the hollow cup motor with a rated voltage of 3.7V can rotate normally,

However, the actual situation is that the motor does not rotate at all, and the CCS software interface jumps to a strange interface, as shown in the following figure.

The two wires of the hollow cup motor are correctly connected to the (AOUT1, AOUT2) or (BOUT1, BOUT2) interface, the motor not only does not react, but the software will enter the interface above.

Although the rated voltage of the hollow cup motor is 3.7V, it can be rotated with a voltage of 1.5V connected to the motor.

The power supply voltage I gave DRV8836 was 3.3V for the whole circuit after the 1S lithium battery voltage division, and I did not directly connect the 1S lithium battery to the DRV8836 (VCC and GND).

In my test, I found that under normal operation, when I connect (AOUT1 directly to AOUT2) or (BOUT1 directly to BOUT2), the CCS interface in the above figure will also appear.

I used EPWM2A to connect AIN2 and EPWM2B to connect AIN1, and the duty cycle given was 80%. I correctly observed the waveform with the oscilloscope. According to the expected calculation, the voltage output of the AOUT1 and AOUT2 pins is 3.3V*0.8=2.64V, which is enough to drive the hollow cup motor, but the motor does not move after insertion and the software stops Debug.

I don't know where the problem is, so I would like to ask the following questions :

1. Is there a problem with my code?

2. There is a problem with the hardware circuit (should the 1S lithium battery be directly connected to VCC and GND of 8836?)

3.Why does CCS have an unfamiliar interface like the one above? (I'm using the XDS100V1 emulator)

4.How can I configure the hollow cup motor to run properly?

I am eager to get your help. Thank you!

Very anxious!!!

Very anxious!!!

  • Hi,

    Please allow some time for our experts to get back to you.

    Thanks

  • Hello,

    Thank you and I look forward to hearing from the experts.

    Thanks

  • Hi,

    Regarding the CCS code questions. Please ask the CCS team since I am not an expert in that. However, I can help with the motor and DRV related questions.

    2. There is a problem with the hardware circuit (should the 1S lithium battery be directly connected to VCC and GND of 8836?)

    This should not be an issue. I did noticed that there is no bulk capacitor on the VCC line. Is it somewhere else in the schematic? We recommend at least 10uF bulk and 0.1uF for decoupling. 

    According to the expected calculation, the voltage output of the AOUT1 and AOUT2 pins is 3.3V*0.8=2.64V, which is enough to drive the hollow cup motor, but the motor does not move after insertion and the software stops Debug.

    When the software stops Debug. Do the input signals go LOW?

    Thanks

  • Hi,

    Thank you for your thoughtful reply.

    My CCS code should be fine, because I used the oscilloscope to observe the EPWM waveform conforming to the prefetch.

    After my test hollow cup motor is no problem.

    1.It should be that there is a problem with the use of DRV8836 chip. The data manual of DRV8836 is not detailed. For example, what signals AIN1 and AIN2 should input are not specified in detail.

    Can you provide me with the use case of DRV8836? Contains the C code and hardware schematics used

    2.I refer to the data manual and connect a 10uF capacitor at the VCC of DRV8836. Please see the hardware schematic diagram below.

    3. When the software stops debugging, the following situation will first appear on the CCS interface, and then no signal will be input to AIN1\AIN2 and BIN1\BIN2 of DRV8836. If the DC brushed hollow cup motor is inserted into the XOUT1 and XOUT ports (X=A or B) of the DRV8836, the failure will be triggered.

    4. Guess possible problems: Because the DRV8836 package is small, is it related to my welding?

    5. Guess the possible problem: I configured DRV8836 in the software type, but only did a simple configuration, I do not know whether it is correct.

    Look forward to receiving your reply as soon as possible. If the description is not clear, please ask me.

    Thanks.

  • Hi,

    1.It should be that there is a problem with the use of DRV8836 chip. The data manual of DRV8836 is not detailed. For example, what signals AIN1 and AIN2 should input are not specified in detail.

    For full scale stepping, the inputs should be as shown below (when in PWM mode)

    2.I refer to the data manual and connect a 10uF capacitor at the VCC of DRV8836. Please see the hardware schematic diagram below.

    It is recommended to add a 0.1uF in paralleled with the 10uF.

    3. When the software stops debugging, the following situation will first appear on the CCS interface, and then no signal will be input to AIN1\AIN2 and BIN1\BIN2 of DRV8836. If the DC brushed hollow cup motor is inserted into the XOUT1 and XOUT ports (X=A or B) of the DRV8836, the failure will be triggered.

    Is this a CCS issues or a motor driver issue? Looks like something is causing the CCS program to stop and the inputs having no signal causing the motors to stop. Can you provide a waveform of the input signals?

    4. Guess possible problems: Because the DRV8836 package is small, is it related to my welding?

    Let's first try to understand if there is a fault getting triggered by the DRV8836. 

    Q1: Does this issue occur all of the time or does the motor spin successfully for some time and then stops?

    Q2: Without connecting the motor to the output, do the OUTx signals follow the control logic table from the datasheet? Essentially, are the OUTx voltages as expected based on the provided INx signals?

    Q3: After connecting the motor and attempting to drive it, can you check the motor current with a current probe? Is it going above the OCP limit?

    Q4: Can you provide a waveform showing the OUTx voltages when driving and when the motor stops?

    5. Guess the possible problem: I configured DRV8836 in the software type, but only did a simple configuration, I do not know whether it is correct.

    Can you provide the inputs signals coming from the uC to the DRV8836? I can confirm.

    Thanks

x 出现错误。请重试或与管理员联系。