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.

DRV8834

Other Parts Discussed in Thread: DRV8834, DRV8823, DRV8834EVM

hello forum

basically i had a look at this chipset drv8834 i have few question regarding this

my project is to connect antenna to stepper motor and move clockwise 30 degree and perform some reading

this process keeps repeating in a loop now i have a humming board with standard i2c uart interface and few gpio pins

my questions are  

1) is there any simple c code to drive this controller from the host now in the datasheet i see there is an application which must be installed on the host but this does not work for my project i need simple c code where in i can compile and run the software on my host machine.

2) is there any other controller similar to drv8834 with a standard i2c or a spi or a uart interface so that i can access the drv88XX from the host

3) as i understand drv8834 chipset pins nENBL/AENBL , STEP/BENBL , DIR/BPHASE , CONFIG , M0/APHASE, M1 , nSLEEP must be directly connected to the normal GPIO of host processor am i correct ? 

  • Hi Nick,

    The DRV8823 may work, but the minimum operating voltage range is higher than the DRV8834.

    Many of the input pins can be set to a static value depending on the application. If the stepper is running in one direction, a GPIO is needed for the STEP pin to advance the motor. Each time the STEP pin is pulse, the indexer advances to the next setting. This moves the motor.

    The DIR, nENBL, and nSLEEP pins are available to reduce current when not required.

    A DRV8834EVM is available for evaluation. The c code is available on line in the Hardware:DRV8834EVM file. It was placed in the Hardware Files because the files are part of the PCB package. This code was written to use a GUI, but demonstrates how to control the DRV8834.
  • Thanks Rick Duncan

    now the idea is to move the motor in clockwise/anticlockwise direction from 0 position to 30 degree STOP the motor take some reading start from 30 degree to 60 degree take some reading periodically.
    now my questions are

    1) how many minimum pins of the DRV8823 are required to be connected to the host gpio and which are they i.e
    STEP,DIR,nENBL and M0 are these pins enough to drive the motor. or any more pins required to be connected if so let me know do not worry about Vcc, Gnd pins please only specify the control pins to drive the motor

    2) now the idea is to move the motor in clockwise/anticlockwise direction from 0 position to 30 degree so in this case my static value will be as bellow
    nENBL = 0;
    DIR = 0/1 depending on clockwise or anticlock wise
    M0 =1;
    and then toggle the STEP pin 32 times with a duty cycle of 10% or whatever

    3) i need to stop at 30 degree rotation and take some reading and then progress from 30 degree to 60 degree now my question is how will i stop the motor at 30 degree and then start from 30 degree to 60 degree .
    i am assuming your answer would be to stop toggling the STEP pin am i correct
    if i understand you correctly stepper indexes forward at rising edge of STEP


    Regards
  • Hi Nick,

    Nick King said:
    1) how many minimum pins of the DRV8823 are required to be connected to the host gpio and which are they i.e
    STEP,DIR,nENBL and M0 are these pins enough to drive the motor. or any more pins required to be connected if so let me know do not worry about Vcc, Gnd pins please only specify the control pins to drive the motor

    One, STEP pin is the only one that must be connected to advance the motor. All other inputs will have to be connected to set the configuration (logic high), Adecay (suggest 20kOhm to GND), reference voltage, step mode, nSLEEP (logic high), sense resistors, etc.

    Nick King said:
    2) now the idea is to move the motor in clockwise/anticlockwise direction from 0 position to 30 degree so in this case my static value will be as bellow
    nENBL = 0;
    DIR = 0/1 depending on clockwise or anticlock wise
    M0 =1;
    and then toggle the STEP pin 32 times with a duty cycle of 10% or whatever

    If moving the motor in both clockwise/anticlockwise, the DIR pin must be connected also. So two GPIOs are required.

    Nick King said:
    3) i need to stop at 30 degree rotation and take some reading and then progress from 30 degree to 60 degree now my question is how will i stop the motor at 30 degree and then start from 30 degree to 60 degree .
    i am assuming your answer would be to stop toggling the STEP pin am i correct
    if i understand you correctly stepper indexes forward at rising edge of STEP

    Yes, the stepper moves on the rising edge of STEP. The motor will hold position until the next rising edge is detected. By the way, many steppers are 1.8 degrees per full step. This allows either 28.8 degrees or 30.6 degrees, but not 30.

  • Thanks Rick Duncan

    you cleared almost all doubts
  • hi rick duncan

    i have another question on the same stepper motor 

    lets say i move from 0 degree to 360 now i have a steel metal lock so that my motor cannot can only move 0 to 360 and back from 360 to 0 

    what happens once when i reach 360 and still i try moving ahead of 360 since there is a lock it can't move ahead will i get any interrupt on the nFAULT pin ?

    Regards

    Nick

  • Hi Nick,

    You will not receive an interrupt when the motor movement is blocked.

    Steppers are open loop systems. The DRV8834 assumes the motor has moved to the new position.

    Some systems have end of travel detection. This can be a hall sensor such as the DRV5000 series, or a mechanical switch. Other systems use encoders to check the position of the stepper.