ZHCSEB6 October 2015 DRV8704
PRODUCTION DATA.
The DRV8704 is a dual-brushed motor controller that uses external N-channel MOSFETs to drive two brushed DC motors.
Motor current can be accurately controlled using adaptive blanking time and various current decay modes, including an auto-mixed decay mode.
A simple PWM interface allows easy interfacing to controller circuits. A SPI serial interface is used to program the device operation. Output current (torque), gate drive settings, and decay mode are all programmable through a SPI serial interface.
Internal shutdown functions are provided for overcurrent protection, short-circuit protection, UVLO, and overtemperature. Fault conditions are indicated by a FAULTn pin, and each fault condition is reported by a dedicated bit through SPI.
The DRV8704 contains two H-bridge motor gate drivers with current-control PWM circuitry.
In direct PWM input mode, the AIN1, AIN2, BIN1, and BIN2 directly control the state of the output drivers. This allows for driving up to two brushed DC motors. Table 1 shows the logic.
| SLEEPn | xIN1 | xIN2 | xOUT1 | xOUT2 | DESCRIPTION |
|---|---|---|---|---|---|
| 0 | X | X | Hi-Z | Hi-Z | Sleep mode; H-bridge disabled Hi-Z |
| 1 | 0 | 0 | Hi-Z | Hi-Z | Coast; H-bridge disabled Hi-Z |
| 1 | 0 | 1 | L | H | Reverse (current xOUT2 → xOUT1) |
| 1 | 1 | 0 | H | L | Forward (current xOUT1 → xOUT2) |
| 1 | 1 | 1 | L | L | Brake; low-side slow decay |
In direct PWM mode, the current control circuitry is still active. The full-scale VREF is set to 2.75 V. The TORQUE register may be used to scale this value, and the ISEN sense amplifier gain may still be set using the ISGAIN bits of the CTRL register.
Figure 8. Motor Driver Block Diagram
The current through the motor windings is regulated by an adjustable fixed-off-time PWM current regulation circuit. When an H-bridge is enabled, current rises through the winding at a rate dependent on the DC voltage and inductance of the winding and the magnitude of the back EMF present. Once the current hits the current chopping threshold, the bridge disables the current for a fixed period of time, which is programmable between 525 ns and 128 µs by writing to the TOFF bits in the OFF register. After the off time expires, the bridge is re-enabled, starting another PWM cycle.
Note that the decay mode is set by DECMOD bits in the DECAY register. Slow, fast, mixed, or auto mixed decay modes are available.
The chopping current is set by a comparator which compares the voltage across a current sense resistor connected to the xISENx pins, multiplied by the gain of the current sense amplifier, with a reference voltage. The current sense amplifier is programmable in the CTRL register.
When driving in PWM mode, the chopping current is calculated as follows:
where
During PWM current chopping, the H-bridge is enabled to drive current through the motor winding until the PWM current chopping threshold is reached. This is shown in the diagram below as case 1. The current flow direction shown indicates positive current flow in the step table below.
Once the chopping current threshold is reached, the H-bridge can operate in two different states, fast decay or slow decay.
In fast decay mode, once the PWM chopping current level has been reached, the H-bridge reverses state to allow winding current to flow in a reverse direction. If the winding current approaches zero, the bridge is disabled to prevent any reverse current flow. Fast decay mode is shown in the diagram below as case 2.
In slow decay mode, winding current is recirculated by enabling both of the low-side FETs in the bridge. This is shown as case 3 in Figure 9.
Figure 9. Decay Mode Current
Figure 10. Decay Mode Comparison
The DRV8704 supports fast decay and slow decay modes. In addition it supports fixed mixed decay and auto mixed decay modes. Decay mode is selected by the DECMOD bits in the DECAY register.
Mixed decay mode begins as fast decay, but after a programmable period of time (set by the TDECAY bits in the DECAY register) switches to slow decay mode for the remainder of the fixed off time.
Auto mixed decay mode samples the current level at the end of the blanking time, and if the current is above the Itrip threshold, immediately changes the H-bridge to fast decay. During fast decay, the (negative) current is monitored, and when it falls below the Itrip threshold (and another blanking time has passed), the bridge is switched to slow decay. Once the fixed off time expires, a new cycle is started.
If the bridge is turned on and at the end of tBLANK the current is below the Itrip threshold, the bridge remains on until the current reaches Itrip. Then slow decay is entered for the fixed off time, and a new cycle begins.
Refer to Figure 11.
The upper waveform shows the behavior if I < Itrip at the end of tBLANK. This is a stable, slow decay mode of operation.
The lower waveform shows what happens when I > Itrip at the end of tBLANK. Note that (at slow motor speeds, where back EMF is not significant), the current increase during the ON phase is the same magnitude as the current decrease in fast decay, since both times are controlled by tBLANK, and the rate of change is the same (full VM is applied to the load inductance in both cases, but in opposite directions). In this case, the current will gradually be driven down until the peak current is just hitting Itrip at the end of the blanking time, after which some cycles will be slow decay, and some will be mixed decay.
Figure 11. Auto Mixed Decay
To accurately detect zero current, an internal offset has been intentionally placed in the zero current detection circuit. If an external filter is placed on the current sense resistor to the xISENN and xISENP pins, symmetry must be maintained. This means that any resistance between the bottom of the RISENSE resistor and xISENN must be matched by the same resistor value (1% tolerance) between the top of the RISENSE resistor and xISENP. Ensure a maximum resistance of 500 Ω. The capacitor value should be chosen such that the RC time constant is between 50 and 60 ns. Any external filtering on these pins is optional and not required for operation.
Figure 12. Optional Filtering for Sense Amplifiers
After the current is enabled in an H-bridge, the voltage on the ISEN pin is ignored for a period of time before enabling the current sense circuitry. This blanking time is adjustable from 500 ns to 5.14 µs, in 20-ns increments, by setting the TBLANK bits in the BLANK register. Note that the blanking time also sets the minimum drive time of the PWM.
The same blanking time is applied to the fast decay period in auto mixed decay mode. The PWM will ignore any transitions on Itrip after entering fast decay mode, until the blanking time has expired.
An internal charge pump circuit and pre-drivers inside the DRV8704 directly drive N-channel MOSFETs, which drive the motor current.
The peak drive current of the pre-drivers is adjustable by setting the bits in the DRIVE register. Peak source currents may be set to 50 mA, 100 mA, 150 mA, or 200 mA. The peak sink current is approximately 2× the peak source current. Adjusting the peak current will change the output slew rate, which also depends on the FET input capacitance and gate charge.
When changing the state of the output, the peak current is applied for a short period of time (tDRIVE), to charge the gate capacitance. After this time, a weak current source is used to keep the gate at the desired state. When selecting the gate drive strength for a given external FET, the selected current must be high enough to fully charge and discharge the gate during the time when driven at full current, or excessive power will be dissipated in the FET.
During high-side turn-on, the low-side gate is pulled low. This prevents the gate-drain capacitance of the low-side FET from inducing turn-on.
The pre-driver circuits include enforcement of a dead time in analog circuitry, which prevents the high-side and low-side FETs from conducting at the same time. Additional dead time is added with digital delays. This delay can be selected by setting the DTIME bits in the CTRL register.
Figure 13. Gate Driver
Figure 14. Gate Driver Source Capability
Figure 15. Gate Driver Sink Capability
IDRIVE and TDRIVE are selected based on the size of external FETs used. These registers need to be configured so that the FET gates are charged completely during TDRIVE. If IDRIVE and TDRIVE are chosen to be too low for a given FET, then the FET may not turn on completely. It is suggested to adjust these values in-system with the required external FETs and motors in order to determine the best possible setting for any application.
Note that TDRIVE will not increase the PWM time or change the PWM chopping frequency.
In a system with capacitor charge Q and desired rise time RT, IDRIVE, and TDRIVE can be initially selected based on:
For best results, select the smallest IDRIVE and TDRIVE that meet the above conditions.
Example:
If the gate charge is 15 nC and the desired rise time is 400 ns, then select
IDRIVEP = 50 mA, IDRIVEN = 100 mA
TDRIVEP = TDRIVEN = 1050 ns
In a typical setup, the DRV8704 can support external FETs over 50 nC each. However, this capacity can be lower or higher based on the device operation. For an accurate calculation of FET driving capacity, use Equation 4.
Example:
If a DTIME is set to 0 (410 ns), TBLANK is set to 0 (1 µs), and TOFF is set to 0 (525 ns), then the DRV8704 will support Q < 11.5 nC FETs. (Please note that this is an absolute worst-case scenario with a PWM frequency about 430 kHz)
If a DTIME is set to 0 (410 ns), TBLANK is set to 0 (1 µs), and TOFF is set to 0x14 (10 µs), then the DRV8704 will support Q < 59 nC FETs (PWM frequency about 85 kHz).
If a DTIME is set to 0 (410 ns), TBLANK is set to 0 (1 µs), and TOFF is set to 0x60 (48 µs), then the DRV8704 will support Q < 249 nC FETs (PWM frequency about 20 kHz).
The DRV8704 is fully protected against undervoltage, overcurrent, and overtemperature events.
Overcurrent is sensed by monitoring the voltage drop across the external FETs. If the voltage across a driven FET exceeds the value programmed by the OCPTH bits in the DRIVE register for more than the time period specified by the OCPDEG bits in the DRIVE register, an OCP event is recognized. During an OCP event, the H-bridge experiencing the OCP event is disabled. In addition, the corresponding xOCP bit in the STATUS register is set, and the FAULTn pin is driven low. The H-bridge (or H-bridges) will remain off, and the xOCP bit will remain set, until it is written to 0, or the device is reset.
If excessive current is detected on the gate drive outputs (which would be indicative of a failed/shorted output FET or PCB fault), the H-bridge experiencing the fault is disabled, the xPDF bit in the STATUS register is set, and the FAULTn pin is driven low. The H-bridge will remain off, and the xPDF bit will remain set until it is written to 0, or the device is reset.
If the die temperature exceeds safe limits, all FETs in the H-bridge will be disabled, the OTS bit in the STATUS register will be set, and the FAULTn pin will be driven low. Once the die temperature has fallen to a safe level operation will automatically resume and the OTS bit will reset. The FAULTn pin will be released after operation has resumed.
If at any time the voltage on the VM pin falls below the undervoltage lockout threshold voltage, all FETs in the H-bridge will be disabled, the UVLO bit in the STATUS register will be set, and the FAULTn pin will be driven low. Operation will resume and the UVLO bit will reset when VM rises above the UVLO threshold. The FAULTn pin will be released after operation has resumed.
The serial data consists of a 16-bit serial write, with a read/write bit, 3 address bits and 12 data bits. The three address bits identify one of the registers defined in the register section above. To complete the read or write transaction, SCS must be set to a logic 0.
To write to a register, data is shifted in after the address as shown in the timing diagram below. The first bit at the beginning of the access must be logic low for a write operation.
Figure 16. Serial Write Operation
Data may be read from the registers through the SDATO pin. During a read operation, only the address is used form the SDATI pin; the data bits following are ignored. The first bit at the beginning of the access must be logic high for a read operation.
The DRV8704 is active unless the nSLEEP pin is brought logic low. In sleep mode the charge pump is disabled, the H-bridge FETs are disabled Hi-Z, and the V5 regulator is disabled. The DRV8704 is brought out of sleep mode automatically if nSLEEP is brought logic high.
If a ‘0’ is written to the ENBL bit, the H-bridge outputs are disabled, but the internal logic will still be active.
| CONDITION | H-BRIDGE | CHARGE PUMP | SPI | V5 | |
|---|---|---|---|---|---|
| Operating | 8 V < VM < 52 V nSLEEP pin = 1 ENBL bit = 1 |
Operating | Operating | Operating | Operating |
| Disabled | 8 V < VM < 52 V nSLEEP pin = 1 ENBL bit = 0 |
Disabled | Operating | Operating | Operating |
| Sleep mode | 8 V < VM < 52 V nSLEEP pin = 0 |
Disabled | Disabled | Disabled | Disabled |
| Fault encountered | Any fault condition met | Disabled | Depends on fault | Depends on fault | Depends on fault |
The DRV8704 uses internal registers to control the operation of the motor. The registers are programmed by a serial SPI communications interface. At power-up or reset, the registers will be pre-loaded with default values as shown in Table 3.
Following is a map of the DRV8704 registers:
| NAME | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ADDRESS HEX | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CTRL | DTIME | ISGAIN | Reserved | ENBL | R/W | 00 | ||||||||
| TORQUE | Reserved | TORQUE | R/W | 01 | ||||||||||
| OFF | Reserved | PWMMODE | TOFF | R/W | 02 | |||||||||
| BLANK | Reserved | TBLANK | R/W | 03 | ||||||||||
| DECAY | Reserved | DECMOD | TDECAY | R/W | 04 | |||||||||
| RESERVED | Reserved | R/W | 05 | |||||||||||
| DRIVE | IDRIVEP | IDRIVEN | TDRIVEP | TDRIVEN | OCPDEG | OCPTH | R/W | 06 | ||||||
| STATUS | Reserved | UVLO | BPDF | APDF | BOCP | AOCP | OTS | R/W | 07 | |||||
Individual register contents are defined in the following sections.
| BIT | NAME | SIZE | R/W | DEFAULT | DESCRIPTION |
|---|---|---|---|---|---|
| 0 | ENBL | 1 | R/W | 1 | 0: Disable motor 1: Enable motor |
| 7-1 | Reserved | 7 | — | — | Reserved |
| 9-8 | ISGAIN | 2 | R/W | 11 | ISENSE amplifier gain set 00: Gain of 5 V/V 01: Gain of 10 V/V 10: Gain of 20 V/V 11: Gain of 40 V/V |
| 11-10 | DTIME | 2 | R/W | 00 | Dead time set 00: 410-ns dead time 01: 460-ns dead time 10: 670-ns dead time 11: 880-ns dead time |
| BIT | NAME | SIZE | R/W | DEFAULT | DESCRIPTION |
|---|---|---|---|---|---|
| 7-0 | TORQUE | 8 | R/W | 0xFFh | Sets full-scale output current for both H-bridges |
| 11-8 | Reserved | 4 | — | — | Reserved |
| BIT | NAME | SIZE | R/W | DEFAULT | DESCRIPTION |
|---|---|---|---|---|---|
| 7-0 | TOFF | 8 | R/W | 0x30h | Sets fixed off time, in increments of 525 ns 0x00h: 525 ns 0xFFh: 133.8 µs |
| 8 | PWMMODE | 1 | R/W | 1 | 0: Do not write ‘0’ to this register 1: PWM control mode |
| 11-9 | Reserved | 3 | — | — | Reserved |
| BIT | NAME | SIZE | R/W | DEFAULT | DESCRIPTION |
|---|---|---|---|---|---|
| 7-0 | TBLANK | 8 | R/W | 0x80h | Sets current trip blanking time, in increments of 21 ns 0x00h: 1.05 µs … 0x32h: 1.05 µs 0x33h: 1.07 µs … 0xFEh: 5.859 µs 0xFFh: 5.880 µs Also sets minimum on-time of PWM |
| 11-8 | Reserved | 4 | — | — | Reserved |
| BIT | NAME | SIZE | R/W | DEFAULT | DESCRIPTION |
|---|---|---|---|---|---|
| 7-0 | TDECAY | 8 | R/W | 0x10h | Sets mixed decay transition time, in increments of 525ns |
| 10-8 | DECMOD | 3 | R/W | 000 | 000: Force slow decay at all times
001: Reserved 010: Force fast decay at all times 011: Use mixed decay at all times 100: Reserved 101: Use auto mixed decay at all times 110 – 111: Reserved |
| 11 | Reserved | 1 | — | — | Reserved |
| BIT | NAME | SIZE | R/W | DEFAULT | DESCRIPTION |
|---|---|---|---|---|---|
| 11-0 | Reserved | 12 | — | — | Reserved |
| BIT | NAME | SIZE | R/W | DEFAULT | DESCRIPTION |
|---|---|---|---|---|---|
| 1-0 | OCPTH | 2 | R/W | 01 | OCP threshold 00: 250 mV 01: 500 mV 10: 750 mV 11: 1000 mV |
| 3-2 | OCPDEG | 2 | R/W | 01 | OCP deglitch time 00: 1.05 µs 01: 2.1 µs 10: 4.2 µs 11: 8.4 µs |
| 5-4 | TDRIVEN | 2 | R/W | 10 | Gate drive sink time 00: 263 ns 01: 525 ns 10: 1.05 µs 11: 2.10 µs |
| 7-6 | TDRIVEP | 2 | R/W | 10 | Gate drive source time 00: 263 ns 01: 525 ns 10: 1.05 µs 11: 2.10 µs |
| 9-8 | IDRIVEN | 2 | R/W | 11 | Gate drive peak sink current 00: 100-mA peak (sink) 01: 200-mA peak (sink) 10: 300-mA peak (sink) 11: 400-mA peak (sink) |
| 11-10 | IDRIVEP | 2 | R/W | 11 | Gate drive peak source current 00: 50-mA peak (source) 01: 100-mA peak (source) 10: 150-mA peak (source) 11: 200-mA peak (source) |
| BIT | NAME | SIZE | R/W | DEFAULT | DESCRIPTION |
|---|---|---|---|---|---|
| 0 | OTS | 1 | R | 0 | 0: Normal operation 1: Device has entered overtemperature shutdown Write a ‘0’ to this bit to clear the fault and resume operation Operation automatically resumes once temperature has fallen to safe levels |
| 1 | AOCP | 1 | R/W | 0 | 0: Normal operation 1: Channel A overcurrent shutdown Write a ‘0’ to this bit to clear the fault and resume operation |
| 2 | BOCP | 1 | R/W | 0 | 0: Normal operation 1: Channel B overcurrent shutdown Write a ‘0’ to this bit to clear the fault and resume operation |
| 3 | APDF | 1 | R/W | 0 | 0: Normal operation 1: Channel A predriver fault Write a ‘0’ to this bit to clear the fault and resume operation |
| 4 | BPDF | 1 | R/W | 0 | 0: Normal operation 1: Channel B predriver fault Write a ‘0’ to this bit to clear the fault and resume operation |
| 5 | UVLO | 1 | R | 0 | 0: Normal operation 1: Undervoltage lockout Write a ‘0’ to this bit to clear the fault and resume operation The UVLO bit cannot be cleared in sleep mode Operation automatically resumes once VM has risen |
| 11-6 | Reserved | 5 | — | — | Reserved |