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.

DRV8702-Q1EVM: How can I control the motor driver using Arduino Mega board

Part Number: DRV8702-Q1EVM
Other Parts Discussed in Thread: DRV8702-Q1

I'm thinking getting a few of these boards to control electric motors in the vehicle using Arduino Mega, is it possible to do so? Is there any pin out on the board to control speed and direction?

Thank you.

  • Hi Vuong,

    Yes, the interface is possible. You can find the EVM design files (schematic, BOM, layout) in this link. Changes needed to be done on DRV8702-Q1EVM to allow this interface to work:

    1. You will need to interface the Arduino board to the J4 header through a ribbon cable or a set or wires. You will need to disconnect the EVM's on board MCU from the J4 header by making sure the highlighted resistors in the image below are not populated.
    2. Be aware that the EVM has an on board LDO U4 with input/output caps C19, C20. This LDO creates the 3.3V signal that interfaces directly to the J4 header to potential provide power to an external MCU (like in your case). It also provides power circuitry tied to the DRV8702-Q1 IC. You can remove U4, C19, and C20 to remove the LDO and provide your own 3.3V power for the DRV from the Arduino board or keep those U4, C19, and C20 to keep the Arduino board running on its own digital supply and the DRV running from the U4 IC by not interfacing the J4's 3.3V pin from EVM to Aruino board.
    3. Do not connect the USB to the DRV8702-Q1EVM as it is not required.
    4. Provide power to EVM (for DRV) through connector H9
    5. To control speed/direction, PH/IN1 and EN/IN2 are manipulated. Those two pins are accesible via the J4 header, along with the MODE pinwhich sets the PWM mode for those two pins. See the datasheet for more information on how to manipulate/set these three pins.

  • Thank you Hector, will try out the wiring once the board approved for purchase as we might need a handful of these for our projects.

    The website / user manual for the DRV8702 board doesn't talk much about header pins input and output. Do you have any documents specifically for the header pins?

    The one thing I notice is the DRV8702-Q1EVM use 3.3 volt (I think) for input, however Arduino digital pin output are 5 volts. Can I wire the Arduino digital pins directly to the DRV8702 header pins or should they go through the voltage divider 1st prior to connecting to the DRV8702 header pins?

    Also what VREF_MCU and SO_MCU pins are for? Current and Voltage sense output?

    Thank you for your time.

  • Hi Vuong,

    Answers inline:

    The website / user manual for the DRV8702 board doesn't talk much about header pins input and output. Do you have any documents specifically for the header pins?

    HH -> We do not have a document describing them. Did you find the design files where you can find the schematic PDF to study them? You can also understand the DRV pins better on the datasheet.

    The one thing I notice is the DRV8702-Q1EVM use 3.3 volt (I think) for input, however Arduino digital pin output are 5 volts. Can I wire the Arduino digital pins directly to the DRV8702 header pins or should they go through the voltage divider 1st prior to connecting to the DRV8702 header pins?

    HH -> The digital input pins of this DRV have an abs max of 5.75 V, so you should be fine. Please note that, if you interface the SO to the Arduino, the Arduinos ADC reference voltage should be 5 V as well. Please also take care of the 3.3V LDO on the EVM so all the digital logic and references are tied to 5 V instead of 3.3V

    Also what VREF_MCU and SO_MCU pins are for? Current and Voltage sense output?

    HH -> If SO > VREF, current regulation kicks in. VREF sets the voltage reference for the current regulation comparator. VREF is compared to the sense output (SO) of the current shunt amplifier tied to the external sense resistor (through SP and SN pins). You can learn more about this regulation in the datasheet section 7.3.4 Current Regulation

  • Thank you so much, your answers had been a great help.

    Can't wait until I receive one of these unit to play with for our park brake actuation system.