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.

BOOSTXL-DRV8323RH: Interfacing PWM Input from Arduino/Raspberry Pi

Part Number: BOOSTXL-DRV8323RH
Other Parts Discussed in Thread: MSP430F5529, , BOOSTXL-DRV8323RS

We currently have the motor drive connected to launch pad board, running software from the launch pad GUI. We are trying to control motor motion with our own PWM source from a Rasp Pi or Arduino - so far we tried connecting our PWM source to the INHA J4 header pin and changing the mode on the GUI to Synchronous 1x PWM Mode. We also tried connecting the Mode pin to 3.3 V. These attempts have been unsuccessful.

Are there any hardware or software adjustments that are missing?

  • Hey Rasa,

    I would recommend starting your evaluation with our EVM before trying to supply any external signals from another micro controller. Concern being if the GUI is not commanding a PWM signal (INHA held low by launchpad) and you supply an external signal to this pin, you run the risk of damaging the launchpad.

    To run the EVM in 1x PWM mode with the Sensored Firmware, populate R36, R37, and R38 with 0 ohm resistors (see note on page 21 of the BOOSTXL-DRV8323Rx EVM Users Guide):

    www.ti.com/.../slvub01a.pdf
  • Hi Phil,

    Thank you for your feedback. Before we attempted external PWM input, we successfully spun the motor using the EVM attached to Launch Pad dev. board and GUI commanding a PWM signal on 6x PWM mode.

    Can you clarify the steps for transitioning to external PWM input? Here are the steps we are aware of: connect the EVM to Launch Pad board, switch to 1x PWM mode on the GUI, populate the R36, R37, R38 pins with 0 ohm resistors (do we solder these resistors to the board ourselves?), connect our PWM supply from Raspberry Pi to the INHA pin, and connect a 2 V source to the Mode pin (as stated in the GUI).

    Thanks,

    Rasa

  • Hey Rasa,

    To supply an external PWM signal, you'll need to isolate the MSP430F5529 pin from the EVM.  IF you do not do this you run the risk of damaging the MSP430 by back-driving this pin while it's being pulled down.  I would advise not trying to supply an external PWM signal while still using the Launchpad connections.

    To run the BOOSTXL-DRV8323RH EVM independently from your Raspberry PI in SENSORED 1x PWM Mode, I would recommend running the following steps:

    1. Remove the BOOSTXL-DRV8323RH EVM from the MSP430F5529 Launchpad
    2. Populate R36, R37, and R38 resistors with 0 Ohms
    3. Connect your Hall Sensor leads from the motor to the J2 Header.  Be sure to observe correct phase connections.
    4. Connect your motor to the J5 header.  Be sure to observe phase connections.
    5. Connect your power supply to J1 Header.  Be sure to observe polarity. 
    6. Leave pin 13 of J4 header floating on the BOOSTXL-DRV8323RH EVM.  This will configure the device for 1x PWM Mode.
    7. Connect a GPIO Pin from the Raspberry PI to the ENABLE Pin (pin 9) of J3 on the BOOSTXL-DRV8323RH EVM.  This pin needs to be Logic-High in order to Enable the DRV8323RH device. 
    8. Connect a GPIO Pin from the Raspberry PI to the INHC pin (pin 9) of J4 on BOOSTXL-DRV8323RH EVM.  This pin controls the direction of the motor.
    9. Connect a GPIO Pin from the Raspberry PI to the INLC pin (pin 11) of J4 on the BOOSTXL-DRV8323RH EVM.  This pin controls the BRAKE functionality and needs to be logic-high in order for the motor to start spinning.
    10. Connect a PWM Source from the Raspberry PI to the INHA pin (pin 1) of J4 on the BOOSTXL-DRV8323RH EVM.  This pin controls the speed of the motor.  
    11. Turn on your power supply.

    To spin the motor, start by bringing the ENABLE pin logic-high, then bring the INLC pin logic-high.  Finally apply your PWM signal to INHA and the motor should start spinning.

  • Thank you very much for the detailed response, this is extremely helpful!
  • I apologize for troubling you again. What are the differences in this process for the BOOSTXL-DRV8323RS (SPI) version?
  • Hi Rasa,

    Not a problem. Differences would be in connecting over the four SPI wires in the BOOSTXL-DRV8323RS to the Raspberry Pi instead of the single MODE pin. The other connections I outlined above are the same.

    Also, I forgot to add in my initial steps, be sure to connect the GROUND of the BOOSTXL-DRV8323RS and the GROUND of the Raspberry Pi together, otherwise you will not be able to communicate between the two PCBs.
  • Great, thank you very much for your help Phil!

  • Hi Phil,

    We successfully spun the motor using PWM input from an Arduino by following your steps. However, we were unable to control direction, assuming that direction could be switched by changing the logic level from low to high. The motor spun in one direction with INHC pin when connected to logic level low and the motor vibrated (did not spin) when connected to logic level high (3.3 V or 5 V).

    Any suggestions?
    Thanks
  • Hey Rasa,

    I would double check that you've correctly connected the hall-sensors in your application. Make sure HALL A / HALL B / HALL C are all correctly connected in relation to the phase connections on the EVM.
  • We verified that the hall sensors and motor phases are connected correctly and in relation to each other. We are still only able to move the motor in one direction (when INHC is logic low)

  • Hi Rasa,

    Could you provide the datasheet for the motor you're trying to spin? 

  • Hi Phil,

    Thanks for all your help with this issue - I am a colleague of Rasa, we have been running the motor as suggested for a while now, but we recently realized we are not getting enough torque using 1x PWM mode with external control. If we go back to the Launchpad and 6x PWM mode on the GUI, it runs very well and produces a lot more torque. There seems to be a commutation problem when controlling via the Raspberry pi. What do you think could be a factor in this issue?